For the full documentation, see readthedocs
elabforms
A set of tools to create and manage standardized forms for eLabFTW.
Create a virtual environment
python3 -m venv myenv
source myenv/bin/activate
Installation
You will need template_part files to generate the final template.
These files are located in the elabforms_INTProjects and elabforms_BIDSMetadata repositories — private Git repositories at NIT.
Reminder:
A template_part is an elabform with a single groupfield.
You need to create a template_file_list.csv file listing the parts you want to concatenate, in this order, for example:
template_part_Example_1.json
template_part_Example_2.json
...
template_part_Example_N.json
Each line corresponds to one template part file.
User mode
Install the package from Test PyPI:
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple elabforms==0.0.6
or with pip:
pip install elabforms==0.0.8
Usage
-
Test the installation by running:
eform --help -
To create a new form, run:
eform template_file_list.csv template_generated.json
## Example
Assuming you have a file `template_file_list.csv` with the following content:
```csv
template_part_Example_1.json
template_part_Example_2.json
This will generate the file template_generated.json which will contain the content of the two files concatenated together.
let 's template_part_Example_1.json` 
with content:
```json
{
"elabftw": {
"extra_fields_groups": [
{
"id": 1,
"name": "GENERIC_BIDS_SESSION"
}
]
},
"extra_fields": {
"session_id": {
"type": "text",
"value": "",
"group_id": 1,
"position": 0,
"required": true,
"description": "Ex: '01 or predrug or 20231206'"
},
"Session duration": {
"type": "number",
"value": "",
"group_id": 1,
"position": 3,
"description": "The duration of the session [in minutes]",
"blank_value_on_duplicate": true
}
}
}
and template_part_Example_2.json ,
with the following content:
{
"elabftw": {
"display_main_text": true,
"extra_fields_groups": [
{
"id": 2,
"name": "Run "
}
]
},
"extra_fields": {
"TaskName": {
"type": "text",
"group_id": 2,
"position": 0,
"description": "Code name of the task (no space and only alphanumeric characters).\n Ex: 'rest or facesnback or headnodding'"
},
"RunNumber": {
"type": "text",
"value": "",
"group_id": 2,
"position": 2
},
"StartTime": {
"type": "text",
"value": "",
"group_id": 2
},
"RunComment": {
"type": "text",
"value": "",
"group_id": 2,
"position": 3,
"description": "Comment about the subject behavior during the run."
},
"TaskDescription": {
"type": "text",
"value": " ",
"group_id": 2,
"position": 1,
"description": "Description of the task"
}
}
}
This will generate the following file " template_generated.json" ,
which will contain the content of the two files template_part_Example_1.json and template_part_Example_2.json concatenated together.
{
"elabftw": {
"extra_fields_groups": [
{
"id": 1,
"name": "GENERIC_BIDS_SESSION"
},
{
"id": 2,
"name": "Run "
}
]
},
"extra_fields": {
"session_id": {
"type": "text",
"value": "",
"group_id": 1,
"position": 0,
"required": true,
"description": "Ex: '01 or predrug or 20231206'"
},
"Session duration": {
"type": "number",
"value": "91",
"group_id": 1,
"position": "3",
"description": "The duration of the session [in minutes]",
"blank_value_on_duplicate": true
},
"TaskName": {
"type": "text",
"group_id": 2,
"position": 0,
"description": "Code name of the task (no space and only alphanumeric characters).\n Ex: 'rest or facesnback or headnodding'"
},
"RunNumber": {
"type": "text",
"value": "",
"group_id": 2,
"position": 2
},
"StartTime": {
"type": "text",
"value": "",
"group_id": 2
},
"RunComment": {
"type": "text",
"value": "",
"group_id": 2,
"position": 3,
"description": "Comment about the subject behavior during the run."
},
"TaskDescription": {
"type": "text",
"value": " ",
"group_id": 2,
"position": 1,
"description": "Description of the task"
}
}
}
```bash
Metadata
Release files for elabforms 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| elabforms-0.1.tar.gz | 9.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| elabforms-0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.7 kB
Release files / elabforms-0.1.tar.gz
| Download URL | elabforms-0.1.tar.gz |
|---|---|
| Size | 9.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5958d721c41a334512b678f6c11ec55ec31220ccb764d99ee1c2078b900db1a4
|
|
BLAKE2b-256 checksum How to use checksums |
5fb867691c98f69982e9ac143c009f9fa79425a48723d93187f8db4db68c2822
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.7
|
Release files / elabforms-0.1-py3-none-any.whl
| Download URL | elabforms-0.1-py3-none-any.whl |
|---|---|
| Size | 11.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
29226e27d4cc271e6b16b1c3cc8fbbd51cca11d53bfe91eb2578de7f4967b758
|
|
BLAKE2b-256 checksum How to use checksums |
3be9b023350819ef3d57ded5477308967734e32a9556e6a6dbd329975a9d0be7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.7
|
Security for elabforms 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.