Skip to content

Commit

Permalink
Merge pull request galaxyproject#16639 from nsoranzo/dependencies_wf_…
Browse files Browse the repository at this point in the history
…py3.8

Fix dependency update GitHub workflow
  • Loading branch information
mvdbeek authored Sep 3, 2023
2 parents 3faab51 + 20022b8 commit 9877fed
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 29 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8'] # poetry requires Python >=3.8
python-version: ['3.7']
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip dir
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }}
# poetry requires Python >=3.8, but lint requirements currently need
# to be generated with `pip freeze`` on the oldest Python version
# supported by Galaxy.
python-version: |
${{ matrix.python-version }}
3.8
- name: Update dependencies
run: |
python -m venv .venv
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ release-bootstrap-history: ## bootstrap history for a new release
update-lint-requirements:
./lib/galaxy/dependencies/update_lint_requirements.sh

update-dependencies: update-lint-requirements ## update pinned and dev dependencies
update-dependencies: update-lint-requirements ## update pinned, dev and typecheck dependencies
$(IN_VENV) ./lib/galaxy/dependencies/update.sh

$(CWL_TARGETS):
Expand Down
14 changes: 0 additions & 14 deletions lib/galaxy/dependencies/typecheck-requirements.txt

This file was deleted.

1 change: 1 addition & 0 deletions lib/galaxy/dependencies/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ PINNED_REQUIREMENTS_FILE=$this_directory/pinned-requirements.txt
PINNED_DEV_REQUIREMENTS_FILE=$this_directory/dev-requirements.txt
poetry export -f requirements.txt --without-hashes --output "$PINNED_REQUIREMENTS_FILE"
poetry export --only dev -f requirements.txt --without-hashes --output "$PINNED_DEV_REQUIREMENTS_FILE"
poetry export --only typecheck -f requirements.txt --without-hashes --output "$this_directory/pinned-typecheck-requirements.txt"

# Fix requirements

Expand Down
11 changes: 4 additions & 7 deletions lib/galaxy/dependencies/update_lint_requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

set -e

# This script updates the pinned requirements for both linting and typechecking.
# The requirements are split into two parts due to incompatible dependencies:
# flake8 requires importlib-metadata 4.2; typecheck requirements do not
# depende on importlib-metadata; however, they must be installed into the same
# virtual environment as Galaxy's core dependencies, which depend on
# importlib-metadata 4.13.
# This script updates the pinned requirements for linting.
# The lint requirements are split from the the other ones due to incompatible
# dependencies: flake8 requires importlib-metadata 4.2, while the Galaxy's core
# dependencies depend on importlib-metadata 4.13.

THIS_DIRECTORY="$(cd "$(dirname "$0")" > /dev/null && pwd)"

Expand All @@ -23,4 +21,3 @@ update_pinned_reqs() {
}

update_pinned_reqs lint
update_pinned_reqs typecheck
21 changes: 21 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,14 @@ homepage = "https://galaxyproject.org/"
repository = "https://github.com/galaxyproject/galaxy/"
documentation = "https://docs.galaxyproject.org/"

[[tool.poetry.source]]
name = "PyPI"
priority = "default"

[[tool.poetry.source]]
name = "galaxyproject"
url = "https://wheels.galaxyproject.org/simple"
priority = "primary"

[tool.poetry.dependencies]
a2wsgi = "*"
Expand Down Expand Up @@ -152,6 +157,22 @@ tuspy = "*"
twill = "*"
watchdog = "*"

[tool.poetry.group.typecheck.dependencies]
mypy = "*"
pydantic = "<2" # for pydantic.mypy plugin
types-bleach = "*"
types-boto = "*"
types-contextvars = "*"
types-dataclasses = "*"
types-docutils = "*"
types-Markdown = "*"
types-paramiko = "*"
types-pkg-resources = "*"
types-python-dateutil = "*"
types-PyYAML = "*"
types-requests = "*"
types-six = "*"

[tool.ruff]
select = ["E", "F", "B", "UP"]
target-version = "py37"
Expand Down

0 comments on commit 9877fed

Please sign in to comment.