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

Integrate the 'sphinx-apidoc' command in the setuptools command #3485

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@stephenfin
Contributor

stephenfin commented Mar 1, 2017

Subject: Integrate the sphinx-apidoc command in the setuptools command

Feature or Bugfix

  • Feature

Purpose

  • Integrate the sphinx-apidoc command in the setuptools command

Detail

Allow running of the 'apidoc' command before building documentation.
This necessitates three new configuration options:

  • 'apidoc'
  • 'apidoc-dir'
  • 'apidoc-exclude'

These are all documented. Anyone wanting more configurability should
continue running the 'sphinx-apidoc' command separately

Relates

stephenfin added some commits Mar 1, 2017

trivial: Use os.path.basename
Don't reinvent the wheel.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Fix #1135: Add sphinx-apidoc to setuptools
Allow running of the 'apidoc' command before building documentation.
This necessitates three new configuration options:

- 'apidoc'
- 'apidoc-dir'
- 'apidoc-exclude'

These are all documented. Anyone wanting more configurability should
continue running the 'sphinx-apidoc' command separately

Signed-off-by: Stephen Finucane <stephen@that.guru>
@tk0miya

This comment has been minimized.

Show comment
Hide comment
@tk0miya

tk0miya Mar 1, 2017

Member

Is there any advantage to integration? I think autosummary is better for such case.

@shimizukawa do you have opinion for this?

Member

tk0miya commented Mar 1, 2017

Is there any advantage to integration? I think autosummary is better for such case.

@shimizukawa do you have opinion for this?

@shimizukawa

This comment has been minimized.

Show comment
Hide comment
@shimizukawa

shimizukawa Mar 1, 2017

Member

+1 to tk0miya.
Additionally, document uploading to PyPI (pythonhosted) has been deprecated, so I think adding a new document-related command to setup.py now is not a good idea.

refs: https://mail.python.org/pipermail/distutils-sig/2016-October/029727.html

Member

shimizukawa commented Mar 1, 2017

+1 to tk0miya.
Additionally, document uploading to PyPI (pythonhosted) has been deprecated, so I think adding a new document-related command to setup.py now is not a good idea.

refs: https://mail.python.org/pipermail/distutils-sig/2016-October/029727.html

@stephenfin

This comment has been minimized.

Show comment
Hide comment
@stephenfin

stephenfin Mar 2, 2017

Contributor

@tk0miya I'm not aware of the differences between apidoc and autosummary. Could you elaborate? Fwiw, I'm hoping to integrate the functionality that pbr provides in their build_sphinx subclass.

@shimizukawa Does this affect the build_sphinx target also or just the upload_sphinx one? I've no intention of modifying the latter.

Contributor

stephenfin commented Mar 2, 2017

@tk0miya I'm not aware of the differences between apidoc and autosummary. Could you elaborate? Fwiw, I'm hoping to integrate the functionality that pbr provides in their build_sphinx subclass.

@shimizukawa Does this affect the build_sphinx target also or just the upload_sphinx one? I've no intention of modifying the latter.

@tk0miya

This comment has been minimized.

Show comment
Hide comment
@tk0miya

tk0miya Mar 4, 2017

Member

With my very less knowledge about auto* extensions, autosummary with autosummary_generate option works same as sphinx-apidoc command.
@shimizukawa is my understanding wrong?

BTW, I could not review and maintain them because I'm not good at autodoc, autosummary and apidoc modules.
So if you want integrate pbr with Sphinx, I need someone become the maintainer of these modules.

Member

tk0miya commented Mar 4, 2017

With my very less knowledge about auto* extensions, autosummary with autosummary_generate option works same as sphinx-apidoc command.
@shimizukawa is my understanding wrong?

BTW, I could not review and maintain them because I'm not good at autodoc, autosummary and apidoc modules.
So if you want integrate pbr with Sphinx, I need someone become the maintainer of these modules.

@shimizukawa

This comment has been minimized.

Show comment
Hide comment
@shimizukawa

shimizukawa Mar 6, 2017

Member

Does this affect the build_sphinx target also or just the upload_sphinx one?

@stephenfin build_sphinx is not affected by the deprecation of upload_sphinx. I was thinking that the two were indivisible, because I thought that build_sphinx is necessary to upload_sphinx with setup.py command.

@tk0miya command name of autosummary is sphinx-autogen, so sphinx-apidoc is not be able to replace with autosummary_generate feature.

Member

shimizukawa commented Mar 6, 2017

