Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.4.2 #100

Closed
wants to merge 60 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
48db186
Create the publish-pypi workflow (issue #71)
mohammadamint Mar 1, 2023
392588f
pypi test distribution workflow ( issue #71 )
mohammadamint Mar 1, 2023
bd3fbcd
Fix installation guide and small typos
FLomb Jun 2, 2023
d569ce9
Fix rst ordered list
FLomb Jun 2, 2023
fa20d26
Fix rst ordered list again
FLomb Jun 2, 2023
68a2d9c
Fix rst
FLomb Jun 2, 2023
9f0b982
Fix RST
FLomb Jun 2, 2023
0e33970
fix rst
FLomb Jun 2, 2023
b6770a0
fix rst
FLomb Jun 2, 2023
4654f6b
Add pip and rampdemand to environment.yml
FLomb Jun 2, 2023
441d7d1
Remove unwanted file
FLomb Jun 2, 2023
5292b91
wrong path in input_file_2.py
FLomb Jun 2, 2023
c3f3da9
The parameter description are not included in the docs (issue #59)
mohammadamint Jun 2, 2023
14af0a2
addin the input_parameters to index.rst
mohammadamint Jun 2, 2023
96dbcaf
Improving the test-pypi workflow
mohammadamint Jun 2, 2023
0c91a37
Merge pull request #72 from RAMP-project/workflows
FLomb Jun 5, 2023
c3292c8
Minor fix to README.rst
FLomb Jun 5, 2023
6da5b48
fix broken path input_file_2.py
FLomb Jun 5, 2023
b6aa104
Minor edits to input_parameters.rst
FLomb Jun 5, 2023
d880934
Merge pull request #75 from RAMP-project/input_pars_doc
FLomb Jun 5, 2023
9e81d2f
update the changelog
FLomb Jun 5, 2023
0edfd0b
remove redundant requirements
FLomb Jun 6, 2023
091542c
update environment.yml
FLomb Aug 23, 2023
d9929fe
Update README.rst requirement section
Bachibouzouk Sep 4, 2023
c333ffa
Merge pull request #76 from RAMP-project/fix-and-enhance-documentation
FLomb Sep 6, 2023
7b9222e
Add mandatory build-os parameter to RTD config
Bachibouzouk Oct 4, 2023
bea0769
Merge branch 'development' into hotfix/hidden-result-files-command-cli
Bachibouzouk Oct 8, 2023
e82e3b3
Merge pull request #85 from RAMP-project/fix/rtd-deprecated
FLomb Oct 23, 2023
1cb8320
Merge pull request #87 from RAMP-project/hotfix/hidden-result-files-c…
Bachibouzouk Oct 24, 2023
6c55416
Update README.rst
computerscienceiscool Oct 12, 2023
4e77f38
Merge pull request #91 from RAMP-project/fix/readme_typos
FLomb Oct 24, 2023
8c9c7e9
Fix user_preference usage
Bachibouzouk Oct 25, 2023
724f4a4
adding peak time range testing
ClaudiaLSS Aug 24, 2023
4708f74
New tests added
ClaudiaLSS Sep 6, 2023
033f892
Update tests/test_peak_time_range.py
ClaudiaLSS Oct 3, 2023
07e3f59
Address reviewer feedback:
ClaudiaLSS Oct 4, 2023
9a99ecf
incorrect file deleted
ClaudiaLSS Oct 4, 2023
30ddbb9
Merge pull request #93 from RAMP-project/feature/claudiaLSS-tests
FLomb Oct 31, 2023
f713f64
Merge pull request #92 from RAMP-project/fix/user_preferences
FLomb Oct 31, 2023
1b4f9d6
Fix typo in test file
Bachibouzouk Oct 31, 2023
c46780f
Add github action workflow for pytest
Bachibouzouk Oct 31, 2023
4d2a094
Add test dependencies
Bachibouzouk Oct 31, 2023
8af9484
Fix failing test for file conversion
Bachibouzouk Oct 31, 2023
7cf5910
Update changelog
Bachibouzouk Oct 31, 2023
9b305a3
Merge pull request #94 from RAMP-project/tests
FLomb Nov 6, 2023
30cec11
update figure links from master to main
FLomb Nov 6, 2023
4c05006
Fixed typos and minor edits to docs and notebooks
FLomb Nov 6, 2023
9ce7d7c
Improve .rst title formatting
FLomb Nov 7, 2023
2a52401
Update README.rst to fix line-length issue
FLomb Nov 7, 2023
70368f7
Merge pull request #95 from RAMP-project/fix/docs-erros
FLomb Nov 7, 2023
8b15d8d
solving the test.pypi release issue #96
mohammadamint Nov 6, 2023
cda75e3
Update python-pypi-test.yml
mohammadamint Nov 7, 2023
38accd4
Merge pull request #97 from RAMP-project/test-pypy-action
FLomb Nov 8, 2023
747295b
Plot class for ramp visualization and data analysis routines (isse #63)
mohammadamint Oct 15, 2023
da26874
adding the new dependencies to the requirements
mohammadamint Oct 15, 2023
0c01599
Update RTD
Bachibouzouk Oct 4, 2023
511d90b
PR #89 reviews
mohammadamint Oct 24, 2023
5766f8c
Update docs requirements
Bachibouzouk Nov 8, 2023
a57b121
Merge pull request #89 from RAMP-project/ramp_visualization
mohammadamint Nov 8, 2023
6815a4d
Update changelog
Bachibouzouk Nov 8, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: RAMP tests

on:
push:
branches: [ "main", "development" ]
pull_request:
branches: [ "main", "development" ]

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install -r tests/requirements.txt
- name: Test with pytest
run: |
pytest tests/
35 changes: 35 additions & 0 deletions .github/workflows/python-publish-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deploy to PyPi

on:
release:
types: [created]

jobs:
build_and_deploy:
name: Build the release and deploy to test pypi
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master

- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: Install main dependencies
run: |
python -m pip install --upgrade pip twine setuptools wheel
- name: build distribution
run: |
python setup.py sdist bdist_wheel
- name: test install package
run: |
pip install -e .
- name: Publish distribution 📦 to PyPI

uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
password: ${{ secrets.RAMP_PYPI_PW }}
repository_url: https://upload.pypi.org/legacy/
42 changes: 42 additions & 0 deletions .github/workflows/python-pypi-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Deploy to Test PyPi

on:
push:
branches:
- development
- main

pull_request:
branches:
- development
- main
jobs:
build_and_deploy:
name: Build the release and deploy to test pypi
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master

- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: Install main dependencies
run: |
python -m pip install --upgrade pip twine setuptools wheel
- name: build distribution
run: |
python setup.py sdist bdist_wheel
- name: test install package
run: |
pip install -e .
- name: Publish distribution 📦 to TestPyPI

uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
verbose: true
password: ${{ secrets.RAMP_TEST}}
repository-url: https://test.pypi.org/legacy/
8 changes: 7 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.7"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py
Expand All @@ -15,6 +22,5 @@ sphinx:
# - pdf
# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
install:
- requirements: docs/docs-requirements.txt
18 changes: 15 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
Release History
===============

0.4.2 (dev)
0.4.3 (dev)
------------------

**|fixed|** automated download of example applications via the `download_example` functions now includes previously missing .csv files
0.4.2 (2023-11-09)
------------------
**|new|** classes to plot and save RAMP simulation results for post-processing (#89)

**|new|** continuous integration setup (#94 and #96)

**|new|** first automated tests (#93)

**|fixed|** moved the randomization of daily preference from appliance to user level (#92)

**|fixed|** installation options have been debugged and the documentation updated accordingly (#76, #95)

**|fixed|** automated download of example applications via the `download_example` functions now includes previously missing .csv files (#69)

0.4.1 (2023-10-XX)
0.4.1 (2023-10-08)
------------------

**|hotfix|** added option `-o` to the terminal command line interface to enable the user to provide output path to save ramp results. This option is also accessible to python users using `ofname` argument of the `ramp/ramp_run.py::run_usecase` or the `ramp/post_process/post_process.py::export_series` functions.
Expand Down
76 changes: 32 additions & 44 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
:target: https://rampdemand.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

.. image:: https://github.com/RAMP-project/RAMP/blob/documentation/docs/source/_static/RAMP_logo_basic.png?raw=true
.. image:: https://github.com/RAMP-project/RAMP/blob/main/docs/source/_static/RAMP_logo_basic.png?raw=true
:width: 300


Expand All @@ -22,30 +22,33 @@ What is RAMP
============
RAMP is an open-source software suite for the stochastic simulation of any user-driven energy demand time series based on few simple inputs.

The project aims to provide synthetic data wherever metered data does not exist, such as when designing systems in remote areas. Check out the `documentation <https://rampdemand.readthedocs.io/en/latest/?badge=latest>`_ and learn more on the RAMP world from our `website <https://rampdemand.org>`_!
The project aims to provide synthetic data wherever metered data does not exist, such as when designing systems in remote areas. Check out the `documentation <https://rampdemand.readthedocs.io/en/latest/?badge=latest>`_ and learn more on the RAMP world from our `website <https://rampdemand.org>`_!

.. image:: https://github.com/RAMP-project/RAMP/blob/master/docs/figures/Example_output.jpg?raw=true
.. image:: https://github.com/RAMP-project/RAMP/blob/main/docs/figures/Example_output.jpg?raw=true
:width: 600

Recommended installation method
===============================

RAMP has been successfully installed and used on macOS, Windows and Linux.

The easiest way to make RAMP software working is to use the free conda package manager which can install the current and future RAMP
depencies in an easy and user friendly way.
dependencies in an easy and user friendly way.

To get conda, `download and install "Anaconda Distribution" <https://www.anaconda.com/products/individual>`_, or `"miniconda" <https://docs.conda.io/en/latest/miniconda.html>`_ which is lighter.
You can install RAMP using pip, conda or from source code.

Installing through pip
----------------------
1. To install the RAMP software, we suggest to create a new environment by running the following command in the anaconda prompt:
1. To install the RAMP software, we suggest to create a new environment by running the following command in the *Anaconda prompt*:

.. code-block:: python

conda create -n ramp python=3.8


2. If you create a new environment for RAMP, you'll need to activate it each time before using it, by writing
the following line in the *Anaconda Prompt*
the following line in the *Anaconda Prompt*:

.. code-block:: python

Expand All @@ -58,50 +61,35 @@ the following line in the *Anaconda Prompt*
pip install rampdemand


Installing through source code
------------------------------
You can also install RAMP from the source code! To do so, you first need to download the source code first:
Installing through the source code
----------------------------------
You can also install RAMP from the source code! To do so, you first need to download the source code, which can be done in two ways:

1. you can use git to clone the repository using:
* You can use git to clone the repository via:

.. code-block:: bash

git clone https://github.com/RAMP-project/RAMP.git

2. you may download the source code directly from:
* Or, you may download the source code directly from:

`"RAMP GitHub Repository" <https://github.com/RAMP-project/RAMP>`_.

In this case, the source code will be downloaded as a zip file, so you need the extract the files.

After downloading the source code using any of abovementioned ways, you need to use your **anaconda prompt** to install the code.
You can follow the first two steps mentioned in **Installing through pip**. Then you need to change the directory of the promt to the folder where the source code is saved (where you can find the *setup.py* file). To install the RAMP software use:
In this second case, the source code will be downloaded as a zip file, so you'll need to extract the files.

.. code-block:: bash

python setup.py
After downloading the source code using any of abovementioned methods, you'll need to use your **anaconda prompt** to install it. There are two options again:

Alternatively, you may use:
* You may follow the first two steps mentioned in **Installing through pip**. Then, change the directory in the prompt to the folder where the source code is saved (where you can find the *setup.py* file). To install the RAMP software, you may then use:

.. code-block:: bash

conda env create -f requirements.yml
python setup.py install

Requirements
============
RAMP has been tested on macOS, Windows and Linux.
* Alternatively, without taking any prior action, simply change the directory in the prompt to the folder where the source code is saved and then use:

For running RAMP, you'll need a few packages:

#. The Python programming language, version 3.6 or higher
#. A number of Python adds-on packages:

* `Pandas <https://pandas.pydata.org/>`_
* `Numpy <https://numpy.org/>`_
* `Matplotlib <https://matplotlib.org/>`_
* `Openpyxl <https://openpyxl.readthedocs.io/en/stable/>`_
.. code-block:: bash

The requirements are specified in the `requirements.txt` file.
conda env create -f environment.yml

Quick start
===========
Expand All @@ -110,7 +98,7 @@ There are different ways to build a model using RAMP! Here, we provide a first e
Example python input files
--------------------------
Three different input files are provided as example representing three different categories of appliances that can be modelled with RAMP.
To have a look to the python files, you can download them using the "download_example" function:
To have a look to the python files, you can download them using the `download_example` function:

.. code-block:: python

Expand All @@ -125,7 +113,7 @@ To have a look to the python files, you can download them using the "download_ex
publication <https://doi.org/10.1016/j.energy.2019.04.097>`__.

- ``input_file_2.py``: shows how to model thermal loads, with the
example of a “shower” appliance. The peculiarity of thermal appiances
example of a “shower” appliance. The peculiarity of thermal appliances
is that the nominal power can be provided as external input as a
“csv” file (in this case, ``shower_P.csv``). For the example “shower”
appliance, the varying nominal power accounts for the effect of
Expand Down Expand Up @@ -153,18 +141,17 @@ To have a look to the python files, you can download them using the "download_ex
Spreadsheet input files
-----------------------

It is also possible to use spreadsheets as input files. To do so you
It is also possible to use spreadsheets as input files. To do so, you
need to run the ``ramp`` command with the option ``-i``:

.. code-block:: bash

ramp -i <path to .xlsx input file>


.. note:: You can input several files, separated from each others by a single blank space

If you already know
how many profile you want to simulate you can indicate it with the
``-n`` option:
If you already know how many profile you want to simulate you can indicate it with the ``-n`` option:

.. code-block:: bash

Expand All @@ -175,6 +162,7 @@ providing a ``.xlsx`` input file with the ``-i`` option, this will then
be equivalent to running ``python ramp_run.py`` from the ``ramp`` folder
without being prompted for the number of profile within the console.


If you want to save ramp results to a custom file, you can provide it with the option `-o`

.. code-block:: bash
Expand All @@ -191,13 +179,13 @@ Other options are documented in the help of `ramp`, which you access with the ``


If you have existing python input files, you can convert them to
spreadsheet. To do so, go to ``ramp`` folder and run
spreadsheet. To do so, go to the ``\ramp`` folder and run

.. code-block:: bash

python ramp_convert_old_input_files.py -i <path to the input file you wish to convert>

For other example of command lines options, such as setting date ranges, please visit `the dedicated section <https://rampdemand.readthedocs.io/en/latest/examples/year_simulation/year_simulation.html#setting-date-range>`_ of the documentation.
For other examples of command lines options, such as setting date ranges, please visit `the dedicated section <https://rampdemand.readthedocs.io/en/latest/examples/year_simulation/year_simulation.html#setting-date-range>`_ of the documentation.

Building a model with a python script
-------------------------------------
Expand Down Expand Up @@ -236,7 +224,7 @@ The use time frames can be specified using the 'window' method for each applianc
window_2 = [1320,1380], # from 10 PM to 11 PM
)

Now you can generate your **stochastic Profiles**:
Now you can generate your **stochastic profiles**:

.. code-block:: python

Expand All @@ -249,7 +237,7 @@ Now you can generate your **stochastic Profiles**:

Contributing
============
This project is open-source. Interested users are therefore invited to test, comment or contribute to the tool. Submitting issues is the best way to get in touch with the development team, which will address your comment, question, or development request in the best possible way. We are also looking for contributors to the main code, willing to contibute to its capabilities, computational-efficiency, formulation, etc.
This project is open-source. Interested users are therefore invited to test, comment or contribute to the tool. Submitting issues is the best way to get in touch with the development team, which will address your comment, question, or development request in the best possible way. We are also looking for contributors to the main code, willing to contribute to its capabilities, computational-efficiency, formulation, etc.

To contribute changes:

Expand All @@ -260,7 +248,7 @@ To contribute changes:
#. Push the branch to GitHub
#. On GitHub, create a new pull request from the feature branch

When committing new changes, please also take care of checking code stability by means of the `qualitativte testing <https://github.com/RAMP-project/RAMP/blob/development/CONTRIBUTING.md>`_ functionality.
When committing new changes, please also take care of checking code stability by means of the `qualitative testing <https://github.com/RAMP-project/RAMP/blob/development/CONTRIBUTING.md>`_ functionality.


How to cite
Expand Down
1 change: 1 addition & 0 deletions docs/docs-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ pandas >= 1.3.3
numpy >= 1.21.2
multiprocess
tqdm
plotly
xlsxwriter <= 1.3.7
matplotlib >= 3.3.4
openpyxl >= 3.0.6
Expand Down
Loading
Loading