Skip to content

Conversation

@dweindl
Copy link
Member

@dweindl dweindl commented Apr 16, 2024

Follow-up to #251

  • Manual changes for compatibility with selected ruff rules
  • run pre-commit hooks on GHA instead of flake8
  • run tests on python3.12

@codecov-commenter
Copy link

codecov-commenter commented Apr 16, 2024

Codecov Report

Attention: Patch coverage is 76.92308% with 6 lines in your changes missing coverage. Please review.

Project coverage is 76.24%. Comparing base (b7d6130) to head (3fdc57f).
Report is 117 commits behind head on develop.

Files with missing lines Patch % Lines
petab/problem.py 78.57% 3 Missing ⚠️
petab/core.py 50.00% 1 Missing ⚠️
petab/sbml.py 0.00% 1 Missing ⚠️
petab/simulate.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #252      +/-   ##
===========================================
+ Coverage    76.20%   76.24%   +0.03%     
===========================================
  Files           34       34              
  Lines         3215     3216       +1     
  Branches       780      780              
===========================================
+ Hits          2450     2452       +2     
+ Misses         561      560       -1     
  Partials       204      204              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dweindl dweindl mentioned this pull request Apr 16, 2024
dweindl added a commit that referenced this pull request Apr 16, 2024
Instead of black and isort, run ruff as pre-commit hook. Enable pyupgrade and additional rules.

Applied safe auto-fixes, but validation currently fails. Will be addressed in a follow-up PR (#252).

Relevant changes: `.pre-commit-config.yaml`, `pyproject.toml`
@dweindl dweindl marked this pull request as ready for review April 16, 2024 13:16
@dweindl dweindl requested review from a team, dilpath and m-philipps as code owners April 16, 2024 13:16
Copy link
Member

@dilpath dilpath left a comment

Choose a reason for hiding this comment

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

👍

Comment on lines 55 to +58
except KeyError:
raise KeyError(
f"Observable table missing mandatory field {OBSERVABLE_ID}."
)
) from None
Copy link
Member

Choose a reason for hiding this comment

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

as err, from err?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd prefer from None. We only want this simple message here without the pandas error on top.

Comment on lines 47 to +50
except KeyError:
raise KeyError(
f"Condition table missing mandatory field {CONDITION_ID}."
)
) from None
Copy link
Member

Choose a reason for hiding this comment

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

as err, from err?

Copy link
Member Author

Choose a reason for hiding this comment

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

as previous

],
"quality": [
"flake8>=3.8.3",
"pre-commit",
Copy link
Member

Choose a reason for hiding this comment

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

Is the ruff dependency somehow managed by pre-commit and the ruff-pre-commit repo?

https://github.com/astral-sh/ruff-pre-commit/blob/e76e45000a5aa92cd2ec4d3fb1485f2f9fea5097/pyproject.toml#L1-L6

Copy link
Member Author

Choose a reason for hiding this comment

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

correct

Comment on lines +387 to +392
f"observableParameter1_{obs1_1_1_1}"
f" + observableParameter2_{obs1_1_1_1}",
f"observableParameter1_{obs1_2_1_1}"
f" + observableParameter2_{obs1_2_1_1}",
f"observableParameter1_{obs1_2_2_1}"
f" + observableParameter2_{obs1_2_2_1}",
Copy link
Member

Choose a reason for hiding this comment

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

😐

Copy link
Member Author

Choose a reason for hiding this comment

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

we should have thought of something shorter than "observableParameter1_" 😅 🙈

@dweindl dweindl merged commit aa8cd78 into develop Apr 16, 2024
@dweindl dweindl deleted the ruff2 branch April 16, 2024 14:13
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.

4 participants