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

Refactor development guide #874

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Refactor development guide #874

wants to merge 3 commits into from

Conversation

jhkennedy
Copy link
Collaborator

@jhkennedy jhkennedy commented Nov 7, 2024

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:

  • it wasn't clear in our dev guide why you might choose a conda environment, a venv environment, or just use pipx to run nox
  • pipx can be as much of a barrier as installing conda/mamba, especially on Windows, so it doesn't feel like a "quick start"
  • how to run tests, generally, outside of the pipx discussion wasn't discussed, so the value of nox wasn't clear
  • We changed the conda env name but didn't really note it in the docs, leading to some friction

This PR should:

  • provide a note that our conda env name has changed and what to do about it
  • provide some guidance on which style of dev env (or not) to use
  • better explains how to use nox
  • provide some guidance on working in an IDE

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
  • Please review our
    contributing documentation
    before getting started.
  • Populate a descriptive title. For example, instead of "Updated README.md", use a
    title such as "Add testing details to the contributor section of the README".
    Example PRs: #763
  • Populate the body of the pull request with:
  • Update CHANGELOG.md with details about your change in a section titled
    ## Unreleased. If such a section does not exist, please create one. Follow
    Common Changelog for your additions.
    Example PRs: #763
  • Update the documentation and/or the README.md with details of changes to the
    earthaccess 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 we
will help you out!

  • Add unit tests for any new features.
  • Apply formatting and linting autofixes. You can add a GitHub comment in this Pull
    Request containing "pre-commit.ci autofix" to automate this.
  • Ensure all automated PR checks (seen at the bottom of the "conversation" tab) pass.
  • Get at least one approving review.

📚 Documentation preview 📚: https://earthaccess--874.org.readthedocs.build/en/874/

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
Copy link

github-actions bot commented Nov 7, 2024

Binder 👈 Launch a binder notebook on this branch for commit bc6399e

I will automatically update this comment whenever this PR is modified

Binder 👈 Launch a binder notebook on this branch for commit 4f1eb58

Comment on lines 181 to 188
!!! 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:
Copy link
Collaborator Author

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)

@jhkennedy
Copy link
Collaborator Author

Also, I opened a related discussion here about what we install into our development environments by default:
#875

@andypbarrett
Copy link
Collaborator

@jhkennedy I think these changes help a lot.

A few suggestions.

In your comment above you say

pipx can be as much of a barrier as installing conda/mamba, especially on Windows, so it doesn't feel like a "quick start"

I wonder if we should add a note to the pipx tab to say that something along the lines of "Installing pipx on Windows can be a pain, so we recommend using mamba/conda"

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 main so this seems like a missing step.

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.

2 participants