Does this affect the build_sphinx target also or just the upload_sphinx one?

@stephenfin build_sphinx is not affected by the deprecation of upload_sphinx. I was thinking that the two were indivisible, because I thought that build_sphinx is necessary to upload_sphinx with setup.py command.

@tk0miya command name of autosummary is sphinx-autogen, so sphinx-apidoc is not be able to replace with autosummary_generate feature.

@stephenfin

This comment has been minimized.

Show comment
Hide comment
@stephenfin

stephenfin Mar 21, 2017

Contributor

@tk0miya command name of autosummary is sphinx-autogen, so sphinx-apidoc is not be able to replace with autosummary_generate feature.

@shimizukawa So they're different features, right? Have I taken the correct approach here?

BTW, I could not review and maintain them because I'm not good at autodoc, autosummary and apidoc modules.
So if you want integrate pbr with Sphinx, I need someone become the maintainer of these modules.

@tk0miya I'm afraid I'm in the same boat. Who is the maintainer of these, if anyone?

Contributor

stephenfin commented Mar 21, 2017

@tk0miya command name of autosummary is sphinx-autogen, so sphinx-apidoc is not be able to replace with autosummary_generate feature.

@shimizukawa So they're different features, right? Have I taken the correct approach here?

BTW, I could not review and maintain them because I'm not good at autodoc, autosummary and apidoc modules.
So if you want integrate pbr with Sphinx, I need someone become the maintainer of these modules.

@tk0miya I'm afraid I'm in the same boat. Who is the maintainer of these, if anyone?

@tk0miya

This comment has been minimized.

Show comment
Hide comment
@tk0miya

tk0miya Mar 21, 2017

Member

I'm afraid I'm in the same boat. Who is the maintainer of these, if anyone?

TBH, there are no active maintainers for them.
I feel Sphinx is too large to maintenance in few members. So I'd like to keep sphinx-core simple.
(Especially, autodoc and autosummary are very complicated to understand its design...)

Member

tk0miya commented Mar 21, 2017

I'm afraid I'm in the same boat. Who is the maintainer of these, if anyone?

TBH, there are no active maintainers for them.
I feel Sphinx is too large to maintenance in few members. So I'd like to keep sphinx-core simple.
(Especially, autodoc and autosummary are very complicated to understand its design...)

stephenfin added a commit to stephenfin/sphinx that referenced this pull request Jul 13, 2017

apidoc: Move apidoc to ext/apidoc
The 'sphinx-apidoc' tool is no longer the only kid on the block when it
comes to automatic documentation of Python projects, with the likes of
'sphinx-autoapi' in development [1] and is not really maintained. Given
the fact that the tool is tangential to Sphinx's main goal, there isn't
really anything that warrants its continue existence as a core module.

Signify this by moving the feature to 'ext'. This allows the feature to
continue to exist in the package, but indicates that stability might be
worse than one would expect from the core library.

To avoid breaking packages that are using this feature directly, such as
pbr [3], aliases for the old 'main' method are included. This is based
on what Django does and, like Django, will allow us to safely remove the
old modules in Sphinx 2.0.

[1] https://github.com/rtfd/sphinx-autoapi
[2] sphinx-doc#3485 (comment)
[3] https://github.com/django/django/blob/1.11/django/test/runner.py#L688-L695

Signed-off-by: Stephen Finucane <stephen@that.guru>

stephenfin added a commit to stephenfin/sphinx that referenced this pull request Jul 14, 2017

apidoc: Move apidoc to ext/apidoc
The 'sphinx-apidoc' tool is no longer the only kid on the block when it
comes to automatic documentation of Python projects, with the likes of
'sphinx-autoapi' in development [1] and is not really maintained. Given
the fact that the tool is tangential to Sphinx's main goal, there isn't
really anything that warrants its continue existence as a core module.

Signify this by moving the feature to 'ext'. This allows the feature to
continue to exist in the package, but indicates that stability might be
worse than one would expect from the core library.

To avoid breaking packages that are using this feature directly, such as
pbr [3], aliases for the old 'main' method are included. This is based
on what Django does and, like Django, will allow us to safely remove the
old modules in Sphinx 2.0.

[1] https://github.com/rtfd/sphinx-autoapi
[2] sphinx-doc#3485 (comment)
[3] https://github.com/django/django/blob/1.11/django/test/runner.py#L688-L695

Signed-off-by: Stephen Finucane <stephen@that.guru>

