Skip to content

Commit a93ff81

Browse files
committed
Merge branch 'main' into development
2 parents 1c3ece0 + a8a7852 commit a93ff81

5 files changed

Lines changed: 8778 additions & 14 deletions

File tree

.github/workflows/deploy.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ jobs:
1818
- name: Install dependencies
1919
run: |
2020
python -m pip install --upgrade pip
21-
pip install setuptools wheel twine
21+
pip install build twine
2222
- name: Build and publish
2323
env:
2424
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
2525
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
2626
run: |
27-
python setup.py sdist bdist_wheel
27+
python -m build
2828
twine upload dist/*
2929
- uses: actions/upload-artifact@v4
3030
with:

bifacial_radiance/main.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,7 @@ def readWeatherFile(self, weatherFile=None, starttime=None,
915915
source : str
916916
To help identify different types of .csv files. If None, it assumes
917917
it is a TMY3-style formated data. Current options: 'TMY3',
918-
'solargis', 'EPW', 'SAM'
918+
'solargis', 'EPW', 'SAM', 'PSM3'
919919
coerce_year : int
920920
Year to coerce weather data to in YYYY format, ie 2021.
921921
If more than one year of data in the weather file, year is NOT coerced.
@@ -968,7 +968,7 @@ def readWeatherFile(self, weatherFile=None, starttime=None,
968968
label = 'right'
969969
metdata, metadata = self._readTMY(weatherFile, label=label, coerce_year=coerce_year)
970970

971-
if source.lower() =='sam':
971+
if source.lower() in ['sam', 'psm3']:
972972
if label is None:
973973
label = 'left'
974974
metdata, metadata = self._readSAM(weatherFile)
@@ -1390,14 +1390,12 @@ def _convertTMYdate(data, meta):
13901390

13911391
def _readSAM(self, SAMfile=None):
13921392
'''
1393-
use pvlib to read in a tmy3 file.
1394-
Note: pvlib 0.7 does not currently support sub-hourly files. Until
1395-
then, use _readTMYdate() to create the index
1393+
Read an NSRDB PSM3 weather file (formatted as SAM CSV).
13961394
13971395
Parameters
13981396
------------
13991397
tmyfile : str
1400-
Filename of tmy3 to be read with pvlib.tmy.readtmy3
1398+
Filename of PSM3 to be read with pvlib.iotools.read_psm3
14011399
14021400
Returns
14031401
-------
@@ -1408,7 +1406,7 @@ def _readSAM(self, SAMfile=None):
14081406
# Will only work with latest PVLIB Release once htey accept my push..
14091407
# Note Oct. 10
14101408
# import pvlib
1411-
#(tmydata, metadata) = pvlib.iotools.tmy.read_psm3(filename=SAMfile,
1409+
#(tmydata, metadata) = pvlib.iotools.read_psm3(filename=SAMfile,
14121410
# map_variables=True)
14131411
with open(SAMfile) as myfile:
14141412
head = next(myfile)#

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ keywords = ["bifacial", "radiance", "photovoltaics", "pv", "ray tracing"]
1616
classifiers = [
1717
"Development Status :: 4 - Beta",
1818
"Intended Audience :: Science/Research",
19-
"License :: OSI Approved :: BSD-3-Clause",
19+
"License :: OSI Approved :: BSD License",
2020
"Programming Language :: Python :: 3",
2121
"Programming Language :: Python :: 3.8",
2222
"Programming Language :: Python :: 3.9",

0 commit comments

Comments
 (0)