Skip to content

Commit

Permalink
Updates for Poetry 1.2.0
Browse files Browse the repository at this point in the history
Also:
- Export only dev requirements to `lib/galaxy/dependencies/dev-requirements.txt` .
- Packages don't have a `requirements.txt` file.
  • Loading branch information
nsoranzo committed Sep 5, 2022
1 parent 2d14fdf commit 0df5c9a
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ tasks:
python3 -m venv .venv &&
. .venv/bin/activate &&
pip install psycopg2 &&
pip install -r lib/galaxy/dependencies/dev-requirements.txt &&
pip install -r requirements.txt -r lib/galaxy/dependencies/dev-requirements.txt &&
pip install tox &&
gp sync-done setup
command: createdb galaxy
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ docs: ## Generate HTML documentation.
# Run following commands to setup the Python portion of the requirements:
# $ ./scripts/common_startup.sh
# $ . .venv/bin/activate
# $ pip install -r lib/galaxy/dependencies/dev-requirements.txt
# $ pip install -r requirements.txt -r lib/galaxy/dependencies/dev-requirements.txt
$(IN_VENV) $(MAKE) -C doc clean
$(IN_VENV) $(MAKE) -C doc html

Expand Down
2 changes: 1 addition & 1 deletion doc/source/admin/framework_dependencies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ to step 3 in the process below.

2. Submit a pull request to `Starforge Recipes`_.

3. Add the new dependency to the `[tool.poetry.dependencies]` (or to `[tool.poetry.dev-dependencies]` if only needed for Galaxy development) section of `pyproject.toml` .
3. Add the new dependency to the `[tool.poetry.dependencies]` (or to `[tool.poetry.group.dev.dependencies]` if only needed for Galaxy development) section of `pyproject.toml` .
4. Run `make update-dependencies` to update the requirements file in `lib/galaxy/dependencies`_.
5. Submit a pull request to Galaxy with your changes.

Expand Down
3 changes: 2 additions & 1 deletion lib/galaxy/dependencies/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ fi

# Install the latest version of poetry into the user account
curl -sSL https://install.python-poetry.org | python3 -
poetry self add poetry-plugin-export

# Run poetry (this may update pyproject.toml and poetry.lock).
if [ -z "$add" ]; then
Expand All @@ -43,4 +44,4 @@ fi

# Update pinned requirements.
poetry export -f requirements.txt --without-hashes --output "$this_directory/pinned-requirements.txt"
poetry export --dev -f requirements.txt --without-hashes --output "$this_directory/dev-requirements.txt"
poetry export --only dev -f requirements.txt --without-hashes --output "$this_directory/dev-requirements.txt"
2 changes: 1 addition & 1 deletion packages/package.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ clean-tests:

setup-venv:
if [ ! -d $(VENV) ]; then virtualenv $(VENV); exit; fi;
$(IN_VENV) pip install -r requirements.txt && pip install -r dev-requirements.txt
$(IN_VENV) pip install -r dev-requirements.txt

test:
$(IN_VENV) pytest $(TESTS)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ WebOb = "*"
Whoosh = "*"
zipstream-new = "*"

[tool.poetry.dev-dependencies]
[tool.poetry.group.dev.dependencies]
ase = ">=3.18.1"
black = "^22.1.0"
cwltest = "2.2.20210901154959"
Expand Down
2 changes: 1 addition & 1 deletion scripts/common_startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ fi

requirement_args="-r requirements.txt"
if [ $DEV_WHEELS -eq 1 ]; then
requirement_args="-r ${GALAXY_DEV_REQUIREMENTS}"
requirement_args="$requirement_args -r ${GALAXY_DEV_REQUIREMENTS}"
fi

[ "$CI" = 'true' ] && export PIP_PROGRESS_BAR=off
Expand Down

0 comments on commit 0df5c9a

Please sign in to comment.