-
Notifications
You must be signed in to change notification settings - Fork 14
chore: [refractionPOINT/tracking#3050] Move from setup.py to pyproject.toml
#159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
tomaz-lc
wants to merge
9
commits into
master
Choose a base branch
from
feat/3050-minor-setup-py-improvements
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setup.py to pyproject.tomlsetup.py to pyproject.toml
we don't need to duplicate it in setup.py.
long description field.
…file in the distribution.
f14807c to
4ceface
Compare
pyproject.toml approach.
4ceface to
13ffb97
Compare
> if 0 == self._pendingReCheck and 0 == len( self._sensorsLeftToCheck ): > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > TypeError: object of type 'Queue' has no len()
tomaz-lc
commented
Feb 24, 2025
| with self._lock: | ||
| # If there are no more sensors to check, we can exit. | ||
| if 0 == self._pendingReCheck and 0 == len( self._sensorsLeftToCheck ): | ||
| # NOTE: len() doesn't work on Queue in Python 3 |
Contributor
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed this code was resulting in this error:
File "/home/tomaz/w/refractionPOINT/python-limacharlie/limacharlie/SpotCheck.py", line 120, in _performSpotChecks
sensor = self._sensorsLeftToCheck.get_nowait()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/queue.py", line 199, in get_nowait
return self.get(block=False)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/queue.py", line 168, in get
raise Empty
_queue.Empty
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
self.run()
File "/usr/lib/python3.11/threading.py", line 975, in run
self._target(*self._args, **self._kwargs)
File "/home/tomaz/w/refractionPOINT/python-limacharlie/limacharlie/SpotCheck.py", line 126, in _performSpotChecks
if 0 == self._pendingReCheck and 0 == len( self._sensorsLeftToCheck ):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: object of type 'Queue' has no len()
warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg))
87363b9 to
cbd10a2
Compare
update Dockerfile to work with new pyproject.toml approach. Also update PR CI workflow to build and test Docker image as part of the run.
cbd10a2 to
dab0103
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request updates the project packaging story and moves from deprecated
setup.pyapproach topyproject.tomlapproach (with setuptools.build_meta build backend).Additionally, it includes the following changes:
README.mdfor the project long description (this will be rendered in PyPi package page).setuptools-scmpackage to automatically read the version from SCM (git). This means that when a tag is available (e.g. stable release), it will automatically use that tag for the version and we don't need to update any files and change the version thereNotes
In theory, this change should be backward compatible, but the package metadata will change a bit and we will include a couple of more files.
This should not affect the end users in any way. I will also add some more dist tests to CI to confirm that. In fact, I already wanted to do it, but Cloud Build makes it a massive pain if you want to do things such as re-use steps, run with multiple versions of Python (you can get it to work using different approaches, but none of them is really pretty and that robust).
TODO
Type of change
Related issues
Fix refractionPOINT/tracking#3050