Skip to content

Generate api docs for EESSI test suite - #319

Merged
casparvl merged 40 commits into
EESSI:mainfrom
xinan1911:apidocs
Jun 30, 2025
Merged

casparvl merged 40 commits into
EESSI:mainfrom
xinan1911:apidocs

Conversation

@xinan1911

@xinan1911 xinan1911 commented Oct 10, 2024 •

Copy link
Copy Markdown
Contributor

A dependency of this PR is on EESSI/test-suite#192 as PR 192 resolves the build error for API docs

@xinan1911

Copy link
Copy Markdown
Contributor Author

@casparvl Adjusted the deploy and schedule. This is ready for test

@casparvl

Copy link
Copy Markdown
Collaborator

Just to log for myself: to test this, one needs to

  • Git clone this feature branch
  • Clone the test suite in an src subdir: mkdir src && cd src && git clone https://github.com/EESSI/test-suite.git
  • Run mkdocs serve -a localhost:<someport>
  • Create a reverse tunnel to that node using ssh -L <someport>:localhost:<someport> <host_running_mkdocs_serve>
  • Go to localhost:<someport> in your browser.

Comment thread mkdocs.yml Resolved
Comment thread .github/workflows/test.yml Outdated
uses: actions/checkout@v4
with:
repository: eessi/test-suite
path: src

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why don't we just do this without path, i.e. in the current workdir? It will still clone into a subidr test-suite by default right? No need to nest that further inside a src I'd think.

Comment thread docs/gen_ref_pages.py Outdated
# need to adjust to the test suite hook
#root = Path(__file__).parent.parent

TEST_SUITE = "src/test-suite"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Same here, this would then just be `"test-suite"

Comment thread docs/gen_ref_pages.py Outdated

import mkdocs_gen_files

# need to adjust to the test suite hook

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

There seem to be quite some comments that are no longer relevant in this gen_ref_pages.py. Would be good to clean those up.

Comment thread mkdocs.yml
- Set up environment: using_eessi/setting_up_environment.md
- Basic commands: using_eessi/basic_commands.md
- Demos: using_eessi/eessi_demos.md
- EESSI in CI: using_eessi/eessi_in_ci.md

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Not sure why this was removed here, but this has a conflict with upstream that needs to be resolved anyway. I guess that'll sort this out too.

Comment thread mkdocs.yml Outdated
default_handler: python
handlers:
python:
paths: [src/test-suite]

@casparvl casparvl Nov 13, 2024 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This could also be shortened to paths: [test-suite], see the above changes.

Comment thread .github/workflows/deploy.yml Outdated
uses: actions/checkout@v4
with:
repository: eessi/test-suite
path: src

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why don't we just do this without path, i.e. in the current workdir? It will still clone into a subidr test-suite by default right? No need to nest that further inside a src I'd think.

Comment thread .github/workflows/deploy.yml Outdated
# documentation: https://help.github.com/en/articles/workflow-syntax-for-github-actions
name: deploy documentation (only on push to main branch)
on:
schedule:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Actually, I don't think we want this in the regular deploy.yml. Having a cronjob that directly deploys the API docs means we have no human in the loop to check the changes to the API docs, and whether they make sense. I think the way this was implemented for the software overview in https://github.com/EESSI/docs/blob/main/.github/workflows/update_available_software.yml makes more sense for now: do a build of the docs, then create a PR based on that. It means the auto-generated docs will actually be part of this repo, i.e. the physical *.md files will be files within the EESSI/docs repo. That'll allow us to do a check on them before they get deployed.

Long term, we might want to do this fully automatically, without human in the loop. But to start with, I think the human in the loop would be a good thing (even if someone needs to keep an eye on those PRs and merge them).

@casparvl casparvl left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think the main change I'd suggest here is to not do the API docs generation as part of the deploy.yml, but in a way similar to how the update_available_software.yml workflow works (i.e. copy that workflow, and adapt it to generate the API docs instead of the available software list). This workflow creates a PR to EESSI/docs every X time (on a cronjob), which allows us to have a human in the loop to check what was generated and if that makes sense.

In the future, we could even see if the workflow could be triggered on push to the main branch of EESSI/test-suite. It seems something like that should be possible https://medium.com/hostspaceng/triggering-workflows-in-another-repository-with-github-actions-4f581f8e0ceb but that's no priority right now.

@boegel boegel changed the title Generate api docs Generate api docs for EESSI test suite Nov 13, 2024
casparvl pushed a commit to casparvl/test-suite that referenced this pull request May 15, 2025
satishskamath added a commit to EESSI/test-suite that referenced this pull request May 15, 2025
@laraPPr

laraPPr commented Jun 25, 2025

Copy link
Copy Markdown
Collaborator

Ok I wanted to get this one over the finish line so made the updates that I wanted.
but now it is failing with

ERROR   -  mkdocstrings: eessi.testsuite.tests.apps.openfoam.openfoam could

           not be found

ERROR   -  Error reading page

           'testsuite_api/eessi/testsuite/tests/apps/openfoam/openfoam.md':

ERROR   -  Could not collect 'eessi.testsuite.tests.apps.openfoam.openfoam'

@laraPPr

laraPPr commented Jun 25, 2025

Copy link
Copy Markdown
Collaborator

Ok I wanted to get this one over the finish line so made the updates that I wanted. but now it is failing with

ERROR   -  mkdocstrings: eessi.testsuite.tests.apps.openfoam.openfoam could

           not be found

ERROR   -  Error reading page

           'testsuite_api/eessi/testsuite/tests/apps/openfoam/openfoam.md':

ERROR   -  Could not collect 'eessi.testsuite.tests.apps.openfoam.openfoam'

@satishskamath Can you look into those missing docstrings?

@laraPPr

laraPPr commented Jun 25, 2025

Copy link
Copy Markdown
Collaborator

I'll also try to resolve the merge conflicts

@satishskamath

Copy link
Copy Markdown
Collaborator

Ok I wanted to get this one over the finish line so made the updates that I wanted. but now it is failing with

ERROR   -  mkdocstrings: eessi.testsuite.tests.apps.openfoam.openfoam could

           not be found

ERROR   -  Error reading page

           'testsuite_api/eessi/testsuite/tests/apps/openfoam/openfoam.md':

ERROR   -  Could not collect 'eessi.testsuite.tests.apps.openfoam.openfoam'

@satishskamath Can you look into those missing docstrings?

Will take a look into it.

satishskamath added a commit to EESSI/test-suite that referenced this pull request Jun 26, 2025
This file added for generation of docs. Refer to the following PR:
EESSI/docs#319
@satishskamath

Copy link
Copy Markdown
Collaborator

@laraPPr Created EESSI/test-suite#271 to fix the openfoam ERRORs here. Can you merge it?

Comment thread .github/workflows/test.yml Resolved
@laraPPr

laraPPr commented Jun 26, 2025

Copy link
Copy Markdown
Collaborator

@casparvl we are gonna need a new release of the test-suite but than this pr should be ready to merge

@smoors smoors left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@casparvl casparvl left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm too :)

@casparvl
casparvl dismissed laraPPr’s stale review June 30, 2025 11:38

All points have been taken care of - partially by @laraPPr herself.

@casparvl
casparvl merged commit 0a76877 into EESSI:main Jun 30, 2025
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.

6 participants