Skip to content

Commit

Permalink
chore: deprecate edx-sphinx-theme
Browse files Browse the repository at this point in the history
  • Loading branch information
huniafatima-arbi committed Oct 30, 2024
1 parent 7557ee2 commit 6bce72a
Show file tree
Hide file tree
Showing 35 changed files with 692 additions and 810 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Python CI

on:
push:
branches:
branches:
- 'main'
pull_request:
branches:
Expand All @@ -16,8 +16,8 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ['3.8']
toxenv: [quality, docs, pii_check, django32, django42]
python-version: ['3.12']
toxenv: [quality, docs, pii_check, django42]

steps:
- uses: actions/checkout@v2
Expand All @@ -40,7 +40,7 @@ jobs:
- name: Run coverage
# Although code coverage is a "quality" concern, we need the coverage report that only exists after running the
# test suite, and this allows us to not run it twice.
if: matrix.python-version == '3.8' && matrix.toxenv == 'django42'
if: matrix.python-version == '3.12' && matrix.toxenv == 'django42'
uses: codecov/codecov-action@v3
with:
flags: unittests
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Publish package to PyPi

on:
push:
tags:
tags:
- "*"

jobs:
Expand All @@ -16,7 +16,7 @@ jobs:
- name: setup python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.12

- name: Install pip
run: pip install -r requirements/pip.txt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upgrade-python-requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

strategy:
matrix:
python-version: ["3.8"]
python-version: ["3.12"]

steps:
- name: setup target branch
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ sphinx:
configuration: docs/conf.py

python:
version: 3.8
version: 3.12
install:
- requirements: requirements/doc.txt
49 changes: 41 additions & 8 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import sys
from subprocess import check_call

import edx_theme
import sphinx_book_theme
from django import setup as django_setup
from django.conf import settings

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

# General information about the project.
project = "platform-plugin-notices"
copyright = edx_theme.COPYRIGHT # pylint: disable=redefined-builtin
author = edx_theme.AUTHOR
copyright = "2024, edX LLC" # pylint: disable=redefined-builtin
author = "edX LLC"
project_title = "platform-plugin-notices"
documentation_title = "{project_title}".format(project_title=project_title)

Expand Down Expand Up @@ -165,16 +165,49 @@ 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 = {}
html_theme_options = {
"repository_url": "https://github.com/edx/platform-plugin-notices",
"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>.
""",
}

html_logo = "https://logos.openedx.org/open-edx-logo-color.png"
html_favicon = "https://logos.openedx.org/open-edx-favicon.ico"

if not os.environ.get("DJANGO_SETTINGS_MODULE"):
os.environ["DJANGO_SETTINGS_MODULE"] = "test_utils.test_settings"

# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = [edx_theme.get_html_theme_path()]

# The name for this set of Sphinx documents.
# "<project> v<release> documentation" by default.
Expand Down
1 change: 1 addition & 0 deletions notices/admin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Admin pages for the notices app."""

from django.contrib import admin

from .models import AcknowledgedNotice, Notice, TranslatedNoticeContent
Expand Down
1 change: 1 addition & 0 deletions notices/api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Python API for Notice data.
"""

import datetime
import logging

Expand Down
1 change: 1 addition & 0 deletions notices/context_api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Functions to add context to LMS pages via the plugins context feature.
"""

from notices.api import get_unacknowledged_notices_for_user
from notices.toggles import ENABLE_NOTICES

Expand Down
1 change: 1 addition & 0 deletions notices/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
See OEP-49 for details
"""

from enum import Enum


Expand Down
1 change: 1 addition & 0 deletions notices/models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Database models for notices.
"""

from django.contrib.auth import get_user_model
from django.db import models
from django.utils import timezone
Expand Down
1 change: 1 addition & 0 deletions notices/rest_api/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
All API URLs should be versioned, so urlpatterns should only
contain namespaces for the active versions of the API.
"""

from django.urls import include, path


Expand Down
1 change: 1 addition & 0 deletions notices/rest_api/v1/urls.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""v1 API URLS"""

from django.urls import path

from notices.rest_api.v1 import views
Expand Down
1 change: 1 addition & 0 deletions notices/rest_api/v1/views.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""API views for the notices app"""

import logging

from django.conf import settings
Expand Down
1 change: 1 addition & 0 deletions notices/selectors.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Utility functions for pulling Notice data.
"""

import datetime

from django.conf import settings
Expand Down
1 change: 1 addition & 0 deletions notices/toggles.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This file houses all the toggles, namely waffle switches and flags."""

from edx_toggles.toggles import WaffleFlag


Expand Down
1 change: 1 addition & 0 deletions notices/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
URLs for notices.
"""

from django.urls import include, path

from notices.views import RenderNotice
Expand Down
Loading

0 comments on commit 6bce72a

Please sign in to comment.