Comments (3)
Hey @ohenrik thanks for the thoughts. Generally, we want anything that varies from machine to machine to be stored in the environment. Check out the 12-factor app's section on configuration for more reasons why.
Projects with a large number of settings do grow into having a separate importable settings or config module (e.g., a django
application). My inclination is to keep things simple by default and not roll our own settings module that would need development/support/documentation at the base level of the cookiecutter.
Happy to consider if there are really compelling use cases for needing a config.py
as a default, but I think environment variables will cover most of them.
from cookiecutter-data-science.
Hope the question fits here... what about a helper module or src/settings.py
to access data folder?
In src/data/make_data.py you have:
Myself I use something like below to locate the repo root folder:
from pathlib import Path
DATA_PATH = Path(__file__).parents[2] / 'data'
def make_data_path(folder: str, file_name: str) -> str:
folder = DATA_PATH / folder
if not folder.exists():
folder.mkdir(parents=True)
return str(folder / file_name)
Once the data directory structure is there template, maybe path to it should be in src/settings.py
too? For me it is seems a good convenience feature.
from cookiecutter-data-science.
Closing as possible in the future but based on participation in this question
issue it's not a commonly desired feature (or is easily slotted in on a per-project basis).
from cookiecutter-data-science.
Related Issues (20)
- Repeated package installations HOT 2
- Create a V2 screencast HOT 1
- Transfer ownership from drivendata user to drivendataorg organization HOT 1
- Add Windows to V2 CI HOT 1
- Add CI for releasing package to PyPI
- Add documentation about major changes between V1 and V2 HOT 1
- Update the opinions section HOT 3
- Add option to include nbautoexport
- Support user-supplied config files
- Improve the quality of the boilerplate python code HOT 1
- Switch from sphinx as default project docs to mkdocs
- Add Python 3.12 support HOT 4
- More documentation for newcomers
- 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
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.