Skip to content

Commit

Permalink
0.6.0: test and support django 4.2 and 5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mbi committed Dec 13, 2023
1 parent 1bc4d52 commit cd66ec8
Show file tree
Hide file tree
Showing 15 changed files with 146 additions and 200 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: [3.7, 3.8, 3.9, "3.10"]
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v1
- uses: niden/actions-memcached@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
16 changes: 16 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
build:
os: ubuntu-22.04
tools:
python: "3.10"
# You can also specify other tool versions:
# nodejs: "16"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# Dependencies required to build your docs
python:
install:
- requirements: docs/requirements.txt
5 changes: 5 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ Version history
###############


Version 0.6.0
==============
* Django 4.2 and 5.0 support


Version 0.5.15
==============
* Django 3.2 support
Expand Down
56 changes: 35 additions & 21 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import os
import sys


# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
Expand All @@ -30,30 +29,38 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.autodoc']
extensions = ["sphinx.ext.autodoc"]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# The suffix of source filenames.
source_suffix = '.rst'
source_suffix = ".rst"

# The encoding of source files.
# source_encoding = 'utf-8-sig'

# The master toctree document.
master_doc = 'index'
master_doc = "index"

# General information about the project.
project = 'Django-Front'
copyright = '2013-2020, Marco Bonetti and contributors'
project = "Django-Front"
copyright = "2013-2023, Marco Bonetti and contributors"


def get_version():
sys.path.insert(0, os.path.abspath(".."))
from front import get_version as get_version_

return get_version_()


# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0.5.14'
version = get_version()
# The full version, including alpha/beta/rc tags.
release = version

Expand All @@ -69,7 +76,7 @@

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
exclude_patterns = ["_build"]

# The reST default role (used for this markup: `text`) to use for all
# documents.
Expand All @@ -87,7 +94,7 @@
# show_authors = False

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = "sphinx"

# A list of ignored prefixes for module index sorting.
# modindex_common_prefix = []
Expand All @@ -101,6 +108,7 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
# html_theme = 'sphinx_rtd_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
Expand Down Expand Up @@ -129,7 +137,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ["_static"]

# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
Expand Down Expand Up @@ -178,7 +186,7 @@
# html_file_suffix = None

# Output file base name for HTML help builder.
htmlhelp_basename = 'Django-Frontdoc'
htmlhelp_basename = "Django-Frontdoc"


# -- Options for LaTeX output ---------------------------------------------
Expand All @@ -196,7 +204,13 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
('index', 'Django-Front.tex', 'Django-Front Documentation', 'Marco Bonetti', 'manual')
(
"index",
"Django-Front.tex",
"Django-Front Documentation",
"Marco Bonetti",
"manual",
)
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down Expand Up @@ -225,7 +239,7 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'django-front', 'Django-Front Documentation', ['Marco Bonetti'], 1)
("index", "django-front", "Django-Front Documentation", ["Marco Bonetti"], 1)
]

# If true, show URL addresses after external links.
Expand All @@ -239,13 +253,13 @@
# dir menu entry, description, category)
texinfo_documents = [
(
'index',
'Django-Front',
'Django-Front Documentation',
'Marco Bonetti',
'Django-Front',
'One line description of project.',
'Miscellaneous',
"index",
"Django-Front",
"Django-Front Documentation",
"Marco Bonetti",
"Django-Front",
"One line description of project.",
"Miscellaneous",
)
]

Expand Down
6 changes: 3 additions & 3 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Installation
Requirements
------------

* Django-front supports Django 1.11 through 2.2
* Django-front supports Django 4.2 and 5.0
* django-classy-tags
* Python 2.7+ or Python 3.5+
* Python 3.9+
* jQuery is required in your template


Expand All @@ -29,4 +29,4 @@ Installing django-front
Testing
-------

* ``pip install tox && tox``
* ``pip install --upgrade tox && tox``
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sphinx-book-theme
6 changes: 6 additions & 0 deletions front/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
VERSION = (0, 6, 0)


def get_version(limit=3):
"""Return the version as a human-format string."""
return ".".join([str(i) for i in VERSION[:limit]])
21 changes: 0 additions & 21 deletions front/migrations/__init__.py
Original file line number Diff line number Diff line change
@@ -1,21 +0,0 @@
"""
Django migrations for django-front app
This package does not contain South migrations. South migrations can be found
in the ``south_migrations`` package.
"""

SOUTH_ERROR_MESSAGE = """\n
For South support, customize the SOUTH_MIGRATION_MODULES setting like so:
SOUTH_MIGRATION_MODULES = {
'front': 'front.south_migrations',
}
"""

# Ensure the user is not using Django 1.6 or below with South
try:
from django.db import migrations # noqa
except ImportError:
from django.core.exceptions import ImproperlyConfigured
raise ImproperlyConfigured(SOUTH_ERROR_MESSAGE)
32 changes: 0 additions & 32 deletions front/south_migrations/0001_initial.py

This file was deleted.

41 changes: 0 additions & 41 deletions front/south_migrations/0002_auto__add_placeholderhistory.py

This file was deleted.

Empty file removed front/south_migrations/__init__.py
Empty file.
55 changes: 28 additions & 27 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


class Tox(test_command):
user_options = [('tox-args=', 'a', "Arguments to pass to tox")]
user_options = [("tox-args=", "a", "Arguments to pass to tox")]

def initialize_options(self):
test_command.initialize_options(self)
Expand All @@ -18,47 +18,48 @@ def finalize_options(self):

def run_tests(self):
# import here, cause outside the eggs aren't loaded
import tox
import shlex

import tox

args = self.tox_args
if args:
args = shlex.split(self.tox_args)
errno = tox.cmdline(args=args)
sys.exit(errno)


with open('README.rst') as readme:
with open("README.rst") as readme:
long_description = readme.read()

setup(
name='django-front',
version='0.5.15',
description='A Django application to allow of front-end editing',
name="django-front",
version=__import__("front").get_version(limit=3),
description="A Django application to allow of front-end editing",
long_description=long_description,
author='Marco Bonetti',
author_email='[email protected]',
url='https://github.com/mbi/django-front',
license='MIT',
packages=find_packages(exclude=['test_project', 'test_project.*']),
author="Marco Bonetti",
author_email="[email protected]",
url="https://github.com/mbi/django-front",
license="MIT",
packages=find_packages(exclude=["test_project", "test_project.*"]),
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Framework :: Django',
'Framework :: Django :: 2.2',
'Framework :: Django :: 3.0',
'Framework :: Django :: 3.1',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
"Development Status :: 4 - Beta",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Framework :: Django",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
],
include_package_data=True,
zip_safe=False,
install_requires=['django-classy-tags >= 1.0', 'Django >= 2.2', 'six'],
tests_require=['tox'],
cmdclass={'test': Tox},
install_requires=["django-classy-tags >= 1.0", "Django >= 4.2", "six"],
tests_require=["tox~=4.11.4"],
cmdclass={"test": Tox},
)
Loading

0 comments on commit cd66ec8

Please sign in to comment.