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

Add install script for all clients #931

Merged
merged 7 commits into from
Mar 27, 2024
Merged

Add install script for all clients #931

merged 7 commits into from
Mar 27, 2024

Conversation

perlinm
Copy link
Contributor

@perlinm perlinm commented Mar 26, 2024

Lets me (or anyone else) just run ./install.sh rather than manually running pip install -e '.[dev]' in each of the client projects.

@perlinm
Copy link
Contributor Author

perlinm commented Mar 26, 2024

Maybe it should be renamed to something like install-dev.sh (UPDATE: done)

@richrines1
Copy link
Contributor

related: #491

Copy link
Member

@vtomole vtomole left a comment

Choose a reason for hiding this comment

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

Move to dev_tools

install-dev.sh Outdated
@@ -0,0 +1,3 @@
#!/usr/bin/env sh
cd $(dirname $0)
pip install -e $(ls ./*/pyproject.toml | sed 's/\/pyproject.toml/\[dev\]/')
Copy link
Contributor

Choose a reason for hiding this comment

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

two notes:

  1. the -e flag has to be passed before each package you want to be editable
  2. checks-superstaq doesn't have a [dev] option

i think it would be better to just hard-code all the client names to avoid any ambiguity, e.g.:

Suggested change
pip install -e $(ls ./*/pyproject.toml | sed 's/\/pyproject.toml/\[dev\]/')
pip install -e ./checks-superstaq -e ./general-superstaq[dev] -e ./qiskit-superstaq[dev] -e ./cirq-superstaq[dev] -e ./superstaq-benchmarks[dev]

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 gives me an error:

$ ./dev_tools/install.sh
cd ./dev_tools/../
ERROR: ./superstaq-benchmarks[dev] is not a valid editable requirement. It should either be a path to a local project or a VCS URL (beginning with bzr+http, bzr+https, bzr+ssh, bzr+sftp, bzr+ftp, bzr+lp, bzr+file, git+http, git+https, git+ssh, git+git, git+file, hg+file, hg+http, hg+https, hg+ssh, hg+static-http, svn+ssh, svn+http, svn+https, svn+svn, svn+file).

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it should go away with ./superstaq-benchmarks[dev] -> ./supermarq-benchmarks[dev]

Copy link
Contributor Author

@perlinm perlinm Mar 26, 2024

Choose a reason for hiding this comment

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

Oh right haha. Works now.

Copy link
Contributor

Choose a reason for hiding this comment

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

lol my bad

perlinm and others added 3 commits March 26, 2024 16:00
Comment on lines 2 to 3
echo cd $(dirname $0)/../
pip install -e ./checks-superstaq -e ./general-superstaq[dev] -e ./qiskit-superstaq[dev] -e ./cirq-superstaq[dev] -e ./supermarq-benchmarks[dev]
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
echo cd $(dirname $0)/../
pip install -e ./checks-superstaq -e ./general-superstaq[dev] -e ./qiskit-superstaq[dev] -e ./cirq-superstaq[dev] -e ./supermarq-benchmarks[dev]
cd $(dirname $0)/..
pip install -e ./checks-superstaq -e ./general-superstaq[dev] -e ./qiskit-superstaq[dev] -e ./cirq-superstaq[dev] -e ./supermarq-benchmarks[dev]

or

Suggested change
echo cd $(dirname $0)/../
pip install -e ./checks-superstaq -e ./general-superstaq[dev] -e ./qiskit-superstaq[dev] -e ./cirq-superstaq[dev] -e ./supermarq-benchmarks[dev]
cd $(dirname $0)
pip install -e ../checks-superstaq -e ../general-superstaq[dev] -e ../qiskit-superstaq[dev] -e ../cirq-superstaq[dev] -e ../supermarq-benchmarks[dev]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch lol

Co-authored-by: richrines1 <85512171+richrines1@users.noreply.github.com>
@vtomole vtomole dismissed their stale review March 26, 2024 22:33

My requests have been addressed :)

Copy link
Contributor

@richrines1 richrines1 left a comment

Choose a reason for hiding this comment

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

lgtm!

@perlinm perlinm merged commit da2ae64 into main Mar 27, 2024
18 checks passed
@perlinm perlinm deleted the install-script branch March 27, 2024 01:10
@perlinm perlinm mentioned this pull request Mar 28, 2024
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.

None yet

4 participants