Materials-Data-Science-and-Informatics / fair-python-cookiecutter

An opinionated cookiecutter template to kickstart a modern best-practice Python project with FAIR metadata.
MIT License
27 stars 4 forks source link

Minor improvement ideas: Add conftest.py #9

Closed broeder-j closed 1 year ago

broeder-j commented 1 year ago
  1. How to use pytest. Reated to a problem? Please describe. Currently people may not know how to execute tests and how to use fixtures.

Describe the solution you'd like Create an empty conftest.py in the test directory. The conftest.py should contain text on how to run the tests. and a link to pytest, fixtures docs

  1. It may not be clear to a standard user how to run the docs build. (to me it was not clear if/how I should run mike, or go over poetry, or something else. If I run poetry run poe docs it runs the tests. So this may need some more documentation.

Per default the docs dependencies are not installed, if this should be the case, the documentation misses how to install them. Also I would move the mkdocs.yml to the docs folder.

apirogov commented 1 year ago

Tests:

Concerning tests, the "developer guide" states that you are supposed to run tests. Is this not sufficient? See here

Concerning fixtures and stuff, the repo can't possibly "teach" how to use all the tools, except for the "demo code". I can create an empty conftest file (which is a good idea) and add some comments like "you can add your fixtures here" and refer to pytest docs. would this be ok from your point of view?

Also, I could add content to that conftest file that is only added if you choose to instantiate with demo code (CLI or API).

Docs:

Again, this is documented

Do you have improvement suggestions to that or is it not clear enough?