Comments (4)
Yes! #3 was a placeholder for this, but with no detail whatsoever. I'll close that as a dupe of this issue.
A couple thoughts:
- nose is no longer maintained 😦 , so we should go for nose2, py.test, or just vanilla unittest.
- Philosophically, I think this lives in
src/tests
. Generally, we think ofsrc
as what might one day get deployed or graduate to a package. - Let's add a boilerplate test to get example syntax all in one place.
- Let's add
make tests
to the Makefile with whichever test runner we go with.
@isms @denisekgosnell Thoughts?
from cookiecutter-data-science.
While making a PR to specifically outline my thoughts, I missed this note. I can change to not use nosetests -- but this PR is the outline of what I was envisioning.
from cookiecutter-data-science.
@pjbull To add to the discussion above:
Philosophically, I think this lives in src/tests
The level of testing that I am proposing is for the deployed models. To me, it looks like the top level data
and models
dir is for the trained models which will be deployed in the project. IMO, these are the scripts and pipelines which need to be wrapped in unit and integration tests.
I may be misinterpreting the difference between the top level data
and models
and then src/data
and srd/models
, so let me know how this aligns with your vision.
Thanks!
from cookiecutter-data-science.
Interesting--the way we've used this in the past is that serialized models (and model-specific results, such as cross-validation scores) live in the root models
folder. We use the data
folder for the data itself (e.g., csvs, sql dumps). So, neither of these contain code, which we try to isolate in notebooks
(for exploratory work) and src
for source files.
I'm currently leaning towards py.test as the default test runner since it will find and run tests that are written with unittest, nosetest, or py.test.
One other note: I think that probably should be conservative and leave out subfolders in tests. Some people may want to organize by test class, but others may want to organize by the module being tested or the fixtures the tests use. We'll leave those subfolder up to the users.
from cookiecutter-data-science.
Related Issues (20)
- Dry run of ownership transfer HOT 2
- Announce v2 release HOT 1
- add documentation for running make on Windows HOT 8
- Make v1 template docs accessible in new docs
- Termynal markdown page should not be included HOT 1
- v2 release logistics checklist HOT 1
- ideas for documentation about just+pyproject.toml+mkdocs HOT 1
- Defend against broken paths from non-editable installs
- Document how to use the Python source code scaffolding
- Document conda-forge as a way to install make
- Option for Poetry support for package managent
- Update directory structure in README to reflect v2
- Add tag for v2 HOT 1
- Release package on conda-forge HOT 1
- Add badges to README
- config import fails when using V2 scaffolding HOT 2
- Consolidate linting and formatting to use ruff
- Add documentation about contributing and requesting tools
- Is there an example project? HOT 1
- Ruff lint configuration names are incorrect HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cookiecutter-data-science.