Skip to content

Commit

Permalink
Merge pull request #648 from rl-institut/release/v0.5.1
Browse files Browse the repository at this point in the history
Release/v0.5.1
  • Loading branch information
smartie2076 authored Nov 10, 2020
2 parents 1114100 + f1ec5ac commit ee6ad64
Show file tree
Hide file tree
Showing 178 changed files with 3,444 additions and 1,652 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,5 @@ mvs_csv_config.json
/inputs/

/validation_tests/

/docs/*.inc
4 changes: 3 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ python:
version: 3.7
install:
- requirements: requirements/docs.txt
- requirements: requirements/default.txt
- requirements: requirements/default.txt
- method: setuptools
path: .
53 changes: 52 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,65 @@ Here is a template for new release sections
-
```

## [0.4.1] - 2020-09-21
## [0.5.1 - 2020-11-10]

### Added
- `E-Land_Requirements.rst`: Official E-Land requirement list as well as progress on functional and non-functional requirements (#590)
- Add pytests for `E4.detect_excessive_excess_generation_in_bus()` (#591)
- Add pypi release to release protocol and update/simplify protocol (#601)
- Remove REPORT_PATH constant (#607)
- Add report assets and example simulation to package_data in `setup.py` (#607)
- Add a util function `copy_report_assets` to copy report asset to simulation output folder when user generates the report (#607)
- Add entrypoints for `mvs_tool` and `mvs_report` in ´setup.py´ (this can be simply typed directly in terminal) (#607)
- Updated readthedocs: Validation plan - Implemented tests and possible future ones (#593)
- Updated readthedocs: Gather the MVS parameters in a csv file and parse it to a sphinx RTD file (#620)
- Added more energy carriers and their weights to the list of already available energy carriers in constants.py (#621)
- Three new KPI's added to MVS_output.rst read the docs page: Onsite energy fraction, Onsite energy matching, Degree of autonomy (#609)
- New constant variables: `LOGS = "logs"`, `WARNINGS = "warnings"`, `ERRORS = "errors"` (#623)
- Tests for `D1.transformer()` (#596)
- Add economic model equations in readthedocs (#581)
- Add component model equations and energy balance adapted to sector coupled example (#581)
- Create function `F0.select_essential_results` to select main results out of `dict_values` (#625)
- Create mapping between EPA and MVS parameter names (#625)
- Create parameter parser from EPA to MVS (#625)
- Create parameter parser from MVS to EPA (#625)

### Changed
- Order of readthedocs content (#590)
- Make sure report can be generated even if figures are missing from simulation outputs (#607)
- Move the code located in `mvs_report.py` into `multi_vector_simulator.cli:report` (#607)
- Update installation steps in README and in RTD (#607)
- If default folder does not exist when code is executed, example simulation's inputs are used from package_data (#607)
- Rename `PATH_SIM_OUTPUT` to `ARG_PATH_SIM_OUTPUT` (#607)
- Rename function `A0.create_parser` to `A0.mvs_arg_parser` (#607)
- Update validation plan description in RTD (#593)
- Column headers of csv input files need to be unique amongst all files, info added to documentation (#602)
- Change mvs_eland to multi_vector_simulator in `docs/Code.rst` (#620)
- Change mvs_eland to multi-vector-simulator in `docs/*.rst` `urls (#620)
- Improved the description of assigning weightage to energy carriers in readthedocs (#619)
- Replaced the DSO sub-system image in Modelling Assumptions chapter of readthedocs (#622)
- Fixed several typos in readthedocs (#622)
- Move the function parse_log_messages to F0 and modify it to print log messages in results JSON file (#623)
- Move the function `parse_log_messages` from F1 to F0 and modify it to print log messages in results JSON file (#623)
- If `assets` folder is not found in package look in current folder for `report/assets` folder (#632)
- `D1.transformer_constant_efficiency_fix()` and `D1.transformer_constant_efficiency_optimize()`, as well as their tests to reassign attributes (#596)
- Move `retrieve_date_time_info` from C0 to B0 (#625)
- Conversion from dict to json drop the timeindexes from pandas.Series (#625)
- Conversion from json to dict allow to load a timeindex for pandas.Series (#625)
- Replace `==` by `is` in expression with `True`, `False` or `None` (#625)
- Remove unused `dict_values` argument of function `receive_timeseries_from_csv` (#625)
- Move the end of the function `receive_timeseries_from_csv` into `C0.compute_timeseries_properties()` (#625)

### Removed
- Parameter label from input csv files; label is now set by filenames (for `project_data`, `economic_data`, `simulation_settings`) and column headers (for `energyConsumption`, `energyConversion`, `energyProduction`, `energyProviders`), special for storage: `filename` + `column header` (#602)
- Remove reference to git branch ID in the report (#607)

### Fixed
- RTD entry for defining parameters as timeseries (#597)
- Math equations of RTD in files `Model_Assumptions.rst` and `MVS_Output.rst` (#604)
- Repaired the broken links to input CSV files (#618)
- Outdated RTD info and mistakenly deleted sentence (#629)
- All `variable_costs`, `efficiency` and `nominal_value` of transformers on output flows. Before they were inconsistently assigned to input or output flows. (#596)

## [0.5.0] - 2020-10-05

Expand All @@ -39,6 +89,7 @@ Here is a template for new release sections
- Requirement for time series of non-dispatchable sources in readthedocs (#498)
- Provide a warning in case of excessive excess generation (#498)
- Pytests for `C0.add_maximum_cap()`, renamed function into `C0.process_maximum_cap_constraint()` (#498)
- Description of the inherited MVS limitations as well as the ones that can be addressed (#580)

### Changed
- Modify `setup.py` to upload the code as package on pypi.org (#570)
Expand Down
102 changes: 43 additions & 59 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,30 +118,51 @@ Once you are satisfied with your PR you should ask someone to review it. Before

## Release protocol

Once you are ready to publish a release, branch off from `dev`
This protocol explains how to perform a release of the code on ´master´ branch before releasing the code to pypi.org. If you don't want to release on pypi.org, skip the part under "The actual release".

### Before the release

1. Create a release branch by branching off from `dev`
```bash
git checkout -b release/vX.Y.Z dev
```
For meaning of X, Y and Z version numbers, please refer to this [semantic versioning guidelines](https://semver.org/spec/v2.0.0.html).

In this branch, you should normally only update the version number in the `src/multi-vector-simulator/version.py` and in the `CHANGELOG.md` files, respecting the indicated formats. Commit the first one with "Bump version number" as commit message.

Your `CHANGELOG.md` file could look like this before the release
```
## [unreleased]
### Added
- feature 1
- feature 2
### Changed
- thing 1
- thing 2
### Removed
- some stuff
```

Simply replace `unreleased` by `X.Y.Z` and add the date of release in [ISO format](https://xkcd.com/1179/), then add the structure for a new `unreleased` version

For meaning of X, Y and Z version numbers, please refer to this [semantic versioning guidelines](https://semver.org/spec/v2.0.0.html).
2. In your release branch, update the version number in [`src/multi-vector-simulator/version.py`](https://github.com/rl-institut/multi-vector-simulator/blob/dev/src/multi_vector_simulator/version.py) in in the format indicated under 1 (commit message: "Bump version number").
3. Replace the header `[Unreleased]` in the [`CHANGELOG.md`](https://github.com/rl-institut/multi-vector-simulator/blob/dev/CHANGELOG.md)
with the version number (see 2.) and the date of the release in [ISO format](https://xkcd.com/1179/): `[Version] - YYYY-MM-DD`.
4. After pushing these changes, create a pull request from `release/vX.Y.Z` towards `master` and merge it into `master`.
5. Create a [release tag](https://github.com/rl-institut/multi-vector-simulator/releases) on github.
Please choose `master` as target and use `vX.Y.Z` as tag version. In the description field simply copy-paste the content of the `CHANGELOG`descriptions for this release and you're done!
For help look into the [github release description](https://help.github.com/en/github/administering-a-repository/creating-releases).
### The actual release
1. Open a working python3 virtual environment and make sure you have the latest versions of setuptools and wheel installed:
`python3 -m pip install --upgrade setuptools wheel twine`
2. Delete `build/` and `dist/` directories (from previous release) to avoid errors.
3. Make sure you pulled the release on `master` branch from `origin`: `git checkout master`, `git pull origin`
4. Change the version without committing with release candidates (add `rc1` to the `version_num`, for example `vX.Y.Zrc1`) before the actual release, as a release with a specific version number can only be uploaded once on pypi.
5. Rebuild the `build/` and `dist/` directories `python3 setup.py sdist bdist_wheel`
6. Check the package with twine: `python3 -m twine check dist/*` If errors occur, fix them before the release or postpone.
7. If everything works as expected you can now upload the package release candidate to pypi.org
1. Check the credentials of our [email protected] account on https://pypi.org.
2. Type `twine upload dist/*`
3. Enter `__token__` for username and your pypi token for password.
8. Test your package:
1. Test the upload on test.pypi.org
` twine upload --repository testpypi dist/*`
2. Test the installation: `pip install multi-vector-simulator==X.Y.Zrci`, where you replace `X.Y.Zrci` by your current version and release candidate
3. Then open a terminal
`mvs_tool -f -o test_pypi`
9. If you notice errors in the uploaded package, fix them and bump up `rc1` to `rc2` and repeat steps 2. to 9. until you don't see any more mistakes.
10. If your release candidate works well you can now do the actual release: repeat step 2. to 9. and remove `rci` from [`src/multi-vector-simulator/version.py`](https://github.com/rl-institut/multi-vector-simulator/blob/dev/src/multi_vector_simulator/version.py).
11. Congratulations, you just updated the package on pypi.org, you deserve a treat!

### After the release

1. Locally, merge `release/vX.Y.Z` into `dev` and push to the remote version of dev.
--> The idea is to avoid creating a merge commit in `dev` (because `master` would otherwise have two merge commits for this release once you merge the next release).
2. Set version for next release in [`src/multi-vector-simulator/version.py`](https://github.com/rl-institut/multi-vector-simulator/blob/dev/src/multi_vector_simulator/version.py) of the `dev`: for example `0.5.1dev`
3. Add the structure for a new `unreleased` version to the [`CHANGELOG.md`](https://github.com/rl-institut/multi-vector-simulator/blob/dev/CHANGELOG.md) in `dev`:
```
## [unreleased]
Expand All @@ -151,45 +172,8 @@ Simply replace `unreleased` by `X.Y.Z` and add the date of release in [ISO forma
-
### Removed
-
## [X.Y.Z] - 20**-**-**
### Added
- feature 1
- feature 2
### Changed
- thing 1
- thing 2
### Removed
- some stuff
```
Commit this with "Update changelog" as commit message.

After pushing these changes, create a pull request from `release/vX.Y.Z` towards `master` and merge it in `master`.

Locally, merge `release/vX.Y.Z` into `dev`
```
git checkout release/vX.Y.Z
```

```
git pull
```

```
git checkout dev
```

```
git merge release/vX.Y.Z
```
And push your these updates to the remote version of dev
```
git push
```

The idea behind this procedure is to avoid creating a merge commit in `dev` (because `master` would otherwise have two merge commit for this release once you merge the next release).

Finally, [create a release](https://help.github.com/en/github/administering-a-repository/creating-releases) on github. Please choose master as the target for the tag and format the tag as `vX.Y.Z`. In the description field simply copy-paste the content of the `CHANGELOG`descriptions for this release and you're done!
4. Commit the steps 2. and 3. together with commit message "Start vX.Y.Zdev"

## Contributing to Readthedocs

Expand Down
Loading

0 comments on commit ee6ad64

Please sign in to comment.