Skip to content

Commit

Permalink
Merge pull request #132 from TRI-AMDD/development
Browse files Browse the repository at this point in the history
v1.0.1
  • Loading branch information
d-cogswell authored Sep 19, 2024
2 parents 8ecdf36 + a337e21 commit ff49b29
Show file tree
Hide file tree
Showing 12 changed files with 52 additions and 100 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/mpet-code-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ jobs:

steps:
- name: Set up python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.12
architecture: x64

- name: Checkout MPET
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1
path: mpet
Expand Down
23 changes: 4 additions & 19 deletions .github/workflows/mpet-regression-test-sourceforge-daetools.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: MPET regression test with daetools 2.2.0 from sourceforge on python 3.10
name: MPET regression test with daetools from sourceforge

on: [push, workflow_dispatch]

Expand All @@ -9,35 +9,20 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
python-version: ["3.10", "3.11", "3.12"]
defaults:
run:
shell: bash -l {0}
steps:

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 1
path: mpet

- uses: conda-incubator/setup-miniconda@v2
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
mamba-version: "*"
channels: conda-forge,defaults
activate-environment: mpet-env

- name: Install dependencies for daetools
run: |
mamba install numpy scipy matplotlib pyqt lxml pandas h5py openpyxl
- name: Install daetools from sourceforge
run: |
curl -L 'https://master.dl.sourceforge.net/project/daetools/daetools/2.2.0/daetools-2.2.0-gnu_linux-x86_64.zip' -o dae.zip
unzip dae.zip
cd daetools*
python setup.py install

- name: Install additional dependencies using mpet's setup.py
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/mpet-regression-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8","3.9","3.10","3.11"]
python-version: ["3.8","3.9"]
defaults:
run:
shell: bash -l {0}
steps:

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 1
path: mpet

- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
mamba-version: "*"
Expand Down
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,4 @@ docs/_build
docs/apidocs

# ignore python biuld files
build/
# ignore daetools
daetools*
build/
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [1.0.1] - 2024-09-19
### Added
- daetools is now installed by setup.py on Windows and Linux, no need to download it separately.

### Fixed
- Github actions updates
- Regression test all active Python versions


## [1.0.0] - 2024-04-11
### Added
- Ability to simulate complex battery cycling protocols with 'profileType = CCCVCPcycle'.
Expand Down
13 changes: 0 additions & 13 deletions dockerfiles/Dockerfile-daetools-1.9.0

This file was deleted.

11 changes: 0 additions & 11 deletions dockerfiles/Dockerfile-daetools-2.0.0

This file was deleted.

8 changes: 8 additions & 0 deletions dockerfiles/daetools-2.3.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM python:3.12-bookworm

#Install necessary packages for daetools
RUN apt-get update && \
apt-get install --yes libgl1-mesa-glx libgfortran5

#Download and install daetools
RUN pip install https://sourceforge.net/projects/daetools/files/daetools/2.3.0/daetools-2.3.0-gnu_linux-x86_64.zip
56 changes: 10 additions & 46 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,59 +4,14 @@ Installation
Prerequisites
----------------------------


* Python 3.6 to 3.12
* numpy, scipy, matplotlib, pyqt5, h5py, configparser, schema
* daetools

MPET on Windows
-----------------------------

MPET on Windows can be installed directly.

The python version can be chosen with (ana)conda, for
example:


.. code-block:: bash
conda create -n mpet python=3.X pip
conda activate mpet
Then install daetools via PyPi


.. code-block:: bash
conda activate mpet
pip install daetools
Then either clone the MPET repository if you want to work on the source code, or
install the mpet package through PyPi (see steps below)


MPET on Linux
-----------------------------

The easiest way to install MPET on Linux is via conda

Install the daetools dependency via conda (in a new environment called mpet)


.. code-block:: bash
conda create -n mpet -c conda-forge daetools
conda activate mpet
Then either clone the MPET repository if you want to work on the source code, or
install the mpet package through PyPi (see steps below)


Install via PyPi
-----------------------------

MPET is available on PyPi, the Python Packaging Index and can be installed with :
MPET is available on PyPi, the Python Packaging Index, and can be installed with:

``pip install mpet``

Expand All @@ -69,6 +24,15 @@ You can also download the source code and install the latest version
* Enter the mpet directory : ``cd mpet``
* install MPET using pip ``pip install -e .``

MPET on Linux
-----------------------------

Running MPET on Linux requires a few additional libraries, which are dependencies for daetools:

.. code-block:: bash
apt-get install libgl1-mesa-glx libgfortran5
Test your installation
---------------------------
To test your installation make sure to install MPET following :
Expand Down
2 changes: 1 addition & 1 deletion mpet/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.0.0'
__version__ = '1.0.1'
12 changes: 12 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
numpy
scipy
matplotlib
pyQt5
h5py
configparser
schema
setuptools; python_version >= "3.12"
daetools @ https://sourceforge.net/projects/daetools/files/daetools/2.3.0/daetools-2.3.0-gnu_linux-x86_64.zip ; python_version >= "3.10" and python_version <= "3.12" and sys_platform == "linux"
daetools @ https://sourceforge.net/projects/daetools/files/daetools/2.3.0/daetools-2.3.0-win64.zip ; python_version >= "3.10" and python_version <= "3.12" and sys_platform == "win32"
daetools @ https://sourceforge.net/projects/daetools/files/Old-releases/daetools-old/1.9.0/daetools-1.9.0-gnu_linux-x86_64.tar.gz ; python_version >= "3.5" and python_version <= "3.7" and sys_platform == "linux"
daetools @ https://sourceforge.net/projects/daetools/files/Old-releases/daetools-old/1.9.0/daetools-1.9.0-win64.zip ; python_version >= "3.5" and python_version <= "3.7" and sys_platform == "win32"
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
'mpet.electrode.reactions',
'mpet.electrolyte','mpet.config'
],
install_requires=['numpy','scipy','matplotlib','pyQt5', 'h5py', 'configparser', 'schema'],
install_requires=open('requirements.txt').readlines(),
extras_require={'test':['pytest','coverage', 'coveralls', 'flake8'],
'doc':['sphinx','sphinx_rtd_theme'],
'dashboard': ['dash', 'dash_bootstrap_components'],
Expand Down

0 comments on commit ff49b29

Please sign in to comment.