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 action errors when codecov is "n" and replaced hardcoded names with placeholders #21

Merged
merged 4 commits into from
Nov 1, 2024

Conversation

pancan21
Copy link
Contributor

@pancan21 pancan21 commented Oct 28, 2024

PR Checklist

  • A description of the changes is added to the description of this PR.
  • If there is a related issue, make sure it is linked to this PR.
  • If you've fixed a bug or added code that should be tested, add tests!
    Not sure how to do that as it already throws an error on github actions when creating a repo without codecov but that kind of testing is not part of the current framework and would require something like act to test the actions.
    Alternatively one could use a script that extracts the run command. But I am not sure if that is very useful in the end as it can't take all previous steps into account.
  • Documentation in docs is updated

Description of changes

The Contributing.md contained a reference to Cookiecutter PyPackage which is replaced with an appropriate placeholder to avoid that adapting this section is overlooked by someone.
Also the hard-coded name of the maintainer in mkdocs.yml was replaced with a placeholder.

The "Run tests" action step in main.yml is changed such that it runs successfully also without codecov dependencies installed.

Docs are rewritten to make clear that no coverage report is created without codecov set to "y"

use project name placeholder instead of cookiecutter
remove flags only supported with pytest-cov if the dependency is not installed which happens when cookiecutter.codecov == "n" is selected.
added documentation of what happens when codecov is set to "n"
Replaced hard-coded maintainer name with github handle
@pancan21 pancan21 changed the title Fix action errors when codecov is "n" Fix action errors when codecov is "n" and replaced hardcoded names with placeholders Oct 28, 2024
@fpgmaas
Copy link
Owner

fpgmaas commented Nov 1, 2024

Thanks for your contribution!

@fpgmaas fpgmaas merged commit 90de471 into fpgmaas:main Nov 1, 2024
7 checks passed
@pancan21
Copy link
Contributor Author

pancan21 commented Nov 4, 2024

@fpgmaas Are you interested in running actions to check if all actions run properly across the different configurations? if yes I am happy to help.

@fpgmaas
Copy link
Owner

fpgmaas commented Nov 4, 2024

@pancan21 yes, that sounds like a good idea. Although I am not sure if that should be part of the actions. I have been playing with the idea of improving the unit tests as follows: Within the unit tests we call the cookies.bake(extra_context={...}) with a variety of configurations. And then for each 'baked' project, we run poetry install in it and run the unit tests to verify that the unit tests work as expected. What do you think?

@pancan21
Copy link
Contributor Author

pancan21 commented Nov 4, 2024

@fpgmaas but I think that would not catch any errors with the github actions (see fix in my pull request) only a subset of the commands e.g. unittests

To ensure that the actions will run as configured one would need to not only do the unit tests but also run all other commands within the actions or better the actions themself on something like a test repo to avoid manual additional labour. Maybe there is some other alternatives. But I can have a look if that is interesting :)

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.

2 participants