Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor cldr data processing script #20

Merged
merged 6 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,19 @@ if the code is not written in a way that is easily testable. Code that is easily
to change later as well, so this is an opportunity to improve the design of the changes before
merge.

## Updating CLDR Data

If a new version of the CLDR data has been released and we have decided to include
it, then we can update it with the following steps:

1. Pull the new version of the CLDR JSON data from the upstream https://github.com/unicode-org/cldr-json repo.
2. Run `hatch run cldr:build` to process the new data and update the linearmoney resource files.
3. Run `hatch run test:suite` to verify that there are no problems with the newly generated data.
4. If tests failed due to a change in the data causing the expected formatting or rounding results to change, update the test cases with the new expectations based on the updated data. If the test failed because the expected structure of the data changed or because of some error in the build, then the tests should not be updated and the data processing script needs to be debugged.
5. Once source tests are passing, copy the resource files to the test file locations in the `tests` directory. E.g. `src/linearmoney/locales.json` -> `tests/cldr/locales.json`. These files are used to test changes to the cldr data processing script itself.
6. Run `hatch run cldr:test` to ensure the test resource files were copied correctly.
7. Commit and push your changes.

## Creating a Release

If you are the current maintainer of linearmoney, you can follow these steps to create
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Version 1.0.0:
- [ ] Serialization/deserialization of forex vectors
- [ ] Recipes to add
- [ ] Use-cases without vectors
- [ ] Refactor CLDR data processing script
- [x] Refactor CLDR data processing script
- [#11](https://github.com/GrammAcc/linearmoney/issues/11)
- [x] Add contributing guidelines and setup CI
- [x] Contributing guidelines
Expand Down
Loading