-
- Includes saturday.
- Surprised there’s no way to auto-browser-open an
index.html
from vscode. At least a context menu option.
- Remember
python -m site
to show path information, get location of site-packages, etc.
- See below for significant comparisons between different docbuilding and dochosting approaches.
- If there’s already a CNAME for a subdomain in route53, you can’t generate a cert in ACM for the toplevel domain. Delete the CNAME, create the cert, then recreate the CNAME.
- Unrelated – It’s a little annoying that you can’t add a new name (subdomain) to an existing ACM cert (you have to create a new one).
- Before you can delete an object in AWS (like a certificate), you have to remove its associations (like a load balancer). For that specific case, you can’t just update the LB to use a new cert. You have to actually go into the LB and disconnect the cert. EC2 -> Load Balancers -> Listeners -> View Details -> Certificates tab -> Remove.
- SBSC. Docs. Nice: https://docs.southbaysupercontest.com/
- https://gitlab.com/bmahlstedt/supercontest/-/issues/197
- Autodocumented the whole supercontest. This involved writing the infra, moving some existing readmes around, as well as documenting every single member of the app.
- Plugged into lint for autoverification / CI.
- Switched from google style docstrings to sphinx style, normal rst. More compact.
- Hosted on RTD. Configured it all. Integrated with gitlab, webhook on change, new version on MRs.
- Switched to my domain, created DNS records (and certs) for subdomain docs.southbaysupercontest.com.
- Ended up building with autosummary. No calls to autogen needed. And no apidoc. Wrote a custom template so that
:members:
of automodule
are all populated (it’s just jinja, so you do some pretty flexible logic here). I don’t just want autosummaries, I want the actual autodocs (duh – this should be the default).
- Now I can (and did) use auto references within docstrings (eg “this function has a param which is the return of this other func”).
- Vscode ext “autodocstring – python docstring generator” for some easy automation / completion of docstring skeletons. Saves a little time.
- Remember to use
#:
(with the colon) to document a module variable/attribute. Otherwise it will not be documented or included in the summaries.
- SBSC. CI.
- Made it so
.gitlab-ci.yml
calls the make targets for: black, pylint, pyright, bandit, and pytest.
- Black is a special case – I don’t want the pipeline autoformatting changes (nor committing), so we run with
--check
which simply returns 0 if no changes or 1 if there would be changes.
- Did a little research into sharing caches between jobs/stages/branches/etc. It’s all configurable. The caches are a little different than artifacts obviously. Artifacts persist. Caches are scoped to specific keys (in your control).
- You use
poetry config virtualenvs.in-project true
to make the venv get created locally (which gitlab caches require, can’t go out of the build dir).
- Implemented the
extends
keyword to reuse common sections in the CI yml.