Skip to content

Data Element Profile docx generator

License

Unknown, Unknown licenses found

Licenses found

Unknown
COPYING
Unknown
COPYING.fr
Notifications You must be signed in to change notification settings

open-data/deplane

Repository files navigation

skydiver

deplane

Generate a Data Element Profile docx file based on a ckanext-recombinant schema. A Data Element Profile docx file is easier for users to understand, share and edit than the ckanext-recombinant JSON/YAML schema and choice files that it represents.

Installation

Install deplane and its dependencies into a Python virtual environment:

python3 -m venv venv
./venv/bin/activate
python setup.py develop

Confirm that deplane is installed in the Python virtual environment:

which deplane

Usage

$ deplane <lang> <url> <filename>

e.g.

$ deplane fr https://open.canada.ca/data/recombinant-schema/consultations.json consultations-fr.docx

skydiver

replane

Reverse engineers the deplane process, transforming a Data Element Profile docx file back into a Recombinant Schema YAML file. Note that the replane tool only works with the English versions of the DEPs.

Replane handles text changes to:

  • Field Names
  • Descriptions
  • Obligations (semantic descriptions)
  • Occurrences (semantic descriptions)
  • Validations (semantic descriptions)
  • Character Limits (semantic descriptions)

It will handle any changes to choice lists, raising an exception if a choice value is removed/modified as this would entail a data migration. For fields which use choices_file, the respective YAML file would be updated.

It will also add field comments with the heading from the DEP. E.g. # DEP: 1-1 Reference Number

The tool attempts to preserve any formatting and inline comments.

It does NOT update:

  • any triggers
  • any Excel formulae
  • any example values (TBD)

Usage

$ replane <yaml/file/path.yaml> <dep/docx/path.docx> --max-line|-l <INT:Optional (default: 130)>

e.g.

$ replane src/ckanext-canada/ckanext/canada/tables/travelq.yaml dep/travelq-en.docx

About

Data Element Profile docx generator

Resources

License

Unknown, Unknown licenses found

Licenses found

Unknown
COPYING
Unknown
COPYING.fr

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages