Skip to content

Commit

Permalink
Update data management (#152)
Browse files Browse the repository at this point in the history
Align the data management strategy with EPP and simplify the example project.

---------

Co-authored-by: Hans-Martin von Gaudecker <[email protected]>
  • Loading branch information
timmens and hmgaudecker authored Jul 16, 2024
1 parent be74854 commit 0ff14c4
Show file tree
Hide file tree
Showing 34 changed files with 378 additions and 516 deletions.
8 changes: 8 additions & 0 deletions CHANGES_template.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Release Notes

## v0.7.2 -- July 2024

Complete re-write of how to obtain templates, simplifying the example project, and
aligning the data management part with that of the newest EPP iteration.

- Remove cookiecutter (#149, @timmens, @hmgaudecker)
- Update data management (#152, @timmens, @hmgaudecker)

## v0.7.1 -- December 2023

- Replace `Pdb++` by `Pdb+` (#142, @janosg).
Expand Down
15 changes: 8 additions & 7 deletions docs_template/scripts/latex/root_bld_src.tex
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
\nodepart{two}
\texttt{bld}
\nodepart{three}
\texttt{template\_project.pdf}
\texttt{paper.pdf}
\nodepart{four}
\texttt{template\_project\_pres.pdf}
\texttt{presentation.pdf}
\nodepart{five}
\texttt{src}
\nodepart{six}
Expand All @@ -47,14 +47,15 @@

\node (2) [
rectangle split,
rectangle split parts=6,
rectangle split parts=7,
rectangle split part fill={
gray,
yellow!75,
yellow!75,
yellow!75,
yellow!75,
yellow!75
yellow!75,
yellow!75,
},
draw,
text width=2.50cm,
Expand All @@ -75,6 +76,8 @@
\texttt{models}
\nodepart{six}
\texttt{predictions}
\nodepart{seven}
\texttt{documents}
};

\node (3) [
Expand All @@ -85,9 +88,7 @@
blue!75,
blue!75,
blue!75,
blue!50,
blue!50,
blue!50,
blue!75,
blue!50,
},
draw,
Expand Down
5 changes: 1 addition & 4 deletions docs_template/scripts/latex/src.tex
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,11 @@

\node (5) [
rectangle split,
rectangle split parts=4,
rectangle split parts=3,
rectangle split part fill={
gray,
blue!50,
blue!50,
blue!50,
},
draw,
text width=3.0cm,
Expand All @@ -70,8 +69,6 @@
\texttt{\_\_init\_\_.py}
\nodepart{three}
\texttt{clean\_data\{.py,.r,.jl,.do\}}
\nodepart{four}
\texttt{data\_info.yaml}
};

\node (4) [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def _visualize_organisational_steps(case):
)
fig.update_yaxes(
tickvals=[1, 2],
ticktext=["marital-status", "qualification"],
ticktext=["marital-status", "highest-qualification"],
title="Variable",
)

Expand Down
216 changes: 0 additions & 216 deletions docs_template/source/_static/css/custom.css

This file was deleted.

Binary file modified docs_template/source/figures/generated/model_steps_full.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs_template/source/figures/generated/model_steps_select.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs_template/source/figures/generated/root_bld_src.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs_template/source/figures/generated/src.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs_template/source/figures/generated/steps_only_full.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ the template, understand what is happening and why, and move on.
1. Start with the data management code and move your data files to the spot where they
belong under the new structure.
1. Move (the first steps of) your data management code to the folder under the
templates. Modify the `task_xxx` files accordingly or create new ones.
templates. Create new `task_...` files.
1. Run `pytask`, adjusting the code for the errors you'll likely see.
1. Move on step-by-step like this.
1. Delete the example files and the corresponding sections of the `task_xxx` files / the
entire files in case you created new ones.
1. Once you feel secure enough that you do not need the template files any more, delete
all files carrying a `_template` in their names. You will also need to adjust the
documents so they do not refer to figures and tables created by the template any
more. Delete the build directory to make sure you do not rely on outputs from tasks
that you removed.
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@ in {ref}`template_setup`, my recommendation would be as follows.
necessary or create new ones.
1. Remove the build directory regularly to make sure you do not rely on outputs from
tasks that do not exist any more — this is a frequent source of confusion.
1. Once you got the hang of how things work, remove the examples (both the data files
and the code in the `task_xxx` files). Also remove the build directory.
1. Once you feel secure enough that you do not need the template files any more, delete
all files carrying a `_template` in their names. You will also need to adjust the
documents so they do not refer to figures and tables created by the template any
more. Delete the build directory to make sure you do not rely on outputs from tasks
that you removed.
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ dependencies:
- pytest-xdist

# Python template project dependencies
- pyyaml
- statsmodels
- numpy
- pandas >=2.2
Expand All @@ -33,6 +32,7 @@ dependencies:
- r-plyr
- r-precommit
- r-yaml
- r-forcats

# Install project
- pip: [-e ., kaleido]
1 change: 1 addition & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,7 @@ FO
Fomel
FomelHennenfent
foR
forcats
formatters
fp
Fp
Expand Down
Loading

0 comments on commit 0ff14c4

Please sign in to comment.