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 parameter to choose optimade-python-tools version, branch, tag or commit #4

Conversation

CasperWA
Copy link
Member

Close #1

This adds the validator version parameter.
It is required and defaults to 'latest'.

It accepts anything pip can handle to install from git (see here) in terms of branches, tags, and commits.
If a version is chosen, e.g., '0.6.0' it will install this version from PyPI.
Finally, if 'latest' is chosen (the default), it will install the latest version from PyPI.

@CasperWA CasperWA force-pushed the close_1_choose_version_of_optimade-python-tools branch 3 times, most recently from c74cd54 to acf2b61 Compare March 12, 2020 14:32
@CasperWA CasperWA force-pushed the close_1_choose_version_of_optimade-python-tools branch 3 times, most recently from e9b15ee to e5e3f0f Compare March 12, 2020 16:35
ml-evs
ml-evs previously approved these changes Mar 12, 2020
Copy link
Member

@ml-evs ml-evs left a comment

Choose a reason for hiding this comment

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

This looks nice @CasperWA, and addresses my concerns in the Materials-Consortia/optimade-python-tools#223. What's going on with the action tests though? I can't load the status at the moment

# Retrieve and add GitHub Actions host runner IP to known hosts
DOCKER_HOST_IP=$(cat /docker_host_ip)
echo ${DOCKER_HOST_IP} gh_actions_host >> /etc/hosts

run_validator="optimade_validator"
run_validator="optimade_validator --verbosity 2"
Copy link
Member

Choose a reason for hiding this comment

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

Don't forget about that handy OPTIMADE_VERBOSITY env var!

Copy link
Member Author

Choose a reason for hiding this comment

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

Hehehe, for sure - but I want to make it editable (see #7)

@ml-evs ml-evs self-requested a review March 12, 2020 17:05
Can be either:
- 'latest': Will install the latest PyPI released version
- PyPI released version (e.g., 'v0.6.0' or '0.6.0')
- optimade-python-tools branch, tag or commit (anything that is
accepted
by pip to install as reference)

And will be tested for in that order as well.

Update README with new parameter.

Enforce --no-cache for installing optimade.

Use tarball directly from GitHub.
The tests of the entrypoint.sh is based on BATS
(https://github.com/bats-core/bats-core).
It runs the tests in a docker container based on the bats/bats public
docker image.

Also, added the constraint that `vMAJOR.MINOR.PATCH` and
`MAJOR.MINOR.PATCH` are the same, in terms of installing from PyPI.

Add README section about running tests.

New helpful sh script for running the tests.
Use sh script to run tests in CI.
Note: The possibility to adjust verbosity should be added to the action
@CasperWA CasperWA force-pushed the close_1_choose_version_of_optimade-python-tools branch from 876d18c to 3fb365d Compare March 12, 2020 17:26
@CasperWA CasperWA requested a review from shyamd March 12, 2020 17:27
Copy link

@shyamd shyamd left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@CasperWA CasperWA merged commit 3fb365d into Materials-Consortia:master Mar 12, 2020
@CasperWA CasperWA deleted the close_1_choose_version_of_optimade-python-tools branch March 12, 2020 17:30
@CasperWA CasperWA mentioned this pull request Mar 13, 2020
12 tasks
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.

Add ability to choose the validator version
3 participants