Commit Graph

248 Commits

Author SHA1 Message Date
Denis Merigoux
92189e6439
Fix bug introduced by a1ebb67 2022-08-16 14:40:12 +02:00
Denis Merigoux
a1ebb6715c
Remove age prompts, deduct from birth date correctly 2022-08-16 11:08:13 +02:00
Denis Merigoux
4336fb0a41
Update assets 2022-08-15 18:38:15 +02:00
Denis Merigoux
93f6a19ea9
Update assets 2022-08-15 18:01:12 +02:00
Denis Merigoux
c278f61cf2
Update assets 2022-08-15 17:21:43 +02:00
Denis Merigoux
c71b8e28c6
Moving parameters into property-section of data 2022-08-12 11:16:52 +02:00
Denis Merigoux
1af33ef8b2
Update assets 2022-08-11 18:24:04 +02:00
Denis Merigoux
7b7d31d0a5
Fix non-negative value bug in housing benefits 2022-08-11 16:16:00 +02:00
Denis Merigoux
a48e90150c
Use let-bindings to refactor code 2022-08-11 14:12:11 +02:00
Denis Merigoux
038e6068e6
Small improvements to housing benefits 2022-08-10 18:13:07 +02:00
Denis Merigoux
8696490265
Fixes #307 2022-08-09 14:39:43 +02:00
Denis Merigoux
0351d90087
Update assets 2022-08-08 17:25:49 +02:00
Emile Rolley
f30dc376fd doc(compiler): add information about the html generation logic + complete the doc of the Utils module 2022-08-05 19:03:59 +02:00
Emile Rolley
70672088fa nitpick: String_common.is_uppercase renamed in String_common.is_uppercase_ascii 2022-08-05 18:18:06 +02:00
Emile Rolley
5534145737 french_law: update the JS lib 2022-08-05 11:20:32 +02:00
Louis Gesbert
a569589193 Small improvements to the Python and OCaml pretty-printers 2022-08-04 20:43:39 +02:00
Louis Gesbert
922126b5cd Improve api_web pretty-printer 2022-08-04 17:36:50 +02:00
Louis Gesbert
e50b567000 Fix relative dir in french_law artifacts ; add a note in examples/README.md 2022-08-04 17:36:50 +02:00
Louis Gesbert
289975ebe8 Generate french law python artifacts through dune
(they're no longer reformatted, at the moment, though)
2022-08-03 19:04:14 +02:00
Louis Gesbert
c964495c59 Generate website assets through dune 2022-08-03 19:04:13 +02:00
Louis Gesbert
1dbcc31599 Shell script tweaks 2022-08-03 19:03:27 +02:00
Louis Gesbert
9db038812c Include generation of json_schema artifacts
(plus other small Makefile improvements)
2022-08-03 18:55:42 +02:00
Louis Gesbert
0600501ec6 Generate french_law artifacts through dune
The files where manually generated through Makefile rules, and
versionned (with an outdated version).

The issue was that we had:
- `dune` building Catala
- Makefiles calling `catala` to build and copy the `french_law/ocaml/law_source`
  files
- then `dune` again to build `french_law`

The result was that `dune build` (without running `make` first) would
return a weird error.

The proposed solution adds ad-hoc dune rules to call the catala
binary, so that it can handle the whole pipeline correctly. If OCaml
is purely a backend, though, a simpler solution that makes us less
dependent on dune would be to handle the compilation of `french_law`
manually.

The dune rules are set to 'promote' the files so that it preserves the
fact that they are versionned (but with no confusion of the build system
about where they should come from anymore)
2022-08-03 18:55:42 +02:00
Emile Rolley
1a6934b538 feat(build): add the generation of json schemas to the build workflow 2022-07-29 18:47:42 +02:00
Emile Rolley
26663f227d fix(plugins/web): fix enum payload + retrieve all required types 2022-07-29 18:42:47 +02:00
Emile Rolley
8e3fd34424 refactor(plugins/jsoo): encode Catala date in JS string object instead of date 2022-07-29 18:42:41 +02:00
Denis Merigoux
5a74f7bd0b Fix all errors 2022-07-29 18:42:14 +02:00
Denis Merigoux
4845196b5b Add source positions in all backends exceptions 2022-07-29 18:42:14 +02:00
Emile Rolley
6e825906de refactor(api_web): factorizes the api_web code + updates .gitattributes 2022-07-28 15:02:43 +02:00
Denis Merigoux
97b6e14740 Removed useless variable 2022-07-28 15:02:43 +02:00
Denis Merigoux
0c4682dc3f Graceful error catching 2022-07-28 15:02:43 +02:00
Denis Merigoux
fa36fb0df1 Housing benefits extract to Python and compute 2022-07-28 15:02:43 +02:00
Denis Merigoux
0f999fb285 Reflect change in filename 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
Emile Rolley
4f828c300e fix(jsoo): fix the translating of TUnit and TDuration to JSOO types 2022-07-28 15:02:43 +02:00
Denis Merigoux
7461a8db31 Generating OCaml for aides au logement 2022-07-28 15:02:43 +02:00
Denis Merigoux
fa55a83fb4
Merge branch 'master' into 290-jsoo-wrapper-plugin 2022-07-22 17:54:51 +02:00
Denis Merigoux
a73be79d61
Update assets 2022-07-22 17:14:58 +02:00
Emile Rolley
d9045499c0 refactor(french_law/ocaml): refactor the api_web.ml 2022-07-22 17:01:33 +02:00
Emile Rolley
231f327efb feat(jsoo): v1 jsoo plugin 2022-07-22 16:52:56 +02:00
Emile Rolley
15be4b7279 refactor(law_source): remove the unused Enfant submodule from the allocation_familiales.mli 2022-07-22 16:52:56 +02:00
Denis Merigoux
df9f02f943
Update Python asset 2022-07-22 16:29:47 +02:00
Denis Merigoux
0304602433 Trying to fix Bindlib unboxing bug [skip ci] 2022-07-22 12:31:05 +02:00
Emile Rolley
61899cd698 fix(examples): assets are now generated from the repo root 2022-07-20 18:29:01 +02:00
Denis Merigoux
bf33cbfa49
Updating assets 2022-07-20 15:58:24 +02:00
Louis Gesbert
19dbce895c Shell scripts: POSIX + correct error reporting 2022-07-20 12:04:30 +02:00
Emile Rolley
4991350b58 feat(backend/ocaml): disambiguate OCaml record names derived from Catala struct 2022-07-12 16:12:18 +02:00
Denis Merigoux
5e45940e1b
Merge branch 'master' into allocations_logement 2022-07-06 16:43:14 +02:00
Denis Merigoux
ea6083d5a2
Disable optimisations for french_law.js because of #274 2022-07-04 12:14:21 +02:00
Denis Merigoux
07b348a309
Update assets 2022-07-04 12:08:54 +02:00
Emile Rolley
22100d5b62 feat(runtime/api_web): add serialization for event + retrieveEvents in the API 2022-06-16 17:24:35 +02:00
Emile Rolley
e35e4a7cb4 feat(runtime): clean parse_raw_events + add documentation 2022-06-16 11:39:37 +02:00
Emile Rolley
092b57c898 feat(runtime): implement the raw_event parser 2022-06-13 17:59:00 +02:00
Emile Rolley
f932c45f97 docs: specify the log event structure 2022-06-09 15:49:08 +02:00
Emile Rolley
92ebb4194b refactor(api_web/runtime): runtime_value derive yojson_of 2022-05-25 14:26:58 +02:00
Louis Gesbert
551c9a6729 Allocation_logement: fix parentheses in formula
Changing the priorities broke the expression!

Here it was caught by the types; I hope there aren't other places where
it just changed the output without being caught by our tests...
2022-05-18 16:47:46 +02:00
Louis Gesbert
f9fc1a8e8b Formatting: sync with master 2022-05-12 15:10:55 +02:00
Denis Merigoux
96f1845afd
Merge branch 'master' into allocations_logement 2022-05-08 15:20:04 +02:00
Denis Merigoux
5ec91c7b00
Fix Python code and generated artefacts 2022-05-05 17:47:41 +02:00
Denis Merigoux
a72944a3ec
Merge branch 'master' into allocations_logement 2022-05-05 14:27:48 +02:00
Denis Merigoux
c7b84ca2d0
Merge pull request #244 from CatalaLang/c_backend
Bringing structure to the Lcalc AST
2022-05-05 14:22:26 +02:00
Denis Merigoux
a54a6826cf
Regenerate Python 2022-05-05 14:14:03 +02:00
Denis Merigoux
8a0d5d7916
Factoring, nitpicks and updates 2022-05-05 14:01:30 +02:00
Romain PRIMET
c1eb835f23
autopep8 2022-05-05 14:01:09 +02:00
Romain PRIMET
c782fff1c8
fail on errors (got bitten by this) 2022-05-05 14:01:09 +02:00
Romain PRIMET
6b30fd0142
fix imports 2022-05-05 14:01:09 +02:00
Romain PRIMET
f56133d442
reference runtime package in Makefile and requirements 2022-05-05 14:01:09 +02:00
Romain PRIMET
268d4b2dfb
rename dependencies to requirements (most common name for pip-installable list of deps) 2022-05-05 14:01:09 +02:00
Romain PRIMET
39be8b085b
invoke venv through its python module name for portability 2022-05-05 14:01:09 +02:00
Romain PRIMET
17f8e4a5f1
start drafting runtime package structure 2022-05-05 14:01:09 +02:00
Romain PRIMET
cde81f9235 autopep8 2022-04-29 21:37:23 +02:00
Denis Merigoux
aaa6a5d3a6
Merge branch 'master' into allocations_logement 2022-04-29 21:29:07 +02:00
Denis Merigoux
34bd6dcab0
I don't want to declare type stubs for gmpy2 2022-04-29 21:23:27 +02:00
Denis Merigoux
78e8275d5e
Adds a decimal rounding operator 2022-04-29 21:18:15 +02:00
Romain PRIMET
5065108407 fail on errors (got bitten by this) 2022-04-26 21:28:57 +02:00
Denis Merigoux
d79e6c974d
Fix last bugs 2022-04-26 16:22:47 +02:00
Romain PRIMET
75f1ea3d5e fix imports 2022-04-21 18:15:02 +02:00
Romain PRIMET
7992d5905b reference runtime package in Makefile and requirements 2022-04-21 12:46:48 +02:00
Romain PRIMET
764bbe9f4b rename dependencies to requirements (most common name for pip-installable list of deps) 2022-04-21 11:49:26 +02:00
Romain PRIMET
ba2d2f4ef0 invoke venv through its python module name for portability 2022-04-21 11:06:36 +02:00
Romain PRIMET
5c7ca03f60 start drafting runtime package structure 2022-04-20 21:40:20 +02:00
Denis Merigoux
6e03b512d9
Merge branch 'master' into allocations_logement 2022-04-13 15:28:54 +02:00
Denis Merigoux
e68fe42856
Put closure conversion prototype under a flag 2022-04-04 17:43:30 +02:00
Denis Merigoux
f40d2a4b8f
Revert asset [skip ci] 2022-04-02 14:53:09 +02:00
Denis Merigoux
25977de151
Prettify Scalc 2022-03-21 14:58:54 +01:00
Denis Merigoux
8f68e2b262
Merge branch 'master' into allocations_logement 2022-03-17 13:15:24 +01:00
Denis Merigoux
a3e9dfa534
Fix wrong round definitions in runtime 2022-03-17 13:09:57 +01:00
Denis Merigoux
cdac6de9fe
Implement the round money builtin 2022-03-17 12:30:14 +01:00
Denis Merigoux
97ede2cde1
Merge branch 'master' into allocations_logement 2022-03-09 10:47:29 +01:00
Denis Merigoux
2dfb15d888
reformat (sync with master) 2022-03-09 10:43:17 +01:00
Louis Gesbert
729fb7e551 reformat (sync with master) 2022-03-08 16:12:25 +01:00
Louis Gesbert
071ec35234 Command-line: use a record for the options
Should make it much easier and less error-prone to add new options. There is
still a bit of boiler-plate, but at least it's contained in the Cli.options
function and doesn't transpire in the interfaces.
2022-03-08 16:11:39 +01:00
Denis Merigoux
95bf732940
Update assets 2022-03-08 14:54:17 +01:00
Louis Gesbert
12ec65601d Use format strings directly in debug/error/log functions
This avoids many intermediate calls to e.g. `Format.asprintf`; should result in
some cases in "more correct" use of `Format`¹, avoid the computation of unused
debug strings, and make the code more readable.

¹ for `Format` to work as expected, all intermediate calls need to go through
it. Some cases of formatting to an intermediate string then printing through Format
again are still present, but this makes the situation better.
2022-03-08 13:04:27 +01:00
Denis Merigoux
cfbca7b2be
Merge branch 'master' into allocations_logement 2022-02-25 17:10:23 +01:00
Denis Merigoux
09dd02c8a0
Python backend works with exceptions avoided
Few bugs in Lcalc->Scalc fixed
2022-02-25 12:30:34 +01:00
Denis Merigoux
c65c38a2d5
Correct flag for enabling optimization 2022-02-24 16:46:02 +01:00
Denis Merigoux
756e7cb9b2
Merge branch 'master' into alain_default-option 2022-02-24 16:41:35 +01:00
Denis Merigoux
d4a1a43fcc
Merge branch 'master' into allocations_logement 2022-02-23 17:11:45 +01:00
Alain
73fe2f876c Revert "Merge pull request #196 from CatalaLang/fixup-cmdliner"
fix cmdliner to 1.0.4

This reverts commit 8e1a1ccb63, reversing
changes made to 4812830a25.
2022-02-21 14:53:48 +01:00
Denis Merigoux
472e3398f7
Restore build of js lib 2022-02-18 11:38:57 +01:00
Denis Merigoux
7d9379e43c
Merge branch 'master' into allocations_logement 2022-02-16 14:56:48 +01:00
Denis Merigoux
33228692b3
Correct assets 2022-02-14 14:23:16 +01:00
Denis Merigoux
e1dc36f1b1
Merge branch 'master' into io-qualifiers-112-part-2 2022-02-10 22:59:37 +01:00
Denis Merigoux
b6d9d7cf5f
Update Cmdliner with breaking changes 2022-02-10 22:57:07 +01:00
Denis Merigoux
36bc25a3ce
Update assets 2022-02-09 16:09:28 +01:00
Denis Merigoux
5c6a43da57
Fixed compilation to examples
Had to rename fields of allocations familiales because of a stupid record field confusion in OCaml
2022-02-07 18:38:31 +01:00
Denis Merigoux
a5ed25c5c6
Merge branch 'master' into allocations_logement 2022-02-03 16:57:14 +01:00
Denis Merigoux
c6a76df631
Reduce iteration number 2022-02-03 14:40:44 +01:00
Denis Merigoux
0d90dcea00
Better optimizations with values instead of literals 2022-02-02 10:30:39 +01:00
Denis Merigoux
6cf1b768d2
Fix bug in Python backend producing unreachable code 2022-02-01 15:41:53 +01:00
Denis Merigoux
effc2b24e4
Optimizations for defaults in Dcalc 2022-01-31 15:27:58 +01:00
Denis Merigoux
f7f010a902
Update asset and fix missing link in doc 2022-01-21 20:16:07 +01:00
Denis Merigoux
df4754b10b
Formatted asset 2022-01-10 09:33:58 +01:00
Denis Merigoux
e231e695f6
Fix bench and Python 2022-01-07 10:06:22 +01:00
Denis Merigoux
e36725a2a8
Added other field 2022-01-07 09:47:10 +01:00
Denis Merigoux
983baf81e7
Update assets and restore CI 2022-01-05 18:01:47 +01:00
Denis Merigoux
7cac55cc0b
Updating assets and relaxing version constraints in Makefile 2022-01-05 17:38:49 +01:00
Denis Merigoux
82865c48da
Fix #162 2021-11-29 10:36:33 +01:00
Denis Merigoux
485d093b7e
Bump Catala version number 2021-11-07 01:38:17 +01:00
Denis Merigoux
4406ff6690
Update all APIs in various languages 2021-11-07 00:53:14 +01:00
Denis Merigoux
cf31da7ca1
Remove limitation on Zarith since https://github.com/janestreet/zarith_stubs_js/pull/8 is closed 2021-10-18 09:58:47 +02:00
Denis Merigoux
8dbf034efc
Update generated assets 2021-10-11 17:41:20 +02:00
Denis Merigoux
b56299f3d3
Switch ocamlformat to 0.19.0 2021-08-19 11:35:56 +02:00
EmileRolley
6169d19b1e feat(compiler): add collection concatenation operator 2021-07-08 16:27:46 +02:00
Denis Merigoux
9ef637a161
Print lists better 2021-06-26 18:13:13 +02:00
Denis Merigoux
0d54b39aa9
Logging in Python OK 2021-06-26 18:04:36 +02:00
Denis Merigoux
32c2e84a10
Improve Python library API 2021-06-26 17:12:15 +02:00
Denis Merigoux
61b84ed71b
Typo in README 2021-06-25 15:35:16 +02:00
Denis Merigoux
ae8ef08b81
Added more doc 2021-06-25 10:50:49 +02:00
Denis Merigoux
3d2f3497bc
Switch to benchmark 2021-06-25 00:56:08 +02:00
Denis Merigoux
03b44f5b15
Python backend debugged and tested 2021-06-25 00:47:12 +02:00
Denis Merigoux
e38dc4c728
Various bugfixing and improvements for the Python backend 2021-06-25 00:16:21 +02:00
Denis Merigoux
3f5027e5a5
Translation now typechecks 2021-06-24 22:55:27 +02:00
Denis Merigoux
95b34937a6
Switch to use Python enums as a tag for tagged unions 2021-06-24 21:55:20 +02:00
Denis Merigoux
fbf60b89bf
Fix lenght type mismatch 2021-06-24 21:32:09 +02:00
Denis Merigoux
8b956bf4fa
Missing cd 2021-06-24 18:27:02 +02:00
Denis Merigoux
ccf2bba79f
Executable permission for env setup 2021-06-24 18:21:21 +02:00
Denis Merigoux
0481181f92
Put mypy typing under CI 2021-06-24 18:18:25 +02:00
Denis Merigoux
817b1785df
Python translation working but still buggy 2021-06-24 17:50:08 +02:00
Denis Merigoux
015776270d
Compilation passing from lcalc to scalc 2021-06-24 14:52:51 +02:00
Denis Merigoux
fffd0ffb63
Working the way into the Python backend 2021-06-22 14:55:43 +02:00
Denis Merigoux
867126f8e4
Added module list for Python doc 2021-06-21 17:42:40 +02:00
Denis Merigoux
488baa9c5e
Wrap up runtime 2021-06-21 17:33:29 +02:00
Denis Merigoux
8c30e059a7
Add functions to runtime, doc setup 2021-06-21 16:51:02 +02:00
Denis Merigoux
db026c6720
Start to implement Python runtime 2021-06-21 12:31:46 +02:00
Denis Merigoux
392ca25093
Install JS dependencies correctly 2021-06-21 11:54:56 +02:00
Denis Merigoux
bbd50747d9
Big renaming and dir reorg 2021-06-21 11:39:06 +02:00