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

Some binder and conda env tweaks #821

Merged
merged 9 commits into from
Sep 23, 2024
Merged

Conversation

jhkennedy
Copy link
Collaborator

@jhkennedy jhkennedy commented Sep 21, 2024

When reviewing #733, we had a short discussion on the binder/ directory and environment files within, and whether the extra environment or dependencies were needed anymore, and we decided to circle back to it, which I've done here.

This PR removes the binder directory and environment file within. I've done this because:

  • binder will now pick up the top-level environment.yml file and works just fine; here's a link to a binder instance of this PR's branch and a screenshot of it running:
    https://mybinder.org/v2/gh/jhkennedy/earthdata/binder-conda-tweaks
    image
  • the extra dependencies in the binder/environment.yml are either not used or already in the docs dependency group which gets installed in the top-level environment file. (inventoried here: 65b0998)
  • this binder environment now is the same one you'd create locally coming to the repo so it doesn't matter where you jump into it

I've also made two tweaks to the top-level environment.yml:

  1. I dropped an unnecessary empty line
  2. I've un-restricted the Python version, which was pinned to Python 3.10. uv does not restrict the python version outside of the python-requires in the pyproject.toml and this will better match uv's behavior (if we do want a default version, we should use a .python-version file).
  3. I've changed the environment name to earthaccess from earthaccess-dev (bolded b/c this might be the most controversial). Generally, this is my preference -- the environment matches the project name. I believe the -dev is a legacy of having multiple environment files, which we no longer do as of Replace poetry with pip, build with hatchling, dynamically calculate minimum dependencies with uv #733 (except the binder one, which I've removed in this PR). I think this should be fine as we previously hid the conda environment file in the ci/ directory (although we did document it as an alternative to poetry). In our current docs we don't explicitly state the environment name, and since we haven't released Replace poetry with pip, build with hatchling, dynamically calculate minimum dependencies with uv #733, I think there should be very little downstream impact on users outside of the developers who prefer conda.

    (I can expand on this preference if there is a question about, or pushback to, this change. )
Pull Request (PR) draft checklist - click to expand
  • Please review our
    contributing documentation
    before getting started.
  • Ensure an issue exists representing the problem being solved in this PR.
  • 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--821.org.readthedocs.build/en/821/

@codecov-commenter
Copy link

codecov-commenter commented Sep 21, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (main@2939f80). Learn more about missing BASE report.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #821   +/-   ##
=======================================
  Coverage        ?   73.64%           
=======================================
  Files           ?       31           
  Lines           ?     1996           
  Branches        ?        0           
=======================================
  Hits            ?     1470           
  Misses          ?      526           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

…ooks don't import anything but earthaccess and the standard library, and most of these deps are in the docs tutorials notebooks so would be available in the development environment
@mfisher87
Copy link
Collaborator

3. I've changed the environment name to earthaccess from earthaccess-dev (bolded b/c this might be the most controversial). Generally, this is my preference -- the environment matches the project name

I'm 1000% on board with this. I share this exact preference. I even have a bash alias that activates an environment matching the name of the current directory. I cd into the project directory then ca to activate the env. Well, now I just tend to use pixi.... but nevermind that :)

mfisher87
mfisher87 previously approved these changes Sep 21, 2024
Copy link
Collaborator

@mfisher87 mfisher87 left a comment

Choose a reason for hiding this comment

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

Nice :)

- `binder/` directory as we no longer need a special [binder](https://mybinder.org)
environment with the top-level `environment.yml` introduce in
[#733](https://github.com/nsidc/earthaccess/issues/733)
([@jhkennedy](https://github.com/jhkennedy))
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't feel too strongly about this, but I'd be OK omitting this from the change log. It's not really user facing. For developers, we have PRs and commits as history, so I don't feel we need things like this in changelog.

CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@chuckwondo chuckwondo left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@betolink betolink 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!

@jhkennedy jhkennedy merged commit 4510ac1 into nsidc:main Sep 23, 2024
12 checks passed
@jhkennedy jhkennedy deleted the binder-conda-tweaks branch September 23, 2024 20:35
@jhkennedy jhkennedy mentioned this pull request Oct 3, 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.

5 participants