osl-incubator / scicookie

Cookiecutter template for a Python package.
https://osl-incubator.github.io/scicookie
Other
11 stars 18 forks source link

ci(template): update ci configuration for main branch only #237

Closed Naman-Priyadarshi closed 6 months ago

Naman-Priyadarshi commented 6 months ago

Pull Request description

This pull request updates the CI configuration to ensure that it only executes for the main branch. This change is being made to streamline our CI process and ensure that tests and workflows are only triggered for changes made to the main branch.

Fixes #214

How to test these changes

Pull Request checklists

This PR is a:

About this PR:

Author's checklist:

Additional information

Reviewer's checklist

Copy and paste this template for your review's note:

## Reviewer's Checklist

- [ ] I managed to reproduce the problem locally from the `main` branch
- [ ] I managed to test the new changes locally
- [ ] I confirm that the issues mentioned were fixed/resolved
Naman-Priyadarshi commented 6 months ago

Hi @Saransh-cpp , could you help me out here? I need help understanding why the test is failing. The pre-commit hooks were executed successfully yet I'm having a linter error

Naman-Priyadarshi commented 6 months ago

See how the smoke tests are failing whenever the generated project is using prettier, pre-commit, and poetry. The tests are not failing for scicookie, but they are failing for the project generated using scicookie, we test both the things. I generally like to create a new project with scicookie enabling these options and run pre-commit inside the folder to see the failing changes. I did the same this time and it edited the code generated from the following snippet -

Alternatively, you can run these tests locally, or read the configuration of the tests in the bash files and reproduce them on your own. I hope this helps!

Thanks, @Saransh-cpp. I was able to reproduce the error by creating a new project with default settings and using poetry, pre-commit, and prettier. This led to using pre-commit run --all-files to identify the required linter changes.

github-actions[bot] commented 6 months ago

:tada: This PR is included in version 0.7.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: