regardscitoyens / the-law-factory-parser

Data generator for the-law-factory project
https://www.lafabriquedelaloi.fr
GNU General Public License v3.0
45 stars 9 forks source link

Predict missing next step when possible #117

Open boogheta opened 5 years ago

boogheta commented 5 years ago

Sometimes, AN/Senate publish a new adopted text but fail to announce the upcoming step, in those case our data remains stuck to the previous version without including the new text even though it is parsed properly.

For instance here and there : (but this might change further on)

The problem is caught there:

https://github.com/regardscitoyens/the-law-factory-parser/blob/master/tlfp/tools/update_procedure.py#L67-L74

But we might want to handle that upper in the chain, for instance after having merged AN & Senate's dossiers, although at this time we do not know for sure yet which steps are echec or not, so not sure...

cf #89

mdamien commented 5 years ago

In the case of the PJLF 2019, I think it's because we remove the predicted hemicycle step in merge.py to keep only the commission step.

https://github.com/regardscitoyens/the-law-factory-parser/blob/fa6febd15e04d4a5bde01472444691627d44d55a/tlfp/merge.py#L148-L155

A simple fix would be to keep the hemicycle step when merging for live texts even when there's a commission step.

boogheta commented 5 years ago

or in this case to not keep commission steps as empty_last_step if the text is using the old_procedure ?