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

front: remove relative imports #6269

Merged
merged 1 commit into from
Jan 11, 2024
Merged

Conversation

clarani
Copy link
Contributor

@clarani clarani commented Jan 4, 2024

closes #6027

@clarani clarani requested a review from a team as a code owner January 4, 2024 14:31
Copy link

codecov bot commented Jan 4, 2024

Codecov Report

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

Comparison is base (dc2b2d6) 27.68% compared to head (e0cfee5) 27.68%.

Files Patch % Lines
.../applications/operationalStudies/views/Project.tsx 0.00% 13 Missing ⚠️
...rc/applications/operationalStudies/views/Study.tsx 0.00% 13 Missing ⚠️
...rc/applications/editor/tools/rangeEdition/utils.ts 0.00% 11 Missing ⚠️
...rc/applications/editor/tools/trackEdition/tool.tsx 0.00% 9 Missing and 1 partial ⚠️
...ult/components/SpeedSpaceChart/SpeedSpaceChart.tsx 0.00% 10 Missing ⚠️
...lt/components/ChartHelpers/enableInteractivity.tsx 0.00% 9 Missing ⚠️
...esult/components/SpaceTimeChart/SpaceTimeChart.tsx 0.00% 8 Missing ⚠️
...tionResult/components/SpeedSpaceChart/d3Helpers.ts 0.00% 8 Missing ⚠️
...cations/editor/tools/pointEdition/tool-factory.tsx 0.00% 7 Missing ⚠️
...tools/rangeEdition/speedSection/EditPSLSection.tsx 0.00% 6 Missing ⚠️
... and 30 more
Additional details and impacted files
@@             Coverage Diff              @@
##                dev    #6269      +/-   ##
============================================
- Coverage     27.68%   27.68%   -0.01%     
  Complexity     2136     2136              
============================================
  Files           990      990              
  Lines        125794   125805      +11     
  Branches       2574     2574              
============================================
- Hits          34830    34823       -7     
- Misses        89475    89493      +18     
  Partials       1489     1489              
Flag Coverage Δ
core 78.88% <ø> (ø)
editoast 75.56% <ø> (-0.01%) ⬇️
front 8.70% <10.77%> (-0.01%) ⬇️
gateway 2.50% <ø> (ø)
railjson_generator 87.42% <ø> (ø)
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.

Copy link
Contributor

@SharglutDev SharglutDev left a comment

Choose a reason for hiding this comment

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

Should we keep the relative imports for the components importing other editor parts ?

@clarani
Copy link
Contributor Author

clarani commented Jan 5, 2024

Well spotted, I think I forgot some :)

@kmer2016
Copy link
Contributor

kmer2016 commented Jan 5, 2024

Some files still have a relative

  • front/src/applications/editor/tools/rangeEdition/types.ts, line 4
  • front/src/common/Pathfinding/tests/Pathfinding.spec.ts, line 1
  • front/src/modules/rollingStock/components/RollingStockEditor/tests/RollingStockEditorForm.spec.ts, line 5
  • front/src/modules/rollingStock/helpers/tests/utils.spec.ts, lines 2 and 3
  • front/src/modules/simulationResult/components/ChartHelpers/tests/ChartHelpers.spec.ts, lines 8, 10, 11
  • front/src/modules/simulationResult/components/SimulationResultsMap/tests/helpers.spec.ts, line 3
  • front/src/modules/trainschedule/components/ManageTrainSchedule/Allowances/tests/allowances.spec.ts, line 5 and 6
  • front/src/reducers/osrdconf/tests/helpers.spec.ts line 1
  • front/src/reducers/osrdconf/stdcmConf/stdcmConfReducers.spec.ts, line 10

I don't know if we have to use absolute path in open-api-config file too. (front/src/config/openapi-editoast-config.ts and front/src/config/openapi-gateway-config.ts)

@clarani clarani force-pushed the cni-6027-remove-relative-imports branch from e50d7d4 to 6b59d52 Compare January 8, 2024 16:47
Copy link
Contributor

@kmer2016 kmer2016 left a comment

Choose a reason for hiding this comment

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

Well done !

@clarani clarani force-pushed the cni-6027-remove-relative-imports branch from 6b59d52 to e0cfee5 Compare January 11, 2024 16:20
@clarani clarani added this pull request to the merge queue Jan 11, 2024
Merged via the queue into dev with commit 8b07c48 Jan 11, 2024
20 checks passed
@clarani clarani deleted the cni-6027-remove-relative-imports branch January 11, 2024 16:36
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.

front: remove "import ../../../../../../../../../../../../../../../../../../somefile" (relative import paths)
5 participants