Adds a tox environment test-readme (not run by default) that tests (most of) the code blocks in README.md.
Also some corresponding changes to the README:
Remove all the import ops and import scenario lines - these seem like noise and are implied I think.
Remove "from charm import Charm" type lines and "class MyCharm(...): ..." lines - these also seem like noise, although they are a little bit less implied. I could add a "here is the code that's used throughout the doc" section at the top if that would be better.
Flesh out a couple of examples a small amount so that the various asserts work.
Fix a few bugs that had crept in (the kind of ones that running this tox command would catch).
Adds a tox environment
test-readme
(not run by default) that tests (most of) the code blocks in README.md.Also some corresponding changes to the README:
import ops
andimport scenario
lines - these seem like noise and are implied I think.