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

Update docs content and process #999

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

lukaszstolarczuk
Copy link
Contributor

A few changes around docs, including:

  • moving docs into a sep. dir docs, not to be a part of scripts dir,
  • updating generate_docs.py script,
  • adding make target docs,
  • updating CI workflow,
  • changes in docs and README content.

Checklist

  • Code compiles without errors locally
  • CI workflows execute properly
  • CI workflows, not executed per PR (e.g. Nightly), execute properly
  • Extended the README/documentation

Preview of new docs: https://lukaszstolarczuk.github.io/unified-memory-framework/introduction.html

@lukaszstolarczuk lukaszstolarczuk requested a review from a team as a code owner December 17, 2024 10:59
docs/README.md Outdated Show resolved Hide resolved

# Sphinx and breathe require access to a Doxygen generated dir ('doxyxml')
# so we copy the whole content of the 'docs' dir to the build dir.
copytree(Path(script_dir), docs_build_path, dirs_exist_ok=True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps you could set the Doxygen output directory to docs output directory instead

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I tested a few variants - doxygen needs specific relation to these breathe files, and also to assets and also the the include dir... it was rather compliacted for me, I just tried to describe it a little, perhaps if anyone has a better option we could improve later

@@ -49,7 +49,9 @@
# -- Extension configuration -------------------------------------------------

# -- Options for breathe extension -------------------------------------------
breathe_projects = {project: "../../docs/xml"}
# 'doxyxml' dir is generated with Doxygen; it's supposed to be in a directory
# one above the config directory.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this relation? Can't breathe_build_directory be set explicitly to get rid of this limitation?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't ask me why, I think breathe expects a specific location of these files... probably could be improve somehow (I'm not breathe nor doxygen expert), but we only run this script in CI, for web page... so probaly not worth spending a lot of time


- name: Upload artifact
uses: actions/upload-pages-artifact@0252fc4ba7626f0298f0cf00902a25c6afc77fa8 # v3.0.0
with:
path: docs/html
path: build/docs_build/generated/html
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are to stick with the build directory for generated documentation, I think that the subdirectory docs_build could be renamed to docs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the script can be run from anywhere, so if I run this e.g. from docs dir, it would try to add a new dir docs when there's already one...

mkdir build
cd build
python3 ../docs/generate_docs.py
cmake -B build -DUMF_TESTS_FAIL_ON_SKIP=ON
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this flag?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's outdated, I think (or displayed wrong in GH)

@@ -755,6 +755,17 @@ if(UMF_FORMAT_CODE_STYLE)
endif()
endif()

find_package(Python3)
if(Python3_FOUND)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, check also the minimum required version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

CMakeLists.txt Outdated
@@ -755,6 +755,17 @@ if(UMF_FORMAT_CODE_STYLE)
endif()
endif()

find_package(Python3)
if(Python3_FOUND)
message(STATUS "Adding 'docs' target")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add: (...) for creating a documentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

docs/README.md Outdated
## make docs

To run documentation generation via build target use CMake commands below.
To enable this target, python executable has to be found in the system.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with a minimum version of...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done (don't want to duplicate the version, it's defiend below)

docs/README.md Outdated
## make docs

To run documentation generation via build target use CMake commands below.
To enable this target, python executable has to be found in the system.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add that using this target will generate docs at the build/docs_build subdir

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's described above, no matter if run via make command or by hand - it will create the sub-dir

includes:
- add missing CUDA provider in the web docs,
- proxy_pool is enabled by default, move req. info to proxy_lib,
- add links in README.
and update the script to work outside of scripts dir.
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.

2 participants