-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bumps the version to 2.1.0 in all src files, adds a changelog and splits the contributing and development notes adding info on default branches and how to release on PiPy.
- Loading branch information
Showing
12 changed files
with
93 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
2.1.0 | ||
- Add functions to convert between specific humidity and humidity ratio (aka mixing ratio). | ||
- Add functions to convert to dry bulb temperature or humidity ratio from enthalpy. | ||
- Restrict minimum value of humidity ratio to `1e-7` | ||
- Fix bug with `GetTDewPointFromVapPres` not always converging due to discontinuity about the freezing point of water in `GetSatVapPres` formulae. | ||
- General `README.md`/docs improvements. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# Development notes | ||
|
||
## Coding conventions | ||
|
||
The followings are minimal guidelines for new contributors aiming to contribute to the source code. To become acquainted with the conventions it may be easier to first read some of the functions already implemented in the language you are interested to contribute to. | ||
|
||
- Always use the language-specific syntax except when defining function names where camel case (e.g. `GetTRankineFromTFahrenheit`) is used irrespective of the language. | ||
- Include a clear description of the function, its inputs, outputs and types. | ||
- Include references. | ||
- Write clear and comprehensive tests. | ||
|
||
|
||
## Versioning | ||
|
||
This project uses [semantic versioning](https://semver.org/). | ||
|
||
|
||
## Default branches | ||
|
||
We use two branches to record the history of the project. The `master` branch stores the official release history while the `develop` branch serves as an integration branch for features and bug fixes. All new releases are tagged with a version number in `master`. | ||
|
||
|
||
## How to create and upload a new version to PiPy | ||
|
||
From the command prompt, navigate to `src/python`. Then you can create and upload a new release with the following commands: | ||
|
||
``` | ||
python3 setup.py sdist --formats=zip | ||
python3 -m pip install --user --upgrade twine | ||
python3 -m twine upload dist/ | ||
``` | ||
|
||
## Testing | ||
|
||
PsychroLib is automatically tested at each commit using continuous integration. If are looking to run the tests locally, make sure you can satisfy the required prerequisites and dependencies. | ||
|
||
### Prerequisites | ||
|
||
- A C and Fortran compiler | ||
- Python version 3.6 or greater. | ||
- Node.js 10.x or greater | ||
- Microsoft Excel | ||
|
||
|
||
### Dependencies | ||
|
||
There are a number of dependencies required to run the tests that need to be installed first. From you command prompt, navigate to the `psychrolib` folder and type the following (I assume that pip and python are for version 3.6 or greater): | ||
|
||
``` | ||
pip install numpy m2r cffi pytest | ||
cd tests/js && npm install | ||
cd ../.. | ||
``` | ||
|
||
|
||
### Run | ||
|
||
To run the tests, type the following in your command prompt: | ||
|
||
|
||
#### Python, C, Fortran | ||
``` | ||
python -m pytest -v -s | ||
``` | ||
|
||
|
||
#### JavaScript | ||
``` | ||
cd tests/js && npm test | ||
``` | ||
|
||
|
||
#### VBA/Excel | ||
For VBA/Excel, navigate to `tests/vba` and open `test_psychrolib_ip.xlsm` and `test_psychrolib_si.xlsm`. For each file, enable macros and launch the Visual Basic Editor (VBE) (Alt+F11 on Windows). Go to `Edit` and activate the 'Immediate Window' (Alt+F11 on Windows) and click on 'RunAllTests' from the right hand side drop down menu at the top next to '(General)'. But in essence go in the VBA editor, click on RunAllTests, then press on the Run icon or go to 'Run' > 'Run' menu. The results will appear in the 'Immediate Window' at the bottom of the screen. | ||
|
||
![VBA/Excel Test](assets/excel_test.png) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.