Flatfile Fixture generator for OS2mo/LoRa
Project description
RA Fixture Generator
OS2mo/LoRa Flatfile Fixture Generator.
Usage
docker build . -t ra-fixture-generator
Which yields:
...
Successfully built ...
Successfully tagged ra-fixture-generator:latest
After which you can run:
docker run --rm ra-fixture-generator --help
Which yields:
Usage: fixture_generator.py [OPTIONS]
Flatfile Fixture Generator.
Used to generate flatfile fixture data (JSON) for OS2mo/LoRa.
Options:
--name TEXT Name of the root organization [required]
--indent INTEGER Pass 'indent' to json serializer
--lora-file FILENAME Output Lora Flatfile [required]
--mo-file FILENAME Output OS2mo Flatfile [required]
--help Show this message and exit.
At this point two flat files can be generated with:
docker run --rm -v $PWD:/srv/ ra-fixture-generator \
--name "Aarhus Kommune" --lora-file /srv/lora.json --mo-file /srv/mo.json
At which point two files lora.json
and mo.json
will be available in the current work-dir.
These files can then be uploaded using the ra-flatfile-importer
.
For instance using:
docker run -i --rm ra-flatfile-importer lora upload --mox-url http://MOXURL:8080 < lora.json
docker run -i --rm ra-flatfile-importer mo upload --mo-url http://MOURL:5000 < mo.json
Alternatively the two can be combined:
docker run -i --rm ra-fixture-generator \
--name "Aarhus Kommune" --lora-file - --mo-file /dev/null | \
docker run -i --rm ra-flatfile-importer lora upload --mox-url http://MOXURL:8080
And similarily for MO:
docker run -i --rm ra-fixture-generator \
--name "Aarhus Kommune" --lora-file /dev/null --mo-file - | \
docker run -i --rm ra-flatfile-importer mo upload --mo-url http://MOURL:5000
Versioning
This project uses Semantic Versioning with the following strategy:
- MAJOR: Incompatible changes to existing data models
- MINOR: Backwards compatible updates to existing data models OR new models added
- PATCH: Backwards compatible bug fixes
License
This project uses REUSE for licensing. All licenses can be found in the LICENSES folder of the project.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for ra-fixture-generator-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f25ec2ca41dbe2704dc76905e82c08bc2a41f33d96e7798f52dbb465f9a108ed |
|
MD5 | 67dbe634d5c5305022f78366f60fd9ff |
|
BLAKE2b-256 | 195b1b804e2e219300f4ceb810981a444eab033bb992bfa06b2a38bdf8d4ff7b |
Close
Hashes for ra_fixture_generator-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd1e28e265b67f7f9498e5fa97bd175cea9264cf694e5614d4a991f974796d4f |
|
MD5 | ca5790058b301530a27d86d60bc77bca |
|
BLAKE2b-256 | 4fe75a9c28c04c8414bcc81db10ddceca3e11a86f2a2f0ed0d52152a89fe91aa |