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
File details
Details for the file tableschema-to-template-0.0.8.tar.gz
.
File metadata
- Download URL: tableschema-to-template-0.0.8.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.0.post20201006 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e704845e1ae80ba4c109396076b667f976485e9537f06b97cd45028dbcd5adcf |
|
MD5 | 64b5e7287cfd347813a29054902b4ffb |
|
BLAKE2b-256 | c5a022d7a69f7ac4a506d0100e1eaada05439782568c7d113e9d88a58f598d73 |
File details
Details for the file tableschema_to_template-0.0.8-py3-none-any.whl
.
File metadata
- Download URL: tableschema_to_template-0.0.8-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.0.post20201006 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91a93731f160ad6e33f1cc5ae8efa42a2ee188bf2fb90e586e962129816ede2e |
|
MD5 | 99fde3d027bbd8362eceb11a8548e3dd |
|
BLAKE2b-256 | f2b6944fa9e48183f9f0e155db37c02ae743626dad46ecdd8ef0acfa5bb73a16 |