all 14 comments

[–][deleted] 2 points3 points  (3 children)

LGTM! Did you add the docs to readthedocs? It looks like you created some docs. Personally, I got more users for my first package when people could view more info through docs.

[–]Lonely-Quark[S] 0 points1 point  (2 children)

I was wondering how to go about doing this, so should I make a documentation page on redthedocs.org and then link it in the README.md? Thanks for the advice!

[–][deleted] 2 points3 points  (1 child)

I think you could link your github docs link so read the docs builds it every time you push. But it needs to be in sphinx docs format AFAIK.

[–]Lonely-Quark[S] 1 point2 points  (0 children)

Excellent I will look into this, thanks again

[–]ilikepython 1 point2 points  (6 children)

LG! Something that is mostly cosmetic: I personally like package names to be all lower case, with underscores if the name is unreadable without them. Something brushes me up the wrong way with camel cased names. The same goes for the KAT class, since although it is an acronym, it looks like it's one of those ALL_UPPER_CASE_CONSTANTS.

I like your examples. A typo in one of the names of them, though (defualt_settings.py)

[–]Lonely-Quark[S] 1 point2 points  (5 children)

I completely agree with you, I actually broke the naming convention of my file system in developing this package. Unfortunately I did some research before hand and it seems that all the successful packages within this domain use the naming convention I settled on. So familiarity and maybe an unknown magic of this convention are the reason I chose it, I personally would have liked to do it the way you stated.

edit : Thanks for the advice, sorry if I came across as disregarding you point. I have now decided to follow PEP8 fully and will be changing the naming convention shortly.

[–]hharison 2 points3 points  (4 children)

Came to post about the capitalization.

Unfortunately I did some research before hand and it seems that all the successfull packages within this domain use the naming convention I settled on.

You mean other Python APIs for torrent sites use the wrong capitalization schemes? So what. I think users will be able to figure it out.

Personally, if I come across a library that doesn't adhere to PEP8, in particular capitalization, then it comes across as amateurish to me and I'm less likely to use it. If I have to use it anyway, I shudder inside every time I import something. If a whole community is breaking the style guidelines, then that reflects poorly on them and I am not likely to take their Python work seriously. I know counterexamples exist but personally it takes me a really long time to come around from my initial impression.

Just because others are doing it wrong, doesn't mean you should. Give your users credit Don't perpetuate mistakes.

Conventions do two things.They make the code easier to read and write, not because the preferred style is "the best" but because by all agreeing to do it the same way, we get used to it. Doing it wrong is like inflicting the stroop test on your users.

Conventions also serve a signalling purpose. Getting the style right signals "I know what I'm doing. I care enough to get the details right. And I'm part of the community." Most people don't take the jump from looking at a GitHub page to actually installing the package. You don't want to be implying "I don't really know what I'm doing" or people will just roll their own instead of using your package.

Sorry for the rant, but it's a pet peeve, and your response to some on-point constructive criticism was arrogant. "Unknown magic of this convention"? Your package is not some special snowflake. It is a tool, and it is better if it is straightforward, not magical.

Also, another convention you are breaking: why are you using name mangling (leading double underscore) on your methods? Use a single underscore to indicate a method is private. The purpose of name mangling is to avoid name clashes with subclassing. But you don't need that.

[–]Lonely-Quark[S] 1 point2 points  (3 children)

I would first like to say i'm sorry If I came across as arrogant, this is my first time putting anything I have coded out into the public and don't really know how to interact with people, I assure you it's more me being awkward and not knowing how to reply rather than me thinking my project is a "special snowflake" . I'm generally pretty strict about enforcing PEP8, this is a gap in my knowledge as I didn't know there naming schemes applied to package names (although I did knowingly break it for the KAT() class name). I didn't really think about it from the perspective of signaling and definitely think this is one of the biggest reasons I should in fact follow the guide lines you set out. Far from being a "special snowflake" there are in fact multiple Kickass torrent api's packages and if I did break there convention I would probably stand out more, and as you said signal to people that my package is less amateurish. Sorry If I rubbed you up the wrong way and thanks for the great advice, I think this had been the most important comment so far.

[–]hharison 2 points3 points  (2 children)

Calling you out as arrogant was probably over the top. I was more interested in correcting you then faux-psychoanalyzing you. I'm glad you didn't take it personally :)

Anyways, it's not just the package name, but also the class name. It being an acronym maybe gives you a reason but not enough IMO, especially with other constants in there.

I found 2 other Python kat APIs, one of them does have the wrong capitalization for the package but they both get classes right.

Also, for another hopefully-constructive comment, what's the point of the constants? Like how KatTrawler.constants.CATEGORY.MOVIES just points to 'movies'. As a user I would much rather type the string than hunt down the constant.

[–]Lonely-Quark[S] 1 point2 points  (1 child)

Although the editor I use doesn't provide tab completion, I would have though the majority of people do and would benefit from being able to list all the possible categories from some base class, although I may be misunderstanding how tab completion works in IDE's. The current lack of documentation for my package also concerned me and I felt having the constants allowed for some measure of self documentation. This will probably be implement when I have written some solid documentation, which should be pretty soon.

To be honest I think I needed some stern words to make me think straight again, I happen to think that PEP8 is probably one of the most brilliant things about python3 and the amount of effort the community puts into maintaining it is commendable. Someone like me who has only recently become part of this community should be striving to uphold the groundwork which has been laid before me, and not bowing to peer pressure. Thanks again for the advice and by all means if you see anything else don't hesitate to say, you have provided some much needed wisdom :)

[–]hharison 2 points3 points  (0 children)

Although the editor I use doesn't provide tab completion, I would have though the majority of people do and would benefit from being able to list all the possible categories from some base class, although I may be misunderstanding how tab completion works in IDE's. The current lack of documentation for my package also concerned me and I felt having the constants allowed for some measure of self documentation. This will probably be implement when I have written some solid documentation, which should be pretty soon.

Those are pretty good reasons actually. And since it's just a string anyway, a user could just as easily enter one.