Skip to content

Fix Convert_CRS#2764

Merged
KS-HTK merged 10 commits intoe2nIEE:developfrom
furqan463:fix_crs
Oct 23, 2025
Merged

Fix Convert_CRS#2764
KS-HTK merged 10 commits intoe2nIEE:developfrom
furqan463:fix_crs

Conversation

@furqan463
Copy link
Copy Markdown
Contributor

Fixes Issue #2761
Currently convert_crs fails if coordinates are present in either bus or line but not both.
Inside abstract_convert_crs it checks if geo attribute is present in both bus and line and if either of them does not contain geo attribute, the program tries to access bus_geo_data and line_goe_data and a key error is raised as both these attributes may not be present if network is constructed using latest create_bus and create_line.

Signed-off-by: furqan463 <ahmadfurqanc@gmail.com>
@furqan463
Copy link
Copy Markdown
Contributor Author

The first commit just reproduces the error by adding tests.
Once the issue is resolved, these tests will pass.

Signed-off-by: furqan463 <ahmadfurqanc@gmail.com>
@furqan463
Copy link
Copy Markdown
Contributor Author

furqan463 commented Oct 18, 2025

@KS-HTK need to your help here.
This will surely fix in cases where bus or line has geo attribute, or otherwise if bus_geo_data is present in network. but I'm not sure in the case when line.geo is not present but line_geo_data is present in net. as I've merged 'geo_branch_transformer' into 'geo_node_transformer' with a check isinstance(r, list).
I hope it'll work but I'm not sure.

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.88%. Comparing base (d0c4c6e) to head (6073df4).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2764      +/-   ##
===========================================
+ Coverage    74.77%   74.88%   +0.11%     
===========================================
  Files          315      315              
  Lines        36327    36329       +2     
===========================================
+ Hits         27164    27206      +42     
+ Misses        9163     9123      -40     

☔ 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.

Signed-off-by: furqan463 <ahmadfurqanc@gmail.com>
Signed-off-by: furqan463 <ahmadfurqanc@gmail.com>
@furqan463
Copy link
Copy Markdown
Contributor Author

@KS-HTK I've added tests for geodata as well, so now I think it's good to go. Please review it.
@vogt31337

Signed-off-by: furqan463 <ahmadfurqanc@gmail.com>
Copy link
Copy Markdown
Collaborator

@KS-HTK KS-HTK left a comment

Choose a reason for hiding this comment

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

This is a very good improvement. But it seems that I could identify an error.
Thank you for the pr!

Copy link
Copy Markdown
Contributor Author

@furqan463 furqan463 left a comment

Choose a reason for hiding this comment

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

Please review again.

Signed-off-by: furqan463 <ahmadfurqanc@gmail.com>
@furqan463 furqan463 requested a review from KS-HTK October 21, 2025 18:14
Copy link
Copy Markdown
Collaborator

@KS-HTK KS-HTK left a comment

Choose a reason for hiding this comment

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

To keep pull requests clean please do not add changes to a pull request that are not related.

We are already aware of the missing version header in the Changelog. But this change must also be pushed to the release branch and therefore requires a hotfix.

The incorrect version number in the pipeline is a required change we missed while dropping support for python 3.9. This was mostly missed as we do not require (and currently do not expect) these pipelines to succeed. In my opinion it can remain here but in the future it would be better suited for its own PR.

@furqan463
Copy link
Copy Markdown
Contributor Author

To keep pull requests clean please do not add changes to a pull request that are not related.

We are already aware of the missing version header in the Changelog. But this change must also be pushed to the release branch and therefore requires a hotfix.

The incorrect version number in the pipeline is a required change we missed while dropping support for python 3.9. This was mostly missed as we do not require (and currently do not expect) these pipelines to succeed. In my opinion it can remain here but in the future it would be better suited for its own PR.

sure.

@sonarqubecloud
Copy link
Copy Markdown

@KS-HTK KS-HTK merged commit d05edd3 into e2nIEE:develop Oct 23, 2025
33 of 48 checks passed
@furqan463 furqan463 deleted the fix_crs branch October 23, 2025 09:25
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