use blanks on both sides of comparison operators not only one, remove blanks next to parenthesis

This commit is contained in:
Axel Kohlmeyer
2023-07-11 10:31:16 -04:00
parent 4d8ef552c4
commit 564a8e88c1
54 changed files with 121 additions and 100 deletions

22
purge-workflows.py Normal file
View File

@ -0,0 +1,22 @@
from yaml import load
import subprocess
try:
from yaml import CLoader as Loader
except ImportError:
from yaml import Loader
runs = subprocess.check_output('gh api repos/lammps/lammps/actions/runs',shell=True)
data = load(runs,Loader=Loader)
while data['total_count'] > 3:
print('remaining: ', data['total_count'])
num=1
for d in data['workflow_runs']:
print(num, d['id'],d['name'],d['run_number'])
num += 1
if num > 4:
subprocess.call('gh api -X DELETE repos/lammps/lammps/actions/runs/' + str(d['id']), shell=True)
#print('gh api -X DELETE repos/lammps/lammps/actions/runs/' + str(d['id']))
else:
print('skip')
runs = subprocess.check_output('gh api repos/lammps/lammps/actions/runs',shell=True)
data = load(runs,Loader=Loader)

View File

@ -198,8 +198,7 @@ PairKIM::~PairKIM()
void PairKIM::set_contributing()
{
int const nall = atom->nlocal + atom->nghost;
for (int i = 0; i < nall; ++i)
kim_particleContributing[i] = ( (i < atom->nlocal) ? 1 : 0 );
for (int i = 0; i < nall; ++i) kim_particleContributing[i] = (i < atom->nlocal) ? 1 : 0;
}
/* ---------------------------------------------------------------------- */