-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into update_Rmax2
- Loading branch information
Showing
102 changed files
with
522,562 additions
and
1,219 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[bumpversion] | ||
current_version = 3.1.2 | ||
current_version = 3.3.1 | ||
commit = False | ||
tag = False | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,86 +20,92 @@ jobs: | |
ENV_NAME: tests | ||
PYTHON: ${{ matrix.python-version }} | ||
OS: ${{ matrix.os }} | ||
CC: gcc | ||
name: Testing | ||
# needs: [linter] | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
python-version: [3.6, 3.7, 3.8] | ||
python-version: [3.7, 3.8, 3.9, "3.10"] | ||
defaults: | ||
run: | ||
# Adding -l {0} ensures conda can be found properly in each step | ||
shell: bash -l {0} | ||
steps: | ||
- uses: actions/checkout@master | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
fetch-depth: 0 | ||
- name: Get Miniconda MacOSX | ||
if: matrix.os == 'macos-latest' | ||
run: | | ||
wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O $HOME/miniconda.sh; | ||
bash $HOME/miniconda.sh -b -p $HOME/miniconda | ||
- name: Get Miniconda Linux | ||
if: matrix.os == 'ubuntu-latest' | ||
run: | | ||
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O $HOME/miniconda.sh; | ||
bash $HOME/miniconda.sh -b -p $HOME/miniconda | ||
- name: Logging | ||
|
||
- name: Print head git commit message | ||
id: get_head_commit_message | ||
run: echo "commit_message=$(git show -s --format=%s)" >> "$GITHUB_ENV" | ||
|
||
- name: Setup Miniconda | ||
uses: conda-incubator/[email protected] | ||
with: | ||
# auto-update-conda: true | ||
miniconda-version: "latest" | ||
python-version: ${{ matrix.python-version }} | ||
environment-file: ci/${{ matrix.os }}-env.yml | ||
activate-environment: tests | ||
channel-priority: strict | ||
use-only-tar-bz2: true | ||
|
||
- name: Conda Info | ||
run: | | ||
echo ${{ github.event.commits }} | ||
echo ${{ github.event.commits[0] }} | ||
conda info -a | ||
conda list | ||
conda config --show-sources | ||
conda config --show | ||
printenv | sort | ||
- name: Make it a Debug Run | ||
if: "contains(github.event.payload.commits[0].message, 'ci debug')" | ||
if: "contains(env.commit_message, 'ci debug')" | ||
run: | | ||
echo "log_level=ULTRA_DEBUG" >> $GITHUB_ENV | ||
echo "extra_pytest_args='-s -k test_perturb_field_data --log-level-21=DEBUG'" >> $GITHUB_ENV | ||
- name: 'Log Commit Message' | ||
run: echo ${{ github.event.commits[0].message }} | ||
echo "extra_pytest_args=-s -k "test_power_spectra_lightcone[mdz_tsfluct_nthreads]" --log-level-21=DEBUG" >> $GITHUB_ENV | ||
- name: Make it a Normal Run | ||
if: "!contains(github.event.commits[0].message, 'ci debug')" | ||
if: "!contains(env.commit_message, 'ci debug')" | ||
run: | | ||
echo "log_level=INFO" >> $GITHUB_ENV | ||
echo "extra_pytest_args=" >> $GITHUB_ENV | ||
- name: Setup Environment | ||
run: | | ||
export PATH="$HOME/miniconda/bin:$PATH" | ||
./ci/install_conda.sh | ||
- name: Install Dependencies | ||
run: | | ||
export PATH="$HOME/miniconda/bin:$PATH" | ||
source activate ${ENV_NAME} | ||
conda env update -f ci/test-env.yml | ||
- name: Get C Libraries Linux | ||
if: matrix.os == 'ubuntu-latest' | ||
run: | | ||
sudo apt-get install libfftw3-dev | ||
sudo apt-get install libgsl0-dev | ||
- name: Get C Libraries MacOSX | ||
if: matrix.os == 'macos-latest' | ||
run: | | ||
export PATH="$HOME/miniconda/bin:$PATH" | ||
source activate $ENV_NAME | ||
conda install gsl | ||
conda install -c conda-forge fftw | ||
conda install -c conda-forge/label/cf201901 gcc | ||
- name: Install 21cmFAST Linux | ||
if: matrix.os == 'ubuntu-latest' | ||
run: | | ||
export PATH="$HOME/miniconda/bin:$PATH" | ||
source activate $ENV_NAME | ||
LOG_LEVEL=${{ env.log_level }} pip install . | ||
- name: Install 21cmFAST MacOS | ||
if: matrix.os == 'macos-latest' | ||
run: | | ||
export PATH="$HOME/miniconda/bin:$PATH" | ||
source activate $ENV_NAME | ||
LOG_LEVEL=${{ env.log_level }} CFLAGS="-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk" pip install . | ||
- name: Run Tests | ||
run: | | ||
export PATH="$HOME/miniconda/bin:$PATH" | ||
source activate $ENV_NAME | ||
python -m pytest -l --cov=py21cmfast --cov-config=.coveragerc -vv --cov-report xml:./coverage.xml --durations=25 ${{ env.extra_pytest_args }} | ||
- uses: codecov/[email protected] | ||
python -m pytest -n 2 -l ${{ env.extra_pytest_args }} --cov=py21cmfast --cov-config=.coveragerc -vv --cov-report xml:./coverage.xml --durations=25 --plots=testplots | ||
- name: Archive Integration Test Plots | ||
if: always() && contains(env.commit_message, 'ci debug') | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: integration-test-plots-${{ matrix.os }}-${{ matrix.python-version }} | ||
path: | | ||
testplots/*.pdf | ||
- uses: codecov/codecov-action@v3 | ||
if: matrix.os == 'ubuntu-latest' && success() && !contains(github.event.pull_request.labels.*.name, 'auto-pr') | ||
with: | ||
file: ./coverage.xml # optional | ||
fail_ci_if_error: true | ||
verbose: true | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
# CC=$HOME/miniconda/envs/$ENV_NAME/bin/gcc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,3 +52,5 @@ c2r* | |
r2c* | ||
plots/ | ||
.vscode/ | ||
src/21cmfast/_version.py | ||
src/py21cmfast/_version.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.