Given a Frictionless Table Schema, generates an Excel template with input validation
Project description
tableschema-to-template
Given a Frictionless Table Schema (like this), generate an Excel template with input validation (like this).
This is a proof of concept.
Usage
pip install tableschema-to-template
wget https://raw.githubusercontent.com/hubmapconsortium/tableschema-to-template/main/tests/fixtures/schema.yaml
ts2xl.py schema.yaml /tmp/template.xlsx
# Open with Excel:
open /tmp/template.xlsx
Development
From a checkout of the repo, run a demo:
pip install -r requirements.txt
PYTHONPATH="${PYTHONPATH}:tableschema_to_template" \
tableschema_to_template/ts2xl.py \
tests/fixtures/schema.yaml /tmp/template.xlsx
# Open with Excel:
open /tmp/template.xlsx
Run the tests:
pip install -r requirements-dev.txt
./test.sh
To build and publish,
- If you haven't already, generate a token on Pypi and create a
.pypirc
in your checkout. - Increment the version number in setup.py.
- Finally:
./publish.sh
Next steps
- How, and whether, to validate regex patterns. Possibilities:
- Don't even try!
- Add VBA to provide regex support in Excel.
- Target Google Sheets, which provides a regex function out of the box.
- Or target OpenOffice, where regexes can be turned on in the settings.
Related work
From the Frictionless community:
table-schema-resource-template
: Generates templates, but doesn't go beyond row headers.data-curator
: Desktop application for data entry based on Table Schema.csv-gg
: Web app which serves data entry form, and uses Validata API for validation.
For the biomedical ontologies community:
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 tableschema-to-template-0.0.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c2879c9366ba27755a6a663c16e5ca32fc5ef1bdd183e9083469b122859680c |
|
MD5 | 50df889475d78c06b04f6ee696d7d476 |
|
BLAKE2b-256 | 31692ca050e063ec9aaa3c4568c68fcb89c55c7044b5bfc9a76d21db2cc4d7a8 |
Close
Hashes for tableschema_to_template-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1c12a40105c28405e5329c1ef1118fa94bdac41dedee8dd44399a4e489bd918 |
|
MD5 | 9bb192bd5c01ad5c7542e299898c309c |
|
BLAKE2b-256 | 85302abb4ccb5520562c59f69b3607dc5059ebcaa0080d54cde83de943ff62c7 |