A Copier template for creating eccenca Corporate Memory packages.
- Python 3.8+
- Copier >= 9.0.0:
pip install copieroruv tool install copier
Create a new package from this template:
copier copy /path/to/package-template my-new-packageOr from a git repository:
copier copy --vcs-ref=main https://github.com/eccenca/cmem-package-template.git my-new-package| Variable | Description | Default |
|---|---|---|
package_type |
Type: vocabulary, project | vocabulary |
package_id |
Package ID (lowercase, hyphens allowed) | - |
package_name |
Human-readable name | - |
package_description |
Short description | - |
package_comment |
A maintainer or publisher comment | - |
python_dependencies |
Comma-separated Python package dependencies | - |
vocab_dependencies |
Comma-separated vocabulary/project dependencies | - |
my-new-package/
├── .copier-answers.env
├── .copier-answers.yml
├── .gitignore
├── .gitlab-ci.yml
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── Taskfile.yaml
└── {package_id}/
└── manifest.json
The default license we add is Apache License 2.0 (Apache-2.0), see https://spdx.org/licenses/ if you need a different.
After generating the package, use Task to run common operations:
task # List available tasks
task build # Build package archive
task check # Run test suite
task import # Import package to Corporate Memory
task export # Export package from Corporate Memory
task publish # Publish to marketplaceAdd files (package contents) by copying those into the package folder (or respective sub-folder) and referencing them in the files section.
Add the following structure to add a graph. register_as_vocabulary and import_into are optional instructions. We suggest to organize graphs in a respective sub-folder (here graphs/), but this is up to you:
"files": [
…
{
"file_type": "graph",
"file_path": "graphs/file.ttl",
"graph_iri": "http://www.example.org/file/",
"register_as_vocabulary": true,
"import_into": [
"http://www.example.org/integration_graph/"
]
},
…
]Add the following structure to add a project. We suggest to organize projects in a respective sub-folder (here projects/), but this is up to you:
"files": [
…
{
"file_type": "project",
"file_path": "projects/product-integration-demo.zip",
"project_id": "product-integration-demo"
},
…
]