https://github.com/catalalang/catala-examples
Collection of Catala programs
Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
11 of 33 committers (33.3%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.4%) to scientific vocabulary
Keywords from Contributors
Repository
Collection of Catala programs
Basic Info
- Host: GitHub
- Owner: CatalaLang
- License: apache-2.0
- Language: OCaml
- Default Branch: master
- Size: 12.4 MB
Statistics
- Stars: 7
- Watchers: 6
- Forks: 4
- Open Issues: 2
- Releases: 0
Metadata Files
README.md
Catala examples
This repository contains examples of Catala programs. It is highly recommended to locate your own Catala programs in this directory, since programs in this directory will receive first-class support during the alpha and beta stage of the Catala programming language development.
List of examples
allocations_familiales/: computation of the French family benefits, based on the Code de la sécurité sociale.aides_logement: computation of the French housing benefits, based on the Code de la construction et de l'habitation. This case study is the biggest and most ambitious for Catala so far.us_tax_code/: contains the Catala formalization of several sections of the US Tax Code.
Building and running examples
Use Clerk (it comes installed alongside catala) to build and test your examples.
Note: For now, the OCaml, Javascript and Python artifacts that are used in https://github.com/CatalaLang/french-law are generated using
dunerules instead, while Clerk is getting mature enough. See the examples inaides_logement/duneandallocations_familiales/dune.
Testing examples
Unit testing is important, and we encourage Catala developers to write lots of tests for their programs. Again, the Makefile system provides a way to collect tests into a regression test suite.
In order to enjoy the benefits of this system, we recommand that you create a
tests/ directory in your examples directory, for instance foo/tests. Then,
create a test file foo_tests.catala_en inside that directory.
Inside foo_tests.catala_en, declare one ore more test scopes. Then, you can
provide the expected output for the interpretation of these scopes or the
compilation of the whole program using the standard expected by clerk test by
including catala-test-cli sections in your file.
Once your tests are written, then will automatically be added to the regression suite executed using:
clerk test
You can isolate a part of the regression suite by invoking:
clerk test foo/tests/foo_tests.catala_en
Adding an example
This section describes what to do to setup a working directory for a new Catala
example, as well as the development cycle. Let us suppose that you want to
create a new example named foo.
First, follow the instructions to install the Catala compiler. You can also set up the syntax highlighting for your editor.
Then, create the directory examples/foo. In there, create a master source
file foo.catala_en (or foo.catala_fr, etc. depending on your language)
that will be the root of your Catala program. You can then start programming
in foo.catala_en, or split up your example into multiple files. In the later case,
foo.catala_en must only contain
something like this:
```markdown
Master file
Include: bar.catala_en ```
where examples/bar.catala_en is another source file containing code for your
example. Make sure you start by including some content in the source files,
like
Hello, world!
Owner
- Name: CatalaLang
- Login: CatalaLang
- Kind: organization
- Repositories: 4
- Profile: https://github.com/CatalaLang
GitHub Events
Total
- Watch event: 2
- Issue comment event: 3
- Push event: 42
- Pull request review comment event: 3
- Pull request review event: 6
- Pull request event: 20
- Fork event: 1
- Create event: 15
Last Year
- Watch event: 2
- Issue comment event: 3
- Push event: 42
- Pull request review comment event: 3
- Pull request review event: 6
- Pull request event: 20
- Fork event: 1
- Create event: 15
Committers
Last synced: 11 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Denis Merigoux | d****x@g****m | 479 |
| Louis Gesbert | l****t@o****m | 105 |
| Lilya Slimani | l****e@g****m | 28 |
| Emile Rolley | e****y@t****o | 27 |
| Bartosz Woźniak | b****0@g****m | 21 |
| James Barnes | 5****b | 20 |
| James Barnes | 17 | |
| JusBanuls | j****s@i****r | 16 |
| Hugo Gimbert | h****t@c****r | 7 |
| lIlIlIlIIIIlIIIllIIlIllIIllIII | l****I | 7 |
| vbot | v****l@i****r | 6 |
| armandsalek | 8****k | 5 |
| Aminata-Dev | b****a@g****m | 5 |
| Aida Ibrahim | a****m@l****r | 4 |
| Jonathan Protzenko | j****o@g****m | 4 |
| Edwin Török | e****n@e****t | 4 |
| Aymeric Fromherz | f****z@c****u | 3 |
| adelaett | 9****t | 3 |
| armandsalek | a****d@s****c | 3 |
| Alain | a****n@i****r | 3 |
| Nicolas Chataing | n****g@e****r | 3 |
| Raphaël Monat | r****t@i****r | 2 |
| Siggy Scott | e****t@m****g | 2 |
| PRIMET Romain | r****t@i****r | 2 |
| Artur Cygan | a****n@g****m | 1 |
| JusBanuls | j****s@i****r | 1 |
| armand | a****d@d****n | 1 |
| XB | x****n@p****g | 1 |
| Raphaël Monat | r****t@l****r | 1 |
| Matthew Gerrior | g****w@g****m | 1 |
| and 3 more... | ||
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 11 months ago
All Time
- Total issues: 0
- Total pull requests: 34
- Average time to close issues: N/A
- Average time to close pull requests: 6 days
- Total issue authors: 0
- Total pull request authors: 6
- Average comments per issue: 0
- Average comments per pull request: 0.26
- Merged pull requests: 30
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 23
- Average time to close issues: N/A
- Average time to close pull requests: 3 days
- Issue authors: 0
- Pull request authors: 5
- Average comments per issue: 0
- Average comments per pull request: 0.26
- Merged pull requests: 19
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- AltGr (1)
Pull Request Authors
- AltGr (28)
- denismerigoux (9)
- vincent-botbol (5)
- rprimet (3)
- samestep (2)
- pierregoutagny (2)