Skip to content

Comments

Fix dependencies for tutorial#116

Merged
tennlee merged 2 commits intoACCESS-Community-Hub:developfrom
jennan:fix_dependencies
May 29, 2025
Merged

Fix dependencies for tutorial#116
tennlee merged 2 commits intoACCESS-Community-Hub:developfrom
jennan:fix_dependencies

Conversation

@jennan
Copy link
Collaborator

@jennan jennan commented May 23, 2025

Add missing dependencies in the tutorial virtual environment to make FourCastMini demo work.

jennan added 2 commits May 22, 2025 22:26
This fixes the issue of having gcfs installed for the FourCastMini_Demo
tutorial.
@jennan jennan self-assigned this May 23, 2025
@jennan jennan requested a review from tennlee May 23, 2025 03:23
@coveralls
Copy link

Pull Request Test Coverage Report for Build 15201583673

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 60.862%

Totals Coverage Status
Change from base Build 15200764542: 0.0%
Covered Lines: 9874
Relevant Lines: 15767

💛 - Coveralls

- pip
- pip:
- -e packages/data
- -e packages/data[download]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remind me the difference between data and data[download]. Should data include the [download] variant options by default?

Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the purpose of pinning python to 3.11 in this case?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Remind me the difference between data and data[download]. Should data include the [download] variant options by default?

The [download] suffix will install the following optional dependencies (extract from packages/data/pyproject.toml)

download = [
  "cdsapi",
  "ecmwf-opendata",
  "eccodes",
  "gcsfs",
]

I think the intention of the original author of pyearthtools.data was to not force installing the dependencies needed for the download-able data accessors for people not using them. That would be my guess. I don't have a strong opinion about having them included or not in the defaults dependencies of pyearthtools.data.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What is the purpose of pinning python to 3.11 in this case?

The goal when I made this conda environment file was to make installation more likely to work for a any user, and pinning the version of python as a way to make sure people use a version we were sure was working at the time. Ideally, I wanted to provide a complete environment file with all versions pinned, but it turned out that some dependencies were not working out-of-the-box on Mac (when pinning versions) so I ended up with this version of the environment file.

P.S: This is not part of the PR proposed changes ;-).

@jennan
Copy link
Collaborator Author

jennan commented May 28, 2025

@tennlee a bit of a digression, but how about we simplify things as follows

  • we rename requirements-dev.txt into requirements.txt
  • we rename tutorial.yml into environment.yml (usual convention) and make it install the requirements.txt

So basically anyone installing from a git clone would install everything, like devs. The resulting environment is quite big but... it would just work (tm) :D.

I am happy to make the changes (and in the docs), if you want.

@tennlee
Copy link
Collaborator

tennlee commented May 29, 2025

I think yes what you propose will simplify what's going on with environments. We can add simplified environments back later if we need to. Please go ahead, and unpin the Python version while at it. I'll merge this PR now.

@tennlee tennlee merged commit ec413bd into ACCESS-Community-Hub:develop May 29, 2025
7 checks passed
@jennan jennan deleted the fix_dependencies branch May 30, 2025 01:58
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.

3 participants