-
Notifications
You must be signed in to change notification settings - Fork 13
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
Made method names consistent and added docstrings #24
Conversation
IK most of the method names are self-documenting, but it doesn't hurt to have docstrings anyway. Also think it's better to have consistent names (and that was one of the open issues) even if it means a slight divergence from the API; the whole point is that the python user doesn't need to know about the API!
update the test files to reflect changes made in previous commit
Amazing, thank you! Would you be so kind as to change them to |
I'd figured that snake_case was better because it fits python conventions, even if it diverges from atproto. Part of the point of this project (as I see it) is that the user shouldn't need to know the details of atproto, and it's easy enough to work out the API method name from the python method name in these cases. All of the Ultimately it's your project though, and I can definitely see why it would be desirable. While I'm doing this, should I make some of the other names closer to the atproto names (e.g. |
all good considerations! i was hoping this library could be friendly / easy-to-use. there's now https://github.com/marshalX/atproto which is a more-full-fledged library, so i think the role of this one will be "utility functions", "REPL for your skeets", "teaches you the names+cases of the xrpc endpoints", "friendly", and "easy to use". to that end i think consistent camelCase across the board is probably best, if you'd be so kind 🙏 |
made the changes myself! thanks for motivating me ^^ shoot me an email - iklatzco AT gmail - for a pair of invite codes ^^ |
I know I have no say here, but I'd like to voice that following the language guidelines is probably a good idea, as stated in pep-0008 https://peps.python.org/pep-0008/#method-names-and-instance-variables Lots of tools will throw a fit if this isn't matched. |
Hmmm that's quite a tempting consideration, thanks for sharing -- PEP8 is pretty canonical, right? I suspect https://github.com/marshalX/atproto is probably pep8 and worth being canonical - i think i intend for atprototools to serve more of the "getting started as quick as possible" wrapper library ^^ |
PEP8 is pretty solid. Worth consideration. Building on a standard, especially a Python Standard, makes good sense. |
Yes, PEP8 was what I was referring to when I said "snake_case fits python conventions" in my earlier comment, it's The Standard for python. All the auto-formatting tools (including I stand by my earlier suggestion that we could have something like a
We'd keep the
Then |
Closes Issue #12. I know most of the method names are self-documenting, but it doesn't hurt to have docstrings anyway. The second commit changes the names in test_main.
P.S. I'd like to be able to make some more substantive changes, but I don't have a bluesky account. If you have a spare invite I'd appreciate it.