When writing the examples for the documentation, I have been saving them locally as separate files. I think it's useful to have code examples in the repository itself. Before I can commit my local files, I need to scrub them of all sensitive information and replace them with consistent os.getenv calls, which will allow all examples to be run with one set of environment variables (something like HARBOR_URL, HARBOR_USER, HARBOR_SECRET, etc.).
Additionally, the examples directory needs a README that suggests reading the actual documentation pages, because they provides additional context for each code example.
When writing the examples for the documentation, I have been saving them locally as separate files. I think it's useful to have code examples in the repository itself. Before I can commit my local files, I need to scrub them of all sensitive information and replace them with consistent
os.getenv
calls, which will allow all examples to be run with one set of environment variables (something likeHARBOR_URL
,HARBOR_USER
,HARBOR_SECRET
, etc.).Additionally, the examples directory needs a README that suggests reading the actual documentation pages, because they provides additional context for each code example.