-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modernize the RACK cli packaging #993
Changes from 7 commits
ba71902
8413681
f10f94b
bad024f
862a0ab
5ac3679
35fb0f0
8145ffe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,19 +29,21 @@ jobs: | |
# This path is specific to Ubuntu | ||
path: ~/.cache/pip | ||
# Look to see if there is a cache hit for the corresponding requirements file | ||
key: ${{ runner.os }}-pip-${{ hashFiles('cli/dev/requirements.txt') }} | ||
key: ${{ runner.os }}-pip-${{ hashFiles('cli/pyproject.toml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
${{ runner.os }}- | ||
|
||
- name: Install RACK CLI development dependencies | ||
run: pip3 install -q -r cli/dev/requirements.txt | ||
run: | | ||
cd cli | ||
pip3 install ".[dev]" | ||
|
||
- name: Lint RACK CLI | ||
run: | | ||
cd cli | ||
pylint . | ||
mypy . | ||
pylint rack | ||
mypy rack | ||
|
||
- name: Lint RACK Ontology | ||
run: | | ||
|
@@ -108,9 +110,9 @@ jobs: | |
|
||
- name: Run rack-box tests | ||
run: | | ||
cd RACK | ||
pip3 install -r cli/requirements.txt | ||
pip3 install cli/. | ||
cd RACK/cli | ||
pip3 install . | ||
cd .. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Too bad that you need two cd commands. What makes There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. First I tried what you wrote, and that didn't work. I'm new to using Your question prompted me to try harder and I learned that a trailing |
||
pip3 install -r tests/requirements.txt | ||
python3 -m pytest tests | ||
|
||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
[build-system] | ||
requires = ["setuptools", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "rack" | ||
version = "0.1" | ||
description = "Command-line interface to RACK" | ||
requires-python = ">=3.7" | ||
|
||
dependencies = [ | ||
"ase==3.22.1", | ||
"attrs==23.1.0", | ||
"certifi==2023.7.22", | ||
"chardet==5.1.0", | ||
"colorama==0.4.6", | ||
"idna==3.4", | ||
"importlib-metadata==6.7.0", | ||
"jsonschema==4.17.3", | ||
"pyrsistent==0.19.3", | ||
"python-dateutil==2.8.2", | ||
"PyYAML==6.0", | ||
"requests==2.31.0", | ||
"Pillow==9.4.0", | ||
"plotly==5.15.0", | ||
"semtk-python3 @ git+https://github.com/ge-semtk/semtk-python3@7995623e12e93b9b252200b9bd507949b8c0a430", | ||
"six==1.16.0", | ||
"tabulate==0.9.0", | ||
"urllib3==2.0.3", | ||
"zipp==3.15.0", | ||
] | ||
|
||
optional-dependencies.dev = [ | ||
"mypy==1.0.0", | ||
"pylint==2.16.2", | ||
"pytest-docker==1.0.1", | ||
"pytest==7.2.1", | ||
"typed-ast==1.5.4", | ||
"types-PyYAML==6.0.12.6", | ||
"types-requests==2.28.11.13", | ||
"types-tabulate==0.9.0.0", | ||
] | ||
glguy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
[tool.setuptools] | ||
packages = ["rack"] | ||
|
||
[project.scripts] | ||
rack = "rack.rack_cmd:main" |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -183,5 +183,5 @@ done | |
# Setup the RACK dataset using the RACK CLI | ||
|
||
cd "/home/${USER}/RACK/cli/" | ||
python3 -m pip install ./wheels/*.whl | ||
python3 -m pip install --no-dependencies ./wheels/*.whl | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. only because I wasn't thinking about changing this line of code at all until it failed due to dependency checks. I was singularly focused on In case you wondered and didn't consult the failed build logs, the |
||
./setup-rack.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar with this ".[dev]". What does it mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is (kind of concerning) pip syntax that means to install the package in the current directory
.
using the optional dependency setdev
. Another option was for me to writerack[dev]