Commit Graph

2360 Commits

Author SHA1 Message Date
Denis Merigoux
0133ad4843
Tests belong to clerk 2022-08-09 12:05:50 +02:00
Denis Merigoux
1d9af3cc02
Attempt to revive nix build 2022-08-08 18:05:43 +02:00
Denis Merigoux
03e598128a
Bumping version number 2022-08-08 17:26:07 +02:00
Denis Merigoux
0351d90087
Update assets 2022-08-08 17:25:49 +02:00
Denis Merigoux
d03d82a0e7
Correctly count columns 2022-08-08 17:25:08 +02:00
Denis Merigoux
4d465b33b4
Helpful error message when trying to interpret a scope with arguments 2022-08-06 13:35:17 +02:00
Denis Merigoux
e5d6c26eb4
Merge pull request #303 from CatalaLang/feat-add-details-to-html
Feat: improve the HTML generation with ToC and details tags
2022-08-05 20:42:36 +02:00
Denis Merigoux
d75d86d321
Merge pull request #305 from CatalaLang/aides_logement
Mise à jour du calcul des aides au logement suite à revalorisation
2022-08-05 20:28:13 +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
Emile Rolley
eacc4dcc90 fix(html): sanitize href of line links in code blocks 2022-08-05 10:55:48 +02:00
Emile Rolley
18284d9f9f git: update .git-blame-ignore-revs 2022-08-05 10:55:48 +02:00
Emile Rolley
ba620fca28 ocamlformat: new break-infix rule 2022-08-05 10:55:48 +02:00
Emile Rolley
d85812109c refactor(compiler): remove the camomile dependency due to the new Utils.String_common module based on Ubase 2022-08-05 10:55:45 +02:00
Emile Rolley
03aebf7f1c feat(backends/html): improve the code generation with ToC and details tags 2022-08-05 10:55:45 +02:00
Louis Gesbert
525226e7c6 Github workflow: fix escaping 2022-08-04 21:12:47 +02:00
Louis Gesbert
fb2e48d6c5
Merge pull request #299 from AltGr/french_law-build
Build system rehaul, use of Docker for CI & artifact generation on Github
2022-08-04 20:57:56 +02:00
Louis Gesbert
a569589193 Small improvements to the Python and OCaml pretty-printers 2022-08-04 20:43:39 +02:00
Denis Merigoux
0e2bc96789
Mise à jour du calcul des aides au logement avec https://www.legifrance.gouv.fr/jorf/id/JORFSCTA000046114996 2022-08-04 18:07:29 +02:00
Louis Gesbert
922126b5cd Improve api_web pretty-printer 2022-08-04 17:36:50 +02:00
Louis Gesbert
e63860de4b Disable ocamlformat on api_web 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
Emile Rolley
8a3d42b623 Revert "fix(html): sanitizes href of line links in code blocks"
This reverts commit 63b069a478.
2022-08-04 16:33:24 +02:00
Emile Rolley
63b069a478 fix(html): sanitizes href of line links in code blocks 2022-08-04 16:25:56 +02:00
Louis Gesbert
3ee6fdb254 Automate artifact generation 2022-08-03 22:42:56 +02:00
Louis Gesbert
bc8eda581c Add a script generating static builds
We have an obvious limitation: static builds won't support plugins. We
could resort to the classic method and do normal builds but on an old
distrib to dodge compatibility issues.

That would still be compatible with statically linking the more specific
libs, like e.g. z3.
2022-08-03 19:04:14 +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
21ac1afa6e Makefile: friendly message about python virtual env 2022-08-03 18:55:42 +02:00
Louis Gesbert
55fcf416a3 Enforce dune profile to 'release' in Makefile
Dune has 2 default build profiles: `dev` and `release`, which change things like warnings-as-errors, and debug in jsoo build mode.

We need to be in release mode when we generate the javascript artifacts (e.g. `make website-assets`), so the master `Makefile` had `--profile=release` for the `dune` commands building them. However, that rebuilds _the whole tree of dependencies_ in release mode, which means `make all` might rebuild everything several times, as the `release` flag is turned off and on. I had conflicting plugins that weren't rebuilt with the correct flag. And let's not imagine the `make -j` case…

This is the best solution I can think of for the time being:
- set the Makefile to use dune's `release` profile by default
- this ensure consistency and avoids surprises with e.g. bad (slower) artifacts
  generated for the website
- devs can use `dune` directly when working, or set `DUNE_PROFILE` manually if
  they need it

I am not sure yet about CI, though, since we want warnings-as-errors but also
useful artifacts. Might best to build twice…
2022-08-03 18:55:42 +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
Denis Merigoux
3df99acb21
Removed unnecessary assets for website 2022-08-03 17:07:43 +02:00
Denis Merigoux
38ca40de98
Merge pull request #302 from AltGr/parser-fix
Tweak priority of 'set contains elt' / tag Docker images
2022-08-03 11:40:10 +02:00
Louis Gesbert
0abbb3e29b Syntax: tweak priority of 'set contains elt'
(the other way around was creating a conflict !)
2022-08-02 10:02:03 +02:00
Louis Gesbert
d02d6f16a5 Github CI: tag Docker images, automatically cleanup non-master ones 2022-08-02 10:00:41 +02:00
Emile Rolley
2da94b88c2 fix(compiler): use Plugin.extension instead of the hardcoded ".ml" one 2022-08-01 10:28:38 +02:00
Catala nix updated
ce47132342 update lock files 2022-08-01 00:26:13 +00:00
Denis Merigoux
f3a7510321
Merge pull request #296 from CatalaLang/feat-jsonschema-gen
Feat: new json_schema plugin
2022-07-29 19:13:59 +02:00
Denis Merigoux
fa9d47254e
Don't use filenames in Makefile when you don't generate the files 2022-07-29 18:56:49 +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
21af0c8c04 refactor(compiler): split web plugin into api_web and json_schema + factorize some util functions 2022-07-29 18:42:47 +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
ae3852fa12 feat(plugins/web): generate minimal working JSON schema from a given scope 2022-07-29 18:42:41 +02:00
Emile Rolley
599126a7ce feat(plugins/web): retrieve required types definitions from scope input 2022-07-29 18:42:41 +02:00
Emile Rolley
32ec53d918 refactor(plugins): jsoo -> web 2022-07-29 18:42:41 +02:00
Emile Rolley
6ce6ea8afc refactor(plugins): add scope as argument for the apply function 2022-07-29 18:42:41 +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