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

railjson-generator: fix example script generation dir #4283

Merged
merged 1 commit into from
Jun 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

from pathlib import Path

from railjson_generator import InfraBuilder, Location, SimulationBuilder
from railjson_generator import InfraBuilder, Location, SimulationBuilder, get_output_dir
from railjson_generator.schema.infra.direction import Direction

CURRENT_DIR = Path(__file__).parent
OUTPUT_DIR = get_output_dir()

# GENERATE INFRA
builder = InfraBuilder()
Expand Down Expand Up @@ -60,7 +60,7 @@
infra = builder.build()

# Save railjson
infra.save(CURRENT_DIR / Path("infra.json"))
infra.save(OUTPUT_DIR / Path("infra.json"))

# GENERATE SIMULATION
builder = SimulationBuilder()
Expand All @@ -86,4 +86,4 @@
sim = builder.build()

# Save railjson
sim.save(CURRENT_DIR / Path("simulation.json"))
sim.save(OUTPUT_DIR / Path("simulation.json"))