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

Sphinx apidocs #10928

Merged
merged 2 commits into from
Sep 22, 2023
Merged

Sphinx apidocs #10928

merged 2 commits into from
Sep 22, 2023

Conversation

sarnold
Copy link
Contributor

@sarnold sarnold commented Jul 29, 2023

Description:

  • adds highlighted source/links to module references in sphinx docs
  • also adds separate ssg API module view for comparison
    • more hierarchical/compact, 100% generated from conf.py and index.rst

Rationale:

  • who doesn't want colored source code links in the API docs?
  • apidoc module is optional and independent of adding source code links

Review Hints:

  • download/view the workflow artifact
  • browse the Module References
  • note the config changes are minimal and the api/ dir is always generated

@openshift-ci
Copy link

openshift-ci bot commented Jul 29, 2023

Hi @sarnold. Thanks for your PR.

I'm waiting for a ComplianceAsCode member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci openshift-ci bot added the needs-ok-to-test Used by openshift-ci bot. label Jul 29, 2023
@github-actions
Copy link

Start a new ephemeral environment with changes proposed in this pull request:

Fedora Environment
Open in Gitpod

Oracle Linux 8 Environment
Open in Gitpod

Copy link
Member

@Mab879 Mab879 left a comment

Choose a reason for hiding this comment

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

Thanks for this PR! I would be more comfortable if we split the docs changes from the tox changes.

I also left some comments on minor issues I saw.


Note the primary tox commands given above are order-dependent, eg:

$ git clone https://github.com/VCTLabs/scap-security-guide
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
$ git clone https://github.com/VCTLabs/scap-security-guide
$ git clone https://github.com/ComplianceAsCode/content

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops! Fixed.

@@ -53,7 +54,7 @@ jobs:
git-config-email: openscap-ci@gmail.com
- name: Upload artifact if the event is pull request
uses: actions/upload-artifact@v3
if: ${{ github.event_name == 'pull_request' }}
#if: ${{ github.event_name == 'pull_request' }}
Copy link
Member

Choose a reason for hiding this comment

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

If plan on removing please just remove the line vs comment it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually I just wanted to check artifacts in my fork, so that is now restored.

@@ -0,0 +1,44 @@
# Local SCAP workflows w/o distro packages
Copy link
Member

Choose a reason for hiding this comment

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

I would rather have this under docs/manual/developer.

tox.ini Outdated
-r requirements.txt

commands =
#stubgen -m munch --export-less -o {toxinidir}
Copy link
Member

Choose a reason for hiding this comment

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

If this command is not used please remove it.

@matejak
Copy link
Member

matejak commented Aug 31, 2023

Thank you for the pull request, please don't be shy to share with us how you interact with the project, and what are the reasons behind it, because it looks like that you have built a layer of additional tooling around it in your environment.
Anyway, this PR seems to do many things at once - the summary mentions apidocs, but there are more items introduced - tox and also repolite, that are not related to apidocs documentation of this project.
Therefore, if you would like to get the tox content through as well, please split it into another PR, and as the associated configuration is quite extensive, we will need justification/documentation to be able to review the PR and to maintain the setup in the long term.
Related to that, we keep the build of the content compatible with Python 2.7 for at least one more year, and then, we will be stuck with Python 3.6 for a couple of more years, as this is the Python supported in the RHEL 8 and derived products, so I would suggest to reflect this in the tox setup as well. Of course, if the other parts of the community will require even more conservative approach, we will probably take that into the account as well.

@sarnold
Copy link
Contributor Author

sarnold commented Sep 1, 2023

Thanks for the feedback; this PR is now limited to just the Sphinx docs with a very minimal tox file and updated (docs) requirements. The actual sphinx link check command is currently commented out to make it easier to see the docs build messages in a console.

@Mab879 Mab879 added this to the 0.1.70 milestone Sep 6, 2023
@Mab879 Mab879 added the Documentation Update in project documentation. label Sep 6, 2023
Copy link
Member

@Mab879 Mab879 left a comment

Choose a reason for hiding this comment

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

Thanks for making those changes, I just have a couple of comments.

tox.ini Outdated Show resolved Hide resolved
tox.ini Outdated Show resolved Hide resolved
* this adds highlighted source/links to module references in sphinx docs,
  plus a small tox file for sphinx builds and static linting

Signed-off-by: Stephen L Arnold <sarnold@vctlabs.com>
Copy link
Member

@Mab879 Mab879 left a comment

Choose a reason for hiding this comment

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

Thanks working on this PR. I do like the API docs. I have a few items of feedback:

  1. Can you please add docs for installing tox in https://github.com/ComplianceAsCode/content/blob/master/docs/manual/developer/02_building_complianceascode.md?
  2. I think the linkchecker might be useful it seems our existing checker isn't working on docs.

@sarnold
Copy link
Contributor Author

sarnold commented Sep 20, 2023

1. Can you please add docs for installing tox in https://github.com/ComplianceAsCode/content/blob/master/docs/manual/developer/02_building_complianceascode.md?

Okay, the "best" place I could find looks like Sphinx packages unless you have another place in mind

2. I think the linkchecker might be useful it seems our existing checker isn't working on docs.

The sphinx link checker is running in commands_post so it will run regardless of the commands outcome.

* changes are in 02_building_complianceascode.md

Signed-off-by: Stephen L Arnold <sarnold@vctlabs.com>
@codeclimate
Copy link

codeclimate bot commented Sep 21, 2023

Code Climate has analyzed commit e275d0d and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 56.8% (3.0% change).

View more on Code Climate.

Copy link
Member

@Mab879 Mab879 left a comment

Choose a reason for hiding this comment

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

Thank for your work on this!

@Mab879 Mab879 added this pull request to the merge queue Sep 22, 2023
@Mab879 Mab879 removed this pull request from the merge queue due to the queue being cleared Sep 22, 2023
@Mab879 Mab879 merged commit 85221e4 into ComplianceAsCode:master Sep 22, 2023
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Update in project documentation. needs-ok-to-test Used by openshift-ci bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants