Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from using Sphinx to Mkdocs when building documentation #198

Closed
wants to merge 70 commits into from

Conversation

nfelt14
Copy link
Collaborator

@nfelt14 nfelt14 commented May 1, 2024

Proposed changes

Currently the documentation build takes over 60 minutes and uses almost 12 GB of RAM. This makes it incompatible with the ReadtheDocs servers and very hard to check changes locally.

This update switches the documentation build system from Sphinx to Mkdocs. This resulted in a new build time of just over 7 minutes while only using ~5.5 GB of RAM. This should enable us to switch to using ReadtheDocs for documentation hosting.

This PR also includes updates to the main README, in order to make it render properly on GitHub and PyPI.

fixes #77

Important

In order to view the pre-built documentation from the artifacts, you need to run python -m http.server -d <path_to_doc_folder>

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • CI/CD update (an update to the CI/CD workflows, scripts, and/or configurations)
  • Documentation update (an update to enhance the user experience when reading through the docs)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have followed the guidelines in the CONTRIBUTING document
  • I have signed the CLA
  • I have checked to ensure there aren't other open Pull Requests for the same update/change
  • I have performed a self-review of my code
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • Basic linting passes locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have added necessary documentation (if appropriate)
  • I have updated the Changelog with a brief description of my changes

@nfelt14 nfelt14 requested review from a team as code owners May 1, 2024 21:54
@nfelt14 nfelt14 temporarily deployed to package-build May 1, 2024 21:54 — with GitHub Actions Inactive
Copy link

codecov bot commented May 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (008e2b2) to head (f2047d2).
Report is 23 commits behind head on main.

❗ Current head f2047d2 differs from pull request most recent head 4ab9474. Consider uploading reports for the commit 4ab9474 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##              main      #198    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files          170       171     +1     
  Lines         3804      4269   +465     
  Branches       643       643            
==========================================
+ Hits          3804      4269   +465     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nfelt14 nfelt14 temporarily deployed to package-build May 1, 2024 22:06 — with GitHub Actions Inactive
@nfelt14 nfelt14 temporarily deployed to package-build May 1, 2024 22:29 — with GitHub Actions Inactive
@nfelt14 nfelt14 temporarily deployed to package-build May 1, 2024 22:55 — with GitHub Actions Inactive
Copy link

github-actions bot commented May 1, 2024

Test Results (macos)

path passed subtotal
tests/test_afgs.py 2 2
tests/test_alias_dict.py 1 1
tests/test_all_device_drivers.py 1 1
tests/test_alternative_connection_addresses.py 17 17
tests/test_awgs.py 1 1
tests/test_config_parser.py 34 34
tests/test_device_manager.py 18 18
tests/test_devices_legacy_tsp_ieee_cmds.py 3 3
tests/test_helpers.py 68 68
tests/test_ieee_scpi_cmds.py 1 1
tests/test_margin_testers.py 5 5
tests/test_pi_device.py 1 1
tests/test_psu.py 1 1
tests/test_rest_api_device.py 10 10
tests/test_scopes.py 6 6
tests/test_singleton.py 1 1
tests/test_smu.py 4 4
tests/test_ss.py 1 1
tests/test_tm_devices.py 4 4
TOTAL 179 179

Link to workflow run

Copy link

github-actions bot commented May 1, 2024

Test Results (ubuntu)

path passed subtotal
tests/test_afgs.py 2 2
tests/test_alias_dict.py 1 1
tests/test_all_device_drivers.py 1 1
tests/test_alternative_connection_addresses.py 17 17
tests/test_awgs.py 1 1
tests/test_config_parser.py 34 34
tests/test_device_manager.py 18 18
tests/test_devices_legacy_tsp_ieee_cmds.py 3 3
tests/test_helpers.py 68 68
tests/test_ieee_scpi_cmds.py 1 1
tests/test_margin_testers.py 5 5
tests/test_pi_device.py 1 1
tests/test_psu.py 1 1
tests/test_rest_api_device.py 10 10
tests/test_scopes.py 6 6
tests/test_singleton.py 1 1
tests/test_smu.py 4 4
tests/test_ss.py 1 1
tests/test_tm_devices.py 4 4
TOTAL 179 179

Link to workflow run

Copy link

github-actions bot commented May 1, 2024

Test Results (windows)

