From 0aa736e752301ba7a0992e7be0a9fbcac5f31499 Mon Sep 17 00:00:00 2001 From: Beau Harrison Date: Wed, 14 Feb 2024 21:11:21 -0600 Subject: [PATCH 1/5] fix: :bug: Gather arguments before passing them on. Deprecated functions were unpacking the arguments and passing them to the updated implementation. This caused the new functions to have the wrong argument type. The arguments are now packed back up before being passed on. --- acsys/dpm/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/acsys/dpm/__init__.py b/acsys/dpm/__init__.py index 5d618cd..0aa1031 100644 --- a/acsys/dpm/__init__.py +++ b/acsys/dpm/__init__.py @@ -181,7 +181,7 @@ def isReadingFor(self, *tags): warnings.warn( "deprecated in favor of the snake_case version, is_reading_for", DeprecationWarning) - return self.is_reading_for(tags) + return self.is_reading_for(*tags) def is_reading_for(self, *tags): return self.tag in tags @@ -233,7 +233,7 @@ def isStatusFor(self, *tags): warnings.warn( "deprecated in favor of the snake_case version, is_status_for", DeprecationWarning) - return self.is_status_for(tags) + return self.is_status_for(*tags) def is_status_for(self, *tags): return self.tag in tags From 0350e41a9aad20e136ddb188b63b090154601bd7 Mon Sep 17 00:00:00 2001 From: Beau Harrison Date: Wed, 14 Feb 2024 21:13:58 -0600 Subject: [PATCH 2/5] fix: :bug: Call functions. In `_ItemCommon`, `isReadingFor` and `isStatusFor` were calling the new functions as though they were properties. The returned value was the function which was evaluating to `True` always. We now call them as functions and they work as expected. --- acsys/dpm/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/acsys/dpm/__init__.py b/acsys/dpm/__init__.py index 0aa1031..e56ddfe 100644 --- a/acsys/dpm/__init__.py +++ b/acsys/dpm/__init__.py @@ -69,7 +69,7 @@ def isReadingFor(self, *tags): warnings.warn( "deprecated in favor of the snake_case version, is_reading_for", DeprecationWarning) - return self.is_reading_for + return self.is_reading_for() def is_reading_for(self, *tags): """Returns True if this object is an ItemData object and its 'tag' @@ -86,7 +86,7 @@ def isStatusFor(self, *tags): warnings.warn( "deprecated in favor of the snake_case version, is_status_for", DeprecationWarning) - return self.is_status_for + return self.is_status_for() def is_status_for(self, *tags): """Returns True if this object is an ItemStatus object and its 'tag' From 863dba83abd5d57292b675515aa86e09b0cd5883 Mon Sep 17 00:00:00 2001 From: Beau Harrison Date: Wed, 14 Feb 2024 21:15:50 -0600 Subject: [PATCH 3/5] chore: :rocket: Bump to version 0.12.8 to release bug fixes. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index cb4f94d..1020d59 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="acsys", - version="0.12.7", + version="0.12.8", author="Rich Neswold", author_email="neswold@fnal.gov", description="ACSys Client library", From bd9d9c8337063a28aec9d713bcce71dbe9aef79e Mon Sep 17 00:00:00 2001 From: Beau Harrison Date: Wed, 14 Feb 2024 21:27:56 -0600 Subject: [PATCH 4/5] build: :technologist: Make `clean` a dependency of `build`. We were overwriting old deployments with `make deploy` when we didn't first run `make clean`. This will always `clean` first now. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9958dc7..72fa641 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -build :: +build :: clean python3 setup.py sdist deploy : build From 267db3f4a78dc34bd258e97d0dd694b8bce5732f Mon Sep 17 00:00:00 2001 From: Beau Harrison Date: Wed, 14 Feb 2024 21:55:53 -0600 Subject: [PATCH 5/5] docs: :memo: Change url to GitHub from Redmine. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 1020d59..691eacc 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ description="ACSys Client library", long_description=long_description, long_description_content_type="text/markdown", - url="https://cdcvs.fnal.gov/redmine/projects/py/wiki/Acsys", + url="https://github.com/fermi-ad/acsys-python", packages=setuptools.find_packages(), classifiers=[ "Programming Language :: Python :: 3",