Flatfile importer for OS2mo/LoRa
Project description
RA Flatfile importer
OS2mo/LoRa flatfile importer.
Build
docker build . -t ra-flatfile-importer
Which yields:
...
Successfully built ...
Successfully tagged ra-flatfile-importer:latest
After which you can run:
docker run --rm ra-flatfile-importer
Which yields:
Usage: flatfile_importer.py [OPTIONS] COMMAND [ARGS]...
Flatfile importer.
Used to validate and load flatfile data (JSON) into OS2mo/LoRa.
Options:
--help Show this message and exit.
Commands:
lora Lora Flatfile importer.
mo OS2mo Flatfile importer.
Usage
The primary usage of the tool is to upload flat-files to LoRa / OS2mo.
docker run --rm ra-flatfile-importer lora upload < lora.json
docker run --rm ra-flatfile-importer mo upload < mo.json
The tool can generate dummy files to test out this functionality:
docker run --rm ra-flatfile-importer lora generate --name "Aarhus Kommune" > lora.json
docker run --rm ra-flatfile-importer mo generate --name "Aarhus Kommune" > mo.json
These test files should be uploadable to Lora/MO and produce a valid MO instance.
The tool has various other commands too, such as producing the validation schema for the flat file format:
docker run --rm ra-flatfile-importer lora schema --indent 4
Which yields:
{
"title": "LoraFlatFileFormatModel",
"description": "Flatfile format for LoRa.\n\nMinimal valid example is {}.",
"type": "object",
"properties": {
"facetter": {
...
},
...
}
}
Or for validating whether a file is invalid:
docker run --rm ra-flatfile-importer lora validate < lora.json
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
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
File details
Details for the file ra-flatfile-importer-0.1.0.tar.gz
.
File metadata
- Download URL: ra-flatfile-importer-0.1.0.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.8.10 Linux/5.4.0-1038-gcp
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6c09f14eee2163c7eff14a66b055a83c43181ce2c830ded3a2fd7b727790803 |
|
MD5 | c76853e013fc60be24a7480ba19e1b37 |
|
BLAKE2b-256 | f0b7d083f02244104c2101d47019fa5a9191ee45b731a6984f5f4ba98a94e997 |
File details
Details for the file ra_flatfile_importer-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: ra_flatfile_importer-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.8.10 Linux/5.4.0-1038-gcp
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 804eb33455df5bff79af5b1b26a3218dfd882535897cb63f59e994b71ce1854a |
|
MD5 | fe59cdbe35cedd467db979aff0925346 |
|
BLAKE2b-256 | 3c7fa5df6859465d5dac2e0f77fc2e7582337b940e359c6df005e1a88f9d7bc5 |