-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Hybrids in PySAM (#162) * add tests for updated PySSC * add hybrids * update hybrids and add tests * remove set_data_ptr * update ctypes and PySSC * add yml for github actions CI * update yml * update yml * update yml * update yml * update yml * update yml * update yml * update yml * remove hybrid_sandbox * update files * update test_hybrids * update CI yml * remove M1 mac test for now * update test_pysam_all * update test * add back M1 mac test * update test_pkg.yml * update test_pkg.yml * update test_pkg.yml * update test_pkg.yml * update test_pkg.yml * update test_pkg.yml * fix mem leak in test_pyssc * update yml for CI * update build scripts * update test_pkg.yml * update test_pkg.yml * update test_pkg.yml * update test_pkg.yml * update test_pkg.yml
- Loading branch information
Showing
253 changed files
with
13,413 additions
and
4,310 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
name: Test Package | ||
|
||
on: [ push ] | ||
|
||
jobs: | ||
build_1: | ||
|
||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ] | ||
|
||
env: | ||
SAMNTDIR: ${{ github.workspace }}/../SAM | ||
NREL_API_KEY: ${{ secrets.NREL_API_KEY }} | ||
NREL_API_EMAIL: ${{ secrets.NREL_API_EMAIL }} | ||
|
||
name: ${{ matrix.os }} ${{ matrix.python-version }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup conda | ||
uses: s-weigand/setup-conda@v1 | ||
with: | ||
update-conda: true | ||
python-version: ${{ matrix.python-version }} | ||
conda-channels: anaconda, conda-forge | ||
- run: conda --version | ||
- run: which python | ||
|
||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Get PySAM Version Unix | ||
if: ${{ matrix.os != 'windows-latest' }} | ||
run: | | ||
VER=$(python -c "from files.version import __version__; print(__version__)") | ||
echo "VERSION=$VER" >> $GITHUB_ENV | ||
- name: Get PySAM Version Windows | ||
if: ${{ matrix.os == 'windows-latest'}} | ||
run: | | ||
$VER=$(python -c "from files.version import __version__; print(__version__)") | ||
echo "VERSION=$VER" >> $env:GITHUB_ENV | ||
- name: Install NREL-PySAM | ||
run: | | ||
pip install -r requirements.txt | ||
pip install -r tests/requirements.txt | ||
conda install -c nrel nrel-pysam==${{ env.VERSION }} | ||
- uses: actions/checkout@v3 | ||
- name: Checkout SAM | ||
run: | | ||
cd .. | ||
git config --global url.https://github.com/.insteadOf git://github.com/ | ||
git clone https://github.com/NREL/SAM.git | ||
- name: Unit tests | ||
run: | | ||
pytest tests/test_pysam_all.py | ||
build_2: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [macos-14] | ||
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ] | ||
|
||
env: | ||
SAMNTDIR: ${{ github.workspace }}/../SAM | ||
NREL_API_KEY: ${{ secrets.NREL_API_KEY }} | ||
NREL_API_EMAIL: ${{ secrets.NREL_API_EMAIL }} | ||
|
||
name: ${{ matrix.os }} ${{ matrix.python-version }} | ||
steps: | ||
- name: Install conda Mac arm64 | ||
run: | | ||
mkdir -p ~/miniconda3 | ||
curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh -o ~/miniconda3/miniconda.sh | ||
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 | ||
rm -rf ~/miniconda3/miniconda.sh | ||
~/miniconda3/bin/conda init bash | ||
source /Users/runner/.bash_profile | ||
conda --version | ||
yes | conda create --name pysam_env python=${{ matrix.python-version }} | ||
conda activate pysam_env | ||
which python | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install NREL-PySAM | ||
run: | | ||
source /Users/runner/.bash_profile | ||
conda activate pysam_env | ||
VER=$(python -c "from files.version import __version__; print(__version__)") | ||
echo $VER | ||
pip install -r requirements.txt | ||
pip install -r tests/requirements.txt | ||
conda install -c nrel nrel-pysam==$VER | ||
- uses: actions/checkout@v3 | ||
- name: Checkout SAM | ||
run: | | ||
cd .. | ||
git config --global url.https://github.com/.insteadOf git://github.com/ | ||
git clone https://github.com/NREL/SAM.git | ||
- name: Unit tests | ||
run: | | ||
source /Users/runner/.bash_profile | ||
conda activate pysam_env | ||
pytest tests/test_pysam_all.py |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.