Skip to content

Miscelaneous improvements#16

Merged
leandro-lucarella-frequenz merged 9 commits into
frequenz-floss:mainfrom
llucax:misc-improvements
Apr 11, 2023
Merged

Miscelaneous improvements#16
leandro-lucarella-frequenz merged 9 commits into
frequenz-floss:mainfrom
llucax:misc-improvements

Conversation

@leandro-lucarella-frequenz
Copy link
Copy Markdown
Contributor

  • Rename dev nox sessions to make them more explicit
  • Rename optional dependencies to match nox sessions
  • Add optional dependencies for actor, app and lib
  • Move py.typed to frequenz.repo.config
  • Use imports from the top-level package
  • Make flatten() really return an iterator
  • Auto-discover pytest paths
  • Fix pytest invocation
  • Improve general module documentation

llucax added 9 commits April 3, 2023 15:46
For projects that have optional dependencies, our standard dev optional
dependencies could cause clashes, or limit downstream projects.

Using the `dev-` prefix makes it very clear that they are `dev`
dependencies.

Signed-off-by: Leandro Lucarella <leandro.lucarella@frequenz.com>
This makes it more clear which optional dependencies should be used for
each session.

Signed-off-by: Leandro Lucarella <leandro.lucarella@frequenz.com>
For now they are empty, but they are necessary to avoid the users
getting a warning about non-existing optional depedencies.

Signed-off-by: Leandro Lucarella <leandro.lucarella@frequenz.com>
This is actually the top-level package we are shipping, so we shouldn't
be including files in the parent namespaces.

Signed-off-by: Leandro Lucarella <leandro.lucarella@frequenz.com>
The top-level package is frequenz.repo.config so we import from there.
It also makes the code more clear.

Signed-off-by: Leandro Lucarella <leandro.lucarella@frequenz.com>
Signed-off-by: Leandro Lucarella <leandro.lucarella@frequenz.com>
Look for pytest paths in the `pyproject.toml` file and add them to
`extra_paths` automatically.

Signed-off-by: Leandro Lucarella <leandro.lucarella@frequenz.com>
`pytest` was invoked with all source and extra paths, but it shouldn't.
Instead the path should be configured by the user in pyproject.toml.

If the user pass any positional arguments to the `pytest` sessions, then
those arguments will be forwarded verbatim to `pytest`.

Since `pytest` works with the default path `tests`, we leave that in the
extra paths in case the user is not defining it explicitly in the
configuration, but for more esoteric setups, the test paths should be
automatically added.

This commit also updates the default configuration for `api` to replace
`tests` with `pytests` in the extra paths (even when the user should
configure it explicitly, we want to remove `tests` as it might be for
something else) and also to replace `src` with `py` in the source paths.

Signed-off-by: Leandro Lucarella <leandro.lucarella@frequenz.com>
Split `nox` sections into a section for writing the `noxfile.py` and a
section about configuring the `pyproject.toml` file.

Signed-off-by: Leandro Lucarella <leandro.lucarella@frequenz.com>
@leandro-lucarella-frequenz leandro-lucarella-frequenz added part:docs Affects the documentation part:nox Affects the configuration of nox labels Apr 11, 2023
@leandro-lucarella-frequenz leandro-lucarella-frequenz added this to the v0.1.0 milestone Apr 11, 2023
@leandro-lucarella-frequenz leandro-lucarella-frequenz merged commit 97c1259 into frequenz-floss:main Apr 11, 2023
@leandro-lucarella-frequenz leandro-lucarella-frequenz deleted the misc-improvements branch April 11, 2023 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

part:docs Affects the documentation part:nox Affects the configuration of nox

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants