Skip to content
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

Merged
merged 8 commits into from
Aug 25, 2023
Merged

Modernize the RACK cli packaging #993

merged 8 commits into from
Aug 25, 2023

Conversation

glguy
Copy link
Contributor

@glguy glguy commented Aug 21, 2023

No description provided.

@glguy glguy self-assigned this Aug 21, 2023
@glguy
Copy link
Contributor Author

glguy commented Aug 23, 2023

@kityansiu this should address the messages you were getting about using a deprecated install process. The process is now very modern!

@glguy
Copy link
Contributor Author

glguy commented Aug 23, 2023

@tuxji would you have time to check that I didn't do something silly to the Github CI process?

@kityansiu
Copy link
Contributor

Tried out your branch. Works beautifully for me!

@kityansiu kityansiu requested review from kityansiu and removed request for kityansiu August 24, 2023 14:04
Copy link
Contributor

@tuxji tuxji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Looks good! Just have a few questions to better understand what's going on.

run: pip3 install -q -r cli/dev/requirements.txt
run: |
cd cli
pip3 install ".[dev]"
Copy link
Contributor

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?

Copy link
Contributor Author

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 set dev. Another option was for me to write rack[dev]

pip3 install cli/.
cd RACK/cli
pip3 install .
cd ..
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too bad that you need two cd commands. What makes pip3 install ./cli no longer work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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 pyproject.toml and when I found that the code committed above working, I went with it.

Your question prompted me to try harder and I learned that a trailing / indicates to pip that what I want is for it to install a directory, rather than a package name. I've updated the script to use a single command and saved the extra cd for another day!

cli/README.md Outdated Show resolved Hide resolved
cli/README.md Outdated Show resolved Hide resolved
cli/pyproject.toml Show resolved Hide resolved
@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not pip3 install?

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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 --no-dependencies when I visited this line. I'll make the change.

In case you wondered and didn't consult the failed build logs, the --no-dependencies became necessary because pip was able to tell that the version of python3-semtk that we'd installed was not the GitHub version, as specified in the pyproject.toml but it was the pre-compiled wheel file which self-descripted as version 0.1. This flag disables all the checks. I believe that this is OK because all the checks were done at the point at which we generated the wheels.

@glguy glguy merged commit 8d231ee into master Aug 25, 2023
4 checks passed
@glguy glguy deleted the cli-pyproject branch August 25, 2023 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants