Skip to content

Commit 8077abd

Browse files
committed
fix(sunpath): Fix bug with reversed daylight savings periods
Resolves ladybug-tools/ladybug-grasshopper#401 (comment)
1 parent eb88cef commit 8077abd

File tree

7 files changed

+15
-16
lines changed

7 files changed

+15
-16
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
run: |
5656
nextRelease="`npx semantic-release@^23.1.1 --dryRun | grep -oP 'Published release \K.*? ' || true`"
5757
npx semantic-release@^23.1.1
58-
echo "::set-output name=tag::$nextRelease"
58+
echo "tag=$nextRelease" >> $GITHUB_OUTPUT
5959
env:
6060
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6161
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}

Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ RUN mkdir ladybug_tools && touch ladybug_tools/config.json
2222
COPY ladybug ${LIBRARYDIR}/ladybug
2323
COPY .git ${LIBRARYDIR}/.git
2424
COPY setup.py ${LIBRARYDIR}
25-
COPY setup.cfg ${LIBRARYDIR}
2625
COPY requirements.txt ${LIBRARYDIR}
2726
COPY README.md ${LIBRARYDIR}
2827
COPY LICENSE ${LIBRARYDIR}

deploy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ CONTAINER_NAME="ladybugtools/ladybug"
1212

1313
echo "PyPi Deployment..."
1414
echo "Building distribution"
15-
python setup.py sdist bdist_wheel
15+
python -m build
1616
echo "Pushing new version to PyPi"
1717
twine upload dist/* -u $PYPI_USERNAME -p $PYPI_PASSWORD
1818

dev-requirements.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@ sphinx-bootstrap-theme==0.8.1
44
sphinxcontrib-fulltoc==1.2.0
55
sphinxcontrib-websupport==2.0.0;python_version>='3.6'
66
sphinx-click==6.0.0;python_version>='3.6'
7-
twine==5.1.1;python_version>='3.6'
8-
wheel==0.44.0;python_version>='3.6'
9-
setuptools==75.1.0;python_version>='3.6'
10-
importlib-metadata==8.5.0;python_version>='3.6'
7+
twine==6.1.0;python_version>='3.6'
8+
wheel==0.45.1;python_version>='3.6'
9+
setuptools==80.9.0;python_version>='3.6'
10+
build==1.3.0;python_version>='3.6'
1111
pytest==4.6.9;python_version<'3.0'
1212
Sphinx==1.8.5;python_version<'3.0'
1313
sphinxcontrib-websupport==1.1.2;python_version<'3.0'
1414
sphinx-click==4.4.0;python_version<'3.0'
1515
twine==1.13.0;python_version<'3.0'
1616
wheel==0.38.1;python_version<'3.0'
1717
setuptools==44.1.0;python_version<'3.0'
18+
build==0.1.0;python_version<'3.0'
1819
importlib-metadata==2.0.0;python_version<'3.0'

ladybug/sunpath.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@ def is_daylight_saving_hour(self, datetime):
179179
if not self.daylight_saving_period:
180180
return False
181181
if self.daylight_saving_period.is_reversed:
182-
return self.daylight_saving_period.end_time.moy <= datetime.moy or \
183-
self.daylight_saving_period.st_time.moy >= datetime.moy
182+
return datetime.moy <= self.daylight_saving_period.end_time.moy or \
183+
datetime.moy >= self.daylight_saving_period.st_time.moy
184184
else:
185185
return self.daylight_saving_period.st_time.moy <= datetime.moy < \
186186
self.daylight_saving_period.end_time.moy

setup.cfg

Lines changed: 0 additions & 5 deletions
This file was deleted.

setup.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,14 @@
2424
},
2525
classifiers=[
2626
"Programming Language :: Python :: 2.7",
27-
"Programming Language :: Python :: 3.6",
2827
"Programming Language :: Python :: 3.7",
28+
"Programming Language :: Python :: 3.8",
29+
"Programming Language :: Python :: 3.9",
30+
"Programming Language :: Python :: 3.10",
31+
"Programming Language :: Python :: 3.11",
32+
"Programming Language :: Python :: 3.12",
2933
"Programming Language :: Python :: Implementation :: CPython",
30-
"License :: OSI Approved :: GNU Affero General Public License v3",
34+
"Programming Language :: Python :: Implementation :: IronPython",
3135
"Operating System :: OS Independent"
3236
],
3337
license="AGPL-3.0"

0 commit comments

Comments
 (0)