Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to repo-config #488

Merged
merged 8 commits into from
Jul 7, 2023
Merged

Migrate to repo-config #488

merged 8 commits into from
Jul 7, 2023

Conversation

llucax
Copy link
Contributor

@llucax llucax commented Jul 6, 2023

  • Migrate to use repo-config
  • Fix pylint false positive for pydantic.parse_raw_as
  • Add more cross-linking to generated docs
  • Drop dependency on the toml package
  • Fix missing import in a code example
  • Fix some typing issues in src/conftest.py
  • Add explicit dependency to types-protobuf

@llucax llucax requested a review from a team as a code owner July 6, 2023 10:20
@llucax llucax self-assigned this Jul 6, 2023
@github-actions github-actions bot added part:docs Affects the documentation 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:config Affects the configuration management labels Jul 6, 2023
@llucax llucax added type:tech-debt Improves the project without visible changes for users and removed part:docs Affects the documentation 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:config Affects the configuration management labels Jul 6, 2023
@llucax llucax added this to the v0.23.0 milestone Jul 6, 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've just have a few cosmetics to check for, LGTM

@github-actions github-actions bot added part:docs Affects the documentation 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:config Affects the configuration management labels Jul 7, 2023
@llucax
Copy link
Contributor Author

llucax commented Jul 7, 2023

Updated, it also fixes the CI (isort) issues

llucax added 3 commits July 7, 2023 15:09
Many files were updated from the generated files by repo-config.

There are some changes that need some clarification:

GitHub workflow:
- The explicit cache is not needed because the Python action supports
  caching natively.
- The announcement discussion for new release is not created anymore as
  it was mainly noise, nobody ever used it.

pyproject.toml:
- We ping build dependencies, as they don't affect users.
- pytest-cov dependency is removed because we are not actually producing
  coverage reports.

Signed-off-by: Leandro Lucarella <[email protected]>
We add inventories for all the dependencies we can find an inventory
for.

Signed-off-by: Leandro Lucarella <[email protected]>
Since we require Python 3.11 or later, we can use the built-in tomllib
module instead.

Signed-off-by: Leandro Lucarella <[email protected]>
llucax added 4 commits July 7, 2023 15:09
These errors went unnoticed in the past because the file wasn't being
checked by `mypy`.

We also need to ignore type-checking for sybil, as it doesn't have
typing information.

Signed-off-by: Leandro Lucarella <[email protected]>
There is very little gain in making the import of the `microgrid` module
to happen automatically and it makes the `conftest.py` script not
generic enough to be shared by different projects (which is something
we eventually want to do).

Signed-off-by: Leandro Lucarella <[email protected]>
Signed-off-by: Leandro Lucarella <[email protected]>
This is for running `mypy`. For some unknown reason before migrating to
repo-config this dependency was pulled automatically (probably by the
`--install-types` `mypy` option) but now it isn't anymore.

Without this, `mypy` crashes with this error:

```
nox > mypy --install-types --namespace-packages --non-interactive --explicit-package-bases --strict -p frequenz.sdk -p benchmarks -p docs -p examples -p noxfile -p tests -p src
Traceback (most recent call last):
  File "/home/luca/devel/sdk/.nox/mypy/bin/mypy", line 8, in <module>
    sys.exit(console_entry())
             ^^^^^^^^^^^^^^^
  File "/home/luca/devel/sdk/.nox/mypy/lib/python3.11/site-packages/mypy/__main__.py", line 15, in console_entry
    main()
  File "mypy/main.py", line 95, in main
  File "mypy/main.py", line 174, in run_build
  File "mypy/build.py", line 197, in build
  File "mypy/build.py", line 270, in _build
  File "mypy/build.py", line 2927, in dispatch
  File "mypy/build.py", line 3325, in process_graph
  File "mypy/build.py", line 3441, in process_stale_scc
  File "mypy/build.py", line 2586, in generate_unused_ignore_notes
  File "mypy/errors.py", line 672, in generate_unused_ignore_errors
  File "mypy/errors.py", line 439, in _add_error_info
AssertionError
```

Signed-off-by: Leandro Lucarella <[email protected]>
@llucax llucax enabled auto-merge July 7, 2023 13:29
@llucax llucax added this pull request to the merge queue Jul 7, 2023
Merged via the queue into frequenz-floss:v0.x.x with commit 79fb177 Jul 7, 2023
@llucax llucax deleted the repo-config branch July 7, 2023 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
part:actor Affects an actor ot the actors utilities (decorator, etc.) part:config Affects the configuration management part:data-pipeline Affects the data pipeline part:docs Affects the documentation part:tests Affects the unit, integration and performance (benchmarks) tests part:tooling Affects the development tooling (CI, deployment, dependency management, etc.) type:tech-debt Improves the project without visible changes for users
Projects
Development

Successfully merging this pull request may close these issues.

2 participants