diff --git a/docs/releases.md b/docs/releases.md index 62556775f42ce550a810d8874125c0cba1bab0d6..35e537fa15f9aa0b1645e487849043887afbddcd 100644 --- a/docs/releases.md +++ b/docs/releases.md @@ -1,5 +1,68 @@ # 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)