Skip to content

Commit

Permalink
fixes imports
Browse files Browse the repository at this point in the history
  • Loading branch information
r-akemii committed Sep 10, 2024
1 parent 64b1aed commit c7106b4
Show file tree
Hide file tree
Showing 16 changed files with 23 additions and 136 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ readily available to other modeling activities.
AequilibraE includes multi-class user-equilibrium assignment with full support
for class-specific networks, value-of-time and generalized cost functions, and
includes a range of equilibration algorithms, including MSA, the traditional
Frank-Wolfe as well as the state-of-the-art biconjugate Frank-Wolfe.
Frank-Wolfe as well as the state-of-the-art Bi-conjugate Frank-Wolfe.

AequilibraE's support for public transport includes a GTFS importer that can
map-match routes into the model network and an optimized version of the
Expand Down
2 changes: 1 addition & 1 deletion aequilibrae/matrix/aequilibrae_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def create_from_omx(
memory_only: bool = True,
) -> None:
"""
Creates an AequilibraeMatrix from an original Open Matrix
Creates an AequilibraeMatrix from an original OpenMatrix
:Arguments:
**file_path** (:obj:`str`): Path for the output AequilibraeMatrix
Expand Down
2 changes: 1 addition & 1 deletion aequilibrae/paths/linear_approximation.py
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ def calculate_stepsize(self):
self.stepsize = tiny_step
else:
self.stepsize = 0.0
# need to reset conjugate / biconjugate direction search
# need to reset conjugate / bi-conjugate direction search
self.do_fw_step = True
self.conjugate_failed = True
self.iteration_issue.append("Found bad conjugate direction step. Performing FW search. {e.args}")
Expand Down
2 changes: 1 addition & 1 deletion aequilibrae/project/about.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


class About:
"""Provides an interface for querying and editing the 'about' table of an AequilibraE project
"""Provides an interface for querying and editing the **about** table of an AequilibraE project
.. code-block:: python
Expand Down
2 changes: 1 addition & 1 deletion aequilibrae/project/field_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def add(self, field_name: str, description: str, data_type="NUMERIC") -> None:
**description** (:obj:`str`): Description of the field to be inserted in the metadata
**data_type** (:obj:`str`, *Optional*): Valid SQLite Data type. Default: ``'NUMERIC'``
**data_type** (:obj:`str`, *Optional*): Valid SQLite Data type. Default: "NUMERIC"
"""
if field_name.lower() in self._original_values.keys():
raise ValueError("attribute_name already exists")
Expand Down
9 changes: 4 additions & 5 deletions aequilibrae/project/network/link_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def new(self, link_type_id: str) -> LinkType:
return lt

def delete(self, link_type_id: str) -> None:
"""Removes the ``LinkType`` with ``link_type_id`` from the project"""
"""Removes the link_type with *link_type_id* from the project"""
try:
lt = self.__items[link_type_id] # type: LinkType
lt.delete()
Expand All @@ -99,21 +99,20 @@ def delete(self, link_type_id: str) -> None:
self.logger.warning(f"Link type {link_type_id} was successfully removed from the project database")

def get(self, link_type_id: str) -> LinkType:
"""Get a ``LinkType`` from the network by its ``link_type_id``"""
"""Get a link_type from the network by its *link_type_id*"""
if link_type_id not in self.__items:
raise ValueError(f"Link type {link_type_id} does not exist in the model")
return self.__items[link_type_id]

def get_by_name(self, link_type: str) -> LinkType:
"""Get a ``LinkType`` from the network by its ``link_type`` (i.e. name)"""
"""Get a link_type from the network by its *link_type* (i.e. name)"""
for lt in self.__items.values():
if lt.link_type.lower() == link_type.lower():
return lt

# TODO: fix the FieldEditor import to self.project
def fields(self) -> FieldEditor:
"""Returns a FieldEditor class instance to edit the Link_Types table fields and their metadata"""
return FieldEditor(self.project, "link_types")
return FieldEditor(self.project.project_base_path, "link_types")

def all_types(self) -> dict:
"""Returns a dictionary with all LinkType objects available in the model. link_type_id as key"""
Expand Down
20 changes: 10 additions & 10 deletions aequilibrae/project/network/links.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ def __init__(self, net):
self.refresh_fields()

