-
Notifications
You must be signed in to change notification settings - Fork 24
146 lines (127 loc) · 5.48 KB
/
main.yml
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
name: CI
on:
push:
schedule:
- cron: '0 1 * * *' # Test every day at 1AM
jobs:
# Based on https://github.com/py-actions/flake8#quick-start
flake8-lint:
runs-on: ubuntu-latest
name: Lint
steps:
- name: Check out source repository
uses: actions/checkout@v3
- name: Set up Python environment
uses: actions/setup-python@v4
- name: flake8 Lint
uses: py-actions/flake8@v2
with:
ignore: "E116,E201,E202,E203,E211,E221,E222,E226,E225,E227,E228,E231,E241,E251,E261,E262,E265,E266,E271,E272,E301,E302,E303,E305,E402,F403,F405,E501,W504,E701,E702,E711,E713,E714,E722,E731,E741,F841,W391,W605"
# E116 unexpected indentation (comment)
# E201 whitespace after '('
# E202 whitespace before ')'
# E203 whitespace before ':'
# E211 whitespace before '['
# E221 multiple spaces before operator
# E222 multiple spaces after operator
# E225 missing whitespace around operator
# E226 missing whitespace around arithmetic operator
# E227 missing whitespace around bitwise or shift operator
# E228 missing whitespace around modulo operator
# E231 missing whitespace after ','
# E241 multiple spaces after ','
# E251 unexpected spaces around keyword / parameter equals
# E261 at least two spaces before inline comment
# E262 inline comment should start with '# '
# E265 block comment should start with '# '
# E266 too many leading '#' for block comment
# E271 multiple spaces after keyword
# E272 multiple spaces before keyword
# E301 expected 1 blank line, found 0
# E302 expected 2 blank lines, found 1
# E303 too many blank lines (3)
# E305 expected 2 blank lines after class or function definition, found 1
# E402 module level import not at top of file
# F403 unable to detect undefined names
# F405 may be undefined, or defined from star imports
# E501 line too long
# W504 line break after binary operator
# E701 multiple statements on one line (colon)
# E702 multiple statements on one line
# E711 comparison to None should be 'if cond is not None:'
# E713 test for membership should be 'not in'
# E714 test for object identity should be 'is not'
# E722 do not use bare 'except'
# E731 do not assign a lambda expression, use a def
# E741 ambiguous variable name
# F841 local variable is assigned to but never used
# W391 blank line at end of file
# W605 invalid escape sequence '\s'
Full_Analysis:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Add conda to system path
run: |
echo $CONDA/bin >> $GITHUB_PATH
- name: Set Swap Space
uses: pierotofy/set-swap-space@49819abfb41bd9b44fb781159c033dba90353a7c
with:
swap-size-gb: 10
- name: Create conda env and install dependencies
run: |
conda config --set channel_priority strict
conda config --add channels conda-forge
conda env create -f environment.yml -n coffea-env
conda list -n coffea-env
- name: Install local pip packages
run: |
mkdir dir_for_topcoffea
cd dir_for_topcoffea
git clone https://github.com/TopEFT/topcoffea.git
cd topcoffea
conda run -n coffea-env pip install -e .
cd ../..
conda run -n coffea-env pip install -e .
- name: Conda list
run: |
conda list -n coffea-env
- name: Install pip packages
run: |
conda run -n coffea-env pip install xgboost
conda run -n coffea-env pip install mt2
conda list -n coffea-env
- name: Download root files
run: |
wget --no-verbose http://www.crc.nd.edu/~kmohrman/files/root_files/for_ci/ttHJet_UL17_R1B14_NAOD-00000_10194_NDSkim.root
- name: Pytest setup
run: |
conda install -y -n coffea-env -c conda-forge pytest pytest-cov root_base
mkdir histos
- name: Test make 1d quad plots
run: |
conda run -n coffea-env pytest --cov=./ --cov-report=xml -rP --cov-append tests/test_make_1d_quad_plots.py
- name: Run topeft processors over test files with futures executor
run: |
conda run -n coffea-env pytest --cov=./ --cov-report=xml -rP --cov-append tests/test_futures.py
- name: Get topeft yields
run: |
conda run -n coffea-env pytest --cov=./ --cov-report=xml -rP --cov-append -k test_make_yields_after_processor
- name: Compare topeft yields
run: |
conda run -n coffea-env pytest --cov=./ --cov-report=xml -rP --cov-append -k test_compare_yields_after_processor
- name: Run topeft processors over test files with workqueue executor
run: |
conda run -n coffea-env pytest --cov=./ --cov-report=xml -rP --cov-append tests/test_workqueue.py
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage/reports/
env_vars: OS,PYTHON
fail_ci_if_error: true
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
verbose: true