Skip to content

Commit 29081cd

Browse files
committed
Merge branch 'main' into pysam_debug
2 parents 97662ec + 994b82c commit 29081cd

File tree

490 files changed

+758131
-73756
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

490 files changed

+758131
-73756
lines changed

.github/workflows/linter.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Lint Code Base
22

33
on:
44
push:
5-
branches: [ master, dev ]
5+
branches: [ main, dev ]
66

77
jobs:
88
build:
@@ -12,7 +12,8 @@ jobs:
1212
- name: Checkout Code
1313
uses: actions/checkout@v2
1414
- name: Lint Code Base
15-
uses: docker://github/super-linter:v2.0.0
15+
uses: docker://github/super-linter:v2.1.1
1616
env:
1717
VALIDATE_ALL_CODEBASE: false
1818
VALIDATE_ANSIBLE: false
19+
DEFAULT_BRANCH: main

.github/workflows/test_pkg.yml

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
name: Test Package
2+
3+
on: [ push ]
4+
5+
jobs:
6+
build_1:
7+
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
matrix:
11+
os: [ubuntu-latest, windows-2019]
12+
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
13+
14+
env:
15+
SAMNTDIR: ${{ github.workspace }}/../SAM
16+
NREL_API_KEY: ${{ secrets.NREL_API_KEY }}
17+
NREL_API_EMAIL: ${{ secrets.NREL_API_EMAIL }}
18+
19+
name: ${{ matrix.os }} ${{ matrix.python-version }}
20+
steps:
21+
- name: Checkout Repo
22+
uses: actions/checkout@v3
23+
24+
- name: Get PySAM Version Unix
25+
if: ${{ matrix.os != 'windows-2019' }}
26+
run: |
27+
VER=$(python -c "from files.version import __version__; print(__version__)")
28+
echo "VERSION=$VER" >> $GITHUB_ENV
29+
30+
- name: Get PySAM Version Windows
31+
if: ${{ matrix.os == 'windows-2019'}}
32+
run: |
33+
$VER=$(python -c "from files.version import __version__; print(__version__)")
34+
echo "VERSION=$VER" >> $env:GITHUB_ENV
35+
36+
- name: Install NREL-PySAM
37+
run: |
38+
pip install -r requirements.txt
39+
pip install -r tests/requirements.txt
40+
pip install nrel-pysam==${{ env.VERSION }}
41+
42+
- uses: actions/checkout@v3
43+
- name: Checkout SAM
44+
run: |
45+
cd ..
46+
git config --global url.https://github.com/.insteadOf git://github.com/
47+
git clone https://github.com/NREL/SAM.git
48+
49+
- name: Unit tests
50+
run: |
51+
pytest tests/test_pysam_all.py
52+
53+
build_2:
54+
runs-on: ${{ matrix.os }}
55+
strategy:
56+
matrix:
57+
os: [macos-14]
58+
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
59+
60+
env:
61+
SAMNTDIR: ${{ github.workspace }}/../SAM
62+
NREL_API_KEY: ${{ secrets.NREL_API_KEY }}
63+
NREL_API_EMAIL: ${{ secrets.NREL_API_EMAIL }}
64+
65+
name: ${{ matrix.os }} ${{ matrix.python-version }}
66+
steps:
67+
- name: Install conda Mac arm64
68+
run: |
69+
mkdir -p ~/miniconda3
70+
curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh -o ~/miniconda3/miniconda.sh
71+
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
72+
rm -rf ~/miniconda3/miniconda.sh
73+
~/miniconda3/bin/conda init bash
74+
source /Users/runner/.bash_profile
75+
conda --version
76+
yes | conda create --name pysam_env python=${{ matrix.python-version }}
77+
conda activate pysam_env
78+
which python
79+
80+
- name: Checkout Repo
81+
uses: actions/checkout@v3
82+
83+
- name: Install NREL-PySAM
84+
run: |
85+
source /Users/runner/.bash_profile
86+
conda activate pysam_env
87+
VER=$(python -c "from files.version import __version__; print(__version__)")
88+
echo $VER
89+
pip install -r requirements.txt
90+
pip install -r tests/requirements.txt
91+
pip install nrel-pysam==$VER
92+
93+
- uses: actions/checkout@v3
94+
- name: Checkout SAM
95+
run: |
96+
cd ..
97+
git config --global url.https://github.com/.insteadOf git://github.com/
98+
git clone https://github.com/NREL/SAM.git
99+
100+
- name: Unit tests
101+
run: |
102+
source /Users/runner/.bash_profile
103+
conda activate pysam_env
104+
pytest tests
105+
106+
build_3:
107+
runs-on: ${{ matrix.os }}
108+
strategy:
109+
matrix:
110+
os: [macos-14-large]
111+
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
112+
113+
env:
114+
SAMNTDIR: ${{ github.workspace }}/../SAM
115+
NREL_API_KEY: ${{ secrets.NREL_API_KEY }}
116+
NREL_API_EMAIL: ${{ secrets.NREL_API_EMAIL }}
117+
118+
name: ${{ matrix.os }} ${{ matrix.python-version }}
119+
steps:
120+
- name: Install conda Mac Intel
121+
run: |
122+
mkdir -p ~/miniconda3
123+
curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o ~/miniconda3/miniconda.sh
124+
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
125+
rm -rf ~/miniconda3/miniconda.sh
126+
~/miniconda3/bin/conda init bash
127+
source /Users/runner/.bash_profile
128+
conda --version
129+
yes | conda create --name pysam_env python=${{ matrix.python-version }}
130+
conda activate pysam_env
131+
which python
132+
133+
- name: Checkout Repo
134+
uses: actions/checkout@v3
135+
136+
- name: Install NREL-PySAM
137+
run: |
138+
source /Users/runner/.bash_profile
139+
conda activate pysam_env
140+
VER=$(python -c "from files.version import __version__; print(__version__)")
141+
echo $VER
142+
pip install -r requirements.txt
143+
pip install -r tests/requirements.txt
144+
pip install nrel-pysam==$VER
145+
146+
- uses: actions/checkout@v3
147+
- name: Checkout SAM
148+
run: |
149+
cd ..
150+
git config --global url.https://github.com/.insteadOf git://github.com/
151+
git clone https://github.com/NREL/SAM.git
152+
153+
- name: Unit tests
154+
run: |
155+
source /Users/runner/.bash_profile
156+
conda activate pysam_env
157+
pytest tests

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ cmake-build-release/
77
*.pyproj
88
*.sln
99
*.ipynb_checkpoints
10+
.vscode
1011

1112
#os specific
1213
.idea/
@@ -30,3 +31,5 @@ files/defaults/
3031
*.pyc
3132

3233
.mypy_cache
34+
35+
*.zip

.readthedocs.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,12 @@ version: 2
99
sphinx:
1010
configuration: docs/conf.py
1111

12-
# Build documentation with MkDocs
13-
#mkdocs:
14-
# configuration: mkdocs.yml
15-
16-
# Optionally build your docs in additional formats such as PDF and ePub
17-
formats: []
12+
build:
13+
os: ubuntu-22.04
14+
tools:
15+
python: "3.10"
1816

1917
# Optionally set the version of Python and requirements required to build your docs
2018
python:
21-
version: 3.7
2219
install:
23-
- requirements: docs/requirements.txt
20+
- requirements: docs/requirements.txt

Examples/100kW_PVWatts.json

Lines changed: 3 additions & 4 deletions
Large diffs are not rendered by default.

Examples/100mW_Generic.json

Lines changed: 1 addition & 7 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)