-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ddbb88e
commit e77080c
Showing
16 changed files
with
4,973 additions
and
206 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
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 |
---|---|---|
|
@@ -19,20 +19,21 @@ jobs: | |
|
||
- uses: actions/setup-python@v5 | ||
|
||
- name: Cache Python packages | ||
uses: actions/cache@v4 | ||
#------------------------------ | ||
# install & configure poetry | ||
#------------------------------ | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
path: | | ||
~/.cache/pip | ||
key: publish-${{ runner.os }} | ||
|
||
- name: Upgrade pip, wheel, setuptools-scm | ||
run: python -m pip install --upgrade pip wheel setuptools-scm twine | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
installer-parallel: true | ||
|
||
- name: Install poetry dynamic versioning plugin | ||
run: poetry self add "poetry-dynamic-versioning[plugin]" | ||
|
||
- name: Build package | ||
run: | | ||
python3 setup.py bdist_wheel sdist | ||
twine check dist/* | ||
run: poetry build | ||
|
||
- name: Publish to TestPyPI | ||
uses: pypa/[email protected] | ||
|
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 |
---|---|---|
|
@@ -18,17 +18,55 @@ jobs: | |
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
id: setup-python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install specific out-dated version of dependencies | ||
#------------------------------ | ||
# install & configure poetry | ||
#------------------------------ | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
installer-parallel: true | ||
|
||
- name: Enforce usage of specific out-dated versions of dependencies | ||
# Update the package requirements when changing minimum dependency versions | ||
# Please also add a section "Dependency changes" to the release notes | ||
run: pip install pandas==2.0.0 numpy==1.23.0 matplotlib==3.6.0 iam-units==2020.4.21 xlrd==2.0.1 pint==0.13 | ||
# Don't install packages, just update lock file to see if a cache exists | ||
run: | | ||
poetry add [email protected] --lock | ||
poetry add [email protected] --lock | ||
poetry add [email protected] --lock | ||
poetry add [email protected] --lock | ||
poetry add [email protected] --lock | ||
poetry add [email protected] --optional --lock | ||
#------------------------------------ | ||
# load cached venv if cache exists | ||
#------------------------------------ | ||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | ||
|
||
#------------------------------------------------ | ||
# install dependencies if cache does not exist | ||
#------------------------------------------------ | ||
- name: Install dependencies | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
run: poetry install --no-interaction --extras "optional_io_formats optional_plotting tests tutorials" --no-root | ||
|
||
- name: Install other dependencies and package | ||
run: pip install .[tests,optional_plotting,optional_io_formats,tutorials] | ||
#------------------------ | ||
# install root project | ||
#------------------------ | ||
- name: Install library | ||
run: poetry install --no-interaction --extras "optional_io_formats optional_plotting tests tutorials" --only-root | ||
|
||
- name: Test with pytest | ||
run: pytest tests | ||
run: poetry run 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
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.