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

Configure doctests #574

Merged
merged 14 commits into from
Oct 4, 2024
Merged

Configure doctests #574

merged 14 commits into from
Oct 4, 2024

Conversation

r-akemii
Copy link
Collaborator

@r-akemii r-akemii commented Sep 23, 2024

This PR finishes the doctest setup for the existing code in docstrings within AequilibraE documentation. Due to testing limitations, some tests were removed.

In this PR we:

  • Modified docstrings in the following files:
    • distribution/gravity_application
    • distribution/gravity_calibration
    • distribution/ipf
    • matrix/aequilibrae_data
    • matrix/aequilibrae_matrix
    • paths/results/path_results
    • paths/results/skim_results
    • paths/assignment_paths
    • paths/graph
    • paths/network_skimming
    • paths/sub_area
    • paths/traffic_assignment
    • paths/traffic_class
    • paths/vdf
    • project/network/link_types
    • project/network/link
    • project/network/links
    • project/network/modes
    • project/network/network
    • project/network/node
    • project/network/nodes
    • project/network/period
    • project/network/periods
    • project/about
    • project/field_editor
    • project/project
    • project/zoning
    • transit/transit
    • log
    • parameters
  • Updated the .github/workflows/documentation.yml to run doctest
  • Added variables to doctest_namespace in conftest.py to make the code less cluttered
  • Removed unused doctest projects in docs/create_docs/data.py
  • Updated the doctests in *.rst files with docstest_namespace variables
  • Created a traffic_assignment_procedure file to keep the tests in assignment_mechanics independent

@r-akemii
Copy link
Collaborator Author

@pedrocamargo before opening this PR, I'd like to check with you if it's ok if we don't test the strings in docs/source/useful_information/validation_benchmarking/traffic_assignment.rst. In this test, we use TNPT files stored locally, so it's a bit more complicated to write tests with doctest.

If you want, we can also add tests to docs/source/modeling_with_aequilibrae/static_traffic_assignment/assignment_mechanics.rst. I'll probably have to create a project folder for it, and re-write part of the code blocks.

@r-akemii r-akemii marked this pull request as ready for review September 30, 2024 14:24
@pedrocamargo pedrocamargo merged commit c9afb4e into develop Oct 4, 2024
16 checks passed
@pedrocamargo pedrocamargo deleted the renata/adds-doctests branch October 4, 2024 10:37
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