jsthermalcomfort 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -17
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
| **license** | [](https://github.com/FedericoTartarini/jsthermalcomfort/blob/main/LICENSE) |
|
|
10
10
|
| **npm version** | [][npm_link] |
|
|
11
11
|
|
|
12
|
-
Package to calculate
|
|
12
|
+
Package to calculate thermophysiological, thermal comfort, thermal stress indices, in JavaScript.
|
|
13
13
|
|
|
14
14
|
Please cite us if you use this package: [Tartarini, F., Schiavon, S., 2020. pythermalcomfort: A Python package for thermal comfort research. SoftwareX 12, 100578. https://doi.org/10.1016/j.softx.2020.100578](https://www.sciencedirect.com/science/article/pii/S2352711020302910)
|
|
15
15
|
|
|
16
16
|
- Free software: MIT license
|
|
17
|
-
- Authors: [Omar Jesus Acuache Briceno](https://www.linkedin.com/in/omar-acuache), [Ruoshui Chen](https://github.com/ChristinChen233), [Jingyu Lu](https://github.com/Lu-Whale), [Yuchen Mu](https://github.com/YuchenMu), [Jordan Ocokoljic](https://github.com/JordanOcokoljic), [Santiago Zaldivar del Alba](https://github.com/szaldivar)
|
|
17
|
+
- Authors: [Omar Jesus Acuache Briceno](https://www.linkedin.com/in/omar-acuache), [Ruoshui Chen](https://github.com/ChristinChen233), [Jingyu Lu](https://github.com/Lu-Whale), [Yuchen Mu](https://github.com/YuchenMu), [Jordan Ocokoljic](https://github.com/JordanOcokoljic), [Santiago Zaldivar del Alba](https://github.com/szaldivar), [Federico Tartarini](https://www.linkedin.com/in/federico-tartarini/), [Stefano Schiavon](https://www.linkedin.com/in/stefanoschiavon/), [Ollie Jay](https://www.linkedin.com/in/ollie-jay-793a1b11/)
|
|
18
18
|
|
|
19
19
|
[docs_link]: https://github.com/FedericoTartarini/jsthermalcomfort/actions/workflows/test_docs.yml
|
|
20
20
|
[build_link]: https://github.com/FedericoTartarini/jsthermalcomfort/actions/workflows/build.yml
|
|
@@ -23,13 +23,17 @@ Please cite us if you use this package: [Tartarini, F., Schiavon, S., 2020. pyth
|
|
|
23
23
|
[synk_link]: https://github.com/FedericoTartarini/jsthermalcomfort/actions/workflows/snyk.yml
|
|
24
24
|
[npm_link]: https://www.npmjs.com/package/jsthermalcomfort
|
|
25
25
|
|
|
26
|
+
# Documentation
|
|
27
|
+
|
|
28
|
+
[https://federicotartarini.github.io/jsthermalcomfort/](https://federicotartarini.github.io/jsthermalcomfort/)
|
|
29
|
+
|
|
26
30
|
# Installation
|
|
27
31
|
|
|
28
32
|
```bash
|
|
29
33
|
npm install jsthermalcomfort
|
|
30
34
|
```
|
|
31
35
|
|
|
32
|
-
|
|
36
|
+
If you want to use jsthermalcomfort package without installing it on your local machine, you can import with:
|
|
33
37
|
|
|
34
38
|
[`https://cdn.jsdelivr.net/gh/FedericoTartarini/jsthermalcomfort/lib/esm/`](https://cdn.jsdelivr.net/gh/FedericoTartarini/jsthermalcomfort/lib/esm/)
|
|
35
39
|
|
|
@@ -61,7 +65,7 @@ You can also import it in the website directly, and caution that you need to mar
|
|
|
61
65
|
|
|
62
66
|
Here is a list of examples running in the browser:
|
|
63
67
|
|
|
64
|
-
- [PHS](/
|
|
68
|
+
- [PHS](/docs/examples/phs.html)
|
|
65
69
|
|
|
66
70
|
# Contributing
|
|
67
71
|
|
|
@@ -77,11 +81,16 @@ When [reporting a bug](https://github.com/FedericoTartarini/jsthermalcomfort/iss
|
|
|
77
81
|
|
|
78
82
|
## Documentation improvements
|
|
79
83
|
|
|
80
|
-
|
|
84
|
+
If you find any issue in our online [documentation](https://federicotartarini.github.io/jsthermalcomfort/) please open
|
|
85
|
+
an [issue](https://github.com/FedericoTartarini/jsthermalcomfort/issues).
|
|
86
|
+
|
|
87
|
+
jsthermalcomfort could always use more documentation, whether as part of the official jsthermalcomfort docs, in JSDocs,
|
|
88
|
+
or even on the web in blog posts, articles, and such.
|
|
81
89
|
|
|
82
90
|
## Feature requests and feedback
|
|
83
91
|
|
|
84
|
-
The best way to send feedback is to file an issue
|
|
92
|
+
The best way to send feedback is to file an issue
|
|
93
|
+
at [https://github.com/FedericoTartarini/jsthermalcomfort/issues](https://github.com/FedericoTartarini/jsthermalcomfort/issues)
|
|
85
94
|
|
|
86
95
|
If you are proposing a feature:
|
|
87
96
|
|
|
@@ -116,6 +125,12 @@ To set up jsthermalcomfort for local development:
|
|
|
116
125
|
|
|
117
126
|
4. When you’re done making changes run all tests using Jest:
|
|
118
127
|
|
|
128
|
+
- Install dependencies
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
npm install
|
|
132
|
+
```
|
|
133
|
+
|
|
119
134
|
```bash
|
|
120
135
|
npm run test
|
|
121
136
|
```
|
|
@@ -152,7 +167,8 @@ To set up jsthermalcomfort for local development:
|
|
|
152
167
|
git push origin name-of-your-bugfix-or-feature
|
|
153
168
|
```
|
|
154
169
|
|
|
155
|
-
5. Submit a pull request after you have done all your modifications and tested your work. The pull request should
|
|
170
|
+
5. Submit a pull request after you have done all your modifications and tested your work. The pull request should
|
|
171
|
+
include a detailed description of your work:
|
|
156
172
|
- What this pull request is about
|
|
157
173
|
- Have you tested your work
|
|
158
174
|
- Will this work affect other component in the product
|
|
@@ -168,13 +184,18 @@ For merging, you should:
|
|
|
168
184
|
|
|
169
185
|
### Documentation
|
|
170
186
|
|
|
171
|
-
We are using [JSDoc](https://jsdoc.app/) and [documentation.js](https://github.com/documentationjs/documentation) to
|
|
187
|
+
We are using [JSDoc](https://jsdoc.app/) and [documentation.js](https://github.com/documentationjs/documentation) to
|
|
188
|
+
automatically build the documentation.
|
|
172
189
|
|
|
173
|
-
### To add a function
|
|
190
|
+
### To add a function
|
|
174
191
|
|
|
175
192
|
1. Add a file under `src/models/` with the name of the function/model and document it.
|
|
176
|
-
2. Add any related functions that are used by your function either in `src/utilities/utilities.js`
|
|
177
|
-
|
|
193
|
+
2. Add any related functions that are used by your function either in `src/utilities/utilities.js`
|
|
194
|
+
or `src/psychrometrics/`. See existing code as example.
|
|
195
|
+
- In order to add a new function/API to the library you should mark that function as `@public`, add it to its
|
|
196
|
+
corresponding category, for example for models you should do `@memberof models`, and lastly you should give it a
|
|
197
|
+
proper name for the documentation with `@docname`, for example: `@docname Clothing prediction`. It is important to
|
|
198
|
+
note that you should also add the `@public` tag to any types the function exposes/uses.
|
|
178
199
|
3. Test your function by writing a test in `tests/models/<name_of_model>.test.js`.
|
|
179
200
|
|
|
180
201
|
### Tips
|
|
@@ -185,15 +206,18 @@ To run a subset of tests you can do the following:
|
|
|
185
206
|
npm run test -- '<path_to_test_file>' -t '<test_pattern/name>'
|
|
186
207
|
```
|
|
187
208
|
|
|
188
|
-
If you are using VSCode you can use
|
|
209
|
+
If you are using VSCode you can use
|
|
210
|
+
the [Jest Runner extension](https://marketplace.visualstudio.com/items?itemName=firsttris.vscode-jest-runner) to easily
|
|
211
|
+
run subset of tests.
|
|
189
212
|
|
|
190
213
|
### Releases
|
|
191
214
|
|
|
192
215
|
To create a new release do the following:
|
|
193
216
|
|
|
194
217
|
1. Update the `package.json` version to the new version (we use the semantic release system for versioning)
|
|
195
|
-
2. Run `npm run build` to update the `lib` directory (output with types of the library that gets published to NPM)
|
|
196
|
-
3.
|
|
197
|
-
4.
|
|
198
|
-
5.
|
|
199
|
-
6.
|
|
218
|
+
2. Run `npm run build` to update the `lib` directory (output with types of the library that gets published to NPM)
|
|
219
|
+
3. Commit the updates
|
|
220
|
+
4. In GitHub go to Releases -> click `Draft a new release`
|
|
221
|
+
5. Click `Choose a tag` and type the new version, for example `v0.1.1`
|
|
222
|
+
6. Write the title and description and click `Publish release`
|
|
223
|
+
7. This will trigger a GitHub action that will publish the new version to NPM
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jsthermalcomfort",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "A JavaScript package to calculate thermal comfort
|
|
3
|
+
"version": "0.1.5",
|
|
4
|
+
"description": "A JavaScript package to calculate thermophysiological, thermal comfort, thermal stress indices",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"lib"
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"bugs": {
|
|
43
43
|
"url": "https://github.com/FedericoTartarini/jsthermalcomfort/issues"
|
|
44
44
|
},
|
|
45
|
-
"homepage": "https://github.
|
|
45
|
+
"homepage": "https://federicotartarini.github.io/jsthermalcomfort/",
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"documentation": "^14.0.2",
|
|
48
48
|
"github-slugger": "^2.0.0",
|