Skip to content

Commit

Permalink
PySAM v3.0.1 Release (#110)
Browse files Browse the repository at this point in the history
* files for pysam 2.2.4

* update build_manylinux.sh

* update tests and conda build

* update SAM_api files

* closes #89 certifi certificates in fetchresource

* fixes #94

* start v 2.3.0

* fix #69

* changes from 2021.12.2 release

* add VersionChanges.rst

* add version_differ.py

* add more release info

* update version_differ.py doc str

* correct version_differ.py with PySSC

* add python 3.10

* fix getting env variables during build and remove pandas dependency

* fix test_ResouceTools.py

* switch to manylinux2010 for Python 3.10 support

* update pysam files

* update PySAM files

* Update docs for Version 3.0.1

* close #109

* remove stubs package dependency

* removal of stubs package
  • Loading branch information
dguittet authored Mar 6, 2022
1 parent b8a064f commit 1352718
Show file tree
Hide file tree
Showing 133 changed files with 25,056 additions and 25,511 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ cmake-build-release/
*.pyproj
*.sln
*.ipynb_checkpoints
.vscode

#os specific
.idea/
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ https://nrel-pysam.readthedocs.io
pip install nrel-pysam
```

2. Anaconda (<1.2.1 only):
2. Anaconda (Versions > 1.2.1 only):
```
conda install -c nrel nrel-pysam nrel-pysam-stubs
conda install -c nrel nrel-pysam
```

May not be compatible with different builds of the CPython reference interpreter, and not with alternative interpreters such as PyPy, IronPython or Jython
Expand Down
6 changes: 6 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Release Notes

## Version 3.0.1, Mar 4, 2022 - SAM 2021.12.02, Revision 1, SSC Version 268
* [SSC Release Notes](https://nrel.github.io/ssc/doc/releasenotes.html) for description of functionality and
variable changes
* [SAM Release updates for Version 2020.12.02](https://nrel.github.io/SAM/doc/releasenotes.html)
* Moved all stub files from NREL-PySAM-stubs package into NREL-PySAM (#109)

## Version 3.0.0, Dec 23, 2021 ~ SAM 2021.12.02, SSC Version 267
* __Warning: Significant changes to Battery and UtilityRate5 Modules, including redefinition of some variables.__
Please see [SSC Release Notes](https://nrel.github.io/ssc/doc/releasenotes.html) for description of functionality and
Expand Down
5 changes: 0 additions & 5 deletions build_conda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ export DIST_DIR
yes | conda install conda-build
yes | conda activate base
conda update -n base -c defaults conda
for PYTHONVER in 3.6 3.7 3.8 3.9 3.10
do
conda-build stubs --output-folder=$DIST_DIR --python=$PYTHONVER || exit
conda build purge
done

for PYTHONVER in 3.6 3.7 3.8 3.9 3.10
do
Expand Down
2 changes: 1 addition & 1 deletion build_manylinux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ cd $PYSAMDIR
for PYTHONENV in cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310
do
yes | /opt/python/$PYTHONENV/bin/pip install -r tests/requirements.txt
yes | /opt/python/$PYTHONENV/bin/pip uninstall NREL-PySAM NREL-PySAM-stubs
yes | /opt/python/$PYTHONENV/bin/pip uninstall NREL-PySAM
/opt/python/$PYTHONENV/bin/python setup.py install
/opt/python/$PYTHONENV/bin/python -m pytest -s tests
retVal=$?
Expand Down
11 changes: 4 additions & 7 deletions build_unix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# Building libssc and libSAM_api
# requires SAM-Dev/CMakeList.txt that contains lk, wex, ssc and sam as subdirectories

mkdir -p ~/SAM-Dev/cmake-build-export
cd ~/SAM-Dev/cmake-build-export || exit
mkdir -p ~/SAM-Dev/cmake-build-release
cd ~/SAM-Dev/cmake-build-release || exit
cmake .. -DCMAKE_BUILD_TYPE=Release -DSAMAPI_EXPORT=1 -DSAM_SKIP_AUTOGEN=0
cmake --build . --target SAM_api -j 6

Expand All @@ -26,7 +26,7 @@ for PYTHONENV in pysam_build_3.6 pysam_build_3.7 pysam_build_3.8 pysam_build_3.9
do
conda activate $PYTHONENV
yes | pip install -r tests/requirements.txt
yes | pip uninstall NREL-PySAM NREL-PySAM-stubs
yes | pip uninstall NREL-PySAM
python setup.py install || exit
pytest -s tests
retVal=$?
Expand All @@ -36,10 +36,6 @@ do
fi
python setup.py bdist_wheel
done
mypy stubs/stubs || exit
python stubs/setup.py bdist_wheel

twine upload $PYSAMDIR/dist/*stubs*.whl

yes | $PYSAMDIR/build_conda.sh || exit

Expand All @@ -49,6 +45,7 @@ yes | $PYSAMDIR/build_conda.sh || exit

cd ..
docker pull quay.io/pypa/manylinux2010_x86_64
# docker run --rm -dit -v $(pwd):/io quay.io/pypa/manylinux2010_x86_64 /bin/bash
docker run --rm -v $(pwd):/io quay.io/pypa/manylinux2010_x86_64 /io/pysam/build_manylinux.sh

rename -s linux manylinux1 $PYSAMDIR/dist/*-linux_*
Expand Down
2 changes: 1 addition & 1 deletion build_win.bat
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ FOR %%i IN (pysam_build_3.6 pysam_build_3.7, pysam_build_3.8 pysam_build_3.9 pys
call deactivate
call activate %%i
echo y | pip install -r tests/requirements.txt
echo y | pip uninstall NREL-PySAM NREL-PySAM-stubs
echo y | pip uninstall NREL-PySAM
python setup.py install
pytest -s tests
if errorlevel 1 (
Expand Down
3 changes: 0 additions & 3 deletions conda/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,8 @@ fi

pattern=$DIST_DIR/NREL_PySAM-*$VERSION*"${PYTHONVER//.}"*$OS_NAME*whl
FILE=( $pattern )
pattern=$DIST_DIR/NREL_PySAM_stubs-*$VERSION*whl
STUBS_FILE=( $pattern )

if [ -f "$FILE" ]; then
pip install $STUBS_FILE
pip install $FILE
else
echo "$FILE does not exist."
Expand Down
1 change: 0 additions & 1 deletion conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ requirements:
- python
run:
- python
- nrel-pysam-stubs

build:
script_env:
Expand Down
4 changes: 2 additions & 2 deletions docs/GettingStarted.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Installation
************
PySAM for Python 3.5 to 3.8, as NREL-PySAM, is available on PyPi. It is also available on Anaconda for MacOSX up to 3.8 and on Windows and Linux up to 3.7. NREL-PySAM-stubs is the stub file package providing auto-completion features.
PySAM for Python 3.5 to 3.8, as NREL-PySAM, is available on PyPi. It is also available on Anaconda for MacOSX up to 3.8 and on Windows and Linux up to 3.7.

To install from PyPi::

Expand All @@ -12,5 +12,5 @@ To install from PyPi::
To install from Anaconda, the NREL channel needs to be appended::

conda config --env --append channels nrel
conda install nrel-pysam nrel-pysam-stubs
conda install nrel-pysam

Loading

0 comments on commit 1352718

Please sign in to comment.