stephenfin added a commit to stephenfin/sphinx that referenced this pull request Jul 21, 2017

apidoc: Move apidoc to ext/apidoc
The 'sphinx-apidoc' tool is no longer the only kid on the block when it
comes to automatic documentation of Python projects, with the likes of
'sphinx-autoapi' in development [1] and is not really maintained. Given
the fact that the tool is tangential to Sphinx's main goal, there isn't
really anything that warrants its continue existence as a core module.

Signify this by moving the feature to 'ext'. This allows the feature to
continue to exist in the package, but indicates that stability might be
worse than one would expect from the core library.

To avoid breaking packages that are using this feature directly, such as
pbr [3], aliases for the old 'main' method are included. This is based
on what Django does and, like Django, will allow us to safely remove the
old modules in Sphinx 2.0.

[1] https://github.com/rtfd/sphinx-autoapi
[2] sphinx-doc#3485 (comment)
[3] https://github.com/django/django/blob/1.11/django/test/runner.py#L688-L695

Signed-off-by: Stephen Finucane <stephen@that.guru>

stephenfin added a commit to stephenfin/sphinx that referenced this pull request Sep 20, 2017

apidoc: Move apidoc to ext/apidoc
The 'sphinx-apidoc' tool is no longer the only kid on the block when it
comes to automatic documentation of Python projects, with the likes of
'sphinx-autoapi' in development [1], and is not really maintained. Given
the fact that the tool is tangential to Sphinx's main goal, there isn't
really anything that warrants its continue existence as a core module.

Signify this by moving the feature to 'ext'. This allows the feature to
continue to exist in the package, but indicates that stability might be
worse than one would expect from the core library.

To avoid breaking packages that are using this feature directly, such as
pbr [3], aliases for the old 'main' method are included. This is based
on what Django does and, like Django, will allow us to safely remove the
old modules in Sphinx 2.0.

[1] https://github.com/rtfd/sphinx-autoapi
[2] sphinx-doc#3485 (comment)
[3] https://github.com/django/django/blob/1.11/django/test/runner.py#L688-L695

Signed-off-by: Stephen Finucane <stephen@that.guru>

stephenfin added a commit to stephenfin/sphinx that referenced this pull request Sep 20, 2017

apidoc: Move apidoc to ext/apidoc
The 'sphinx-apidoc' tool is no longer the only kid on the block when it
comes to automatic documentation of Python projects, with the likes of
'sphinx-autoapi' in development [1], and is not really maintained. Given
the fact that the tool is tangential to Sphinx's main goal, there isn't
really anything that warrants its continue existence as a core module.

Signify this by moving the feature to 'ext'. This allows the feature to
continue to exist in the package, but indicates that stability might be
worse than one would expect from the core library.

To avoid breaking packages that are using this feature directly, such as
pbr [3], aliases for the old 'main' method are included. This is based
on what Django does and, like Django, will allow us to safely remove the
old modules in Sphinx 2.0.

[1] https://github.com/rtfd/sphinx-autoapi
[2] sphinx-doc#3485 (comment)
[3] https://github.com/django/django/blob/1.11/django/test/runner.py#L688-L695

Signed-off-by: Stephen Finucane <stephen@that.guru>

stephenfin added a commit to stephenfin/sphinx that referenced this pull request Sep 20, 2017

apidoc: Move apidoc to ext/apidoc
The 'sphinx-apidoc' tool is no longer the only kid on the block when it
comes to automatic documentation of Python projects, with the likes of
'sphinx-autoapi' in development [1], and is not really maintained. Given
the fact that the tool is tangential to Sphinx's main goal, there isn't
really anything that warrants its continue existence as a core module.

Signify this by moving the feature to 'ext'. This allows the feature to
continue to exist in the package, but indicates that stability might be
worse than one would expect from the core library.

To avoid breaking packages that are using this feature directly, such as
pbr [3], aliases for the old 'main' method are included. This is based
on what Django does and, like Django, will allow us to safely remove the
old modules in Sphinx 2.0.

[1] https://github.com/rtfd/sphinx-autoapi
[2] sphinx-doc#3485 (comment)
[3] https://github.com/django/django/blob/1.11/django/test/runner.py#L688-L695

Signed-off-by: Stephen Finucane <stephen@that.guru>

@stephenfin stephenfin closed this Oct 5, 2017

@stephenfin stephenfin deleted the stephenfin:feat/sphinx-setuptools-apidoc-integration branch Oct 5, 2017

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