Skip to content

Add Travis-CI tests for docs#1784

Merged
steven-esser merged 7 commits into
aboutcode-org:developfrom
AyanSinhaMahapatra:develop
Nov 1, 2019
Merged

Add Travis-CI tests for docs#1784
steven-esser merged 7 commits into
aboutcode-org:developfrom
AyanSinhaMahapatra:develop

Conversation

@AyanSinhaMahapatra

Copy link
Copy Markdown
Member

This PR adds Travis-CI checks for documentation, similar to that in aboutcode. It also adds the requirements file for ReadTheDocs build and minor doc style fixes.

This commit adds minor changes to comply with doc style guides.
Also fixes a minor warning in conf.py.

Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
This commit adds to Travis-CI checks for the documentation, similar to aboutcode.
Adds sphinx-build, linkcheck and doc8 style checks for the docs.

Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
@AyanSinhaMahapatra

Copy link
Copy Markdown
Member Author

@pombredanne @MaJuRG The ./configure fails for changes made in setup.py, and I need help with that.

@pombredanne

Copy link
Copy Markdown
Member

@MaJuRG any idea why this fails?

@steven-esser

Copy link
Copy Markdown
Contributor

@AyanSinhaMahapatra Yes

@AyanSinhaMahapatra

AyanSinhaMahapatra commented Oct 24, 2019

Copy link
Copy Markdown
Member Author

I think packages mentioned in setup.py has to have their corresponding wheels located in thirdparty/. Now, do we actually need to do that in this case? If we want to install sphinx, doc8 just for the tests, then we can just run pip install from the CI jobs, that is just placing them explicitly in the .travis.yml file. Should I just do that instead of trying to get Sphinx and other libraries installed in the virtualenv created by scancode at the time of configuring?

@AyanSinhaMahapatra

Copy link
Copy Markdown
Member Author

Sorry, Updated the comment.

@steven-esser

steven-esser commented Oct 24, 2019

Copy link
Copy Markdown
Contributor

@AyanSinhaMahapatra In this case I think we will need the .whl files added to the thirdparty/ directory

We want people to be able to build the docs locally as well, not just on the CI systems.

ScanCode is a bit unconventional in this way (i.e. having to add deps manually etc), but ScanCode is used in many places where there may be no external internet connection so we want to be fully self-contained for these types of scenarios.

@AyanSinhaMahapatra

Copy link
Copy Markdown
Member Author

@MaJuRG I see there are .LICENSE and .ABOUT files also, along with the .whl files. So the LICENSE file is the same as the LICENSE file inside the wheel (and renamed similar to wheel name)? Also, where do I get corresponding ABOUT files?

@AyanSinhaMahapatra

Copy link
Copy Markdown
Member Author

Also, Sphinx itself has another dozen requirements. Do I add wheels for them also?

@steven-esser

Copy link
Copy Markdown
Contributor

@AyanSinhaMahapatra I believe we will want to add the sphix deps as well, if they are not already present in the thirdparty directory.

We probably do not need to worry about the .LICENSE files for sphinx and its deps, BUT we will want to have ABOUT files for these. You can use the existing ABOUT files in the thirdparty repo as a skeleton of sorts.

See: https://github.com/nexB/aboutcode-toolkit/blob/develop/SPECIFICATION.rst for details on ABOUT files

@AyanSinhaMahapatra

AyanSinhaMahapatra commented Oct 25, 2019

Copy link
Copy Markdown
Member Author

@pombredanne @MaJuRG Since we are enabling local documentation builds by installing dependencies in the time of initial configuration, isn't it a good idea also build the documentation then inside ./configure (command is make html, inside docs) and maybe add a CLI option into scancode like --open-docs to open the locally available documentation (command is see docs/build/html/index.html) in a browser window?

Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
@steven-esser

Copy link
Copy Markdown
Contributor

@AyanSinhaMahapatra Not sure that we want to build docs have automatically on ./configure.

I think having the users run make html in the docs/ dir is enough, as long as we document this somewhere.

@steven-esser

Copy link
Copy Markdown
Contributor

This looks good to me @AyanSinhaMahapatra, however the travis build is failing for some reason.

I think it got hung up on installing some base packages for macOS. I think if you re-trigger the build we should be good to go.

@AyanSinhaMahapatra

Copy link
Copy Markdown
Member Author

I think having the users run make html in the docs/ dir is enough, as long as we document this somewhere.

Sure! I'll add that somewhere. Triggering a rebuild so the tests pass.

Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
@AyanSinhaMahapatra

Copy link
Copy Markdown
Member Author

@MaJuRG Checks Passed.

@steven-esser

Copy link
Copy Markdown
Contributor

@pombredanne This looks good to me, can you take a look and merge?

@pombredanne pombredanne left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

All good! Thanks!

@steven-esser
steven-esser merged commit 4502055 into aboutcode-org:develop Nov 1, 2019
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.

3 participants