-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated install to pyproject.toml (#324)
* updated to pyproject.toml * updated main.yaml to use micromamba from docker image * pr sched * ci * remove concurrency * pre-commit update * Update .github/workflows/main.yaml Co-authored-by: Max Jones <[email protected]> * Update .github/workflows/main.yaml Co-authored-by: Max Jones <[email protected]> * Update cmip6_downscaling/_version.py Co-authored-by: Max Jones <[email protected]> * Update pyproject.toml Co-authored-by: Max Jones <[email protected]> * Update pyproject.toml Co-authored-by: Max Jones <[email protected]> * Update pyproject.toml Co-authored-by: Max Jones <[email protected]> * Update .github/workflows/main.yaml Co-authored-by: Max Jones <[email protected]> * pre-commit modified files * added xesmf to pyproj * esmf * updated pytest dir * removed esmf --------- Co-authored-by: Max Jones <[email protected]>
- Loading branch information
1 parent
9693dd4
commit 0d8508c
Showing
18 changed files
with
197 additions
and
147 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,30 +1,56 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
branches: ['main'] | ||
pull_request: | ||
branches: ['main'] | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 0 * * 0' # Weekly “At 00:00” | ||
|
||
# concurrency: | ||
# group: ${{ github.workflow }}-${{ github.ref }} | ||
# cancel-in-progress: true | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
# Note: This CI used to run off of the image: | ||
# carbonplan/cmip6-downscaling-single-user:2022.06.19 | ||
|
||
jobs: | ||
test: | ||
name: build-and-test | ||
name: ${{ matrix.python-version }}-build | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ['3.9', '3.10'] #TODO: add 3.11 once sparse/numba support it | ||
timeout-minutes: 20 | ||
container: | ||
image: carbonplan/cmip6-downscaling-single-user:2022.06.19 | ||
options: --user root | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Micromamba | ||
uses: mamba-org/[email protected] | ||
with: | ||
environment-name: cmip6-downscaling | ||
condarc: | | ||
channels: | ||
- conda-forge | ||
- nodefaults | ||
cache-downloads: false | ||
cache-environment: true | ||
create-args: >- | ||
python=${{ matrix.python-version }} | ||
- name: Install package | ||
run: | | ||
python -m pip install -e .[dev] | ||
- name: Conda list information | ||
run: | | ||
git config --global --add safe.directory /__w/cmip6-downscaling/cmip6-downscaling | ||
python -m pip install -e . | ||
python -m pip list | ||
- name: Running Tests | ||
conda env list | ||
conda list | ||
- name: Run tests | ||
run: | | ||
python -m pytest --verbose | ||
python -m pytest tests |
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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
from importlib.metadata import PackageNotFoundError, version | ||
from importlib.metadata import PackageNotFoundError as _PackageNotFoundError | ||
from importlib.metadata import version as _version | ||
|
||
try: | ||
__version__ = version("cmip6-downscaling") | ||
except PackageNotFoundError: | ||
__version__ = _version('cmip6_downscaling') | ||
except _PackageNotFoundError: | ||
# package is not installed | ||
__version__ = 'unknown' | ||
__version__ = "unknown" |
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
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
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
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
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
Oops, something went wrong.