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

First tests in org.eqasim.core #181

Merged
merged 5 commits into from
Dec 15, 2023
Merged

First tests in org.eqasim.core #181

merged 5 commits into from
Dec 15, 2023

Conversation

tkchouaki
Copy link
Collaborator

The goal of this PR is to move towards a higher test coverage in Eqasim. We start here by testing functionalities of the core module on a sample scenario.
Key elements in this PR (not necessarily in the order of the commits):

  • A small scenario corresponding to the area of Melun in Ile-de-France is added as a resource of the module. This scenario results from a 10% synthetic population of IdF cut around the area and keeping only persons that have all their activities inside the area.
  • The tool for removing persons with certain activity types.
  • Fixing the reading of public transit events from events files during trip and leg analyses. They were not converted from GenericEvent to PublicTransitEvent previously, so they were not processed by the event listeners.
  • The unit test:
    • Performing a simulation of Melun
    • Running the various analyses (trips, legs and pt legs) from the resulting events and checking that the files generated by the run scripts are identical to the ones generated by the EqasimAnalysisModule during the simulation
    • Running the export to shapefile tools (schedule, stops and network)

With this PR, the coverage of the tests in the core module goes from 15% of the classes to 45% (for the lines it's from 13% to 32%)

Tarek Chouaki added 3 commits December 15, 2023 13:54
…ing analysis

Now adding a CustomEventMapper to the event readers that converts GenericEvent objects to PublicTransitEvent ones. This is done by the new convert method in the latter class.
Scope of the test:
- Simulation of a small scenario (added in this commit) with default Eqasim behaviour
- Shapefile export tools for transit schedules, transit stops and networks
- Run scripts in eqasim.core.analysis.run using output events
@tkchouaki tkchouaki merged commit b1331d7 into develop Dec 15, 2023
1 check passed
@tkchouaki tkchouaki deleted the testing branch December 15, 2023 14:44
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