Skip to content

Commit d473c8e

Browse files
authored
SNSUNI-133: Add persistance module and converters
2 parents 9bb5b42 + c12c9ca commit d473c8e

File tree

80 files changed

+3288
-60
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+3288
-60
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is, including what module/class is affected (e.g. `HumidityRatio`, `Temperature`, `UnitConverter`, etc.).
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Create instance of `...`
16+
2. Call method `...` with input `...`
17+
3. Observe output `...`
18+
4. Expected: `...`, Actual: `...`
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Code snippet (optional but helpful)**
24+
```java
25+
// Paste a short code snippet to reproduce the bug including the exception message and stack trace
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for Unitility
4+
title: ''
5+
labels: 'enhancement'
6+
assignees: ''
7+
---
8+
9+
**Is your feature request related to a problem? Please describe.**
10+
Describe any limitation or pain point you encountered that this feature would address.
11+
Example: "I need to convert between grains per pound and kg/kg but Unitility doesn't currently support this unit."
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you would like to see implemented.
15+
Example: "Add a `GrainsPerPound` unit and extend `HumidityRatio` to support parsing from this unit."
16+
17+
**Describe alternatives you've considered**
18+
Have you tried working around the issue?
19+
Example: "I wrote a custom unit / custom parsing factory, but it would be great to have this natively in Unitility."
20+
21+
**Additional context**
22+
Include any references, code snippets, or use cases that explain why this feature is valuable.

.github/pull_request_template.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Pull Request
2+
3+
## Description
4+
5+
Briefly describe what was added, changed, or fixed. Include module/context if relevant.
6+
7+
## Summary of Changes
8+
9+
- Mention affected key classes, modules, or files
10+
- Outline key logic changes or decisions
11+
- Use story number / id if provided when commiting changes
12+
13+
## Checklist
14+
15+
- [ ] Changes follow the architectural and naming conventions
16+
- [ ] Related modules and dependencies are considered
17+
- [ ] Unit tests added/updated where applicable
18+
- [ ] Code compiles and passes all tests
19+
- [ ] Public APIs are documented (e.g. Javadoc if needed)
20+
21+
## Notes (optional)
22+
23+
Add any extra context, reasoning, related issues/links, or POC's if required.

CODE_OF_CONDUCT.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# 📜 Code of Conduct
2+
3+
This project and community follow the [Contributor Covenant Code of Conduct](https://www.contributor-covenant.org/version/2/1/code_of_conduct/), version 2.1.
4+
5+
---
6+
7+
## Our Pledge
8+
9+
We, as contributors and maintainers, pledge to make participation in the Unitility project a harassment-free experience for everyone, regardless of:
10+
11+
- Age
12+
- Body size
13+
- Visible or invisible disability
14+
- Ethnicity
15+
- Sex characteristics
16+
- Gender identity and expression
17+
- Level of experience
18+
- Education
19+
- Socioeconomic status
20+
- Nationality
21+
- Race
22+
- Religion
23+
- Sexual identity and orientation
24+
25+
We commit to creating a welcoming and inclusive environment for all participants.
26+
27+
---
28+
29+
## Our Standards
30+
31+
Examples of behavior that contributes to a positive environment:
32+
33+
- Using welcoming and inclusive language
34+
- Being respectful of differing viewpoints and experiences
35+
- Gracefully accepting constructive feedback
36+
- Focusing on what is best for the community and project
37+
- Showing empathy toward others
38+
39+
Examples of unacceptable behavior:
40+
41+
- Trolling, insulting or derogatory comments
42+
- Harassment in any form
43+
- Publishing others’ private information without explicit permission
44+
- Political or ideological arguments unrelated to the project
45+
- Personal attacks or threats
46+
47+
---
48+
49+
## ⚖️ Enforcement Responsibilities
50+
51+
Project maintainers are responsible for clarifying the standards of acceptable behavior and will take appropriate and fair corrective action in response to any instances of unacceptable behavior.
52+
53+
---
54+
55+
## Scope
56+
57+
This Code of Conduct applies within all project spaces (GitHub issues, discussions, pull requests, and any official communication channels), and also applies when an individual is officially representing the project.
58+
59+
---
60+
61+
## Reporting
62+
63+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to:
64+
65+
**security [at] synerset [dot] com**
66+
(Replace `[at]` with `@` and `[dot]` with `.`)
67+
68+
All complaints will be reviewed and investigated. The project team is obligated to maintain confidentiality with regard to the reporter.
69+
70+
---
71+
72+
## Attribution
73+
74+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1.

COMMUNITY_GUIDELINES.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# 🤝 Community Guidelines
2+
3+
Welcome to the **Unitility** community!
4+
5+
Unitility is an open-source Java library for working with physical quantities and unit conversions. Whether you're an engineer, developer, researcher, or enthusiast — we're excited to have you here!
6+
7+
These guidelines are intended to ensure this space remains constructive, respectful, and focused on technical collaboration.
8+
9+
---
10+
11+
## Purpose of This Community
12+
13+
Our GitHub repository (issues, discussions, pull requests) serves to:
14+
15+
- Support users integrating Unitility into Java projects (Quarkus, Spring, etc.)
16+
- Facilitate discussion about physical quantities, units, and related models
17+
- Provide a platform to report bugs, propose features, or request enhancements
18+
- Encourage contribution to Unitility’s open development
19+
20+
---
21+
22+
## What You Can Do Here
23+
24+
We welcome a variety of community contributions:
25+
26+
### Discussions
27+
- Questions about using Unitility or interpreting results
28+
- Suggestions for new physical quantities or modules
29+
- General feedback or design trade-offs
30+
31+
### Issues
32+
- Bug reports with steps to reproduce
33+
- Inaccurate conversions or unexpected results
34+
- Feature requests with clear use cases
35+
36+
> 💡 **Prefer using [GitHub Issues](https://github.com/pjazdzyk/unitility/issues)** for clearly defined bugs or feature proposals.
37+
> Use **Discussions** for general questions or open-ended conversations.
38+
39+
### Pull Requests
40+
- New physical quantity implementations
41+
- Improvements to parsing, validation, or operator handling
42+
- Enhancements to documentation or integration modules
43+
- Contributions must follow the existing code structure and include tests
44+
45+
---
46+
47+
## 🚫 What Not to Post
48+
49+
To keep this space professional and focused:
50+
51+
- ❌ Off-topic content unrelated to the library
52+
- ❌ Political, ideological, or religious content
53+
- ❌ Disrespectful or aggressive comments
54+
- ❌ Spam, advertisements, or self-promotion
55+
- ❌ Requests to include vague, non-scientific, or unverified quantities / units
56+
57+
---
58+
59+
## How to Contribute
60+
61+
- Fork the repository and create a feature or bugfix branch
62+
- Follow the coding and testing patterns used in the repo
63+
- Submit a **Pull Request** with a clear description and scope
64+
- Respect semantic versioning and backward compatibility
65+
- Review open issues or suggest improvements
66+
67+
If unsure, open a **Discussion** first to validate your idea.
68+
69+
---
70+
71+
## Code of Conduct
72+
73+
We follow the [Contributor Covenant Code of Conduct](https://www.contributor-covenant.org/version/2/1/code_of_conduct/).
74+
Please be kind, inclusive, and respectful in all interactions.
75+
76+
---
77+
78+
## Useful Links
79+
80+
- 🔗 [Unitility on GitHub](https://github.com/pjazdzyk/unitility)
81+
- 🐞 [Issue Tracker](https://github.com/pjazdzyk/unitility/issues)
82+
- 💬 [Start a Discussion](https://github.com/pjazdzyk/unitility/discussions)
83+
- 📦 [Maven Central Artifacts](https://central.sonatype.com/search?q=unitility)
84+
85+
86+
Projects where Unitility is currently used:
87+
- 🌐 [EnergyFlowX](https://energyflowx.com)
88+
89+
---
90+
91+
Thank you for being part of Unitility! Your contributions help engineers and developers build better, more precise software every day.️

CONTRIBUTING.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# 🛠️ Contributing to Unitility
2+
3+
Thank you for your interest in contributing to **Unitility**!
4+
This guide outlines how you can help improve the library — whether by fixing bugs, adding features, improving docs, or proposing new ideas.
5+
6+
---
7+
8+
## Getting Started
9+
10+
1. **Fork the repository**
11+
2. Create a branch from `main`, e.g. `feature/new-quantity` or `fix/unit-parsing`
12+
3. Make your changes, use story id/number in a commit message id provided,
13+
4. Write or update unit tests
14+
5. Run the test suite (`mvn clean verify`)
15+
6. Submit a pull request with a clear description of your changes
16+
17+
---
18+
19+
## Contribution Guidelines
20+
21+
- Keep changes **small and focused**
22+
- Use clear, descriptive commit messages
23+
- Follow existing **naming conventions** and **code structure**
24+
- All public classes and methods should include **Javadoc**
25+
- Cover new logic with **unit tests**
26+
27+
---
28+
29+
## Common Contributions
30+
31+
- New physical quantities and their units (at least one for SI/metric and one for an Imperial system),
32+
- Bug fixes (e.g. conversion logic, unit parsing edge cases)
33+
- Integration modules (Quarkus, Spring Boot, Jackson, etc.)
34+
- Additional unit tests for coverage
35+
- Documentation improvements
36+
37+
---
38+
39+
## Reporting Bugs
40+
41+
For a good bug report, include:
42+
- Steps to reproduce
43+
- Expected vs actual behavior
44+
- Sample code (if applicable)
45+
- Unitility version, Java version, OS
46+
47+
> Open issues under [GitHub Issues](https://github.com/pjazdzyk/unitility/issues)
48+
49+
---
50+
51+
## Questions or Proposals?
52+
53+
Use [GitHub Discussions](https://github.com/pjazdzyk/unitility/discussions) for:
54+
- General questions
55+
- Feature suggestions
56+
- Design discussions
57+
58+
---
59+
60+
Thanks again for contributing to Unitility!

0 commit comments

Comments
 (0)