path passed subtotal
tests\test_afgs.py 2 2
tests\test_alias_dict.py 1 1
tests\test_all_device_drivers.py 1 1
tests\test_alternative_connection_addresses.py 17 17
tests\test_awgs.py 1 1
tests\test_config_parser.py 34 34
tests\test_device_manager.py 18 18
tests\test_devices_legacy_tsp_ieee_cmds.py 3 3
tests\test_helpers.py 68 68
tests\test_ieee_scpi_cmds.py 1 1
tests\test_margin_testers.py 5 5
tests\test_pi_device.py 1 1
tests\test_psu.py 1 1
tests\test_rest_api_device.py 10 10
tests\test_scopes.py 6 6
tests\test_singleton.py 1 1
tests\test_smu.py 4 4
tests\test_ss.py 1 1
tests\test_tm_devices.py 4 4
TOTAL 179 179

Link to workflow run

@nfelt14 nfelt14 enabled auto-merge (squash) May 1, 2024 23:17
ldantek
ldantek previously approved these changes May 1, 2024
@nfelt14 nfelt14 disabled auto-merge May 2, 2024 00:58
v12ganesh and others added 15 commits May 1, 2024 18:21
…MDO4K, MSO4K and DPO4K models to work properly. (tektronix#173)

Co-authored-by: Shashank P <[email protected]>
Signed-off-by: Nicholas Felt <[email protected]>
* Update README.rst

Read Me update for TekVISA support and python API validation status.

Signed-off-by: adityakb <[email protected]>

* Update CHANGELOG.md

Signed-off-by: adityakb <[email protected]>

* Updated CHANGELOG.md

Co-authored-by: Nicholas Felt <[email protected]>
Signed-off-by: Shashank P <[email protected]>

* Update README.rst

Mentioning TekVISA version 4.2.0.

Signed-off-by: adityakb <[email protected]>

---------

Signed-off-by: adityakb <[email protected]>
Signed-off-by: Shashank P <[email protected]>
Signed-off-by: Nicholas Felt <[email protected]>
Co-authored-by: Shashank P <[email protected]>
Co-authored-by: Nicholas Felt <[email protected]>
Signed-off-by: Nicholas Felt <[email protected]>
…tronix#174)

* docs: Update readme admonition to make it display better in GitHub.

Signed-off-by: Nicholas Felt <[email protected]>
…te (tektronix#176)

* python-deps(deps-dev): bump the python-dependencies group with 1 update

Updates the requirements on [pyright](https://github.com/RobertCraigie/pyright-python) to permit the latest version.

Updates `pyright` to 1.1.356
- [Release notes](https://github.com/RobertCraigie/pyright-python/releases)
- [Commits](RobertCraigie/pyright-python@v1.1.355...v1.1.356)

---
updated-dependencies:
- dependency-name: pyright
  dependency-type: direct:development
  dependency-group: python-dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>

* ci: Update python linters and pre-commit dependencies.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tektronix Bot <[email protected]>
Signed-off-by: Nicholas Felt <[email protected]>
…es (tektronix#177)

Bumps the gh-actions-dependencies group with 2 updates: [hynek/build-and-inspect-python-package](https://github.com/hynek/build-and-inspect-python-package) and [python-semantic-release/python-semantic-release](https://github.com/python-semantic-release/python-semantic-release).

Updates `hynek/build-and-inspect-python-package` from 2.0.2 to 2.2.0
- [Release notes](https://github.com/hynek/build-and-inspect-python-package/releases)
- [Changelog](https://github.com/hynek/build-and-inspect-python-package/blob/main/CHANGELOG.md)
- [Commits](hynek/build-and-inspect-python-package@v2.0.2...v2.2.0)

Updates `python-semantic-release/python-semantic-release` from 9.3.1 to 9.4.0
- [Release notes](https://github.com/python-semantic-release/python-semantic-release/releases)
- [Changelog](https://github.com/python-semantic-release/python-semantic-release/blob/master/CHANGELOG.md)
- [Commits](python-semantic-release/python-semantic-release@v9.3.1...v9.4.0)

---
updated-dependencies:
- dependency-name: hynek/build-and-inspect-python-package
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: gh-actions-dependencies
- dependency-name: python-semantic-release/python-semantic-release
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: gh-actions-dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Nicholas Felt <[email protected]>
* ci: Update job to check for file existence to force compliance with GitHub's Community Standards.

Signed-off-by: Nicholas Felt <[email protected]>
* ci: Convert Package Build workflow into a re-usable workflow.

* ci: Update workflow to set conditional environment variable for usage in workflow.

* ci: Convert assign-reviewers.yml to a re-usable workflow.

* ci: Convert codeql-analysis.yml to a re-usable workflow.

* ci: Convert dependency-review.yml to a re-usable workflow.

* ci: Convert sbom-scan.yml to a re-usable workflow.

* ci: Convert tek-repo-lint.yml to a re-usable workflow.

* ci: Convert update-python-and-pre-commit-dependencies.yml to a re-usable workflow.

* ci: Convert test-code.yml to a re-usable workflow.

* ci: Update descriptions to end in periods.

* ci: Add quotes around package name.

* ci: Update reusable workflows.

---------

Signed-off-by: Nicholas Felt <[email protected]>
)

* ci: Add workflow to publish test results.

* ci: update workflow permissions

* ci: Update workflow job condition.

* ci: Update publish-test-results.yml to correctly publish results.

* ci: Filter artifacts downloaded to speed up job.

* ci: Update workflows to enable posting a comment on Pull Requests coming from forks.

---------

Signed-off-by: Nicholas Felt <[email protected]>
* ci: Update test-code.yml to install documentation dependencies in both testing jobs.

Signed-off-by: Nicholas Felt <[email protected]>

* ci: Convert package-testpypi.yml to a reusable workflow.

Signed-off-by: Nicholas Felt <[email protected]>

* ci: Convert package-release.yml to a reusable workflow.

Signed-off-by: Nicholas Felt <[email protected]>

---------

Signed-off-by: Nicholas Felt <[email protected]>
…x#185)

* ci: Update package-release.yml and package-testpypi.yml to use new method of checking repo name.

---------

Signed-off-by: Nicholas Felt <[email protected]>
Automatically generated by python-semantic-release

Signed-off-by: Nicholas Felt <[email protected]>
…b releases (tektronix#186)

* ci: Add permissions for the SBOM workflow to be able to add artifacts to releases.

---------

Signed-off-by: Nicholas Felt <[email protected]>
Automatically generated by python-semantic-release

Signed-off-by: Nicholas Felt <[email protected]>
…surement. (tektronix#187)

* Update get_acquisition_data.py to select different sources for measurements.

Signed-off-by: Shashank P <[email protected]>

* Update CHANGELOG.md

Update to Changed from Fixed in description of commit.

Co-authored-by: Nicholas Felt <[email protected]>
Signed-off-by: Shashank P <[email protected]>

---------

Signed-off-by: Shashank P <[email protected]>
Co-authored-by: Nicholas Felt <[email protected]>
Signed-off-by: Nicholas Felt <[email protected]>
nfelt14 and others added 25 commits May 1, 2024 18:26
…pi to crash when building docs.

Signed-off-by: Nicholas Felt <[email protected]>
…itHub Flavored Markdown with search and replace capability to eliminate the need to modify file contents on-disk.
…o the path to attempt to reduce the memory consumption when building the docs.

Signed-off-by: Nicholas Felt <[email protected]>
…ory consumption during doc builds.

Signed-off-by: Nicholas Felt <[email protected]>
Signed-off-by: Nicholas Felt <[email protected]>
…erty display and attempt to fix the doc build memory issues.

Signed-off-by: Nicholas Felt <[email protected]>
* docs: Switch to using mkdocs.
* docs: Got basic code syntax highlighting working.
* docs: Override the theme.js file to hide open/close buttons that don't need to be there.
* docs: Added the ability to load in external code files to the docs.
* docs: Updated examples in the basic_usage.md file.
* docs: Update known words.
* docs: Update links to repo.
* docs: Update links to repos and update glossary plugin.
* test: Got doc tests working.
* test: Fixed the linkchecker test.
* docs: Update tox config for docs.
* docs: Start working on API docs.
* docs: Update glossary plugin to use a version that supports unicode characters as glossary entries.
* ci: Add file sorter for known_words.txt.
* ci: Remove unneeded pre-commit hook.
* docs: Started working on making the API docs look good.
* docs: Got the documentation mostly working.
* docs: Add custom template for package files.
* fix: Add missing init file.
* docs: Updated all drivers with init methods to enable docs to build properly.
* docs: Update the auto-generated commands to better render in the documentation.
* docs: Implement a macro that will create mermaid class diagrams.
* refactor: Move a class only used for type hinting into a new module and convert to a private class.
* test: Fix a test based on new file paths.
* docs: Remove unused css file and update links in python docstrings.
* docs: Install the package when building docs to allow diagrams to be created properly.
* docs: Update site path when building docs with tox.
* docs: Update auto-generated python docstrings to render properly.
* ci: Lock docutils version while the bad version is still on PyPI.
* docs: Remove unneeded js files.
* docs: Add links to API in various docs.
* ci: Remove a pre-commit hook that is failing in some CI environments.
* style: Use Python 3.8 syntax for type hinting.
* docs: Update method of including python code snippets to allow mdformat to be used to format markdown files.
* docs: Update config to correctly set the enabled key.
…es (tektronix#191)

Bumps the gh-actions-dependencies group with 2 updates: [hynek/build-and-inspect-python-package](https://github.com/hynek/build-and-inspect-python-package) and [python-semantic-release/python-semantic-release](https://github.com/python-semantic-release/python-semantic-release).

Updates `hynek/build-and-inspect-python-package` from 2.2.1 to 2.4.0
- [Release notes](https://github.com/hynek/build-and-inspect-python-package/releases)
- [Changelog](https://github.com/hynek/build-and-inspect-python-package/blob/main/CHANGELOG.md)
- [Commits](hynek/build-and-inspect-python-package@v2.2.1...v2.4.0)

Updates `python-semantic-release/python-semantic-release` from 9.4.1 to 9.4.2
- [Release notes](https://github.com/python-semantic-release/python-semantic-release/releases)
- [Changelog](https://github.com/python-semantic-release/python-semantic-release/blob/master/CHANGELOG.md)
- [Commits](python-semantic-release/python-semantic-release@v9.4.1...v9.4.2)

---
updated-dependencies:
- dependency-name: hynek/build-and-inspect-python-package
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: gh-actions-dependencies
- dependency-name: python-semantic-release/python-semantic-release
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: gh-actions-dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Nicholas Felt <[email protected]>
…ektronix#192)

* python-deps(deps): bump the python-dependencies group with 2 updates

Updates the requirements on [pyright](https://github.com/RobertCraigie/pyright-python) and [ruff](https://github.com/astral-sh/ruff) to permit the latest version.

Updates `pyright` to 1.1.358
- [Release notes](https://github.com/RobertCraigie/pyright-python/releases)
- [Commits](RobertCraigie/pyright-python@v1.1.357...v1.1.358)

Updates `ruff` to 0.3.7
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](astral-sh/ruff@v0.3.5...v0.3.7)

---
updated-dependencies:
- dependency-name: pyright
  dependency-type: direct:development
  dependency-group: python-dependencies
- dependency-name: ruff
  dependency-type: direct:production
  dependency-group: python-dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>

* Update update-python-and-pre-commit-dependencies.yml to continue even if pre-commit fails.

* ci: Update pre-commit dependencies.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nicholas Felt <[email protected]>
…ektronix#195)

* python-deps(deps): bump the python-dependencies group with 2 updates

Updates the requirements on [pyright](https://github.com/RobertCraigie/pyright-python) and [ruff](https://github.com/astral-sh/ruff) to permit the latest version.

Updates `pyright` to 1.1.360
- [Release notes](https://github.com/RobertCraigie/pyright-python/releases)
- [Commits](RobertCraigie/pyright-python@v1.1.359...v1.1.360)

Updates `ruff` to 0.4.2
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](astral-sh/ruff@v0.4.1...v0.4.2)

---
updated-dependencies:
- dependency-name: pyright
  dependency-type: direct:development
  dependency-group: python-dependencies
- dependency-name: ruff
  dependency-type: direct:production
  dependency-group: python-dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>

* ci: Update python linters and pre-commit dependencies.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tektronix Bot <[email protected]>
tektronix#197)

Bumps the gh-actions-dependencies group with 1 update in the / directory: [python-semantic-release/python-semantic-release](https://github.com/python-semantic-release/python-semantic-release).

Updates `python-semantic-release/python-semantic-release` from 9.4.2 to 9.6.0
- [Release notes](https://github.com/python-semantic-release/python-semantic-release/releases)
- [Changelog](https://github.com/python-semantic-release/python-semantic-release/blob/master/CHANGELOG.md)
- [Commits](python-semantic-release/python-semantic-release@v9.4.2...v9.6.0)

---
updated-dependencies:
- dependency-name: python-semantic-release/python-semantic-release
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: gh-actions-dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Nicholas Felt <[email protected]>
…ent breaking changes from affecting the package.

Signed-off-by: Nicholas Felt <[email protected]>
… and docs for repeatable builds.

Signed-off-by: Nicholas Felt <[email protected]>
Signed-off-by: Nicholas Felt <[email protected]>
@CLAassistant
Copy link

CLAassistant commented May 2, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
4 out of 6 committers have signed the CLA.

✅ v12ganesh
✅ adityakb
✅ u625355
✅ nfelt14
❌ dependabot[bot]
❌ tek-githubbot-1010
You have signed the CLA already but the status is still pending? Let us recheck it.

@nfelt14
Copy link
Collaborator Author

nfelt14 commented May 2, 2024

Closing PR to fix commit issues.

@nfelt14 nfelt14 closed this May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: ReadtheDocs builds run out of memory
7 participants