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

Generate docs for aspects too when doing setup.py docs #5302

Open
Makman2 opened this issue Apr 1, 2018 · 8 comments
Open

Generate docs for aspects too when doing setup.py docs #5302

Makman2 opened this issue Apr 1, 2018 · 8 comments

Comments

@Makman2
Copy link
Member

Makman2 commented Apr 1, 2018

What https://github.com/coala/aspect-docs does right now should be embedded as a build-step in our setup.py docs command and put into the API docs.

Then we can archive/move to GitLab/delete that repo.

@gitmate-bot
Copy link
Collaborator

GitMate.io thinks possibly related issues are #3785 (Docs: Let setup.py docs generate them from the current repo, not installation), #1493 (setup.py: Make docs), #2536 (No generated API docs for Linter), #4501 (Fix DataClump aspect docs ), and #3869 (aspects/taste.py: Typo Error).

@lalitmee
Copy link
Contributor

lalitmee commented Apr 1, 2018

@Makman2 I would like to do this. but I need some help in understanding somethings. 😇
Actually I was having a look at setup.py just now. I think you are talkin about this code:

class BuildDocsCommand(setuptools.command.build_py.build_py):
    apidoc_command = (
        'sphinx-apidoc', '-f', '-o', 'docs', '--no-toc', 'coalib'
    )
    doc_command = ('make', '-C', 'docs', 'html', 'SPHINXOPTS=-W')

    def run(self):
        errOne = call(self.apidoc_command)
        errTwo = call(self.doc_command)
        sys.exit(errOne or errTwo)

@Makman2
Copy link
Member Author

Makman2 commented Apr 2, 2018

Yes that looks like the right location 👍

@jayvdb
Copy link
Member

jayvdb commented Apr 18, 2018

The setup.py docs as part of this issue is not important.

The generator is at https://github.com/coala/aspect-docs/blob/master/generate

If we are importing it, the first step is importing the history to this repo, otherwise it is a copyright violation. The alternative is also easy: the authors can re-import it here.

Then that generator needs to be called before sphinx and be integrated into the docs/ so that sphinx picks up the generated files.

@lalitmee
Copy link
Contributor

Yeah, actually this was the problem what I was facing in doing this issue. I was not getting that how can we import that whole repo. Since there is a file generate which builds the docs after ./generate, I was thinking that we can import that generate file here in coala. But I was not sure. I also asked for help on the gitter but no luck. 🤔

@jayvdb
Copy link
Member

jayvdb commented Apr 18, 2018

Also worth investigating is creating a sphinx plugin which does a similar job to the generate script.

@jayvdb
Copy link
Member

jayvdb commented Apr 18, 2018

Also worth considering, we have aspect metadata obtained via --json (#2467), and then convert that to rst.

@jayvdb
Copy link
Member

jayvdb commented May 1, 2018

#5426 will allow the generated docs to be viewed as part of the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants