OARepo model builder plugin for workflows
This plugin provides a model builder for the OARepo workflow service. Use it to add support for workflows to your OARepo model.
Installation and usage
To use the plugin, add the following to your model yaml file, section plugins.packages:
plugins:
packages:
- oarepo-model-builder-worklows
Then recompile your model to generate the new code.
Code added
The plugin adds the following code to your model:
- A new field
workflowto the model's parent record. The workflow is thus shared across all the versions of the record. - A new field
stateon the record. This field is used to store the current state of the record in the workflow. Each version of the record (published, draft, previous versions) has its own state. - Marhmallow schema of the parent record is extended with
oarepo_workflows.services.records.schema.WorkflowParentSchemaclass to allow passing the workflow to the record. - DB table of the parent record is extended with
oarepo_workflows.records.models.RecordWorkflowParentModelMixinto include the workflow field - A workflow component (
oarepo_workflows.services.components.workflow.WorkflowComponent) is added to model service components.
Tests
Note: the tests generated with oarepo-model-builder-tests plugin are not compatible with the workflow plugin. You need to write your own tests for the workflow.
Usage remarks
The workflow module depends on the record and initial data passed to the permission policy.
In the current version invenio does not pass those.
To circumvent this, you need to use the oarepo forks of the following invenio modules:
- invenio-records-resources
- invenio-drafts-resources
Metadata
Release files for oarepo-model-builder-workflows 1.0.7
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 | Actions |
|---|---|---|---|---|
| oarepo_model_builder_workflows-1.0.7.tar.gz | 4.1 kB | Without provenance | Details for oarepo_model_builder_workflows-1.0.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| oarepo_model_builder_workflows-1.0.7-py3-none-any.whl | Python 3 | none | any | Details for oarepo_model_builder_workflows-1.0.7-py3-none-any.whl |
Total release size: 9.9 kB
Release files / oarepo_model_builder_workflows-1.0.7.tar.gz
| Download URL | oarepo_model_builder_workflows-1.0.7.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1c88030c12f8b6656c1b84d24b23584b484eb961897b49eec0f047f6a1f648de
|
|
BLAKE2b-256 checksum How to use checksums |
34d7c19e370ff6959272de748bb56e9171825463d855dc8141389cce15ba6637
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / oarepo_model_builder_workflows-1.0.7-py3-none-any.whl
| Download URL | oarepo_model_builder_workflows-1.0.7-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1b342e2f096ca78c28c8788d3d2ea3fbcc62c2d556a56026a5d241e6a4e64813
|
|
BLAKE2b-256 checksum How to use checksums |
0fde3b94380b376ca2b1bd00a45dc2517e38619ac700ec804aee83ee5be9ebc6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Security for oarepo-model-builder-workflows 1.0.7
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.