-
Notifications
You must be signed in to change notification settings - Fork 18
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
feat(hypothesis): Added hypothesis as an option #134
Conversation
@@ -1,4 +1,5 @@ | |||
"""Tests for `{{ cookiecutter.project_slug }}` package.""" | |||
{%- if cookiecutter.use_pytest == "yes" -%} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you revisit this file again?
keep in mind that it would be possible to have both pytest and hypothesis.
also please, check the result locally to see what is the final result for this file for all the 3 possibilities (pytest, hypothesis, pytest + hypothesis).
also pay attention on the jinja2 modifications %-/-%, %+/+% or just % .. and the combinations among them
@xmnlab and @Saransh-cpp I do not know why its failing the main/test (pull_request). Can you review it? |
all the files need to end with one empty line, no more, no less. Fixing src/scicookie/cookiecutter.json these issues should be caught by the pre-commit locally. check if you have it installed with |
and run locally |
.PHONY:test | ||
test: ## run tests quickly with the default Python | ||
pytest | ||
{% endif %} | ||
{%- endif +%} | ||
{% if cookiecutter.use_hypothesis == "yes" -%} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one problem here is that,
if pytest == yes and hypothesis == yes, it will create the test target twice.
hey @xmnlab and @Saransh-cpp again these test cases are failing , I am using pre-commit locally but here it not passing on gh workflows. I think I am not correctly dealing with makefile when pytest + hypothesis both options are selected. Can you look into it? |
src/scicookie/{{cookiecutter.project_slug}}/tests/test_{{cookiecutter.package_slug}}.py
Outdated
Show resolved
Hide resolved
src/scicookie/{{cookiecutter.project_slug}}/tests/test_{{cookiecutter.package_slug}}.py
Outdated
Show resolved
Hide resolved
src/scicookie/{{cookiecutter.project_slug}}/tests/test_{{cookiecutter.package_slug}}.py
Outdated
Show resolved
Hide resolved
src/scicookie/{{cookiecutter.project_slug}}/tests/test_{{cookiecutter.package_slug}}.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ayeankit, it seems that the docstrings are giving problems, I left you some suggestions. I hope it works.
src/scicookie/{{cookiecutter.project_slug}}/tests/test_{{cookiecutter.package_slug}}.py
Outdated
Show resolved
Hide resolved
src/scicookie/{{cookiecutter.project_slug}}/tests/test_{{cookiecutter.package_slug}}.py
Outdated
Show resolved
Hide resolved
src/scicookie/{{cookiecutter.project_slug}}/tests/test_{{cookiecutter.package_slug}}.py
Outdated
Show resolved
Hide resolved
@Anavelyz after changing the auto-string, it's still failing the gh actions. Can you see why its failing? |
I didn't check the CI error ..but if it is just about the docstring .. just keep it shorter. |
@xmnlab I added the documentation in guide.md , contributing.md and Readme.md files as suggested. Can you review it once again? |
README.md
Outdated
- Flexible build system selection: Choose between popular build systems like | ||
[Poetry](https://python-poetry.org/) or [Flit](https://flit.pypa.io) based | ||
on your preference. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this shouldn't have been removed.
docs/guide.md
Outdated
- [**Pytest**](https://docs.pytest.org/en/7.3.x/contents.html): is a powerful property-based testing library for Python. It generates test cases based on properties, uncovering bugs and corner cases. Learn more in the Hypothesis documentation. | ||
|
||
- [**Hypothesis**](https://hypothesis.readthedocs.io/): is a powerful property-based testing library for Python. It generates test cases based on properties, uncovering bugs and corner cases. Learn more in the Hypothesis documentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some formatting issues and repetition here 🙂
Co-authored-by: Saransh Chopra <saransh0701@gmail.com>
@xmnlab I changed the files as suggested by @Saransh-cpp. Can you review it once again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ayeankit in general it looks good. thanks!
could you just improve a bit the documentation in the template side please?
you can get some ideas from here https://github.com/osl-incubator/scicookie/pull/136/files#diff-f1c71bca02a04da875655ec4b14b5bc1ed65d7c025276bd97efbf97bc464a3b1
In general, you should try to see the documentation from the perspective of a new developer. Maybe a new developer would not know what is pytest or hypothesis.
so maybe 1 or 2 paragraphs about that and a link to the official web/documentation page would be great.
other than that, it looks great :)
Co-authored-by: Ivan Ogasawara <ivan.ogasawara@gmail.com>
Co-authored-by: Ivan Ogasawara <ivan.ogasawara@gmail.com>
@xmnlab I changed the files as suggested . Can you review it once again? |
README.md
Outdated
- Flexible build system selection: Choose between popular build systems like | ||
[Poetry](https://python-poetry.org/) or [Flit](https://flit.pypa.io) based | ||
on your preference. | ||
- Release workflow with semantic release and github actions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks unrelated to this PR 🙂
Should be okay though, just moved down
Co-authored-by: Saransh Chopra <saransh0701@gmail.com>
Co-authored-by: Saransh Chopra <saransh0701@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for working on that @ayeankit !
@ayeankit next time, please provide more information in the |
🎉 This PR is included in version 0.3.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Pull Request description
Issue #23
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: