@@ -34,37 +34,50 @@ First, let us take a look at the folder and file structure of such a project.
3434
3535.. code-block ::
3636
37- src
38- │ config.py
37+ my_project
38+ ├───pytask.ini or tox.ini or setup.cfg
3939 │
40- ├───data
41- │ data_0.csv
42- │ data_1.csv
43- │ data_2.csv
44- │ data_3.csv
40+ ├───src
41+ │ └───my_project
42+ │ ├────config.py
43+ │ │
44+ │ ├───data
45+ │ │ ├────data_0.csv
46+ │ │ ├────data_1.csv
47+ │ │ ├────data_2.csv
48+ │ │ └────data_3.csv
49+ │ │
50+ │ ├───data_preparation
51+ │ │ ├────data_preparation_config.py
52+ │ │ └────task_prepare_data.py
53+ │ │
54+ │ └───estimation
55+ │ ├────estimation_config.py
56+ │ └────task_estimate_models.py
4557 │
46- ├───data_preparation
47- │ data_preparation_config.py
48- │ task_prepare_data.py
4958 │
50- └───estimation
51- estimation_config.py
52- task_estimate_models.py
59+ ├───setup.py
60+ │
61+ ├───.pytask.sqlite3
62+ │
63+ └───bld
64+
65+
5366
5467 The folder structure, the general ``config.py `` which holds ``SRC `` and ``BLD `` and the
5568tasks follow the same structure which is advocated for throughout the tutorials.
5669
57- What is new are the local configuration files in each of the subfolders of `` src `` which
58- contain objects which are shared across tasks. For example,
70+ What is new are the local configuration files in each of the subfolders of
71+ `` my_project `` which contain objects which are shared across tasks. For example,
5972``data_preparation_config.py `` holds the paths to the processed data and the names of
6073the data sets.
6174
6275.. code-block :: python
6376
6477 # Content of data_preparation_config.py
6578
66- from src .config import BLD
67- from src .config import SRC
79+ from my_project .config import BLD
80+ from my_project .config import SRC
6881
6982
7083 DATA = [" data_0" , " data_1" , " data_2" , " data_3" ]
@@ -87,9 +100,9 @@ parametrization.
87100
88101 import pytask
89102
90- from src .data_preparation.data_preparation_config import DATA
91- from src .data_preparation.data_preparation_config import path_to_input_data
92- from src .data_preparation.data_preparation_config import path_to_processed_data
103+ from my_project .data_preparation.data_preparation_config import DATA
104+ from my_project .data_preparation.data_preparation_config import path_to_input_data
105+ from my_project .data_preparation.data_preparation_config import path_to_processed_data
93106
94107
95108 def _create_parametrization (data ):
@@ -121,7 +134,7 @@ an explicit id.
121134.. code-block ::
122135
123136 # With id
124- .../src /data_preparation/task_prepare_data.py::task_prepare_data[data_0]
137+ .../my_project /data_preparation/task_prepare_data.py::task_prepare_data[data_0]
125138
126139 Next, we move to the estimation to see how we can build another parametrization upon the
127140previous one.
@@ -130,8 +143,8 @@ previous one.
130143
131144 # Content of estimation_config.py
132145
133- from src .config import BLD
134- from src .data_preparation.data_preparation_config import DATA
146+ from my_project .config import BLD
147+ from my_project .data_preparation.data_preparation_config import DATA
135148
136149
137150 _MODELS = [" linear_probability" , " logistic_model" , " decision_tree" ]
@@ -164,9 +177,9 @@ And, here is the task file.
164177
165178 import pytask
166179
167- from src .data_preparation.data_preparation_config import path_to_processed_data
168- from src .data_preparation.estimation_config import ESTIMATIONS
169- from src .data_preparation.estimation_config import path_to_estimation_result
180+ from my_project .data_preparation.data_preparation_config import path_to_processed_data
181+ from my_project .data_preparation.estimation_config import ESTIMATIONS
182+ from my_project .data_preparation.estimation_config import path_to_estimation_result
170183
171184
172185 def _create_parametrization (estimations ):
0 commit comments