Skip to content

Commit 8e62a7f

Browse files
authored
Merge pull request #59 from NREL/58_versioneer
Remove versioneer in favor of setuptools_scm. Fix some deprecation warnings due to numpy. Add support up to Python 3.11. Drop Python 3.6 and 3.7 support.
2 parents 5097f4f + acd2563 commit 8e62a7f

9 files changed

Lines changed: 60 additions & 2389 deletions

File tree

.github/workflows/pytest.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ jobs:
77

88
runs-on: ubuntu-latest
99
strategy:
10-
fail-fast: false # don't cancel other matrix jobs when one fails
10+
fail-fast: true # don't cancel other matrix jobs when one fails
1111
matrix:
12-
python-version: ["3.7"]
12+
python-version: ["3.8", "3.11"]
1313
# Test two environments:
1414
# 1) dependencies with pinned versions from requirements.txt
1515
# 2) 'pip install --upgrade --upgrade-strategy=eager .' to install upgraded

bifacialvf/__init__.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88
from bifacialvf.BF_BifacialIrradiances.LandscapeSingleHour import LandscapeSingleHour # For calculateBilInterpol
99
from bifacialvf.BF_BifacialIrradiances.PortraitSingleHour import PortraitSingleHour # For calculateBilInterpol
1010

11-
from ._version import get_versions
12-
__version__ = get_versions()['version']
13-
del get_versions
11+
try:
12+
from importlib.metadata import PackageNotFoundError, version
13+
except ImportError:
14+
# for python < 3.8 (remove when dropping 3.7 support)
15+
from importlib_metadata import PackageNotFoundError, version
16+
17+
try:
18+
__version__ = version(__package__)
19+
except PackageNotFoundError:
20+
__version__ = "0+unknown"

0 commit comments

Comments
 (0)