Skip to content

Commit

Permalink
Merge branch 'development' into 512_CEC_performance
Browse files Browse the repository at this point in the history
  • Loading branch information
cdeline committed Aug 30, 2024
2 parents 93e0ec5 + 562ddd2 commit 2e7fbf2
Show file tree
Hide file tree
Showing 35 changed files with 18,433 additions and 19,421 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,30 +25,30 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Print triggering event info
run: |
echo "${{ github.actor }} triggered run #${{ github.run_number }} with event type ${{ github.event_name }}"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_NREL_USER }}
password: ${{ secrets.DOCKERHUB_NREL_TOKEN }}

- name: Login to GitHub Package Registry
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/Dockerfile
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test
name: test

on: [pull_request, push]

Expand All @@ -20,10 +20,10 @@ jobs:
]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
echo "/home/runner/work/bifacial_radiance/bifacial_radiance/SMARTS_295_Linux" >> $GITHUB_PATH
- name: Test with pytest ${{ matrix.env }}
uses: GabrielBB/xvfb-action@v1 # GUI testing requires xvfb
uses: coactions/setup-xvfb@6b00cf1889f4e1d5a48635647013c0508128ee1a # GUI testing requires xvfb
with:
run: |
pytest --cov=bifacial_radiance
Expand All @@ -69,6 +69,7 @@ jobs:
SMARTSPATH: /home/runner/work/bifacial_radiance/bifacial_radiance/SMARTS_295_Linux

- name: Coveralls
continue-on-error: true #prevent coveralls from blowing the test report
if: matrix.python-version == 3.11 # && ${{ matrix.env }} == '-r requirements.txt .[all]'
run: |
coveralls --service=github
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ tests/_test_fixed_tilt_end_to_end.oct
tests/_test_high_azimuth_angle_end_to_end.oct
tests/1axis_01_01_11.oct
tests/save.pickle
tests/simulation.ini

# bifacial_radiance temp folder
bifacial_radiance/TEMP/
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ and [Issues](https://github.com/NREL/bifacial_radiance/issues) page.
https://youtu.be/4A9GocfHKyM
This video shows how to install the bifacial_radiance software and all associated software needed. More info on the Wiki. Instructions are also shown below.

For detailed instructions of how to install bifacial_radiance, you can also refer to the [installation guide](https://bifacial-radiance.readthedocs.io/en/stable/installation.html)
For detailed instructions of how to install bifacial_radiance, you can also refer to the [installation guide](https://bifacial-radiance.readthedocs.io/en/stable/user_guide/installation.html)

## GUI!

Expand Down
18 changes: 15 additions & 3 deletions bifacial_radiance/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
try:
from importlib.metadata import PackageNotFoundError, version
except ImportError:
# for python < 3.8 (remove when dropping 3.7 support)
from importlib_metadata import PackageNotFoundError, version

try:
__version__ = version(__package__)
except PackageNotFoundError:
__version__ = "0+unknown"


from bifacial_radiance.main import AnalysisObj, GroundObj, MetObj, RadianceObj, SceneObj
#from bifacial_radiance.readepw import readepw
from bifacial_radiance.module import ModuleObj
Expand All @@ -7,6 +19,6 @@
from bifacial_radiance import mismatch
from bifacial_radiance.spectral_utils import generate_spectra
from bifacial_radiance import performance
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
#from ._version import get_versions
#__version__ = get_versions()['version']
#del get_versions
Loading

0 comments on commit 2e7fbf2

Please sign in to comment.