Skip to content

Remove tests from minimum profile#642

Merged
abelsiqueira merged 1 commit intomainfrom
594-remove-tests-from-minimum
Aug 29, 2024
Merged

Remove tests from minimum profile#642
abelsiqueira merged 1 commit intomainfrom
594-remove-tests-from-minimum

Conversation

@abelsiqueira
Copy link
Copy Markdown
Member

Checklist before requesting a review

  • I have read the contribution guidelines
  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • All user facing changes have been added to CHANGELOG.md

Type of change

Please delete options that are not relevant.

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

List of related issues or pull requests**

Refs:

Describe the changes made in this pull request

Introduces a question AddLocalTests to control the existence of the tests folder.

If the user selects 'GitHub Actions -> Build' or 'Code analysis (using SonarCloud)'
then this option is also selected.

Instructions to review the pull request

Possible things to check:

  • If strategy=minimal, then tests are not present
  • If strategy=recommended, then tests are present
  • If strategy=ask and only GitHub Actions -> Build is selected, then tests are present
  • If strategy=ask and only Code analysis (using SonarCloud) is selected, then tests are present

Install the requirements

cd $(mktemp -d --tmpdir py-tmpl-XXXXXX)
pip install pipx
pipx install copier

Create a new package using the template

copier copy --vcs-ref <YOUR_BRANCH> https://github.com/nlesc/python-template test_package
# Create a local environment to test your generated package locally
python -m venv env
source env/bin/activate
python -m pip install --upgrade pip setuptools
python -m pip install '.[dev,publishing]'

Then run the tests

pytest

Introduces a question AddLocalTests to control the existence of the tests folder.

If the user selects 'GitHub Actions -> Build' or 'Code analysis (using SonarCloud)'
then this option is also selected.

Related to #594
@abelsiqueira abelsiqueira force-pushed the 594-remove-tests-from-minimum branch from 567335c to d55fbb4 Compare August 29, 2024 14:17
@abelsiqueira abelsiqueira marked this pull request as ready for review August 29, 2024 14:32
@abelsiqueira abelsiqueira requested a review from fdiblen August 29, 2024 15:11
Copy link
Copy Markdown
Member

@fdiblen fdiblen left a comment

Choose a reason for hiding this comment

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

looks great! Thank you, @abelsiqueira

🦘

@abelsiqueira abelsiqueira merged commit 79a3101 into main Aug 29, 2024
@abelsiqueira abelsiqueira deleted the 594-remove-tests-from-minimum branch August 29, 2024 19:26
@abelsiqueira
Copy link
Copy Markdown
Member Author

Thanks for the review

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