Skip to content
Snippets Groups Projects
Commit eb18f504 authored by Yoann Schneider's avatar Yoann Schneider :tennis: Committed by Manon Blanco
Browse files

Add release notes for 0.3.6

parent fab850cc
No related branches found
No related tags found
1 merge request!477Add release notes for 0.3.6
Pipeline #153707 passed
# Releases
## 0.3.6
Released on **22 Dec 2023** • View on [Gitlab](https://gitlab.teklia.com/workers/base-worker/-/releases/0.3.6)
### Breaking changes
- The `arkindex_worker.git` module was removed. It was not used locally by any workers, this module was only used to expose some workflows from [python-gitlab](https://python-gitlab.readthedocs.io/en/stable/). Please refer to their documentation if your worker needs to communicate with a Git instance.
- Following [Arkindex's 1.5.3 release](https://teklia.com/our-solutions/arkindex/releases/arkindex-release-153/), the `model_usage` configuration parameter has been updated to a tri-enum. To migrate your workers:
- `model_usage: false` becomes `model_usage: disabled`
- `model_usage: true` becomes `model_usage: required`
The `supported` value means that the model is supported by a worker but not required to make it work.
### Project architecture
- [PEP 621](https://peps.python.org/pep-0621/) encourages user to store most of the package's metadata in the `pyproject.toml`. We followed this proposition both for the `arkindex-worker` package and the worker template.
### Arkindex API
- The details of the model available to the worker is now stored under the `model_details` attribute.
- The [list_corpus_entities](https://gitlab.teklia.com/workers/base-worker/-/blob/0.3.6/arkindex_worker/worker/entity.py?ref_type=tags#L358) API helper now stores the entities in the `entities` attribute instead of returning them.
- A reminder was added to prevent making changes to the Arkindex Cache schema without bumping the Version of said cache.
- Each dataset's archive is now properly deleted after processing.
- The path to a [Dataset](https://gitlab.teklia.com/workers/base-worker/-/blob/0.3.6/arkindex_worker/models.py?ref_type=tags#L268)'s archive is now stored under the `filepath` property.
- The new [create_element_parent](https://gitlab.teklia.com/workers/base-worker/-/blob/0.3.6/arkindex_worker/worker/element.py?ref_type=tags#L286) API helper allows to create a link between two elements.
- The [create_sub_element](https://gitlab.teklia.com/workers/base-worker/-/blob/0.3.6/arkindex_worker/worker/element.py?ref_type=tags#L84) was updated to support creating children element without zones and under a parent without a zone.
- A new user configuration type was introduced to be able to select Arkindex `Models`. Learn more about it in the [documentation](https://workers.arkindex.org/contents/workers/yaml/#model-parameters).
### Worker template
- When the provided `slug` had more than one word, it was invalid for either:
- the package name, because the user used `_` as word delimiter,
- the module directory's name, because the user used `-` as word delimiter.
The package name and the module directory's name are now both computed from the slug, making sure that:
- the package name uses `-` as word delimiter,
- the module directory's name uses `_` as word delimiter.
### Documentation
- A link to the documentation was added:
- in the [README](https://gitlab.teklia.com/workers/base-worker/-/blob/0.3.6/README.md?ref_type=tags&plain=1#L9),
- as a GitLab badge on the repo.
- Some sections in the documentation were renamed to improve readability.
### Misc
- While we removed the `black` formatter from our CI workflow, we replaced it by [Ruff's](https://docs.astral.sh/ruff/formatter/) which respects most of its rules.
- Many linting rules supported by the [Ruff](https://docs.astral.sh/ruff/rules/) formatter were added to improve the style of the codebase:
- [Pathlib usage](https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth)
- [Pytest style](https://docs.astral.sh/ruff/rules/#flake8-pytest-style-pt)
- [Flake8's simplify](https://docs.astral.sh/ruff/rules/#flake8-simplify-sim)
- [Flake8's bugbear](https://docs.astral.sh/ruff/rules/#flake8-bugbear-b)
- [Pyupgrade](https://docs.astral.sh/ruff/rules/#pyupgrade-up)
- This project is now licensed under the [MIT](https://en.wikipedia.org/wiki/MIT_License) license.
## 0.3.5
Released on **8 Nov 2023** • View on [Gitlab](https://gitlab.teklia.com/workers/base-worker/-/releases/0.3.5)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment