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

Refactor the tests for forecast.solar #47

Merged
merged 15 commits into from
May 1, 2024
Merged

Conversation

klaasnicolaas
Copy link
Contributor

@klaasnicolaas klaasnicolaas commented Apr 27, 2024

This PR replaces the old tests with new ones, up to 94% codecoverage.

  • Add new package: aresponses, syrupy and pytest-freezer
  • Add new CI, which testing matrix for python 3.11, 3.12 and upload coverage to codecov (add key in repo secrets!)

@klaasnicolaas klaasnicolaas added refactor Improvement of existing code, not introducing new features. ci Work that improves the continue integration. labels Apr 27, 2024
.github/workflows/tests.yaml Outdated Show resolved Hide resolved
src/forecast_solar/forecast_solar.py Outdated Show resolved Hide resolved
.github/workflows/tests.yaml Outdated Show resolved Hide resolved
.github/workflows/tests.yaml Outdated Show resolved Hide resolved
@klaasnicolaas
Copy link
Contributor Author

klaasnicolaas commented Apr 29, 2024

My proposal is to keep the CI as I initially committed, because even with the last suggestions I see that the coverage file is not found. So I'd rather keep what I know for sure works, than continue to muddle through.

Copy link
Contributor

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

You can check this repo for a working workflow:
https://github.com/home-assistant-libs/zwave-js-server-python/

.github/workflows/tests.yaml Outdated Show resolved Hide resolved
@klaasnicolaas
Copy link
Contributor Author

klaasnicolaas commented Apr 29, 2024

zwave-js is using different upload/download artifact versions.

Currently codecov does not see a config file, so nothing is uploaded...
warning - 2024-04-29 20:25:39,974 -- No config file could be found. Ignoring config.

Maybe you can add a codecov token to the secrets? Because I can't.

@klaasnicolaas
Copy link
Contributor Author

@MartinHjelmare can you add a codecov token secret to this repository?

@MartinHjelmare
Copy link
Contributor

I've added the token secret. 👍

Copy link
Contributor

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

pyproject.toml Outdated Show resolved Hide resolved
Copy link

codecov bot commented May 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (master@6e53f8e). Click here to learn what that means.

Additional details and impacted files
@@            Coverage Diff            @@
##             master      #47   +/-   ##
=========================================
  Coverage          ?   92.89%           
=========================================
  Files             ?        4           
  Lines             ?      211           
  Branches          ?       42           
=========================================
  Hits              ?      196           
  Misses            ?        7           
  Partials          ?        8           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

Nice!

@klaasnicolaas klaasnicolaas merged commit 4ffa970 into master May 1, 2024
11 checks passed
@klaasnicolaas klaasnicolaas deleted the klaas-2024-008 branch May 1, 2024 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Work that improves the continue integration. refactor Improvement of existing code, not introducing new features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants