-
Notifications
You must be signed in to change notification settings - Fork 90
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
Refactor development guide #874
Conversation
This should: * provide a note that our counda env name has changed * provide some guidance on which style of dev env (or not) to use * provide some guidance on working in an IDE * better explains how to use nox
👈 Launch a binder notebook on this branch for commit bc6399e I will automatically update this comment whenever this PR is modified 👈 Launch a binder notebook on this branch for commit 4f1eb58 👈 Launch a binder notebook on this branch for commit 2612c25 👈 Launch a binder notebook on this branch for commit 01b3fc3 👈 Launch a binder notebook on this branch for commit bb02093 👈 Launch a binder notebook on this branch for commit 15b81c3 👈 Launch a binder notebook on this branch for commit b959a62 👈 Launch a binder notebook on this branch for commit 057c8e1 👈 Launch a binder notebook on this branch for commit ebd739b 👈 Launch a binder notebook on this branch for commit 14c2634 |
docs/contributing/development.md
Outdated
!!! info "Important" | ||
|
||
Currently, our integration tests are *flakey* and a small number of random failures are expected. When the integration | ||
test suite runs, it may retun a status code of 99 if the failure rate was less than an "acceptable" threshold. Since | ||
any non-zero status code is considered an error, your console and/or IDE wll consider this a failure by default. | ||
`nox`, however, knows about this special status code and will report a success. To get pytest or your IDE to match | ||
this behavior, you can modify the special status code to be zero with the `EARTHACCESS_ALLOWABLE_FAILURE_STATUS_CODE` | ||
evnironment variable: |
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.
Some discussion related to this here:
#872 (comment)
Also, I opened a related discussion here about what we install into our development environments by default: |
@jhkennedy I think these changes help a lot. A few suggestions. In your comment above you say
I wonder if we should add a note to the Also, should we add a section between the "Development Environment Setup" and "Running Tests" about development workflow and branching? I don't think we can push to |
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.
Looking great! Sorry it took me two weeks to get to this.
I suggested some nitpicks and pushed a few commits; the whitespace changes were difficult to make work with the suggestion syntax. Now that I think about it I could have probably increased the size of the suggestion code fence from triple backticks to 6x backticks and that would have worked. 🤷
I feel the CSS change is really important for being able to discern the limits of a tabbed block.
Co-authored-by: Matt Fisher <[email protected]>
@andypbarrett I have this in the top level "Development environment setup" section: Do you want it duplicated in the pipx+nox section?
Technically, we are telling users to fork so they can push to main, but it's still better to use a feature branch, so I've added: |
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.
LGTM with nitpick fix :)
Co-authored-by: Matt Fisher <[email protected]>
@chuckwondo also provided the quoted feedback 👇 in slack, which I've responded to:
I think this is all fair criticism. I really dislike telling users what tools they need to use, and if we were to pick one tool, I'd still vote for I think
I've seen this example in nox's cookbook, but I do not like it as it hides too much and is brittle across OSs, especially Windows.
If we're going to pick one, either conda or mamba, I think we should do exactly the opposite -- point users to @andypbarrett @mfisher87 I think I've addressed all your feedback, but do you want to weigh in on anything @chuckwondo brought up? |
I really like Pixi's model for tasks. My reason for preferring to prioritize pip / PyPI for development is because I find it easier to reason about this: flowchart LR
PyPI --> dev
dev --> PyPI
PyPI --> conda-forge
than this: flowchart LR
conda-forge --> dev
dev --> PyPI
PyPI --> conda-forge
Perhaps it would simplify things if we broke the development guide into two pieces:
and
Agree!
Agreed, with one nitpick: mambaforge isn't a thing anymore, mamba is now included with miniforge. Solver aside, I believe mamba still has a download parallelization advantage over conda. That said, conda vs mamba is still confusing to newcomers. It may be worth a note admonition explaining conda and mamba are drop-in compatible with each other, and we are documenting mamba for licensing / community trust reasons. |
Woohoo visualizations! I struggle to put this in to words convincingly, so I'm very glad this helped :)
I think this would be amazing if we can get realtime docs previews working in codespaces.
Thanks, what you have looks great :) I agree on "inviting questions". Maybe if we made "community trust reasons" a link to a blog post about their licensing changes, that would provide context for those that want to learn more. |
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.
I like this, as in not imposing a single workflow to setup a dev environment.
This PR is largely prompted by recent conversations in our hackweeks, #858, and some discussions in the Openscapes slack (e.g., https://openscapes.slack.com/archives/C05TMK269HA/p1730312039229589).
Basically:
This PR should:
I think, overall, this should make things more approachable for contributors, but I suspect this proposal may generate some discussion, so it'd be good to get a few reviewer's eyes on this.
I'm happy to make changes -- this is just a starting point IMO.
Note: I do lean heavily into mkdocs syntax, so you may want to view the preview linked below or checkout this branch and build the docs locally while reviewing this PR.
Pull Request (PR) draft checklist - click to expand
contributing documentation
before getting started.
title such as "Add testing details to the contributor section of the README".
Example PRs: #763
example
closes #1
. SeeGitHub docs - Linking a pull request to an issue.
CHANGELOG.md
with details about your change in a section titled## Unreleased
. If such a section does not exist, please create one. FollowCommon Changelog for your additions.
Example PRs: #763
README.md
with details of changes to theearthaccess interface, if any. Consider new environment variables, function names,
decorators, etc.
Click the "Ready for review" button at the bottom of the "Conversation" tab in GitHub
once these requirements are fulfilled. Don't worry if you see any test failures in
GitHub at this point!
Pull Request (PR) merge checklist - click to expand
Please do your best to complete these requirements! If you need help with any of these
requirements, you can ping the
@nsidc/earthaccess-support
team in a comment and wewill help you out!
Request containing "pre-commit.ci autofix" to automate this.
📚 Documentation preview 📚: https://earthaccess--874.org.readthedocs.build/en/874/