Skip to content

Conversation

@llucax
Copy link
Contributor

@llucax llucax commented Aug 30, 2023

The new repo-config version brings a few important changes:

  • Dependabot grouping
  • Replace darglint with pydoclint
  • Introduction of flake8 basic checks
  • Start checking docstrings and flake8 basic checks in tests and benchmarks

Becuase of this, this PR is very big, as it needs to fix a lot of issues detected by pydoclint and flake8.

The first commits, up to Add mypy configuration to pyproject.toml deal with the upgrade of repo-config templates.

The rest of the commits are documentation fixes (first from pydoclint and then from pydocstyle) plus some other flake8 fixes, usually in that order.

@github-actions github-actions bot added part:tests Affects the unit, integration and performance (benchmarks) tests part:tooling Affects the development tooling (CI, deployment, dependency management, etc.) part:data-pipeline Affects the data pipeline part:actor Affects an actor ot the actors utilities (decorator, etc.) part:microgrid Affects the interactions with the microgrid labels Aug 30, 2023
@llucax llucax force-pushed the repo-config-v0.6 branch 3 times, most recently from b926787 to f0a7943 Compare August 30, 2023 19:02
@llucax llucax added the cmd:skip-release-notes It is not necessary to update release notes for this PR label Aug 30, 2023
@llucax llucax added this to the v1.0.0-rc milestone Aug 30, 2023
@llucax
Copy link
Contributor Author

llucax commented Aug 30, 2023

OK, this is working and only waiting for the repo-config release. It would be good to merge ASAP so new PRs don't introduce new flake8 failures and this needs to be updated ad-infinitum.

@llucax
Copy link
Contributor Author

llucax commented Aug 30, 2023

Nice side effect: this also speeds up the CI by a minute or two.

@llucax llucax force-pushed the repo-config-v0.6 branch 2 times, most recently from 56e1c9f to aefd5d3 Compare September 2, 2023 12:47
@llucax llucax marked this pull request as ready for review September 2, 2023 12:47
@llucax llucax requested a review from a team as a code owner September 2, 2023 12:47
@llucax
Copy link
Contributor Author

llucax commented Sep 2, 2023

Ready for review, updated branch protection rules for the new matrix variable, enabled auto-merge.

@llucax llucax enabled auto-merge September 2, 2023 13:07
Now `pydoclint` is used instead.

Signed-off-by: Leandro Lucarella <[email protected]>
These are now installed via repo-config.

Signed-off-by: Leandro Lucarella <[email protected]>
Now `flake8` is used to check docstrings, so the optional depdendencies
should match that.

Also add the configuration for `flake8` and the plugins it runs.

Signed-off-by: Leandro Lucarella <[email protected]>
Flake8 runs much faster than pylint, so it is preferred.

Signed-off-by: Leandro Lucarella <[email protected]>
Adds command-line options and also adds the stub dependencies.

Signed-off-by: Leandro Lucarella <[email protected]>
Collected positional and keyword argument should be documented using
also the asterisks.

Signed-off-by: Leandro Lucarella <[email protected]>
Signed-off-by: Leandro Lucarella <[email protected]>
Signed-off-by: Leandro Lucarella <[email protected]>
Signed-off-by: Leandro Lucarella <[email protected]>
Signed-off-by: Leandro Lucarella <[email protected]>
Signed-off-by: Leandro Lucarella <[email protected]>
Signed-off-by: Leandro Lucarella <[email protected]>
Signed-off-by: Leandro Lucarella <[email protected]>
Signed-off-by: Leandro Lucarella <[email protected]>
These imports are used to break circular imports in a very convoluted
set of circular dependencies. To do that some types need to be specified
as strings and use `typing.TYPE_CHECKING` to conditionally add imports,
and it seems like flake8 doesn't detect those strings as types being
used.

Signed-off-by: Leandro Lucarella <[email protected]>
`microgrid.grid.get()` returns `Grid | None`, so before accessing any
attributes from `grid` we need to make sure it is not `None`.

Signed-off-by: Leandro Lucarella <[email protected]>
@llucax llucax changed the title Upgrade to repo-config v0.6.0 Upgrade to repo-config v0.6.1 Sep 3, 2023
@llucax llucax self-assigned this Sep 4, 2023
Copy link
Contributor

@daniel-zullo-frequenz daniel-zullo-frequenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only found a few cosmetics to check for

@llucax
Copy link
Contributor Author

llucax commented Sep 4, 2023

@daniel-zullo-frequenz I just replied to your comments. If it's OK with you please approve so it can be merged.

Co-authored-by: daniel-zullo-frequenz <[email protected]>
Signed-off-by: Leandro Lucarella <[email protected]>
@llucax llucax added this pull request to the merge queue Sep 4, 2023
Merged via the queue into frequenz-floss:v0.x.x with commit 385b81b Sep 4, 2023
@llucax llucax deleted the repo-config-v0.6 branch September 4, 2023 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cmd:skip-release-notes It is not necessary to update release notes for this PR part:actor Affects an actor ot the actors utilities (decorator, etc.) part:data-pipeline Affects the data pipeline part:microgrid Affects the interactions with the microgrid part:tests Affects the unit, integration and performance (benchmarks) tests part:tooling Affects the development tooling (CI, deployment, dependency management, etc.)

Projects

Development

Successfully merging this pull request may close these issues.

3 participants