-
Notifications
You must be signed in to change notification settings - Fork 125
210 lines (179 loc) · 6.75 KB
/
action_build.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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
name: JARVIS-Tools github action
on: [push, pull_request]
jobs:
miniconda:
name: Miniconda ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-latest"]
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: test
environment-file: environment.yml
python-version: "3.10"
auto-activate-base: false
- shell: bash -l {0}
run: |
conda info
conda list
- name: Lint
shell: bash -l {0}
run: |
conda install flake8 pycodestyle pydocstyle
flake8 --ignore E203,W503 --exclude=examples,tests --statistics --count --exit-zero jarvis
pycodestyle --ignore E203,W503 --exclude=examples,testfiles jarvis
pydocstyle --match-dir=core --match-dir=io --match-dir=io --match-dir=ai --match-dir=analysis --match-dir=db --match-dir=tasks --count jarvis
- name: Run pytest
shell: bash -l {0}
run: |
conda install pytest coverage codecov
python setup.py develop
coverage run -m pytest
coverage report -m -i
codecov
codecov --token="b61081a0-39de-44a8-8a9c-97d4be82af6d"
rm POSCAR* *.png
# name: JARVIS-Tools github action
# on: [push, pull_request]
# jobs:
# checks:
# name: Checks
# runs-on: ubuntu-latest
# defaults:
# run:
# shell: bash -l {0}
# strategy:
# matrix:
# python-version: ["3.10"]
# steps:
# - uses: actions/checkout@v2
# - name: Setup Python ${{ matrix.python-version }}
# uses: actions/setup-python@v2
# with:
# python-version: ${{ matrix.python-version }}
# - uses: actions/cache@v2
# with:
# path: ${{ env.pythonLocation }}
# key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('dev-requirements.txt') }}
# - name: Install requirements
# run: |
# source ~/.bashrc
# echo "begin: PATH=$PATH;"
# find . -type f > before_test_files.txt
# conda env create -f environment.yml
# conda activate my_jarvis
# conda install pandas numpy matplotlib phonopy scikit-learn --quiet
# pip install --upgrade pip
# pip install pycodestyle flake8 pydocstyle coverage pytest codecov qiskit==0.41.1
# flake8 --ignore E203,W503 --exclude=examples,tests --statistics --count --exit-zero jarvis
# pycodestyle --ignore E203,W503 --exclude=examples,testfiles jarvis
# pydocstyle --match-dir=core --match-dir=io --match-dir=io --match-dir=ai --match-dir=analysis --match-dir=db --match-dir=tasks --count jarvis
# #python setup.py develop
# #pip install --upgrade --upgrade-strategy eager -r dev-requirements.txt -e .
# #conda install -c ambermd pytraj
# #pip install numpy scipy matplotlib
# #pip install -r dev-requirements.txt
# pip install -e .
# echo 'CONDA LIST'
# conda list
# echo 'PIP FREEZE'
# pip freeze
# #echo 'PYTEST-COV'
# #pytest --cov-config=.coveragerc --cov=jarvis -n 2
# coverage run -m pytest
# coverage report -m -i
# codecov
# codecov --token="b61081a0-39de-44a8-8a9c-97d4be82af6d"
# find . -type f > after_test_files.txt
# #comm -13 <(sort before_test_files.txt) <(sort after_test_files.txt) > new_files.txt
# #cat new_files.txt | xargs rm
# #rm before_test_files.txt after_test_files.txt new_files.txt
# # git clone https://github.com/QEF/q-e.git
# # cd q-e
# # ./configure
# # make pw
# jobs:
# checks:
# name: Checks
# runs-on: ubuntu-latest
# strategy:
# matrix:
# python-version: ["3.9","3.10"]
# steps:
# - uses: actions/checkout@v2
# - name: Setup Python ${{ matrix.python-version }}
# uses: actions/setup-python@v2
# with:
# python-version: ${{ matrix.python-version }}
# - uses: actions/cache@v2
# with:
# path: ${{ env.pythonLocation }}
# key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('dev-requirements.txt') }}
# - name: Install requirements
# run: |
# python setup.py develop
# pip install --upgrade --upgrade-strategy eager -r dev-requirements.txt -e .
# #conda install -c ambermd pytraj
# echo 'CONDA LIST'
# conda list
# echo 'PIP FREEZE'
# pip freeze
# #echo 'PYTEST-COV'
# #pytest --cov-config=.coveragerc --cov=jarvis -n 2
# coverage run -m pytest
# coverage report -m -i
# codecov
# codecov --token="b61081a0-39de-44a8-8a9c-97d4be82af6d"
# # git clone https://github.com/QEF/q-e.git
# # cd q-e
# # ./configure
# # make pw
#jobs:
# miniconda:
# name: Miniconda ${{ matrix.os }}
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os: ["ubuntu-latest"]
# steps:
# - uses: actions/checkout@v2
# - uses: conda-incubator/setup-miniconda@v2
# with:
# activate-environment: test
# python-version: 3.8
# auto-activate-base: false
# - shell: bash -l {0}
# run: |
# conda info
# conda list
# - uses: actions/cache@v2
# with:
# path: ~/.cache/pip
# key: ${{ hashFiles('setup.py') }}-${{ hashFiles('dev-requirements.txt') }}
# - name: Run pytest
# shell: bash -l {0}
# run: |
# python setup.py develop
# #pip uninstall qiskit
# # pip install qiskit ase numpy==1.18.5 scipy==1.4.1 matplotlib>=3.0.0 phonopy==2.8.1 coverage lightgbm==2.1.0 flask joblib networkx scikit-learn pandas pennylane==0.14.1 dgl tqdm codecov torch keras tensorflow==2.3.0 pytest pytest-cov bokeh pytest-xdist
# # pip install git+https://github.com/aspuru-guzik-group/tequila.git
# # pip install -r requirements-for-ci-only.txt
# # pip install -r dev-requirements.txt
# pip install --upgrade --upgrade-strategy eager -r dev-requirements.txt -e .
# echo 'CONDA LIST'
# conda list
# echo 'PIP FREEZE'
# pip freeze
# #echo 'PYTEST-COV'
# #pytest --cov-config=.coveragerc --cov=jarvis -n 2
# coverage run -m pytest
# coverage report -m
# codecov
# codecov --token="b61081a0-39de-44a8-8a9c-97d4be82af6d"
# # git clone https://github.com/QEF/q-e.git
# # cd q-e
# # ./configure
# # make pw