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

Ausbeth upgrade #3

Merged
merged 106 commits into from
Sep 26, 2024
Merged

Ausbeth upgrade #3

merged 106 commits into from
Sep 26, 2024

Conversation

Ausbeth
Copy link
Collaborator

@Ausbeth Ausbeth commented Sep 3, 2024

About shpc upgrade software

If software is not installed yet: ask user to "install" it (achieved)
Else, follow this logic: (achieved)

For each version already installed:
If version == latest:
currently just skip, in the future check the checksum of the container
Else:
ask the user about uninstalling it
If latest version was not installed yet:
install the latest

Also needs:

--all option to do the above for all software (achieved)
--dry-run option to show which versions would be uninstalled and installed (achieved as "--preview")

Note - The following are considered to be invalid syntax:

  shpc upgrade software:version
  shpc upgrade software --all
  shpc upgrade software --preview
  shpc upgrade software --all --preview
  shpc upgrade --all --preview      

@gq1
Copy link
Member

gq1 commented Sep 25, 2024

$ shpc upgrade
Incomplete command.
For upgrade help description, please use shpc upgrade --help or shpc upgrade -h.

Can you do similar things like shpc install to give the usage and error message?

$ shpc install
usage: shpc install [-h] [--keep-path] [--no-view] [--force] [--module-sys {lmod,tcl}]
                    [--container-tech {singularity,podman,docker}]
                    install_recipe [container_image]
shpc install: error: the following arguments are required: install_recipe

When the installed list is empty, still no usage being printed and with a different error message, can you make it consistent?

$ shpc upgrade
Cannot perform shpc upgrade because you currently do not have any software installed.

Copy link
Member

@muffato muffato left a comment

Choose a reason for hiding this comment

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

Hi @Ausbeth . I think that's almost the end for me ! Everything's getting there

shpc/main/client.py Outdated Show resolved Hide resolved
shpc/client/upgrade.py Outdated Show resolved Hide resolved
shpc/client/upgrade.py Outdated Show resolved Hide resolved
shpc/client/upgrade.py Show resolved Hide resolved
@Ausbeth
Copy link
Collaborator Author

Ausbeth commented Sep 26, 2024

Hi @Ausbeth . I think that's almost the end for me ! Everything's getting there

Hi @muffato , thanks a lot for your review and contributions! I have committed the changes you suggested.

Copy link
Member

@muffato muffato left a comment

Choose a reason for hiding this comment

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

All good for me 👏🏼
(please wait for @gq1's approval before merging)

@gq1
Copy link
Member

gq1 commented Sep 26, 2024

If you have conda installed, you can follow these steps to fix the format problem in your local:

source activate black
pip install -r .github/dev-requirements.txt
pre-commit run --all-files

If not, all the fixes and errors reported here:
https://github.com/sanger-tol/singularity-hpc/actions/runs/11050810144/job/30699369537

@gq1
Copy link
Member

gq1 commented Sep 26, 2024

@Ausbeth
Copy link
Collaborator Author

Ausbeth commented Sep 26, 2024

More format to fix: https://github.com/sanger-tol/singularity-hpc/actions/runs/11053323799/job/30707425335?pr=3

Hi @gq1 , upon fixing this issue, the following files were modified by black:
image
and pyproject.toml had to be modified by me to make black work

@Ausbeth
Copy link
Collaborator Author

Ausbeth commented Sep 26, 2024

Hmmm, its still failing on the GitHub repo but working locally
image

@gq1
Copy link
Member

gq1 commented Sep 26, 2024

Make sure the all Github CI jobs pass.

Copy link
Member

@gq1 gq1 left a comment

Choose a reason for hiding this comment

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

Can you squash merge? And then make a PR to the upstream.

@Ausbeth Ausbeth merged commit a35e2bd into sanger-tol-upgrade Sep 26, 2024
11 checks passed
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.

Command-line interface for all installation-related commands
3 participants