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

Replace custom theme with sphinx-ansible-theme #856

Merged
merged 1 commit into from
Jun 30, 2020
Merged

Replace custom theme with sphinx-ansible-theme #856

merged 1 commit into from
Jun 30, 2020

Conversation

ssbarnea
Copy link
Member

@ssbarnea ssbarnea commented Jun 23, 2020

  • remove custom sphinx theme from our codebase
  • reuse shared sphinx-ansible-theme
  • removed docs makefiles

@ssbarnea ssbarnea requested a review from webknjaz June 24, 2020 06:49
Copy link
Member

@webknjaz webknjaz left a comment

Choose a reason for hiding this comment

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

It's easier to merge #858 first. This way you'd not have to modify makefile stuff making this change easier to accept too.

@ssbarnea ssbarnea changed the title WIP: Replace custom theme with sphinx-ansible-theme Replace custom theme with sphinx-ansible-theme Jun 26, 2020
@ssbarnea ssbarnea marked this pull request as ready for review June 26, 2020 19:29
@ssbarnea ssbarnea requested a review from webknjaz June 26, 2020 19:30
docs/docsite/rst/conf.py Outdated Show resolved Hide resolved
# the extension builds 404.rst into a location-agnostic 404 page
#
# default is `en` - using this for the sub-site:
notfound_default_language = "ansible"
Copy link
Member

Choose a reason for hiding this comment

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

What is this?

Copy link
Member Author

@ssbarnea ssbarnea Jun 29, 2020

Choose a reason for hiding this comment

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

Got it from Ansible itself, a guess is default code-block when language is not mentioned i or unknown.

docs/docsite/rst/conf.py Outdated Show resolved Hide resolved
Copy link
Member

@webknjaz webknjaz left a comment

Choose a reason for hiding this comment

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

i've marked some things that obviously don't belong here.

README.rst Outdated Show resolved Hide resolved
lib/ansiblelint/__init__.py Outdated Show resolved Hide resolved
setup.cfg Outdated Show resolved Hide resolved
tox.ini Outdated Show resolved Hide resolved
docs/docsite/Makefile.sphinx Outdated Show resolved Hide resolved
.readthedocs.yml Outdated
Comment on lines 1 to 15
---
version: 2

formats: all

build:
image: latest

python:
version: 3.7
install:
- method: pip
path: .
extra_requirements:
- docs
Copy link
Member

Choose a reason for hiding this comment

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

out of scope

docs/docsite/rst/conf.py Outdated Show resolved Hide resolved
docs/docsite/rst/conf.py Outdated Show resolved Hide resolved
'github_version': 'master/docs/',
'current_version': version,
'latest_version': 'latest',
# list specifically out of order to make latest work
Copy link
Member

Choose a reason for hiding this comment

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

?

docs/docsite/rst/conf.py Outdated Show resolved Hide resolved
.flake8 Outdated Show resolved Hide resolved
.readthedocs.yml Outdated Show resolved Hide resolved

import sys
import os
import datetime
Copy link
Member

Choose a reason for hiding this comment

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

Refactoring this module is out of scope. The change should only contain the integration of the new theme.

docs/requirements.txt Outdated Show resolved Hide resolved
lib/ansiblelint/__init__.py Outdated Show resolved Hide resolved
tox.ini Outdated Show resolved Hide resolved
@webknjaz
Copy link
Member

docs/_themes/sphinx_rtd_theme/static/images/logo_invert.png

@ssbarnea should we keep this?

@ssbarnea
Copy link
Member Author

Feel free to make any changes you want to the conf.py, i will not mind as long it builds with them.

docs/docsite/README.md Outdated Show resolved Hide resolved
docs/rst/conf.py Outdated
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
"""Sphinx configuration."""
Copy link
Member

Choose a reason for hiding this comment

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

I don't think it should be moved here. Also it doesn't seem related to changing the theme anyway.

docs/rst/conf.py Outdated
# pip install sphinx_rtd_theme
# import sphinx_rtd_theme
# html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# pip install sphinx_ansible_theme
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is useful since all the supported configs have this info in the right place

Suggested change
# pip install sphinx_ansible_theme

docs/rst/conf.py Outdated
# html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# pip install sphinx_ansible_theme
import sphinx_ansible_theme
from ansiblelint import __version__, __package__
Copy link
Member

Choose a reason for hiding this comment

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

Setting up version vars is out of scope and should be in a separate PR.

docs/rst/conf.py Outdated Show resolved Hide resolved
Copy link
Member

@webknjaz webknjaz left a comment

Choose a reason for hiding this comment

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

This PR should only contain bits related to adding a theme. All other changes are welcome to be submitted separately.

@ssbarnea ssbarnea requested a review from webknjaz June 30, 2020 07:46
@ssbarnea ssbarnea dismissed webknjaz’s stale review June 30, 2020 07:47

I remove almost all changes from conf.py to avoid delaying this even more.

- remove custom sphinx theme from our codebase
- reuse shared sphinx-ansible-theme
Copy link
Member

@webknjaz webknjaz left a comment

Choose a reason for hiding this comment

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

Please answer this question:

docs/_themes/sphinx_rtd_theme/static/images/logo_invert.png

@ssbarnea should we keep this?

Also, for any change you want to do as a follow-up I expect a comment and maybe a link to an issue documenting that this needs to be done.

docs/README.md Outdated Show resolved Hide resolved
docs/requirements.in Show resolved Hide resolved
.readthedocs.yml Show resolved Hide resolved
docs/rst/conf.py Show resolved Hide resolved
@ssbarnea
Copy link
Member Author

Please answer this question:

docs/_themes/sphinx_rtd_theme/static/images/logo_invert.png

@ssbarnea should we keep this?

Also, for any change you want to do as a follow-up I expect a comment and maybe a link to an issue documenting that this needs to be done.

That is Ansible owns logo, now included with the theme. No need to keep it.

@ssbarnea ssbarnea merged commit 49f09a5 into ansible:master Jun 30, 2020
@ssbarnea ssbarnea deleted the theme branch June 30, 2020 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants