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

python: add tests for railjson_generator #6222

Merged
merged 1 commit into from
Jan 5, 2024
Merged

Conversation

shenriotpro
Copy link
Contributor

@shenriotpro shenriotpro commented Dec 26, 2023

fixes #6221

Copy link

codecov bot commented Dec 26, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (f2e96c2) 26.92% compared to head (2d801a5) 27.63%.

Files Patch % Lines
...rator/railjson_generator/utils/routes_generator.py 80.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                dev    #6222      +/-   ##
============================================
+ Coverage     26.92%   27.63%   +0.71%     
  Complexity     2136     2136              
============================================
  Files           961      990      +29     
  Lines        124331   125811    +1480     
  Branches       2575     2575              
============================================
+ Hits          33477    34771    +1294     
- Misses        89364    89550     +186     
  Partials       1490     1490              
Flag Coverage Δ
core 78.88% <ø> (ø)
editoast 75.46% <ø> (ø)
front 8.69% <ø> (ø)
gateway 2.50% <ø> (ø)
railjson_generator 87.43% <99.43%> (?)
tests 81.77% <ø> (ø)

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.

@shenriotpro shenriotpro changed the title python: add tests for railjson_generator (external_generated_inputs) python: add tests for railjson_generator Dec 26, 2023
@shenriotpro shenriotpro force-pushed the shenriot-test-railjson branch 4 times, most recently from fcae1f8 to 3c9d27d Compare December 29, 2023 16:51
@shenriotpro shenriotpro marked this pull request as ready for review January 2, 2024 08:35
@shenriotpro shenriotpro requested review from a team as code owners January 2, 2024 08:35
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.

As an aside, we should probably change the docstrings to an imperative tense (https://peps.python.org/pep-0257/#one-line-docstrings)

python/railjson_generator/README.md Outdated Show resolved Hide resolved
@shenriotpro
Copy link
Contributor Author

Otherwise LGTM.

As an aside, we should probably change the docstrings to an imperative tense (https://peps.python.org/pep-0257/#one-line-docstrings)

Done, thanks.

Copy link
Contributor

@Tguisnet Tguisnet left a comment

Choose a reason for hiding this comment

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

Thanks, good PR !
I have only one thing to say, the ascii diagrams giving details about the infra used for the tests are good.
However, for a better understanding, I think we could represent a switch with 'o' or something to have a better understanding of the infra.
Especially in the case for routes tests, to avoid thinking detectors are link between track sections.
And I have no particuliar suggestion, but the difference between the diagram crossing and the diagram double slip switch is not explicit too.

For the routes tests, maybe we should add a comment to know what kind of route we are trying to create, but it's not mandatory, so as you wish !

@shenriotpro
Copy link
Contributor Author

Thanks, good PR ! I have only one thing to say, the ascii diagrams giving details about the infra used for the tests are good. However, for a better understanding, I think we could represent a switch with 'o' or something to have a better understanding of the infra. Especially in the case for routes tests, to avoid thinking detectors are link between track sections. And I have no particuliar suggestion, but the difference between the diagram crossing and the diagram double slip switch is not explicit too.

For the routes tests, maybe we should add a comment to know what kind of route we are trying to create, but it's not mandatory, so as you wish !

Thanks, I made a few adjustments.

Copy link
Contributor

@ElysaSrc ElysaSrc left a comment

Choose a reason for hiding this comment

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

Reviewed the CI part which looks good to me

@shenriotpro shenriotpro added this pull request to the merge queue Jan 5, 2024
@shenriotpro shenriotpro removed this pull request from the merge queue due to a manual request Jan 5, 2024
@shenriotpro shenriotpro added this pull request to the merge queue Jan 5, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 5, 2024
@shenriotpro shenriotpro added this pull request to the merge queue Jan 5, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 5, 2024
@shenriotpro shenriotpro added this pull request to the merge queue Jan 5, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 5, 2024
@ElysaSrc ElysaSrc added this pull request to the merge queue Jan 5, 2024
Merged via the queue into dev with commit 53f282c Jan 5, 2024
20 checks passed
@ElysaSrc ElysaSrc deleted the shenriot-test-railjson branch January 5, 2024 11:29
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.

Check Python tests coverage
4 participants