generated from opensafely/research-template
/
project.yaml
97 lines (78 loc) · 3.46 KB
/
project.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
version: '3.0'
expectations:
population_size: 1000
actions:
generate_study_population:
run: cohortextractor:latest generate_cohort --study-definition study_definition --index-date-range "2019-01-01 to 2021-04-01 by month" --output-dir=output --output-format=feather
outputs:
highly_sensitive:
cohort: output/input_*.feather
get_patient_count:
run: python:latest python analysis/get_patients_counts.py
needs: [generate_study_population]
outputs:
moderately_sensitive:
text: output/patient_count.json
generate_study_population_ethnicity:
run: cohortextractor:latest generate_cohort --study-definition study_definition_ethnicity --output-dir=output --output-format=feather
outputs:
highly_sensitive:
cohort: output/input_ethnicity.feather
join_ethnicity:
run: python:latest python analysis/join_ethnicity.py
needs: [generate_study_population, generate_study_population_ethnicity]
outputs:
highly_sensitive:
cohort: output/input*.feather
generate_study_population_practice_count:
run: cohortextractor:latest generate_cohort --study-definition study_definition_practice_count --output-dir=output --output-format=feather
outputs:
highly_sensitive:
cohort: output/input_practice_count.feather
get_practice_count:
run: python:latest python analysis/get_practice_count.py
needs: [generate_study_population_practice_count]
outputs:
moderately_sensitive:
text: output/practice_count.json
generate_measures:
run: cohortextractor:latest generate_measures --study-definition study_definition --output-dir=output
needs: [join_ethnicity]
outputs:
moderately_sensitive:
measure_csv: output/measure_*.csv
generate_measures_demographics:
run: python:latest python analysis/calculate_measures.py
needs: [join_ethnicity]
outputs:
moderately_sensitive:
measure: output/combined_measure_*.csv
generate_notebook:
run: jupyter:latest jupyter nbconvert /workspace/notebooks/sentinel_measures.ipynb --execute --to html --template basic --output-dir=/workspace/output --ExecutePreprocessor.timeout=86400 --no-input
needs: [generate_measures, get_practice_count, get_patient_count]
outputs:
moderately_sensitive:
notebook: output/sentinel_measures.html
generate_notebook_demographics:
run: jupyter:latest jupyter nbconvert /workspace/notebooks/sentinel_measures_demographics.ipynb --execute --to html --template basic --output-dir=/workspace/output --ExecutePreprocessor.timeout=86400 --no-input
needs: [generate_measures_demographics]
outputs:
moderately_sensitive:
notebook: output/sentinel_measures_demographics.html
get_population_count:
run: python:latest python analysis/population_counts.py
needs: [join_ethnicity]
outputs:
moderately_sensitive:
text: output/*_count.csv
demographic_changs:
run: jupyter:latest jupyter nbconvert /workspace/notebooks/demographic-change.ipynb --execute --to notebook --output-dir=/workspace/output --ExecutePreprocessor.timeout=86400
needs: [generate_measures, generate_measures_demographics]
outputs:
moderately_sensitive:
csv: output/demographics_differences.csv
# run_tests:
# run: python:latest python -m pytest --junit-xml=output/pytest.xml --verbose
# outputs:
# moderately_sensitive:
# log: output/pytest.xml