define_05_docs¶
Document Build and Deploy Automation for Python Projects.
- class pywf_internal_proprietary.define_05_docs.PyWfDocs[source]¶
Namespace class for document related automation.
- build_doc(real_run: bool = True, verbose: bool = True)[source]¶
Use sphinx doc to build documentation site locally. It set the necessary environment variables so that the
make htmlcommand can build the HTML successfully.Run:
sphinx-build -M html docs/source docs/build
- view_doc(real_run: bool = True, verbose: bool = True)[source]¶
View documentation site built locally in web browser.
It is usually at the
${dir_project_root}/build/html/index.htmlRun:
# For MacOS / Linux open build/html/index.html # For Windows start build/html/index.html
- deploy_versioned_doc(bucket: str | None = None, prefix: str = 'projects/', aws_profile: str | None = None, real_run: bool = True, verbose: bool = True) bool[source]¶
Deploy versioned document to AWS S3.
The S3 bucket has to enable static website hosting. The document site will be uploaded to
s3://${bucket}/${prefix}${package_name}/${package_version}/
- deploy_latest_doc(bucket: str | None = None, prefix: str = 'projects/', aws_profile: str | None = None, real_run: bool = True, verbose: bool = True) bool[source]¶
Deploy the latest document to AWS S3.
The S3 bucket has to enable static website hosting. The document site will be uploaded to
s3://${bucket}/${prefix}${package_name}/latest/