Skip to content

Commit b222df1

Browse files
authored
Merge pull request #24 from oyve/dev
Documentation, functions, refactor
2 parents 35ce0f6 + 0b769c6 commit b222df1

File tree

17 files changed

+1239
-9
lines changed

17 files changed

+1239
-9
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
name: Bug Report
3+
about: Report a bug or incorrect calculation
4+
title: '[BUG] '
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
## Bug Description
10+
A clear and concise description of what the bug is.
11+
12+
## Formula/Function Affected
13+
Which formula or function is producing incorrect results?
14+
- Function name:
15+
- Module: (e.g., temperature, humidity, pressure)
16+
17+
## Steps to Reproduce
18+
Provide a minimal code example that reproduces the issue:
19+
20+
```typescript
21+
import { temperature } from 'weather-formulas';
22+
23+
const result = temperature.dewPointMagnusFormula(298.15, 60);
24+
console.log(result); // Actual: XXX, Expected: YYY
25+
```
26+
27+
## Expected Behavior
28+
What result did you expect?
29+
- Expected value:
30+
- Units:
31+
32+
## Actual Behavior
33+
What result did you actually get?
34+
- Actual value:
35+
- Units:
36+
37+
## Input Parameters
38+
List all input parameters used:
39+
- Temperature: (in Kelvin)
40+
- Humidity: (in %)
41+
- Pressure: (in Pa or hPa)
42+
- Other parameters:
43+
44+
## Reference/Source
45+
If you believe the expected value is correct, please provide a reference:
46+
- [ ] Scientific paper (provide citation)
47+
- [ ] Validated calculator (provide link)
48+
- [ ] Other authoritative source (specify)
49+
50+
Link or citation:
51+
52+
## Environment
53+
- Node.js version: (e.g., 18.0.0)
54+
- Package version: (e.g., 1.0.9)
55+
- TypeScript version (if applicable): (e.g., 5.8.3)
56+
- Module system: [ ] ESM [ ] CommonJS
57+
58+
## Additional Context
59+
Add any other context about the problem here. For example:
60+
- Is this a precision/rounding issue?
61+
- Does it only occur for specific input ranges?
62+
- Are there any error messages or warnings?
63+
64+
## Possible Solution (Optional)
65+
If you have an idea of what might be causing the issue or how to fix it, please share.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Ask a Question
4+
url: https://github.com/oyve/weather-formulas/discussions
5+
about: Ask questions and discuss ideas with the community
6+
- name: Documentation
7+
url: https://github.com/oyve/weather-formulas#readme
8+
about: Read the documentation and usage examples
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
---
2+
name: Feature Request
3+
about: Suggest a new formula or enhancement
4+
title: '[FEATURE] '
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
## Feature Type
10+
- [ ] New weather formula
11+
- [ ] New weather index
12+
- [ ] New scale/classification
13+
- [ ] Enhancement to existing formula
14+
- [ ] Documentation improvement
15+
- [ ] API improvement
16+
- [ ] Other (please specify)
17+
18+
## Description
19+
A clear and concise description of the feature you'd like to see added.
20+
21+
## Formula Details (for new formulas)
22+
If requesting a new formula, please provide:
23+
24+
### Formula Name
25+
What is the formula called?
26+
27+
### Scientific Background
28+
What does this formula calculate? What is its purpose in meteorology/atmospheric science?
29+
30+
### Formula/Equation
31+
Provide the mathematical formula (use LaTeX notation if possible):
32+
```
33+
Example: T_d = \frac{b \cdot \alpha(T,RH)}{a - \alpha(T,RH)}
34+
Or simple: T_d = (b * α(T,RH)) / (a - α(T,RH))
35+
```
36+
37+
### Input Parameters
38+
List all required input parameters:
39+
- Parameter 1: (description, units)
40+
- Parameter 2: (description, units)
41+
- ...
42+
43+
### Output
44+
What does the formula return?
45+
- Output: (description, units)
46+
47+
### Reference Sources
48+
Provide authoritative sources for the formula:
49+
- [ ] Wikipedia article: (link)
50+
- [ ] Scientific paper: (citation and DOI if available)
51+
- [ ] Meteorological standard: (specify)
52+
- [ ] Other: (specify)
53+
54+
### Use Case
55+
Explain the practical use case for this formula. When would someone need this calculation?
56+
57+
## Example Usage
58+
How would you like to use this feature? Provide a code example:
59+
60+
```typescript
61+
import { module } from 'weather-formulas';
62+
63+
const result = module.newFormula(param1, param2);
64+
console.log(`Result: ${result}`);
65+
```
66+
67+
## Expected Behavior
68+
Describe what you expect this feature to do.
69+
70+
## Validation
71+
How can the correctness of this formula be verified?
72+
- [ ] Known reference values
73+
- [ ] Online calculator (provide link)
74+
- [ ] Scientific literature values
75+
- [ ] Other (specify)
76+
77+
## Additional Context
78+
Add any other context, screenshots, or examples about the feature request here.
79+
80+
## Alternative Solutions (Optional)
81+
Have you considered any alternative approaches or workarounds?
82+
83+
## Priority
84+
How important is this feature to you?
85+
- [ ] Critical - Blocking my work
86+
- [ ] High - Need it soon
87+
- [ ] Medium - Would be nice to have
88+
- [ ] Low - Just a suggestion
89+
90+
## Contribution
91+
Are you willing to contribute this feature yourself?
92+
- [ ] Yes, I can implement this with guidance
93+
- [ ] Yes, I can implement this independently
94+
- [ ] No, but I can help test
95+
- [ ] No, just requesting

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
## Description
2+
<!-- Provide a clear and concise description of your changes -->
3+
4+
5+
## Type of Change
6+
<!-- Check all that apply -->
7+
- [ ] Bug fix (non-breaking change that fixes an issue)
8+
- [ ] New formula/feature (non-breaking change that adds functionality)
9+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
10+
- [ ] Documentation update
11+
- [ ] Performance improvement
12+
- [ ] Code refactoring
13+
- [ ] Test improvements
14+
15+
## Related Issue
16+
<!-- Link to the issue this PR addresses. Remove this section if not applicable -->
17+
Fixes #(issue number)
18+
19+
## Changes Made
20+
<!-- List the specific changes you made -->
21+
-
22+
-
23+
-
24+
25+
## Formula Details (if applicable)
26+
<!-- For new formulas or formula changes -->
27+
28+
### Formula Name
29+
<!-- Name of the formula -->
30+
31+
### Scientific Source
32+
<!-- Provide reference to scientific source -->
33+
- Source:
34+
- Link:
35+
36+
### Input Parameters
37+
<!-- List input parameters with units -->
38+
-
39+
-
40+
41+
### Output
42+
<!-- Describe output with units -->
43+
-
44+
45+
### Validation
46+
<!-- How did you validate the formula? -->
47+
- [ ] Tested against known reference values
48+
- [ ] Verified with online calculator (link: )
49+
- [ ] Compared to scientific literature
50+
- [ ] Other:
51+
52+
## Testing
53+
<!-- Describe the tests you ran -->
54+
55+
### Test Coverage
56+
- [ ] Added tests for new functionality
57+
- [ ] Updated existing tests
58+
- [ ] All tests pass locally (`npm test`)
59+
- [ ] Build succeeds (`npm run build`)
60+
61+
### Test Results
62+
```bash
63+
# Paste relevant test output here
64+
```
65+
66+
### Manual Testing
67+
<!-- Describe any manual testing performed -->
68+
69+
70+
## Documentation
71+
- [ ] Updated README.md (if needed)
72+
- [ ] Added/updated JSDoc comments
73+
- [ ] Updated CONTRIBUTING.md (if needed)
74+
- [ ] Added usage examples (if applicable)
75+
76+
## Checklist
77+
<!-- Ensure all items are completed before requesting review -->
78+
- [ ] My code follows the style guidelines of this project
79+
- [ ] I have performed a self-review of my own code
80+
- [ ] I have commented my code, particularly in hard-to-understand areas
81+
- [ ] I have made corresponding changes to the documentation
82+
- [ ] My changes generate no new warnings
83+
- [ ] I have added tests that prove my fix is effective or that my feature works
84+
- [ ] New and existing unit tests pass locally with my changes
85+
- [ ] Any dependent changes have been merged and published
86+
- [ ] I have used the correct units (Kelvin for temperature, SI units for others)
87+
- [ ] I have verified backward compatibility (or documented breaking changes)
88+
89+
## Breaking Changes
90+
<!-- If this PR introduces breaking changes, describe them here -->
91+
- [ ] This PR introduces breaking changes
92+
- [ ] I have updated the version number appropriately
93+
94+
Details of breaking changes:
95+
96+
97+
## Screenshots (if applicable)
98+
<!-- Add screenshots to show visual changes -->
99+
100+
101+
## Additional Notes
102+
<!-- Add any other context about the PR here -->
103+
104+
105+
## Performance Impact
106+
<!-- Describe any performance implications -->
107+
- [ ] No performance impact
108+
- [ ] Performance improvement
109+
- [ ] Potential performance regression (explain below)
110+
111+
Details:
112+
113+
114+
## Dependencies
115+
<!-- List any new dependencies added -->
116+
- [ ] No new dependencies
117+
- [ ] New dependencies added (list below with justification)
118+
119+
New dependencies:
120+
121+
122+
---
123+
124+
## Reviewer Notes
125+
<!-- Notes for reviewers -->
126+
- Key files to review:
127+
- Areas needing special attention:
128+
- Questions for reviewers:

0 commit comments

Comments
 (0)