Commit Graph

217 Commits

Author SHA1 Message Date
Louis Gesbert
5a553149ff Makefile: ensure compiler is up-to-date when running tests 2022-10-04 14:50:37 +02:00
Denis Merigoux
6e64f769a0
Update assets and rename executable 2022-09-08 15:16:39 +02:00
Denis Merigoux
1990b0b970
Code compiles 2022-09-06 17:25:57 +02:00
Denis Merigoux
5bddde1c68
Fix documentation and test invocation 2022-08-30 13:48:20 +02:00
Denis Merigoux
c71b8e28c6
Moving parameters into property-section of data 2022-08-12 11:16:52 +02:00
Denis Merigoux
da06bedaca
Fix HTML line numbers 2022-08-11 16:15:52 +02:00
Louis Gesbert
3ee6fdb254 Automate artifact generation 2022-08-03 22:42:56 +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
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
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
26663f227d fix(plugins/web): fix enum payload + retrieve all required types 2022-07-29 18:42:47 +02:00
Denis Merigoux
4845196b5b Add source positions in all backends exceptions 2022-07-29 18:42:14 +02:00
Denis Merigoux
fa36fb0df1 Housing benefits extract to Python and compute 2022-07-28 15:02:43 +02:00
Denis Merigoux
8d3e283669 Fix some bugs of JSOO plugin 2022-07-28 15:02:43 +02:00
Denis Merigoux
aa3820c2a7
Nitpicks 2022-07-22 17:42:24 +02:00
Emile Rolley
d9045499c0 refactor(french_law/ocaml): refactor the api_web.ml 2022-07-22 17:01:33 +02:00
Denis Merigoux
0304602433 Trying to fix Bindlib unboxing bug [skip ci] 2022-07-22 12:31:05 +02:00
Denis Merigoux
5bcee7ceba
Correctly generate HTML output 2022-07-20 15:35:26 +02:00
Louis Gesbert
39139816ff Use groff directly instead of man2html 2022-07-20 12:05:19 +02:00
Louis Gesbert
dfccf8e139 Run all CI tests through a Docker container
Also reworks some dependency handling
2022-07-20 12:05:17 +02:00
Louis Gesbert
b8e73ab3ae Tweak build/ci 2022-07-11 17:42:34 +02:00
Louis Gesbert
504f54c31e Rework type error reporting 2022-07-11 17:42:34 +02:00
Louis Gesbert
d2a182043b Update doc for handling tests 2022-07-11 16:03:47 +02:00
Denis Merigoux
bdbf202a8d
Minimal implementation of https://github.com/CatalaLang/catala/issues/192#issuecomment-1178750411 2022-07-08 14:10:25 +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
Emile Rolley
fb93be04dc fix: remove -s flag in the Makefile rule used to generate the french law library in OCaml 2022-06-16 17:30:33 +02:00
Louis Gesbert
30297b27b8 Add dune rule to build tests
This allows a new magic command: `dune test -w`
2022-05-25 18:33:20 +02:00
Louis Gesbert
56026e8e8d Pygments: install as user
Makefiles shouldn't sudo
2022-05-19 10:40:04 +02:00
Louis Gesbert
08c997142d CI: run builds from a clean repo 2022-05-19 10:40:04 +02:00
Louis Gesbert
5ae4393004 Add two demo backend plugins
- one that is just the same as the python backend
- one that is a quick'n'dirty call to js_of_ocaml on top of the ocaml backend to
  generate js files

Use `make plugins` to test them. They are only expected to be useful as
demonstrations of how to write plugins.
2022-05-19 10:40:04 +02:00
Emile Rolley
06717ecb19 build: add the js_build rule for the website-assets one in the Makefile 2022-05-19 10:03:05 +02:00
Louis Gesbert
faa5b32638 Merge remote-tracking branch 'origin/master' into allocations_logement 2022-05-12 15:22:17 +02:00
Louis Gesbert
abb4e9b66d Some build / CI tweaks
add a check that the dune-promoted files are in sync when submitting a PR
2022-05-11 19:24:38 +02:00
Louis Gesbert
c5583a0c16 Add ocamlformat, obelisk and conf-npm as dev dependencies 2022-05-11 16:25:51 +02:00
Louis Gesbert
ac85d8dbb4 Upgrade ocamlformat version 2022-05-11 16:21:58 +02:00
Louis Gesbert
6cb0d581a6 Workaround some ocamlformat crashes
These files were not reformatted!
2022-05-11 16:21:07 +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
Romain PRIMET
5aa5c2a9b4
venv is bundled with python, and node's executable name is most commonly node 2022-05-05 14:01:09 +02:00
Denis Merigoux
ad7fe6a21a
Use pandoc to prettify a lot the LaTeX document with tables 2022-04-29 23:47:02 +02:00
Romain PRIMET
b8d3d13440 venv is bundled with python, and node's executable name is most commonly node 2022-04-20 18:32:31 +02:00
Denis Merigoux
171c3966f5
Pass some make flags to Clerk 2022-04-14 11:47:18 +02:00
Denis Merigoux
62a1903686
Wrong makefile target 2022-04-11 11:01:20 +02:00
Denis Merigoux
6f223d2519
Restore web build 2022-04-11 10:59:40 +02:00