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

Annotate typing #310

Merged
merged 26 commits into from
Jul 5, 2024
Merged

Annotate typing #310

merged 26 commits into from
Jul 5, 2024

Conversation

FabianHofmann
Copy link
Collaborator

@FabianHofmann FabianHofmann commented Jun 27, 2024

Add type annotations & add MyPy to pre-commit hooks. This is quite a large change, but the functional change is kept to a minimum.

closes #303
closes #185

Copy link

codecov bot commented Jun 27, 2024

Codecov Report

Attention: Patch coverage is 87.84091% with 107 lines in your changes missing coverage. Please review.

Project coverage is 88.29%. Comparing base (3d2a72b) to head (201b164).
Report is 3 commits behind head on master.

Current head 201b164 differs from pull request most recent head 5949eca

Please upload reports for the commit 5949eca to get more accurate results.

Files Patch % Lines
linopy/expressions.py 90.15% 12 Missing and 7 partials ⚠️
linopy/model.py 87.03% 9 Missing and 5 partials ⚠️
linopy/solvers.py 85.05% 8 Missing and 5 partials ⚠️
linopy/variables.py 91.15% 9 Missing and 4 partials ⚠️
linopy/io.py 81.25% 6 Missing and 6 partials ⚠️
linopy/common.py 81.66% 6 Missing and 5 partials ⚠️
linopy/constraints.py 91.13% 2 Missing and 5 partials ⚠️
linopy/constants.py 66.66% 3 Missing and 2 partials ⚠️
linopy/matrices.py 87.09% 2 Missing and 2 partials ⚠️
linopy/types.py 82.60% 3 Missing and 1 partial ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #310      +/-   ##
==========================================
- Coverage   89.72%   88.29%   -1.43%     
==========================================
  Files          16       17       +1     
  Lines        4037     4159     +122     
  Branches      942      978      +36     
==========================================
+ Hits         3622     3672      +50     
- Misses        282      316      +34     
- Partials      133      171      +38     

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

@FabianHofmann
Copy link
Collaborator Author

@lkstrp could I kindly ask you to take over fixing the pre-commit bot. It looks like the pre-commit CI is sort of stuck with another set of (cached ?) arguments. Locally it works fine. What I want in the end is to run mypy checks on linopy/ and test/

@FabianHofmann
Copy link
Collaborator Author

@lkstrp awesome thanks

@FabianHofmann FabianHofmann enabled auto-merge July 5, 2024 14:07
@FabianHofmann FabianHofmann merged commit d3d0b7c into master Jul 5, 2024
14 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.

xarray DeprecationWarning: Deleting a single level of a MultiIndex is deprecated. Previously Annotate Typing
2 participants