-
Notifications
You must be signed in to change notification settings - Fork 38
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
refactor: fix wrong type Residue -> DefinitionResidue #412
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #412 +/- ##
==========================================
+ Coverage 66.22% 66.36% +0.14%
==========================================
Files 30 30
Lines 7765 7742 -23
==========================================
- Hits 5142 5138 -4
+ Misses 2623 2604 -19 ☔ View full report in Codecov by Sentry. |
I think we should remove setup.py and use pyproject.toml to configure the build. Ruff didn't detect the python version, thus it reported error. While we can specifically configure ruff, this means we have two locations for the configuration. A little bit of background:
However, |
OK, I've made the change. I think you would like this.
Test building the package using # option 1. uv (recommended)
pip install uv
uv build
# option 2. pyproject-build (slower)
pip install build
python -m build Unpack the wheel and tarball to see what they include pip install wheel
wheel unpack dist/pdb2pqr-3.6.2-py3-none-any.whl |
The
Residue
type doesn't havealtnames
, so it must have been documented with the wrong type. The correct type seems to beDefinitionResidue
.I'm fixing the type issue with a type checker. Untyped code makes it vulnerable to random crashes thus making it hard to develop. Below is an example of errors that need to be addressed in the future:
For now, I want to keep each PR simple. I didn't fix all issues but I'm slowly trying to.
FYI: adding types is usually safe because they are ignored on runtime. Even if you pass an object with a different type by mistake, it won't error out during runtime (only in the IDE it will show an error.) It just helps the IDE to figure out what they are.