Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
r-akemii committed Sep 2, 2024
1 parent 3c304c8 commit 0a582da
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 12 deletions.
27 changes: 22 additions & 5 deletions docs/source/api/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,21 +86,38 @@ Matrix

Paths
-----

Graph
~~~~~
.. currentmodule:: aequilibrae.paths
.. autosummary::
:toctree: generated/

Graph
TransitGraph
AssignmentResults
TransitAssignmentResults
SkimResults
PathResults
VDF

Traffic assignment
~~~~~~~~~~~~~~~~~~
.. currentmodule:: aequilibrae.paths
.. autosummary::
:toctree: generated/

TrafficClass
TransitClass
VDF
TrafficAssignment
TransitAssignment
AssignmentResults
TransitAssignmentResults
SkimResults
PathResults

Route choice
~~~~~~~~~~~~
.. currentmodule:: aequilibrae.paths
.. autosummary::
:toctree: generated/

HyperpathGenerating
OptimalStrategies
RouteChoice
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,14 @@ also created *on-the-fly* when the user imports a GTFS source into an Aequilibra
model, but there is still no support for manually or programmatically adding routes
to a route system as of yet.

The following sections presents the structure and contents for all databases in the project.


.. toctree::
:maxdepth: 1
:caption: Dive deep into project structure!

project_database/index
parameter_file
results_database
public_transport_database/index
transit_database/index
22 changes: 16 additions & 6 deletions docs/table_documentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,16 @@ def __init__(self, component: str, tgt_fldr: str):
self.stub = "data_model"
# Get the appropriate data for the database we are documenting
self.conn = database_connection(db_type=folder, project_path=self.proj_path)
self.path = join(*Path(realpath(__file__)).parts[:-1],
f"../aequilibrae/project/database_specification/{folder}/tables")
self.doc_path = str(Path(realpath(__file__)).parent / "source" / tgt_fldr)
self.path = join(
*Path(realpath(__file__)).parts[:-1], f"../aequilibrae/project/database_specification/{folder}/tables"
)
self.doc_path = str(
Path(realpath(__file__)).parent
/ "source"
/ "modeling_with_aequilibrae"
/ "1-aequilibrae_project"
/ tgt_fldr
)

Path(join(self.doc_path, self.stub)).mkdir(exist_ok=True, parents=True)

Expand All @@ -44,7 +51,7 @@ def create(self):
descr = self.conn.execute(f"pragma table_info({table_name})").fetchall()

# Title of the page
title = f'*{table_name}* table structure'
title = f"*{table_name}* table structure"
txt = [title, "-" * len(title), ""]

# intro = """A more technical view of the database structure, including the SQL queries used to create each table and the indices used are displayed below.\n"""
Expand Down Expand Up @@ -126,8 +133,11 @@ def readlines(filename):
with open(filename, "r") as f:
return [x.strip() for x in f.readlines()]

tables = [("project_database", "modeling_with_aequilibrae/project_database"),
("transit_database", "modeling_with_aequilibrae/transit_database")]

tables = [
("project_database", "modeling_with_aequilibrae/project_database"),
("transit_database", "modeling_with_aequilibrae/transit_database"),
]

for table, pth in tables:
s = CreateTablesSRC(table, pth)
Expand Down

0 comments on commit 0a582da

Please sign in to comment.