Skip to content

Commit

Permalink
Refactor to poetry groups instead of extras (#833)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhuppmann authored Mar 11, 2024
1 parent b59e77c commit 661136c
Show file tree
Hide file tree
Showing 13 changed files with 298 additions and 308 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
# install root project
#------------------------
- name: Install library
run: poetry install --no-interaction --extras "docs optional_plotting tutorials"
run: poetry install --no-interaction --with docs,optional_plotting,tutorials

- name: Build the docs
run: poetry run make --directory=docs html
6 changes: 3 additions & 3 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
# update dependencies to latest versions
#------------------------------------------
- name: Update dependencies
run: poetry update --lock
run: poetry update dev,docs,optional_io_formats,optional_plotting,tutorials,wbdata --lock

#------------------------------------
# load cached venv if cache exists
Expand All @@ -68,13 +68,13 @@ jobs:
#------------------------------------------------
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --extras "docs optional_io_formats optional_plotting tests tutorials" --no-root
run: poetry install --no-interaction --with dev,docs,optional_io_formats,optional_plotting,tutorials,wbdata --no-root

#------------------------
# install root project
#------------------------
- name: Install library
run: poetry install --no-interaction --extras "optional_io_formats optional_plotting tests tutorials" --only-root
run: poetry install --no-interaction --only-root

- name: Test with pytest (including Matplotlib)
run: poetry run pytest tests --mpl
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@ jobs:
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: poetry build

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pytest-legacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ jobs:
#------------------------------------------------
- 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
run: poetry install --no-interaction --with dev,optional_io_formats,optional_plotting,tutorials --no-root

#------------------------
# install root project
#------------------------
- name: Install library
run: poetry install --no-interaction --extras "optional_io_formats optional_plotting tests tutorials" --only-root
run: poetry install --no-interaction --only-root

- name: Test with pytest
run: poetry run pytest tests
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
# install your project
#------------------------
- name: Install library
run: poetry install --no-interaction --extras "optional_io_formats optional_plotting tests tutorials"
run: poetry install --no-interaction --with dev,optional_io_formats,optional_plotting,tutorials,wbdata

# run tests without Matplotlib & CodeCode tests on earlier Python versions
- name: Test with pytest
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ Setup
poetry self add "poetry-dynamic-versioning[plugin]"
# Install dependencies
# (using "--with docs" if docs dependencies should be installed as well)
poetry install --with docs,server,dev
# (using "--with dev,..." if dependencies should be installed as well)
poetry install --with dev,docs,optional_io_formats,optional_plotting,tutorials,wbdata,unfccc
# Activate virtual environment
poetry shell
Update poetry
^^^^^^^^^^^^^
Expand Down
Loading

0 comments on commit 661136c

Please sign in to comment.