Louis Gesbert
89e90271c1
Implement an additional localised, user-facing value printer
2023-07-03 16:42:54 +02:00
Louis Gesbert
0f9ee2c72e
Refacter the main Driver
module
...
- Use separate functions for successive passes in module `Driver.Passes`
- Use other functions for end results printing in module `Driver.Commands`
As a consequence, it is much more flexible to use by plugins or libs and we no
longer need the complex polymorphic variant parameter.
This patch leverages previous changes to use Cmdliner subcommands and
effectively specialises the flags of each Catala subcommand.
Other changes include:
- an attempt to normalise the generic options and reduce the number of global
references. Some are ok, like `debug` ; some would better be further cleaned up,
e.g. the ones used by Proof backend were moved to a `Proof.globals` module and
need discussion. The printer no longer relies on the global languages and prints
money amounts in an agnostic way.
- the plugin directory is automatically guessed and loaded even in dev setups.
Plugins are shown by the main `catala` command and listed in `catala --help`
- exception catching at the toplevel has been refactored a bit as well; return
codes are normalised to follow the manpage and avoid codes >= 128 that are
generally reserved for shells.
Update tests
2023-07-03 16:42:54 +02:00
Denis Merigoux
420348beda
Added a last TODO and put big example under CI
2023-06-18 21:38:00 +02:00
Denis Merigoux
e6bccd716d
Fix a Catala program bug thanks to Proof mode!
2023-04-27 18:03:27 +02:00
Denis Merigoux
9b056f3ca1
Update assets and fix errors after rebase
2023-04-27 12:18:50 +02:00
Denis Merigoux
14dd879cc5
Restore tests, update assets
2023-04-27 12:14:27 +02:00
Denis Merigoux
9b06bb66db
Fix tests and restore CI
2023-04-27 12:14:16 +02:00
Denis Merigoux
ada8e4941a
Delete variable EVERYWHERE
2023-04-27 12:13:50 +02:00
Denis Merigoux
28577c7a5e
Fix tests with @JusBanuls
2023-04-27 12:10:47 +02:00
Denis Merigoux
25d6178d42
Add training lines
2023-04-27 12:10:47 +02:00
JusBanuls
537acd320d
Ajouts de plusieurs tests et correction de bugs
2023-04-27 12:10:14 +02:00
Denis Merigoux
b2beec0bcc
Fixing #444 and #445
2023-04-27 12:09:22 +02:00
JusBanuls
891ebbddff
Ajout d'un test AL locatif pour Saint-Pierre-et-Miquelon
2023-04-27 12:08:00 +02:00
Denis Merigoux
f877544368
Remove optimizations for big tests
2023-04-18 15:56:04 +02:00
adelaett
5e46253140
removed one remaning debuging print, and updating all the tests
2023-04-14 17:59:08 +02:00
Denis Merigoux
16ab1b310d
Restore tests
2023-04-03 18:32:33 +02:00
Denis Merigoux
ad02a0959d
Merge branch 'master' into aides_logement_outre_mer
2023-04-03 14:12:10 +02:00
Denis Merigoux
d147238088
Apply suggestions by @altgr
2023-04-03 13:42:14 +02:00
Denis Merigoux
e80143b3ca
Last linting pass and update tests
2023-03-31 17:56:45 +02:00
Denis Merigoux
6d71d52a2e
Update tests and create disable_warnings option
2023-03-31 16:43:03 +02:00
Denis Merigoux
96fb716f50
Fix test
2023-03-21 17:16:14 +01:00
JusBanuls
51e638ecbe
Tests Accession à la propriété - Outre-Mers
2023-03-21 16:11:32 +01:00
Denis Merigoux
b2d02f4b0f
Fixed all tests
2023-03-17 18:44:19 +01:00
JusBanuls
d8f0274bf7
Nouveau test
2023-03-14 15:34:01 +01:00
Denis Merigoux
82132bf145
Updated tests
2023-02-20 16:58:16 +01:00
Denis Merigoux
6a2c644e9e
Fin de l'arrêté du 27 septembre 2019 pour les outre-mer
2023-02-14 15:58:20 +01:00
Denis Merigoux
1a97c21ca5
Add missing residence
2023-01-20 15:55:13 -05:00
JusBanuls
52e1bf0cf6
Ajout de la variable résidence aux tests
2023-01-17 11:38:25 +01:00
Denis Merigoux
2b6687fc44
FIx one of the tests
2023-01-13 16:15:11 +01:00
Louis Gesbert
09d49ab1cc
French syntax: replace 'sortie' with 'résultat'
...
as per comment in #357
2022-12-13 12:27:33 +01:00
Louis Gesbert
b19a7660fc
Fix ambiguities in examples
2022-10-21 17:36:44 +02:00
Louis Gesbert
0ab7a0f9ce
Turn all existing tests to inline tests
...
Done using
```bash
process() { FILE=$1; awk 'match($0, /^```catala-test *{ *id *= *"(.*)" *}/, a) {print "```catala-test-inline"; f="'"$(dirname $FILE)/output/$(basename $FILE)"'." a[1]; getline; print "$ " $0; while ((getline<f) > 0) print; next} {print}' $FILE >$FILE.new; mv $FILE.new $FILE; }
for f in tests/test_*/*/*.catala_* examples/**/*.catala_*; do process $f; git add $f; done
for d in $(find -name output -type d); do git rm -r $d; done
```
2022-09-23 14:45:10 +02:00
Denis Merigoux
1553f88cf5
Remove unnecessary input
2022-08-18 18:53:30 +02:00
Denis Merigoux
2bc1b7d7f7
RLS only for social housing
2022-08-18 16:00:52 +02:00
Denis Merigoux
62ff234319
Shuffle data around
2022-08-18 15:27:01 +02:00
Denis Merigoux
1d63c48b9c
Fix test
2022-08-18 11:55:19 +02:00
Denis Merigoux
82940b63e3
Remove mode_occupation from AL/APL logement-foyer's input
...
In favor of a more restricted input
2022-08-16 17:01:53 +02:00
Denis Merigoux
54e08585c6
Put sectorial information where it belongs
2022-08-16 16:22:51 +02:00
Denis Merigoux
a1ebb6715c
Remove age prompts, deduct from birth date correctly
2022-08-16 11:08:13 +02:00
Denis Merigoux
1fdb21326b
Fix logement meublé thing
2022-08-15 17:43:29 +02:00
Denis Merigoux
489d2f9506
Fixed bugs in allocation logement eligibility
2022-08-15 17:16:23 +02:00
Denis Merigoux
c71b8e28c6
Moving parameters into property-section of data
2022-08-12 11:16:52 +02:00
Denis Merigoux
ef269df553
Restore tests
2022-08-12 09:51:35 +02:00
Denis Merigoux
c062ac2924
Added a new test
2022-08-11 18:18:04 +02:00
Denis Merigoux
038e6068e6
Small improvements to housing benefits
2022-08-10 18:13:07 +02:00
Denis Merigoux
97b6e14740
Removed useless variable
2022-07-28 15:02:43 +02:00
Denis Merigoux
d91ed27e28
The JS version of the housing benefits computation is working!
2022-07-28 15:02:43 +02:00
Denis Merigoux
4002c22570
Contre-ordre: DGLAN admet l'arrondi par défaut
2022-07-22 17:05:09 +02:00
Denis Merigoux
ad0f02837c
Fix some TODOs
2022-07-21 14:54:05 +02:00
Denis Merigoux
58cb48fb28
Merge remote-tracking branch 'origin/master' into aides_logement
2022-07-20 11:20:00 +02:00