-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add checks on steps dates #102
Comments
Pour le premier cas, j'ai aucun dossier affecté mais pour le deuxième j'en ai 84 EDIT: Un warning existe dans EDIT 2: Le troisiéme cas n'arrive jamais aussi, du coup je part sur un check pour le cas 2 seulement Exemple: Le script qui pourrait être intégré dans import json, glob, sys
from os.path import join
for dos_file in glob.glob(join(sys.argv[1], '*/*/procedure.json')):
with open(dos_file) as f:
dos = json.load(f)
prev_step = None
for step in dos['steps']:
if not step.get('in_discussion'):
if step.get('date') > step.get('enddate', '999999999'):
print('1er cas>', dos_file)
if prev_step and step.get('date') < prev_step.get('enddate'):
print('2eme cas>', dos_file)
print(step.get('date'))
if not step.get('date'):
print('3eme cas>', dos_file)
print(step.get('source_url'))
prev_step = step |
Du coup, j'ai fait une mini-compil pour le Sénat:
C'est du pinaillage de l’extrême, je l'admet complètement ! EDIT: Envoyé ! |
me likey, corrigé quelques typos et rajouté encore un peu de vernis à la fin ;) |
The backend should perform a few checks on the dates to ensure we have no incoherence like overlapping steps, or steps without any date.
-> raise an exception
The text was updated successfully, but these errors were encountered: