pymetropolis 0.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,22 @@
1
+ Metadata-Version: 2.4
2
+ Name: pymetropolis
3
+ Version: 0.1.1
4
+ Summary: Helper functions to generate, calibrate, run, and analyze METROPOLIS2 simulation instances
5
+ Author-email: Lucas Javaudin <lucas@lucasjavaudin.com>
6
+ License-Expression: GPL-3.0-or-later
7
+ Project-URL: Homepage, https://metropolis2.org
8
+ Project-URL: Documentation, https://docs.metropolis2.org
9
+ Project-URL: Repository, https://github.com/Metropolis2/pymetropolis
10
+ Project-URL: Issues, https://github.com/Metropolis2/pymetropolis/issues
11
+ Keywords: transport simulation,metropolis2
12
+ Classifier: Programming Language :: Python
13
+ Classifier: Programming Language :: Python :: 3
14
+ Requires-Python: >=3.12
15
+ Description-Content-Type: text/markdown
16
+ Requires-Dist: metro-demand
17
+ Requires-Dist: metro-network
18
+ Requires-Dist: metro-pipeline
19
+ Requires-Dist: metro-simulation
20
+ Requires-Dist: metro-spatial
21
+ Requires-Dist: metro-results
22
+ Requires-Dist: typer>=0.20.0
File without changes
@@ -0,0 +1,57 @@
1
+ # pyproject.toml
2
+
3
+ [project]
4
+ name = "pymetropolis"
5
+ version = "0.1.1"
6
+ description = "Helper functions to generate, calibrate, run, and analyze METROPOLIS2 simulation instances"
7
+ readme = "README.md"
8
+ authors = [{ name = "Lucas Javaudin", email = "lucas@lucasjavaudin.com" }]
9
+ license = "GPL-3.0-or-later"
10
+ license-files = ["LICENSE.txt"]
11
+ classifiers = [
12
+ "Programming Language :: Python",
13
+ "Programming Language :: Python :: 3",
14
+ ]
15
+ keywords = ["transport simulation", "metropolis2"]
16
+ requires-python = ">=3.12"
17
+ dependencies = [
18
+ "metro-demand",
19
+ "metro-network",
20
+ "metro-pipeline",
21
+ "metro-simulation",
22
+ "metro-spatial",
23
+ "metro-results",
24
+ "typer>=0.20.0",
25
+ ]
26
+
27
+ [project.urls]
28
+ Homepage = "https://metropolis2.org"
29
+ Documentation = "https://docs.metropolis2.org"
30
+ Repository = "https://github.com/Metropolis2/pymetropolis"
31
+ Issues = "https://github.com/Metropolis2/pymetropolis/issues"
32
+
33
+ [project.scripts]
34
+ pymetropolis = "pymetropolis:main"
35
+
36
+ [dependency-groups]
37
+ dev = [
38
+ "ipython>=8.37.0",
39
+ "pytest>=8.4.2",
40
+ "ruff>=0.14.3",
41
+ ]
42
+
43
+ [build-system]
44
+ requires = ["setuptools>=61.0.0", "wheel"]
45
+ build-backend = "setuptools.build_meta"
46
+
47
+ [tool.uv.sources]
48
+ metro-common = { workspace = true }
49
+ metro-demand = { workspace = true }
50
+ metro-pipeline = { workspace = true }
51
+ metro-network = { workspace=true }
52
+ metro-spatial = { workspace = true }
53
+ metro-simulation = { workspace = true }
54
+ metro-results = { workspace = true }
55
+
56
+ [tool.uv.workspace]
57
+ members = ["packages/*"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,2 @@
1
+ from .cli import app as app
2
+ from .main import main as main
@@ -0,0 +1,4 @@
1
+ from .main import main
2
+
3
+ if __name__ == "__main__":
4
+ main()
@@ -0,0 +1,23 @@
1
+ from typing import Annotated
2
+
3
+ import typer
4
+ from metro_pipeline import Config, run_pipeline
5
+
6
+ from .schema import CONFIG_SCHEMA, STEPS_DICT
7
+
8
+
9
+ def app(
10
+ config: Annotated[str, typer.Argument(help="Path to the TOML configuration path to be used.")],
11
+ step: Annotated[
12
+ str,
13
+ typer.Argument(help="Slug of the step to be run."),
14
+ ],
15
+ dry_run: bool = typer.Option(
16
+ False, "--dry-run", help="Show the step that will be run without actually running them."
17
+ ),
18
+ ):
19
+ """Python command line tool to generate, calibrate, run and analyse a METROPOLIS2 simulation."""
20
+ # TODO command to list available steps
21
+ metro_config = Config.from_toml(config, CONFIG_SCHEMA)
22
+ metro_step = STEPS_DICT[step]
23
+ run_pipeline(metro_step, metro_config, dry_run=dry_run)
@@ -0,0 +1,5 @@
1
+ import typer
2
+
3
+
4
+ def main():
5
+ typer.run(metropy.app)
@@ -0,0 +1,29 @@
1
+ from metro_demand import CONFIG_SCHEMA as METRO_DEMAND_CONFIG_SCHEMA
2
+ from metro_demand import STEPS as METRO_DEMAND_STEPS
3
+ from metro_network import CONFIG_SCHEMA as METRO_NETWORK_CONFIG_SCHEMA
4
+ from metro_network import STEPS as METRO_NETWORK_STEPS
5
+ from metro_pipeline import BASE_SCHEMA, Step
6
+ from metro_results import CONFIG_SCHEMA as METRO_RESULTS_CONFIG_SCHEMA
7
+ from metro_results import STEPS as METRO_RESULTS_STEPS
8
+ from metro_simulation import CONFIG_SCHEMA as METRO_SIMULATION_CONFIG_SCHEMA
9
+ from metro_simulation import STEPS as METRO_SIMULATION_STEPS
10
+ from metro_spatial import CONFIG_SCHEMA as METRO_SPATIAL_CONFIG_SCHEMA
11
+ from metro_spatial import STEPS as METRO_SPATIAL_STEPS
12
+
13
+ CONFIG_SCHEMA = (
14
+ BASE_SCHEMA
15
+ + METRO_SPATIAL_CONFIG_SCHEMA
16
+ + METRO_NETWORK_CONFIG_SCHEMA
17
+ + METRO_DEMAND_CONFIG_SCHEMA
18
+ + METRO_SIMULATION_CONFIG_SCHEMA
19
+ + METRO_RESULTS_CONFIG_SCHEMA
20
+ )
21
+
22
+ STEPS: list[Step] = (
23
+ METRO_SPATIAL_STEPS
24
+ + METRO_NETWORK_STEPS
25
+ + METRO_DEMAND_STEPS
26
+ + METRO_SIMULATION_STEPS
27
+ + METRO_RESULTS_STEPS
28
+ )
29
+ STEPS_DICT: dict[str, Step] = {step.slug: step for step in STEPS}
@@ -0,0 +1,22 @@
1
+ Metadata-Version: 2.4
2
+ Name: pymetropolis
3
+ Version: 0.1.1
4
+ Summary: Helper functions to generate, calibrate, run, and analyze METROPOLIS2 simulation instances
5
+ Author-email: Lucas Javaudin <lucas@lucasjavaudin.com>
6
+ License-Expression: GPL-3.0-or-later
7
+ Project-URL: Homepage, https://metropolis2.org
8
+ Project-URL: Documentation, https://docs.metropolis2.org
9
+ Project-URL: Repository, https://github.com/Metropolis2/pymetropolis
10
+ Project-URL: Issues, https://github.com/Metropolis2/pymetropolis/issues
11
+ Keywords: transport simulation,metropolis2
12
+ Classifier: Programming Language :: Python
13
+ Classifier: Programming Language :: Python :: 3
14
+ Requires-Python: >=3.12
15
+ Description-Content-Type: text/markdown
16
+ Requires-Dist: metro-demand
17
+ Requires-Dist: metro-network
18
+ Requires-Dist: metro-pipeline
19
+ Requires-Dist: metro-simulation
20
+ Requires-Dist: metro-spatial
21
+ Requires-Dist: metro-results
22
+ Requires-Dist: typer>=0.20.0
@@ -0,0 +1,13 @@
1
+ README.md
2
+ pyproject.toml
3
+ src/pymetropolis/__init__.py
4
+ src/pymetropolis/__main__.py
5
+ src/pymetropolis/cli.py
6
+ src/pymetropolis/main.py
7
+ src/pymetropolis/schema.py
8
+ src/pymetropolis.egg-info/PKG-INFO
9
+ src/pymetropolis.egg-info/SOURCES.txt
10
+ src/pymetropolis.egg-info/dependency_links.txt
11
+ src/pymetropolis.egg-info/entry_points.txt
12
+ src/pymetropolis.egg-info/requires.txt
13
+ src/pymetropolis.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ pymetropolis = pymetropolis:main
@@ -0,0 +1,7 @@
1
+ metro-demand
2
+ metro-network
3
+ metro-pipeline
4
+ metro-simulation
5
+ metro-spatial
6
+ metro-results
7
+ typer>=0.20.0
@@ -0,0 +1 @@
1
+ pymetropolis