You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-26
Original file line number
Diff line number
Diff line change
@@ -538,32 +538,7 @@ creates the source MSSQL database (_docker/mssql_init/populate.sql_) was changed
538
538
539
539
### Requirements
540
540
541
-
You need to have Python 3 installed on your system to run the script
542
-
543
-
#### Virtual environment
544
-
545
-
To run Python scripts with required libraries you should setup a virtual environment which contains the requirements for the script. To setup an environment, run:
546
-
547
-
`python3 -m venv LOCATION/OF/ENVIRONMENT/HERE`
548
-
549
-
Where you should replace the location with one you want to use. For example a directory under your home directory.
550
-
To use the environment you can either source the virtual environment by running:
Which allows you to use the binaries directly as `python importer.py`
555
-
556
-
Or you can use the virtual environment python directly: `LOCATION/OF/ENVIRONMENT/HERE/bin/python importer.py`
557
-
558
-
#### Script setup
559
-
560
-
You need to run the `import.py` script using Python 3 and it requires the following libraries:
561
-
562
-
- pymssql
563
-
- requests
564
-
- simplejson
565
-
566
-
They can be installed by running `pip install -r requirements.txt`
541
+
You need to have Docker installed on your system to run the script
567
542
568
543
### How to use
569
544
@@ -586,3 +561,5 @@ JORE3_DATABASE_NAME=
586
561
You should have run the base Jore3 importer first which ensures the Jore4 database has the required scheduled stop points. Then run the stop registry import script which will match scheduled stop points in the Jore4 routes database with stops in the Jore3 database and generate GraphQL mutations to Hasura/Tiamat according to the data. The script will also link the generated stop registry stops with the scheduled stop points by their NeTEx ID using Hasura for the mutation.
587
562
588
563
Running the script will produce multiple errors as there are many stops in the Jore3 database with overlapping validity. These can be ingored as only the most recent one is the one which ends up being imported.
564
+
565
+
To run the script simply run `run-stop-registry-importer.sh` in the stop-registry-importer directory, this will create and run a Docker container with the environment set up.
0 commit comments