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

Modernize Poetry configuration and project dependencies #788

Merged
merged 11 commits into from
Nov 21, 2022

Conversation

amotl
Copy link
Member

@amotl amotl commented Nov 16, 2022

A few modernizations and dependency package version bumps.

  • Start using Poetry dependency groups, see https://python-poetry.org/docs/managing-dependencies/.
  • Update to black 22.10, isort 5.10, and ruff 0.0.120.
  • Update packages pytest and friends.
  • Update packages dash, plotly, scipy, shapely, utm, xarray, and zarr.
  • Remove mock package, use unittest.mock instead.
  • By significantly reducing runtime dependencies, also getting rid of the py package, it will automatically resolve [1] and [2].

[1] https://github.com/earthobservations/wetterdienst/security/dependabot/11
[2] https://github.com/earthobservations/wetterdienst/security/dependabot/12

@amotl amotl force-pushed the collab/fix-h5py branch 2 times, most recently from de2f301 to cf947ec Compare November 16, 2022 02:00
@amotl amotl force-pushed the collab/modernize-dependencies branch from 2fb5c21 to 4cfe043 Compare November 16, 2022 02:54
@amotl amotl changed the title [STACK] Modernize dependencies [STACK] Modernize Poetry configuration and project dependencies Nov 16, 2022
Comment on lines -168 to +99
ruff==0.0.46 ; python_version >= "3.8" and python_version < "3.12"
ruff==0.0.120 ; python_version >= "3.8" and python_version < "3.12"
Copy link
Member Author

Choose a reason for hiding this comment

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

Why is ruff still part of the requirements.txt?

Copy link
Member Author

@amotl amotl Nov 20, 2022

Choose a reason for hiding this comment

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

I see. The export to requirements.txt includes development dependencies. Is it intended like this? If the Anaconda packages will derive its runtime dependencies from this list, maybe we should change it? See also conda-forge/wetterdienst-feedstock#57.

In order to provide a corresponding file including the development dependencies, we can use a different file name, like requirements-dev.txt.

export_requirements_runtime = "poetry export --without-hashes --output requirements.txt"
export_requirements_sandbox = "poetry export --without-hashes --with=dev,test --output requirements-sandbox.txt"

Copy link
Member Author

Choose a reason for hiding this comment

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

See #790.

requirements.txt Show resolved Hide resolved
@amotl amotl force-pushed the collab/modernize-dependencies branch from 4cfe043 to b038efe Compare November 16, 2022 08:09
Copy link
Member

@gutzbenj gutzbenj left a comment

Choose a reason for hiding this comment

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

Thanks for your work!
Just added a small comment.

docs/contribution/development.rst Show resolved Hide resolved
Base automatically changed from collab/fix-h5py to main November 20, 2022 13:17
@amotl amotl changed the title [STACK] Modernize Poetry configuration and project dependencies Modernize Poetry configuration and project dependencies Nov 20, 2022
@amotl amotl force-pushed the collab/modernize-dependencies branch 2 times, most recently from c3c622f to ed86bb6 Compare November 20, 2022 13:28
@codecov
Copy link

codecov bot commented Nov 20, 2022

Codecov Report

Base: 90.46% // Head: 90.72% // Increases project coverage by +0.25% 🎉

Coverage data is based on head (4c491b8) compared to base (ce9eada).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #788      +/-   ##
==========================================
+ Coverage   90.46%   90.72%   +0.25%     
==========================================
  Files          88       88              
  Lines        6201     6201              
  Branches      616      616              
==========================================
+ Hits         5610     5626      +16     
+ Misses        449      436      -13     
+ Partials      142      139       -3     
Flag Coverage Δ
unittests 90.72% <ø> (+0.25%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
wetterdienst/ui/explorer/app.py 87.56% <0.00%> (+6.48%) ⬆️
wetterdienst/ui/explorer/library.py 100.00% <0.00%> (+30.76%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@amotl amotl force-pushed the collab/modernize-dependencies branch from ed86bb6 to 4c491b8 Compare November 20, 2022 23:54
@amotl amotl marked this pull request as ready for review November 20, 2022 23:59
@amotl amotl merged commit cbe08a4 into main Nov 21, 2022
@amotl amotl deleted the collab/modernize-dependencies branch November 21, 2022 00:22
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