def get(self, link_id: int) -> Link:
"""Get a link from the network by its ``link_id``
"""Get a link from the network by its *link_id*
It raises an error if ``link_id`` does not exist
It raises an error if link_id does not exist
:Arguments:
**link_id** (:obj:`int`): ID of a link to retrieve
**link_id** (:obj:`int`): Id of a link to retrieve
:Returns:
**link** (:obj:`Link`): Link object for requested link_id
Expand All @@ -71,7 +71,7 @@ def new(self) -> Link:
"""Creates a new link
:Returns:
**link** (:obj:`Link`): A new link object populated only with ``link_id`` (not saved in the model yet)
**link** (:obj:`Link`): A new link object populated only with link_id (not saved in the model yet)
"""

data = {key: None for key in self.__fields}
Expand All @@ -86,13 +86,13 @@ def new(self) -> Link:
def copy_link(self, link_id: int) -> Link:
"""Creates a copy of a link with a new id
It raises an error if ``link_id`` does not exist
It raises an error if link_id does not exist
:Arguments:
**link_id** (:obj:`int`): ID of the link to copy
**link_id** (:obj:`int`): Id of the link to copy
:Returns:
**link** (:obj:`Link`): Link object for requested ``link_id``
**link** (:obj:`Link`): Link object for requested link_id
"""

data = self.__link_data(int(link_id))
Expand All @@ -108,10 +108,10 @@ def copy_link(self, link_id: int) -> Link:
return link

def delete(self, link_id: int) -> None:
"""Removes the link with ``link_id`` from the project
"""Removes the link with link_id from the project
:Arguments:
**link_id** (:obj:`int`): ID of a link to delete
**link_id** (:obj:`int`): Id of a link to delete
"""
d = 1
link_id = int(link_id)
Expand Down Expand Up @@ -140,7 +140,7 @@ def data(self) -> gpd.GeoDataFrame:
"""Returns all links data as a Pandas DataFrame
:Returns:
**table** (:obj:`gpd.GeoDataFrame`): GeoPandas GeoDataFrame with all the nodes
**table** (:obj:`GeoDataFrame`): GeoPandas GeoDataFrame with all the nodes
"""
dl = DataLoader(self.project.path_to_file, "links")
return dl.load_table()
Expand Down
2 changes: 1 addition & 1 deletion aequilibrae/project/network/mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


class Mode:
"""A mode object represents a single record in the 'modes' table"""
"""A mode object represents a single record in the *modes* table"""

__alowed_characters = string.ascii_letters + "_"

Expand Down
2 changes: 1 addition & 1 deletion aequilibrae/project/network/modes.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class Modes:
"""
Access to the API resources to manipulate the 'modes' table in the network
Access to the API resources to manipulate the modes table in the network
.. code-block:: python
Expand Down
2 changes: 1 addition & 1 deletion aequilibrae/project/network/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def data(self) -> gpd.GeoDataFrame:

@property
def lonlat(self) -> pd.DataFrame:
"""Returns all nodes lon/lat coordinates as a Pandas DataFrame
"""Returns all nodes lon/lat coords as a Pandas DataFrame
:Returns:
**table** (:obj:`DataFrame`): Pandas DataFrame with all the nodes, with geometry as lon/lat
Expand Down
1 change: 0 additions & 1 deletion aequilibrae/transit/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
from .transit import Transit
from .transit_graph_builder import TransitGraphBuilder
from .lib_gtfs import GTFSRouteSystemBuilder
3 changes: 1 addition & 2 deletions docs/requirements-docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ enum34
Sphinx
pydata-sphinx-theme==0.13.3
sphinx_autodoc_annotation
pillow
matplotlib
folium
keplergl
mapclassify
sphinx-gallery
sphinx-copybutton
sphinx-design
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ a look at the documentation provided by `Google <https://developers.google.com/t
The public transport database is created on the run when the ``Transit`` module is executed
for the first time.

.. Só é possível popular essas tabelas através da execução dos módulos ``Transit`` e
.. ``TransitGraphBuilder`` (mais algum módulo pertinente). A tabela a seguir mostra
.. quais tabelas são povoadas através dos módulos
.. seealso::

:func:`aequilibrae.transit.Transit`
Expand Down
106 changes: 0 additions & 106 deletions docs/source/sg_execution_times.rst

This file was deleted.

0 comments on commit c7106b4

Please sign in to comment.