#dev 2021-12-07

2021-12-07 UTC
KartikPrabhu and gRegor joined the channel
#
[snarfed]
hey jamietanna, any progress on suppressing your Bridgy Publish resends? they've crept back up again to 6-7k/day, same ~30 posts every 6-7m. not a big deal, just curious!
KartikPrabhu joined the channel
#
capjamesg[d]
[snarfed] Have you been trying to send webmentions from localhost? I just got a webmention from this URL: http://localhost/2021-09-13_my-new-social-pages-james-coffee-blog and notice the slug matched one on your site.
#
capjamesg[d]
It's no big deal because the mention does not validate anyway.
angelo joined the channel
#
jamietanna[m]
Sorry snarfed not right now. Kinda hoping to move over to https://github.com/barryf/vibrancy/ before long, but not yet taken the plunge
kogepan joined the channel
#
capjamesg
I have a few functions I'd like to package up into Python packages. They relate to various IndieWeb functions, from authorship inference to endpoint discovery. Should I package them as individual modules or create an "indieweb-utils" library or something like that?
#
capjamesg
The plan is that I could add some more useful code I have like webmention verification or reply context generation.
#
capjamesg
Or I could keep individual modules like "authorship_inference" so each one is separate.
#
capjamesg
Also, [tantek] are there any good original post discovery tests / URLs that are good for testing?
tetov-irc, digivonity and iama_hooman[d] joined the channel
#
[snarfed]
capjamesg yup, looks like me!
#
[snarfed]
re packaging, up to you!
#
[snarfed]
I'd generally suggest larger packages - this ain't node - but no hard and fast rules
#
capjamesg
Thanks!
#
capjamesg
I couldn't make a call :D
#
capjamesg
My reservation is that the utilities have quite different functions. But grouping them together makes sense because some are too small for a module on their own (i.e. URL canonicalization) and many functions pair well with each other (auth callback verification and endpoint discovery, for example).
#
capjamesg
I think I'll go with making one big package. Thanks [snarfed]++
#
Loqi
[snarfed] has 33 karma in this channel over the last year (64 in all channels)
#
capjamesg[d]
[snarfed] and/or [tantek] Would you have a moment to review a README?
#
capjamesg[d]
It's 1,300 words long.
Seb[d] joined the channel
#
capjamesg
I have just invited you to this private repo: https://github.com/capjamesg/python-indieweb-utils
alex11 joined the channel
#
[tantek]
I got a 404
#
[tantek]
I tend to agree with snarfed about start with "all-in-one" type package that suits your needs, so you don't prematurely spend time on package-foo yakshaving
#
[tantek]
I mean I take that even farther and start with all-in-one-file to avoid filenaming/folder hierarchy yakshaving
#
capjamesg
I'll invite you.
#
capjamesg
[tantek] I just invited you. There's no code in the repo, hence it is private.
#
capjamesg
"yak shaving" always makes me laugh :D
#
[tantek]
big reason I put all of cassis.js in one file
#
[snarfed]
capjamesg docs are great, glad to see you writing them!
#
[snarfed]
READMEs and home pages etc are good for information that doesn't change often. that's most of the sections here, eg features, why, installation, getting started, etc. great!
#
[snarfed]
the per-method and other code-specific docs are better left to your actual docs, which are often auto-generated from docstrings, etc. easier to keep those up to date when they live with the code itself. (also dependencies, leave those to your setup.py or requirements.txt unless they're unusual)
#
[snarfed]
also you'll eventually want a Development section with setup instructions for would-be contributors
[fluffy] joined the channel
#
[tantek]
capjamesg++ amazing! this README is looking great and certainly good enough to make public (for pull requests etc) even if the library/package itself is not yet ready for "release"
#
Loqi
capjamesg has 18 karma in this channel over the last year (49 in all channels)
#
[tantek]
I agree with some of what snarfed is saying. E.g. per-method / code-specific docs being more appropriate for the code itself or generated therefrom.
#
[snarfed]
you'll probably also want to address where (and why) it overlaps with mf2util
#
[tantek]
OTOH I'm a fan of "keep all the docs in one page" until there's a specific need/reason to split them out. e.g. brid.gy/about is a good example of that 😄
#
[snarfed]
heh true! user docs are a bit different from developer docs, not in one page vs many, but auto generating etc
#
capjamesg[d]
[snarfed] It looks like I'll need to write some docstrings 🙂 I haven't done that yet. Can you point me to a library that generates them automatically?
#
capjamesg[d]
Sorry, I meant generates documentation from docstrings. I know I need to write my own docstrings 🙂
#
capjamesg[d]
Regarding setup, the config.cfg file should auto-install any required dependencies when it is built for those who install via pip. I don't know if that carries along to local setup though. Good idea re: development section [snarfed]++
#
Loqi
[snarfed] has 34 karma in this channel over the last year (65 in all channels)
#
capjamesg[d]
[tantek]++ for the help!
#
Loqi
[tantek] has 25 karma in this channel over the last year (80 in all channels)
#
capjamesg[d]
I have all of the code ready and will open-source it. It will not be ready for production use for a bit though. I'll have to modify a few of my projects to remove this code (which has been repetitive across a number of codebases) and use the library instead.
#
capjamesg[d]
I'm so excited about this!
#
[snarfed]
capjamesg https://readthedocs.org/ is the most common service for auto generating python docs. it uses sphinx and friends, which are the standard toolchain for python
#
[snarfed]
`sphinx-build -b html html/` is a miminal command line. example output: https://granary.readthedocs.io/
#
[tantek]
capjamesg[d] re: "not be ready for production use" I mean I say that about /CASSIS except for production use on my personal site 😂
#
[tantek]
and it's been opensourced for years (10+?)
#
[fluffy]
I’d say sphinx et al are *a* standard toolchain for Python, but not *the* standard.
#
[snarfed]
[fluffy] interesting! I guess I just meant by adoption. is there another you think is more common?
#
[fluffy]
More common, no, but other things that are fairly common, there’s various simpler pydoc-consuming things, and also other static publishing systems like Pelican which could be used similarly.
#
[fluffy]
Also I feel like referring to something as “standard” implies that it’s part of the Python standard.
#
[fluffy]
Which pydoc is, but Sphinx isn’t.
#
[snarfed]
backs away slowly 😁
#
[fluffy]
but yeah you probably won’t go wrong using Sphinx
#
[fluffy]
I do wish it had support for Markdown rather than rst though, rst is… fussy.
#
[snarfed]
eh all my docs are Markdown, I just consider pandoc => sphinx the pipeline, and rst a semi-hidden implementation detail I can mostly ignore
#
[fluffy]
Ah, is there a way to do that with readthedocs?
#
capjamesg[d]
I have set up a read the docs page.
#
capjamesg[d]
Now I’ll just have to move my docs over there. I’ll need to read what the folder / doc structure looks like.
#
[fluffy]
also how does that work with things like :py:class: links?
#
capjamesg[d]
Thus far the setup process has been nice.
#
[snarfed]
pandoc on RTD, probably! I do it semi manually, https://github.com/snarfed/granary/blob/main/docs/build.sh , but not often, most of my doc changes are in docstrings
#
[snarfed]
capjamesg++
#
Loqi
capjamesg has 19 karma in this channel over the last year (50 in all channels)
#
[fluffy]
I thought rtfd made you use their own build process. But I also found their docs kind of confusing and when I set up Authl’s docs I did a minimal effort to get it working.
#
[snarfed]
you can configure it, and you can preprocess. but I don't have answers for most follow-up questions about pandoc etc 😁
#
[fluffy]
That’s fair!
#
[fluffy]
Someday I want to build sort of the opposite, a pydoc/rst -> markdown conversion process that lets Publ self-host its docs properly. (Right now publ.plaidweb.site is all hand-edited.)
#
[fluffy]
although the “how to use Publ” docs are by necessity rather different than the “here’s the internal Python API” docs, but it’d be nice to pull the latter into the former.
#
[snarfed]
oof. more self hosting is more burden. glad we all get to choose where we live on that spectrum!
lagash joined the channel
#
capjamesg[d]
[snarfed] quick point of clarification. Do I need to keep my project itself in the same repo as the docs?
#
capjamesg[d]
I’m not doing anything else today but am trying to build a mental map of what I’ll need to do.
sayanarijit[d], sarahd[d], KartikPrabhu and lagash joined the channel
#
[snarfed]
no correct/incorrect answer, but for smaller projects generally yes. (and many big ones too)
#
[tantek]
there's a general rule about proximity of metadata (e.g. docs) to data (e.g. code) to help accuracy, maintainability etc.
Darius_Dunlap[d] joined the channel
#
[snarfed]
tantek++
#
Loqi
tantek has 26 karma in this channel over the last year (81 in all channels)
KartikPrabhu joined the channel
#
capjamesg[d]
That makes sense. Thanks tantek!
#
capjamesg[d]
I greatly appreciate everyone’s help!
#
[chrisaldrich]
doubleloop[m], thanks for the details. If you need it, here's that repo for hashtag support for WordPress that will auto-create WP tags https://github.com/pfefferle/wordpress-hashtags. I'm guessing it could be modified to do the same thing but with [[wikilinks]].
#
Loqi
[pfefferle] wordpress-hashtags: A very simple WordPress-plugin to add Hashtag support to your blog posts.
[tw2113_Slack_] joined the channel
#
[tw2113_Slack_]
hmm
#
[tw2113_Slack_]
ooh, basically turns hashtags into term archive links
#
[tw2113_Slack_]
i could use that on one of my sites
[manton] joined the channel
#
[Joe_Crawford]
I’m also looking at that repo. My goal is to make a version that is not automatic and also pulls from the post title — and also adds a step where they are not automatic but suggested for import when a post is opened for editing.
#
@jimmyzelinskie
↩️ I don't know much about how this works, but could something like IndieAuth be used to support OIDC and still maintain decentralization? https://en.wikipedia.org/wiki/IndieAuth
(twitter.com/_/status/1468346968762208262)
[fluffy]1 and gRegor joined the channel
#
gRegor
jamietanna[m], when you have a moment, could you try signing in to indiebookclub to confirm the PKCE warning doesn't show on your server?
tetov-irc joined the channel