-
Notifications
You must be signed in to change notification settings - Fork 11
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
DAS-2214: Add the pre-commit file and update readme. #86
Conversation
Mostly to see if github picks this up automatically
There should be no changes since all we have done is reformat all of the code for consistency.
Mostly for awareness: @chris-durbin @ygliuvt @indiejames This just adds auto-formatting via pre-commit hooks to our jupyter notebooks and python modules. But since you also work in here sometimes. I'm pinging you. |
# Uses focal image because newer jammy image does not work with old docker versions | ||
# see related information: https://github.com/adoptium/containers/issues/215#issuecomment-1142046045 | ||
FROM mambaorg/micromamba:1.4.2-focal | ||
FROM mambaorg/micromamba:1.5.8-jammy |
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 updates the base image, but the old version was only because we couldn't update docker on the bamboo agents.
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.
My thought is to at least try to keep PR documented in a changelog.
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.
Thanks for fixing all of this up and adding pre-commit
. I ran all the regression tests locally, and they still pass. I also installed pre-commit
via the new instructions, and it works as it should.
Nice!
Close and reopen to see if I can pickup the pre-commit.ci |
reopening |
Description
Adds pre-commit functionality to the harmony-regression-tests repository
When pre-commit.ci is enabled: this will automatically run our pre-commit hooks for each PR.
Rather than fixing errors, it will simply fail the PR checks.
If a developer installs the pre-commit hooks themselves, they will catch errors
before they are even committed, again no fixes are automatically applied, but
the files are updated to be correct and the user can add the changes to their commit.
Additionally, I have bumped every package version by a patch version in order
to release the changes to the code. There should be no difference in how the
tests function. I have verified this but also included instructions in the
test for you do to the same.
Jira Issue ID
DAS-2214 ostensibly but mostly because I have to do significant ipython notebook writing.
Local Test Steps
Check that the commit in the
.git-blame-ignore-revs
file contains all of the reformatting changes.Pull this branch.
Follow the new instructions in the README under
pre-commit hooks
.To test this, make some minor change to a .py file or an .ipynb file, use git
to add the changes to a commit. You should see the checks all run when you are
trying to use git commit.
To test the all of the code changes / bumped versions.
from the
test
directory make and run all of the tests.For your UAT environment set all of these variables:
export HARMONY_HOST_URL=https://harmony.uat.earthdata.nasa.gov
export AWS_ACCESS_KEY_ID=
export AWS_SECRET_ACCESS_KEY=
export EDL_USER=
export EDL_PASSWORD=
Then make all images with:
> make images
That will take a while and then run them:
Ensure all tests pass
PR Acceptance Checklist