Skip to content

Releases: LzLang/Zendro-Converter

Release of the converter

19 Dec 12:30
cf1f484
Compare
Choose a tag to compare
v1.0.0

Update Readme.md

convert v0.0.6

01 Jun 14:58
14c6c48
Compare
Choose a tag to compare
convert v0.0.6 Pre-release
Pre-release

convert:
Goal: Get input from startup arguments

Example: python convert.py "..\BrAPI_JSON_Schema_2-1\schemas\BrAPI-Core\Study.json" "..\results"

  • First argument: convert.py
  • Second argument: Path to input file
  • Third argument: Path to output folder (outputfile is named after input file)

Observation: Currently only one file at a time, planing to give just the path and automatically searches and opens json files


convertAPI:
Goal: Cleaning up the file

  • Commented every function
  • Changed names of functions and variables to a more readable and suitable name
  • Changed Exception handling (when opening a file excepts specifically OSError logs the occured error)
  • Merged getPropType and getZendroType to get_type for a better overview

Converter v0.0.5

13 May 14:08
8cda52e
Compare
Choose a tag to compare
Converter v0.0.5 Pre-release
Pre-release

The current version of the converter is able to read BrAPI JSON-file and extracting only the properties that are compatible to the Zendro-API (Boolean, Integer and String).
All properties, that are extracted, will be written to a new JSON-file.

Current methods/functions:
--> logMSG(msg): Write a msg with date and time to a log
--> readJSON(path, fname): Read in a JSON-file
--> writeJSON(path, fname, propData): Write data from properties to a JSON-file
--> getPropType(types): Return compatible/allowed types
--> getZendroType(types): Convert and return the Zendro types
--> getPropData(data): Return a dictionary with only properties, that have a Zendro compatible type

ToDo:
- Testing with different/other files
- Checking if output is correct or if properties are missing
- Writing a function, that goes through the file system/directories and read the JSON-files automtically
- Setting output to same filename as input
- Commenting whole code and writing a documentation
- Further testing