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

Create v0.1.3 Release #21

Merged
merged 9 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
35 changes: 35 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,41 @@ 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
a new package release:

1. Merge any changes that need to be included in the release into the main branch.
2. Rebuild the documentation with `hatch run docs:build`.
3. Run `hatch run all` locally and ensure there are no issues.
4. Bump the VERSION in `src/linearmoney/__init__.py`.
5. Build the package locally and push to test.pypi.org.
6. Run `hatch run test:prod` to check that the published test package installs and runs correctly.
7. Publish the package to the public pypi registry.
8. Push your changes to the main branch of GH.
9. In the web UI, create a new release on the main branch from your new commit. Use the version as the tag. E.g. v1.0.1

Semantic versioning should be followed for all source code changes. Additionally,
if the CLDR data version has been updated, then this constitutes a minor version update.
The reasoning behind this is that it doesn't change the interface of the library in any
way, but it can change the way currency information is displayed to users, so it is
not a breaking change, but it could cause problems for some use-cases. It should be
made very clear in the release notes that these changes are included in the release.

## Note on AI Generated Contributions

Please do not submit a PR that was generated by an LLM. Many people may
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