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

Move development dependencies to optional dependencies #221

Merged
merged 3 commits into from
Nov 19, 2024

Conversation

zealous-ideal-monk
Copy link
Contributor

@zealous-ideal-monk zealous-ideal-monk commented Nov 13, 2024

Reorganize Project Dependencies

Description

This PR improves the project's dependency management by:

  1. Moving development and optional tools to optional-dependencies
  2. Adding an all group that includes all optional dependencies
  3. Moving FastAPI to optional dependencies as it's primarily used for development/testing

Changes made:

  • Added [project.optional-dependencies] section with two groups:
    • dev: Development tools (streamlit, plotly, huggingface_hub, gdown, fastapi)
    • all: Contains all optional dependencies for easy full installation
  • Kept core ML and data processing dependencies in main dependencies

Benefits:

  • Smaller production installations
  • Clearer separation between core and development dependencies
  • Flexible installation options:
    • pip install . for minimal production install
    • pip install .[dev] for development tools
    • pip install .[all] for everything

How Has This Been Tested?

  • Verified successful installation with core dependencies only: pip install .
  • Verified successful installation with development dependencies: pip install .[dev]
  • Verified successful installation with all dependencies: pip install .[all]

Changes to Data Processing

No changes to data processing - this is a project structure improvement only.

Checklist:

  • My code follows OCF's coding style guidelines
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation (updated pyproject.toml)
  • I have tested all three installation methods work correctly
  • I have checked my code and corrected any misspellings

@peterdudfield
Copy link
Contributor

peterdudfield commented Nov 14, 2024

Thanks @zealous-ideal-monk for having a go with this.

I think it needs to be something like

[project.optional-dependencies]
dev = [
    "tox", "abs","etc"
]

in fact there is already a place holder for it - https://github.com/openclimatefix/open-source-quartz-solar-forecast/blob/main/pyproject.toml#L45

@zealous-ideal-monk
Copy link
Contributor Author

As you suggested I have made the required changes and sent a PR

Copy link
Contributor

@peterdudfield peterdudfield left a comment

Choose a reason for hiding this comment

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

Hey thanks so much for this. Just a few small things

Do you mind adding a description to the PR?

Could you move fastapi also to this group?

Can we make sure the group "all" has all the extra dependencies in it?

Thanks again for all this

@zealous-ideal-monk
Copy link
Contributor Author

tell me if any other changes are required

@peterdudfield peterdudfield merged commit 3d53ea8 into openclimatefix:main Nov 19, 2024
1 of 2 checks passed
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