#Really interesting project BTW the name
1 messages · Page 1 of 1 (latest)
Thanks! It's gotten far more popular than I ever expected. I'm pretty sure back when I named it, I thought, "man, if this gets at all popular, I'm going to regret this choice of name" ...
That said, since I planned it as a CLI tool from the beginning (albeit just the convert mode -- suggest came later), I wanted something quick to type... and once you know what it does, the provenance of the name is straightforward... <helpless shrug> It is what it is, now.
Yeah, that happens a lot I'm sure, haha. I figure if I do end up using it frequently (as I expect I might), I might just alias sphobjinv suggest -u https://docs.python.org/dev to something shorter anyway. Indeed, it seems quite useful, though at least on my older Windows machine running, e.g. sphobjinv suggest -u https://docs.python.org/dev dataclass from a warm start takes nearly 20 seconds, at which point it may not really save me much time over just using the HTML search page, which is my primary current approach. Regardless, though, I'm still quite interested in it for programmatic use.
Yeah, I had to pull a C-based fuzzy matcher out in v2.2 due to a licensing conflict. I have grand plans for leveraging multiprocessing to speed things up in v2.4... the search process is embarrassingly parallel, and potentially can benefit from some of the caching properties of difflib.SequenceMatcher... will see.
The main thing that sphobjinv will do over a docs search is tell you for sure what role you should be using to reference something, and the exact name to use. The URL in the docset can hint at the latter, and most things (esp in Python, likely) are pretty easy to guess for the former, but there are lots of gotchas
I forget what it was, but something (a builtin?) that I expected to be a function is actually implemented as a class
Sphinx search does indicate the type of the object, at least when its an index match. But yeah, that can be tricky at times. For me the most annoying thing is determining the ref target label for a given section, which typically requires just going to the source.
Ah yeah, I noticed that now after reading the docs in more detail. I assume it was GPL?
Oh, huh -- I wonder if that's been added since I created the project. I don't recall having noticed that.
-m intersphinx may have been around in 2016, but if it was I don't think it was documented yet.
Yep. fuzzywuzzy had been MIT, but had to convert to GPL when it started importing python-Levenshtein.
They've definitely improved their search a lot in that regard over that timeframe, and with Adam, now the most active Sphinx maintainer, as a PEP editor and on the Python docs team, we've been driving a number of further improvements there.
FWIW, IANAL but its considered legally dubious whether dynamic linking (i.e. what import is, and a relatively loose form of it at that), particularly when it is replaceable and not essential to the program's function (e.g. an optional accelerator) would actually hold up in court as constituting a derived work and thus invoke the GPL. The FSF claims it generally does, but I've seen a number of other legal opinions that it likely wouldn't, or at least depend on the circumstances (which would be favorable to this case), and it has yet to be tested in court. But I digress...