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

chore: deprecate edx sphinx theme #98

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dbt_schema_builder/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class InvalidDatabaseException(Exception):


class GetCatalogTask(CompileTask):

"""
A dbt task to load the information schema to dict in the form of:
{
Expand All @@ -55,6 +56,7 @@ class GetCatalogTask(CompileTask):
}
}
"""

def _get_column_name_filter(self, source_database, banned_column_names):
"""
Create the SQL string to omit banned_column_names from the Snowflake metadata queries.
Expand Down
43 changes: 35 additions & 8 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
import re
import sys
from subprocess import check_call
from datetime import datetime

import edx_theme
import sphinx_book_theme


def get_version(*file_paths):
Expand Down Expand Up @@ -61,7 +62,6 @@ def get_version(*file_paths):
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'edx_theme',
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
Expand Down Expand Up @@ -92,8 +92,8 @@ def get_version(*file_paths):

# General information about the project.
project = 'dbt-schema-builder'
copyright = edx_theme.COPYRIGHT # pylint: disable=redefined-builtin
author = edx_theme.AUTHOR
copyright = f'{datetime.now().year}, edX LLC.' # pylint: disable=redefined-builtin
author = "edX LLC."
project_title = 'dbt-schema-builder'
documentation_title = "{project_title}".format(project_title=project_title)

Expand Down Expand Up @@ -164,16 +164,43 @@ def get_version(*file_paths):
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.

html_theme = 'edx_theme'
html_theme = 'sphinx_book_theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}

# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = [edx_theme.get_html_theme_path()]
html_theme_options = {
"repository_url": "https://github.com/edx/dbt-schema-builder",
"repository_branch": "main",
"path_to_docs": "docs/",
"use_repository_button": True,
"use_issues_button": True,
"use_edit_page_button": True,
# Please don't change unless you know what you're doing.
"extra_footer": """
<a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">
<img
alt="Creative Commons License"
style="border-width:0"
src="https://i.creativecommons.org/l/by-sa/4.0/80x15.png"/>
</a>
<br>
These works by
<a
xmlns:cc="https://creativecommons.org/ns#"
href="https://edx.org"
property="cc:attributionName"
rel="cc:attributionURL"
>edX LLC</a>
are licensed under a
<a
rel="license"
href="https://creativecommons.org/licenses/by-sa/4.0/"
>Creative Commons Attribution-ShareAlike 4.0 International License</a>.
"""
}

# The name for this set of Sphinx documents.
# "<project> v<release> documentation" by default.
Expand Down
2 changes: 1 addition & 1 deletion requirements/doc.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
-r test.txt # Core and testing dependencies for this package

doc8 # reStructuredText style checker
edx_sphinx_theme # edX theme for Sphinx output
sphinx-book-theme # edX theme for Sphinx output
readme_renderer # Validates README.rst for usage on PyPI
Sphinx # Documentation builder
24 changes: 19 additions & 5 deletions requirements/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# make upgrade
# pip-compile --output-file=requirements/doc.txt requirements/doc.in
#
accessible-pygments==0.0.4
# via pydata-sphinx-theme
agate==1.7.1
# via
# -r requirements/test.txt
Expand All @@ -28,7 +30,10 @@ babel==2.14.0
# via
# -r requirements/test.txt
# agate
# pydata-sphinx-theme
# sphinx
beautifulsoup4==4.12.3
# via pydata-sphinx-theme
certifi==2024.2.2
# via
# -r requirements/test.txt
Expand Down Expand Up @@ -82,11 +87,10 @@ doc8==1.1.1
docutils==0.19
# via
# doc8
# pydata-sphinx-theme
# readme-renderer
# restructuredtext-lint
# sphinx
edx-sphinx-theme==3.1.0
# via -r requirements/doc.in
exceptiongroup==1.2.0
# via
# -r requirements/test.txt
Expand Down Expand Up @@ -187,6 +191,7 @@ packaging==23.1
# -c requirements/constraints.txt
# -r requirements/test.txt
# dbt-core
# pydata-sphinx-theme
# pytest
# snowflake-connector-python
# sphinx
Expand Down Expand Up @@ -228,9 +233,13 @@ pydantic-core==2.16.3
# via
# -r requirements/test.txt
# pydantic
pydata-sphinx-theme==0.14.4
# via sphinx-book-theme
pygments==2.17.2
# via
# accessible-pygments
# doc8
# pydata-sphinx-theme
# readme-renderer
# sphinx
pyjwt==2.8.0
Expand Down Expand Up @@ -294,7 +303,6 @@ rpds-py==0.18.0
six==1.16.0
# via
# -r requirements/test.txt
# edx-sphinx-theme
# isodate
# minimal-snowplow-tracker
# python-dateutil
Expand All @@ -308,10 +316,15 @@ sortedcontainers==2.4.0
# via
# -r requirements/test.txt
# snowflake-connector-python
soupsieve==2.5
# via beautifulsoup4
sphinx==5.3.0
# via
# -r requirements/doc.in
# edx-sphinx-theme
# pydata-sphinx-theme
# sphinx-book-theme
sphinx-book-theme==1.0.1
# via -r requirements/doc.in
sphinxcontrib-applehelp==1.0.4
# via sphinx
sphinxcontrib-devhelp==1.0.2
Expand Down Expand Up @@ -353,6 +366,7 @@ typing-extensions==4.10.0
# mashumaro
# pydantic
# pydantic-core
# pydata-sphinx-theme
# snowflake-connector-python
urllib3==1.26.18
# via
Expand Down
1 change: 0 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ envlist = py{38,39}
python =
3.8: py38, docs, quality
3.9: py39

[doc8]
max-line-length = 120

Expand Down
Loading