https://github.com/catalalang/catala-dsfr
Web prototype for automated generation of individual explanations from Catala programs
Science Score: 13.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
-
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.8%) to scientific vocabulary
Keywords
Repository
Web prototype for automated generation of individual explanations from Catala programs
Basic Info
- Host: GitHub
- Owner: CatalaLang
- License: apache-2.0
- Language: ReScript
- Default Branch: main
- Homepage: https://code.gouv.fr/demos/catala
- Size: 2.56 MB
Statistics
- Stars: 1
- Watchers: 6
- Forks: 0
- Open Issues: 6
- Releases: 0
Topics
Metadata Files
README.md
Catala DFSR
Source code for the web demo about automated generation of individual explanations of [Catala](https://catala-lang.org) programs hosted at [https://code.gouv.fr/demos/catala](https://code.gouv.fr/demos/catala/).This project is built on top of the following libraries:
@catala-lang/french-law@catala-lang/rescript-catala@catala-lang/catala-explain@catala-lang/catala-web-assets@codegouvfr/rescript-react-dsfr@codegouvfr/react-dsfr
Local dev
```
Install dependencies
yarn
Start a local dev server
yarn dev ```
[!WARNING] When adding modifications to the Rescript files, if you start seeing errors like that in your
yarn devoutput:
14:28:30 [vite] hmr invalidate /src/components/Form.bs.js Could not Fast Refresh.That means that the fast reload isn't working properly. To avoid that, each ReScript file must export only one React component. You can hide internal code by providing an interface file that only exports the component you want to use.
Generally, you should always have an inteface file (
.resi) for each implementation file (.res) to speed up incremental build.
Using local packages
If you want to use one of the @catala-lang packages from your local machine
instead of the published version, you can use yarn link to link them to this
project.
```
In the library you want to link
yarn link
In this project
yarn link @catala-lang/
[!IMPORTANT] But then some shenanigans will appear. First, there might be duplicate dependencies between
catala-dsfrand the linked dependencies. These duplicates will show as error messages so you know which they are. To remove the dependency duplication, you should link the version of the duplicate dependency incatala-dsfr/node_modules/<duplicate-library-name>and make sure@catala-lang/<library-name>uses it withyarn link <duplicate-library-name>in the local folder of@catala-lang/<library-name>.Now that the links are OK, you have to tell
viteto watch for the changes in the dependencies to have reloading work. For that, follow the instructions to modifyvite.config.tsincatala-dsfrhere. At last, don't forget to runyarn watchin the local folder of@catala-lang/<library-name>, so that the modifications in the Rescript files are watched and compiled to modifications to JS files thatvitecan pick up.
Versioned assets
Multiple versions of @catala-lang/catala-web-assets and @catala-lang/french-law are used in this project.
In the assets-versions.json file is defined the list of versions available.
Each version is defined by a pair of versions for each package (one for the web
assets and one for the french law library) and named with the corresponding
date.
To add a new version
To add a new version of the assets, you need to use the yarn aliases:
```bash
For @catala-lang/catala-web-assets
yarn add @catala-lang/catala-web-assets-
For @catala-lang/french-law
yarn add @catala-lang/french-law-
[!TIP] The latest version of the
@catala-lang/catala-web-assetspackage and the@catala-lang/french-lawpackage are automatically updated with the./update-assets.sh(yarn assets) script run beforeyarn buildandyarn dev. Consequently, you don't need to manually update the version of the packages in thepackage.jsonfile.[!IMPORTANT] For now, if a new version of one of the packages is added, you need to manually update the
assets-versions.jsonfile with the new version.
diff
{
"available": [
+ {
+ "name": "<date>",
+ "french-law": "<latest-version>"
+ "catala-web-assets": "<latest-version>",
+ },
]
}
Using local assets
If you want to use @catala-lang/french-law (resp.
@catala-lang/catala-web-assets) from your local machine instead of the
published version, you can use yarn link to link them to this project.
[!IMPORTANT] See the Using local packages section for more information about how to link local packages.
Then, add the new version in assets-versions.json with the local version.
diff
{
"available": [
+ {
+ "name": "local", # or whatever name you want to give to the version
+ "french-law": "local"
+ "catala-web-assets": "<latest-version>",
+ },
]
}
Build for production and deploy
To test before deploy
```
Build for production
yarn build
Locally preview the production build
yarn serve ```
To deploy
```
Build for production and rsync files to the (could be a ssh address)
yarn deploy
Sponsors
This library has been developed during a research project funded by the mission logiciels libres et communs numériques of the direction interministérielle du numérique in collaboration with the Catala project.
Owner
- Name: CatalaLang
- Login: CatalaLang
- Kind: organization
- Repositories: 4
- Profile: https://github.com/CatalaLang
GitHub Events
Total
Last Year
Committers
Last synced: about 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Emile Rolley | e****y@t****o | 183 |
| Denis Merigoux | d****x@g****m | 6 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 12 months ago
All Time
- Total issues: 9
- Total pull requests: 13
- Average time to close issues: about 1 month
- Average time to close pull requests: 19 days
- Total issue authors: 1
- Total pull request authors: 1
- Average comments per issue: 0.44
- Average comments per pull request: 0.54
- Merged pull requests: 13
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: about 24 hours
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 1.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- EmileRolley (6)
Pull Request Authors
- EmileRolley (13)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- @catala-lang/catala-web-assets ^0.8.0-b development
- @jihchi/vite-plugin-rescript ^5.1.0 development
- @originjs/vite-plugin-commonjs ^1.0.3 development
- @rescript/core ^0.3.1 development
- @vitejs/plugin-react ^3.1.0 development
- autoprefixer ^10.4.13 development
- gentype ^4.5.0 development
- jsdom ^21.1.0 development
- tailwindcss ^3.2.6 development
- vite ^4.1.1 development
- @catala-lang/french-law ^0.8.1
- @catala-lang/rescript-catala ^0.8.0
- @codegouvfr/react-dsfr ^0.52.1
- @rescript/react ^0.11.0
- @rjsf/core ^5.1.0
- @rjsf/utils ^5.1.0
- @rjsf/validator-ajv8 ^5.1.0
- react ^18.2.0
- react-dom ^18.2.0
- rescript ^10.1.2
- 322 dependencies