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

Fix test errors: codecov secret and missing package for docs #394

Merged
merged 16 commits into from
Feb 12, 2024

Conversation

adeliegorce
Copy link
Contributor

This PR adds two elements that were missing for the tests to pass:

  • Adds a secret for codecov. Although it is not required for public repos, uploads often fail when you don't have one. If you don't set one, it uses like a backup public token which has a rate limit (@steven-murray)
  • Adds the mock package as a requirement for the documentation: building readthedocs is failing without (called in conf.py)

@adeliegorce
Copy link
Contributor Author

To whoever reviews this PR, a question: why is there a list of requirements for docs in setup.cfg and a docs/requirements.txt file? it seems like the latter overruns the former? thanks

Copy link

codecov bot commented Feb 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (fac41f1) 95.99% compared to head (7f4d549) 95.99%.
Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #394   +/-   ##
=======================================
  Coverage   95.99%   95.99%           
=======================================
  Files          17       17           
  Lines        6113     6118    +5     
=======================================
+ Hits         5868     5873    +5     
  Misses        245      245           
Flag Coverage Δ
unittests 95.99% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Contributor

@steven-murray steven-murray left a comment

Choose a reason for hiding this comment

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

Thanks @adeliegorce. To answer your question -- I agree it's redundant. I strongly prefer simply defining it in setup.cfg (or better, pyproject.toml!) so I would suggest removing the docs/requirements.txt, but other people have different opinions. I like defining all the requirements in one place.

@@ -41,6 +41,8 @@ jobs:

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
Copy link
Contributor

Choose a reason for hiding this comment

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

You should update this to v4 as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried v4 but there is an issue that prevents codecov from finding the coverage.xml file. It is a regression issue currently being looked at by the team codecov/codecov-action#1278

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So for now I stick with v3 :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah OK :-)

@adeliegorce
Copy link
Contributor Author

Hi @steven-murray, thanks for the review. I have made the requested changes apart from switching to codecov-actions@v4 as there is a regression issue. Let's keep it in mind (or create an issue related to this) and do the update in a couple months once things are more stable.

@steven-murray steven-murray merged commit 369ffb6 into main Feb 12, 2024
9 checks passed
@adeliegorce adeliegorce deleted the add-codecov-secret branch March 5, 2024 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants