-
Notifications
You must be signed in to change notification settings - Fork 6
patches #388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kkappler
wants to merge
8
commits into
main
Choose a base branch
from
patches
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
patches #388
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
65314c4
do not exit executing notebooks if one fails
kkappler 3742687
use uv for pytest
kkappler c13634f
rm incorrect uv prefix
kkappler 531faa1
try better utilizing uv, (test can move away from conda)
kkappler a5c110f
add some doc
kkappler b36862e
Update python versions for tests
kkappler a6e106e
rename yml to yaml
kkappler ec6da92
Merge branch 'uv' into patches
kkappler File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -13,85 +13,68 @@ jobs: | |
| runs-on: ${{ matrix.os }} | ||
| defaults: | ||
| run: | ||
| shell: bash -l {0} | ||
| shell: bash | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: ["ubuntu-latest"] | ||
| python-version: [3.8, 3.9, "3.10", "3.11"] | ||
| python-version: [3.9, "3.10", "3.11", "3.12"] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Miniconda | ||
| uses: conda-incubator/setup-[email protected] | ||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v3 | ||
| with: | ||
| activate-environment: aurora-test | ||
| python-version: ${{ matrix.python-version }} | ||
| version: "latest" | ||
|
|
||
| - name: Set up Python ${{ matrix.python-version }} | ||
| run: uv python install ${{ matrix.python-version }} | ||
|
|
||
| - name: Install uv and project dependencies | ||
| - name: Create virtual environment and install dependencies | ||
| run: | | ||
| python --version | ||
| echo $CONDA_PREFIX | ||
| pip install uv | ||
| uv pip install -e ".[dev]" | ||
| uv venv --python ${{ matrix.python-version }} | ||
| uv pip install -e ".[dev,test]" | ||
| uv pip install "mt_metadata[obspy] @ git+https://github.com/kujaku11/mt_metadata.git" | ||
| uv pip install git+https://github.com/kujaku11/mth5.git | ||
| conda install -c conda-forge certifi">=2017.4.17" pandoc | ||
| uv pip install jupyter ipykernel pytest pytest-cov codecov | ||
|
|
||
| - name: Install Our Package | ||
| - name: Install system dependencies | ||
| run: | | ||
| echo $CONDA_PREFIX | ||
| uv pip install -e . | ||
| echo "Install complete" | ||
| conda list | ||
| pip freeze | ||
|
|
||
| - name: Install Jupyter and dependencies | ||
| run: | | ||
| pip install jupyter | ||
| pip install ipykernel | ||
| python -m ipykernel install --user --name aurora-test | ||
| # Install any other dependencies you need | ||
| sudo apt-get update | ||
| sudo apt-get install -y pandoc | ||
|
|
||
| - name: Execute Jupyter Notebooks | ||
| run: | | ||
| source .venv/bin/activate | ||
| python -m ipykernel install --user --name aurora-test | ||
| jupyter nbconvert --to notebook --execute docs/examples/dataset_definition.ipynb | ||
| jupyter nbconvert --to notebook --execute docs/examples/operate_aurora.ipynb | ||
| jupyter nbconvert --to notebook --execute docs/tutorials/pkd_units_check.ipynb | ||
| jupyter nbconvert --to notebook --execute docs/tutorials/pole_zero_fitting/lemi_pole_zero_fitting_example.ipynb | ||
| jupyter nbconvert --to notebook --execute docs/tutorials/processing_configuration.ipynb | ||
| jupyter nbconvert --to notebook --execute docs/tutorials/process_cas04_multiple_station.ipynb | ||
| jupyter nbconvert --to notebook --execute docs/tutorials/synthetic_data_processing.ipynb | ||
| # Replace "notebook.ipynb" with your notebook's filename | ||
|
|
||
| # - name: Commit changes (if any) | ||
| # run: | | ||
| # git config --local user.email "[email protected]" | ||
| # git config --local user.name "GitHub Action" | ||
| # git commit -a -m "Execute Jupyter notebook" | ||
| # git push | ||
| # if: ${{ success() }} | ||
|
|
||
|
|
||
| - name: Run Tests | ||
| run: | | ||
| source .venv/bin/activate | ||
| pytest -s -v --cov=./ --cov-report=xml --cov=aurora | ||
| # pytest -s -v tests/synthetic/test_fourier_coefficients.py | ||
| # pytest -s -v tests/config/test_config_creator.py | ||
| pytest -s -v --cov=./ --cov-report=xml --cov=aurora | ||
|
|
||
|
|
||
| - name: "Upload coverage reports to Codecov" | ||
| uses: codecov/codecov-action@v4 | ||
| with: | ||
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
| fail_ci_if_error: false | ||
| flags: tests | ||
| # token: ${{ secrets.CODECOV_TOKEN }} | ||
|
|
||
| - name: Build Doc | ||
| if: ${{ (github.ref == 'refs/heads/main') && (matrix.python-version == '3.8')}} | ||
| run: | | ||
| source .venv/bin/activate | ||
| cd docs | ||
| make html | ||
| cd .. | ||
|
|
||
This file contains hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jcapriot I'd be curious about your thoughts on changing tests.yaml to use
uvinstead ofconda. I've been moving toward usinguvfor all my python projects lately. I don't foreseeauroraincorporating C or other code anytime in the near future. Any SimPEG-related drawbacks to this change that I may be missing?