From c0da3e3d8f9fe251c196b4fd67c338cbf5634120 Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Sat, 14 Oct 2023 13:41:38 +0200 Subject: [PATCH 1/2] feat(tox): new release environment Install and run `zest.releaser`'s `fullrelease` command to generate, and upload a new release of the distribution. --- src/plone/meta/default/tox.ini.j2 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/plone/meta/default/tox.ini.j2 b/src/plone/meta/default/tox.ini.j2 index 45b7847d..61a1715d 100644 --- a/src/plone/meta/default/tox.ini.j2 +++ b/src/plone/meta/default/tox.ini.j2 @@ -43,3 +43,12 @@ envlist = # _your own configuration lines_ # """ ## + +[testenv:release] +description = create a new release +skip_install = true +deps = + zest.release[recommended] + -c %(constraints_file)s +commands = + fullrelease From a372ce86078e3764bde8d6eb9bc5b55ac7c75573 Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Fri, 17 Nov 2023 13:50:40 +0100 Subject: [PATCH 2/2] feat(docs): explain the tox environments --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index cd887d0e..a4a1e3da 100644 --- a/README.md +++ b/README.md @@ -425,6 +425,8 @@ _custom configuration_ #### `tox.ini` +##### Testing + Depending on the test runner that you want to use, `plone.meta` will adapt `tox.ini` to it. In the `[tox]` TOML table in `.meta.toml`, set the value for the key `test_runner` to `pytest` if you want to use [`pytest`](https://pypi.org/project/pytest). @@ -435,6 +437,23 @@ By default, it is set to nothing, that is, the repository's top level is already If either a `tests` or `src` folder exists, then they are used as safe fallbacks. +##### Environments + +`plone/meta` generates the following `tox` environments: + +- `init`: prepares the environment (only if `mxdev` is used) +- `test`: runs the package's python tests +- `coverage`: runs the package's python tests and generates a coverage report out of it +- `dependencies`: checks that all python dependencies are specified properly +- `dependencies-graph`: generates a graph to visualize the dependencies tree/forest +- `circular`: checks that within the dependency graph there are no circular imports +- `release-check`: runs a few sanity checks to know if the distribution is ready to be released +- `release`: releases a new version of the distribution +- `format`: runs python/HTML/XML code formatters on the source code +- `lint`: runs quite some python linters + +##### Options + Add the `[tox]` TOML table in `.meta.toml`, and set the extra configuration for `tox` under the `extra_lines` key. ```toml