@@ -61,9 +61,9 @@ A parameters **calculability** indicates whether and how it may be calculated, a
*`FREE` : parameter may have any value, may vary, may not be calculated
*`EQUATION` : parameter may have any value, may vary, may be calculated analytically
*`DICHO` : parameter may have any value, may vary, may be calculated using numerical method
Calculability of a Nub's parameters is defined in the Nub's class by overloading `setParametersCalculability()`.
#### mode
At a given time, a parameter may be in one of the following states, called **modes** and picked among `ParamValueMode` enum. Parameter **calculability** may restrict the available modes.
...
...
@@ -92,7 +92,7 @@ A parameter has different contextualized "values" at a time :
*`.currentValue` : the value for the current calculation step, among all values of a variating parameter; it is set and returned by iteration methods; initially equal to `.singleValue` for fixed parameters
*`.v` : the sandbox value used during calculation; initialized by `CalcSerie()` before calculation, with `.singleValue` for parameters in `SINGLE` mode or with `.currentValue` for variating parameters
*`.V` : a convenience accessor that returns the the calculation result if the parameter is in `CALCUL` mode, or its `.currentValue` otherwise
Additionally `getInferredValuesList()`method allows to retrieve multiple values as a numbers list, whether in `LISTE` or `MINMAX` mode.
@@ -463,3 +463,30 @@ public get children(): Espece[] {
Using `npm run build-node` allows building JaLHyd for execution with Node.js (ie. with "commonjs" modules).
Examples of Javascript and Typescript programs can be found in `/boilerplate`.
## Release policy
Use [semantic versioning](https://semver.org/).
**When releasing a Cassiopee (NgHyd) version along with a JaLHyd version, it's discouraged to execute release steps manually, see "Release Policy / Release Script" in [NgHyd's README.md](https://forgemia.inra.fr/cassiopee/nghyd/blob/master/README.md)**
Before releasing a new stable version, one should complete the following files
-`CHANGELOG.md`
-`package.json` (update "version", or use `npm version`)
Every stable version should be tagged with both
- a tag stating compatibility with NgHyd, of the form `nghyd_X.Y.Z`
- the `stable` tag
The `stable` tag should be set **after** the NgHyd compatibility tag, so that `git describe` returns `stable` (latest tag). There should be **at least 1s** between the two tag commands, so that date sorting is not confused.
Here are the steps to follow for an example **4.5.0** version
The tsviz package can be used for drawing class diagram of the current code.
...
...
@@ -76,29 +75,12 @@ To draw the diagram:
npm run viz
```
## Release policy
Use [semantic versioning](https://semver.org/).
**When releasing a Cassiopee (NgHyd) version along with a JaLHyd version, it's discouraged to execute release steps manually, see "Release Policy / Release Script" in [NgHyd's README.md](https://forgemia.inra.fr/cassiopee/nghyd/blob/master/README.md)**
Before releasing a new stable version, one should complete the following files
-`CHANGELOG.md`
-`package.json` (update "version", or use `npm version`)
## Boiler plate for writing CLI scripts based on JaLHyd
Every stable version should be tagged with both
- a tag stating compatibility with NgHyd, of the form `nghyd_X.Y.Z`
- the `stable` tag
The folder `boilerplate` contains simple examples of use of JalHyd in a JS or TS script.
The `stable` tag should be set **after** the NgHyd compatibility tag, so that `git describe` returns `stable` (latest tag). There should be **at least 1s** between the two tag commands, so that date sorting is not confused.
Here are the steps to follow for an example **4.5.0** version
```sh
npm version 4.5.0
# commit changes
git tag -fa nghyd_4.5.0
sleep 1
git tag -fa stable
git push --tags--force
```
- Build JalHyd for node (commonJS module): `npm run build-node`
- Choose the js or ts folder: `cd boilerplate/js` or `cd boilerplate/ts`
- Type `npm install` to install dependencies
- For the TS script, build the project with `npm run build`
- Run the script with `node boilerplate.js` or `node build/boilerplate.js`