-
Notifications
You must be signed in to change notification settings - Fork 7
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
Preparing for 1.2.2 and updating versions #46
Conversation
Some of the CommonMark doc changes clippy made for me ended up being wrong, so I'll be going through the API docs with a finetooth comb tomorrow morning for sure |
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.
Just a few small clarifying questions, but otherwise it looks pretty straightforward
@@ -0,0 +1,2 @@ | |||
too-many-arguments-threshold=20 # for what it is worth, clippy is absolutely right and pythonic-ness is absolutely wrong |
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.
Can you clarify what you mean here? Is this an issue with named kwargs or positional args?
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.
the number of arguments. by default, clippy will warn you that your callable signature is too long if you have more than 7 arguments.
I've certainly seen **kwargs used for this, but it's not universal. and even if it was, it isn't worth me changing the api
self.neighbor_edge_weights_within_cluster[*cluster] = f64::NAN; | ||
} | ||
self.neighboring_clusters.clear(); | ||
if let Some(current_cluster) = self.current_cluster { |
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.
It's been a minute since I've written any Rust, but this looks like an assignment in an if
expression, and I just wanted to confirm your intent here.
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 believe it is - I think self.current_cluster can be None, and rather than try to match on a Some(current_cluster) and handle the None in said match when I don't actually want to do anything if it is None, I fabricate a Some(usize) and test equality. I don't know why I thought this was strictly better than the other way, it has been a few years at this point. Currently I have zero strong opinions about it
packages/pyo3/pyproject.toml
Outdated
[tool.uv] | ||
dev-dependencies = [ | ||
"ipython>=8.12.3", | ||
"networkx==3", |
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.
Will this pin to 3.0.0 or will it allow minor/patch bumps?
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'm not sure, so I'll just be explicit and use >=3,<4
Expanding our supported python trove identifiers to include python 3.13
Updating pyo3 from 0.15 to 0.23
Moving 3.6 and 3.7 to EOL (since not only they, but even 3.8 are EOL. pyo3 currently does not support abi3-py36, and I'm betting 3.7 is going to follow suit sometime soon.)
abi3-py36 changing to abi3-py38
…nature specification for python. Also updated my first name everywhere.
…was never used and never should be used (there have to be better ways than that nonsense), and about to have clippy fix my convention of always using a return statement because I hate implicit returns but that's a me thing not a world thing
… && uv run ipython` get you to a reasonable repl for manual testing. I cannot believe I did not do proper python testing here. Maybe I did it in graspologic?
…mmit message alone
…v/main branching scheme.
…cification. I really hope this doesn't break older versions.
…n in the function. Too much was being treated as a quoted paragraph.
force push is due to not merging the prior changes from @dylanwhawk to dev and rebasing on that. |
This PR got away from me for sure. I updated versions, I fixed all the breaks that entailed, I ran clippy for apparently the first time, I fixed all of the warnings (well, almost all - see clippy.toml for details), I ran cargo fmt, I gave up on arguing about:
Because arguing with my formatting tools is lame and a gigantic waste of time.
I also added some dev deps to make it easy to get into a repl with it in by bootstrapping via
uv
. And I found out my unit tests only get run if I do it manually indax space
, so like.. we probably should write some actual damn tests into the CICD for this. I pulled the plug on doing that right now because I don't want to throw a thousand changes at you.And I didn't change the API, so this is just a patch, though I changed enough of the internals I'm a bit nervous about saying that for my downstream users. Especially without any meaningful and exhaustive tests. 🙀