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

railjson_generator: update to 'poetry:2.0' and use 'ruff' for linting #10730

Merged
merged 4 commits into from
Feb 14, 2025

Conversation

woshilapin
Copy link
Contributor

@woshilapin woshilapin commented Feb 7, 2025

Needs #10724 first since osrd_schemas needs to support a recent version of Python first.

3 commits:

  • first replace pyflake, isort and black with ruff (all modified Python's file are only reformatting)
  • second replace pytype with pyright (needed a bunch of corrections, might need an attentive look since I'm not the best Python developer)
  • third make it compatible for poetry:2.0 and a modern version of Python

@woshilapin woshilapin requested review from a team as code owners February 7, 2025 22:17
@github-actions github-actions bot added area:railjson Work on Proposed Unified Rail Assets Data Exchange Format area:ci Work on Continous Integration Pipeline Service labels Feb 7, 2025
@woshilapin woshilapin force-pushed the wsl/railjson_generator/poetry-2 branch 2 times, most recently from 627cfb2 to 1c1a36b Compare February 7, 2025 22:20
@woshilapin woshilapin changed the title Wsl/railjson generator/poetry 2 railjson_generator: update to 'poetry:2.0' and use 'ruff' for linting Feb 7, 2025
@woshilapin woshilapin force-pushed the wsl/railjson_generator/poetry-2 branch 2 times, most recently from 1484b8f to 574fb4b Compare February 7, 2025 22:47
@codecov-commenter
Copy link

codecov-commenter commented Feb 7, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 86.53846% with 14 lines in your changes missing coverage. Please review.

Project coverage is 81.95%. Comparing base (cbee100) to head (5234b79).
Report is 17 commits behind head on dev.

Files with missing lines Patch % Lines
...json_generator/schema/simulation/train_schedule.py 75.00% 4 Missing ⚠️
...erator/railjson_generator/schema/infra/endpoint.py 0.00% 2 Missing ⚠️
...r/railjson_generator/schema/infra/track_section.py 80.00% 2 Missing ⚠️
...generator/railjson_generator/schema/infra/infra.py 0.00% 1 Missing ⚠️
...r/railjson_generator/schema/infra/make_geo_data.py 75.00% 1 Missing ⚠️
.../railjson_generator/schema/infra/range_elements.py 0.00% 1 Missing ⚠️
...enerator/railjson_generator/schema/infra/signal.py 80.00% 1 Missing ⚠️
...railjson_generator/schema/simulation/simulation.py 0.00% 1 Missing ⚠️
...rator/railjson_generator/utils/routes_generator.py 94.11% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #10730      +/-   ##
==========================================
+ Coverage   81.87%   81.95%   +0.08%     
==========================================
  Files        1082     1083       +1     
  Lines      107150   107627     +477     
  Branches      721      741      +20     
==========================================
+ Hits        87725    88203     +478     
+ Misses      19384    19383       -1     
  Partials       41       41              
Flag Coverage Δ
editoast 74.39% <ø> (+0.06%) ⬆️
front 89.46% <ø> (+0.05%) ⬆️
gateway 2.18% <ø> (ø)
osrdyne 3.28% <ø> (ø)
railjson_generator 87.58% <86.53%> (+0.07%) ⬆️
tests 87.91% <ø> (ø)

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

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

@woshilapin woshilapin force-pushed the wsl/schemas/poetry-2 branch from 0a0cd6a to 550500a Compare February 7, 2025 23:24
@woshilapin woshilapin force-pushed the wsl/railjson_generator/poetry-2 branch from 574fb4b to 5d924aa Compare February 7, 2025 23:24
@woshilapin woshilapin force-pushed the wsl/schemas/poetry-2 branch 2 times, most recently from adf1379 to 45617c7 Compare February 11, 2025 09:21
Base automatically changed from wsl/schemas/poetry-2 to dev February 13, 2025 08:43
@woshilapin woshilapin force-pushed the wsl/railjson_generator/poetry-2 branch from 5d924aa to 46a097a Compare February 13, 2025 11:02
@woshilapin woshilapin requested a review from Castavo February 13, 2025 11:02
@woshilapin woshilapin force-pushed the wsl/railjson_generator/poetry-2 branch 3 times, most recently from fbff62d to 1136c8f Compare February 13, 2025 11:04
Copy link
Contributor

@Khoyo Khoyo left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM :)

@woshilapin woshilapin force-pushed the wsl/railjson_generator/poetry-2 branch from 1136c8f to 7fab4f3 Compare February 13, 2025 16:58
@woshilapin woshilapin enabled auto-merge February 13, 2025 16:59
@woshilapin woshilapin added this pull request to the merge queue Feb 14, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 14, 2025
Copy link
Contributor

@Castavo Castavo left a comment

Choose a reason for hiding this comment

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

Looks neat !

We should address the weird things we do with extensions one day. We have #5254 on somewhat the same subject.

Signed-off-by: Jean SIMARD <[email protected]>
@woshilapin woshilapin force-pushed the wsl/railjson_generator/poetry-2 branch 2 times, most recently from f47f109 to 35e25a7 Compare February 14, 2025 09:41
In order to keep homogeneity with 'railjson_generator'

Signed-off-by: Jean SIMARD <[email protected]>
@woshilapin woshilapin force-pushed the wsl/railjson_generator/poetry-2 branch from 35e25a7 to 5234b79 Compare February 14, 2025 09:44
@woshilapin woshilapin enabled auto-merge February 14, 2025 09:45
@woshilapin woshilapin added this pull request to the merge queue Feb 14, 2025
Merged via the queue into dev with commit 3af0ded Feb 14, 2025
27 checks passed
@woshilapin woshilapin deleted the wsl/railjson_generator/poetry-2 branch February 14, 2025 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:ci Work on Continous Integration Pipeline Service area:railjson Work on Proposed Unified Rail Assets Data Exchange Format
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants