Skip to content

Commit

Permalink
Merge branch 'release/4.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
shtalinberg committed Nov 20, 2024
2 parents 835003d + 7e0dbe3 commit b5e9341
Show file tree
Hide file tree
Showing 7 changed files with 135 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ wheels/
.installed.cfg
*.egg

# Sphinx documentation
_static/TRACKME
.doctrees/
doc/_build
doc/.doctrees

*.sublime-*
.idea*
/help-man
Expand Down
38 changes: 38 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.10"

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

# Optionally build your docs in additional formats such as PDF and ePub
formats:
- pdf

# Optionally declare the Python requirements required to build your docs
python:
install:
- method: pip
path: .
extra_requirements:
- doc
- requirements: doc/requirements.txt

# Don't install the package in editable mode
# This ensures we're testing the actual installation
python:
install:
- method: pip
path: .
- requirements: doc/requirements.txt
42 changes: 38 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ doc: develop $(DOC_INDEX)

clean:
pip uninstall django-el-pagination -y || true
rm -rfv .coverage build/ dist/ doc/_build MANIFEST *.egg-info
rm -rf .coverage build/ dist/ doc/_build MANIFEST *.egg-info
find . -name '*.pyc' -delete
find . -name '__pycache__' -type d -delete

Expand All @@ -49,9 +49,6 @@ lint: develop
opendoc: doc
@firefox $(DOC_INDEX)

release: clean
python setup.py register sdist upload

server: develop
@$(WITH_VENV) $(MANAGE) runserver 0.0.0.0:8000

Expand All @@ -64,6 +61,43 @@ source:
test: develop
@$(WITH_VENV) $(MANAGE) test

build-dist: clean develop
@echo "Installing build dependencies..."
$(VENV)/bin/pip install build twine
@echo "Building distribution..."
$(VENV)/bin/python -m build

check-dist: build-dist
@echo "Checking distribution..."
$(VENV)/bin/twine check dist/*

upload-dist: check-dist
@echo "Uploading to PyPI..."
$(VENV)/bin/twine upload dist/*

release: clean develop
@echo "Starting release process..."
@if [ -z "$$SKIP_CONFIRMATION" ]; then \
read -p "Are you sure you want to release to PyPI? [y/N] " confirm; \
if [ "$$confirm" != "y" ]; then \
echo "Release cancelled."; \
exit 1; \
fi \
fi
$(MAKE) build-dist
$(MAKE) check-dist
@echo "Ready to upload to PyPI..."
@if [ -z "$$SKIP_CONFIRMATION" ]; then \
read -p "Proceed with upload? [y/N] " confirm; \
if [ "$$confirm" != "y" ]; then \
echo "Upload cancelled."; \
exit 1; \
fi \
fi
$(MAKE) upload-dist
@echo "Release completed successfully!"


help:
@echo 'Django Endless Pagination - Available commands:'
@echo
Expand Down
19 changes: 10 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Django EL(Endless) Pagination
=============================

| |pypi-pkg-version| |python-versions| |django-versions| |pypi-status| |docs|
| |build-ci-status| |build-ci-dev-status| |codecov|
| |build-ci-status| |tox-ci-status| |codecov|
Django EL(Endless) Pagination can be used to provide Twitter-style or
Digg-style pagination, with optional Ajax support and other features
Expand Down Expand Up @@ -32,11 +32,12 @@ https://github.com/shtalinberg/django-el-pagination.
Pull requests are welcome. See `Contributing Guide
<http://django-el-pagination.readthedocs.io/en/latest/contributing.html>`_.

.. |build-ci-status| image:: https://github.com/shtalinberg/django-el-pagination/actions/workflows/tests.yml/badge.svg?branch=master
:target: https://github.com/shtalinberg/django-el-pagination/actions/workflows/tests.yml
:alt: Build status
.. |docs| image:: https://readthedocs.org/projects/django-el-pagination/badge/?version=latest&style=flat
:target: https://django-el-pagination.readthedocs.io/
.. |build-ci-status| image:: https://github.com/shtalinberg/django-el-pagination/actions/workflows/tox.yml/badge.svg?branch=master
:target: https://github.com/shtalinberg/django-el-pagination/actions/workflows/tox.yml
:alt: Build release status
.. |docs| image:: https://readthedocs.org/projects/django-el-pagination/badge/?version=latest
:target: https://django-el-pagination.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
.. |pypi-pkg-version| image:: https://img.shields.io/pypi/v/django-el-pagination.svg
:target: https://pypi.python.org/pypi/django-el-pagination/
.. |pypi-status| image:: https://img.shields.io/pypi/status/coverage.svg
Expand All @@ -46,6 +47,6 @@ Pull requests are welcome. See `Contributing Guide
.. |codecov| image:: https://codecov.io/gh/shtalinberg/django-el-pagination/branch/master/graph/badge.svg
:target: https://codecov.io/gh/shtalinberg/django-el-pagination
:alt: Code coverage
.. |build-ci-dev-status| image:: https://github.com/shtalinberg/django-el-pagination/actions/workflows/tests.yml/badge.svg?branch=develop
:target: https://github.com/shtalinberg/django-el-pagination/actions/workflows/tests.yml
:alt: Build dev status
.. |tox-ci-status| image:: https://github.com/shtalinberg/django-el-pagination/actions/workflows/tox.yml/badge.svg?branch=develop
:target: https://github.com/shtalinberg/django-el-pagination/actions/workflows/tox.yml
:alt: Tox develop status
30 changes: 29 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
"""Django EL(Endless) Pagination documentation build configuration file."""

import os
import sys

sys.path.insert(0, os.path.abspath('..'))


AUTHOR = 'Francesco Banconi, Oleksandr Shtalinberg'
APP = 'Django EL(Endless) Pagination'
TITLE = APP + ' Documentation'
Expand All @@ -21,7 +27,12 @@

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = [
'_build',
'Thumbs.db',
'.DS_Store',
'_static/TRACKME', # Exclude the TRACKME file from processing
]

# The suffix of source filenames.
source_suffix = '.rst'
Expand All @@ -42,11 +53,28 @@
# 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_options = {
'navigation_depth': 4,
'collapse_navigation': False,
'sticky_navigation': True,
'includehidden': True,
'titles_only': False,
}

# 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']
epub_exclude_files = [
'_static/TRACKME',
'search.html',
'_static/websupport.js',
]
# -- Epub options ---------------------------------------------------------
epub_show_urls = 'footnote'
epub_tocdepth = 3
epub_tocdup = True
epub_guide = (('toc', 'index.html', 'Table of Contents'),)

# Output file base name for HTML help builder.
htmlhelp_basename = 'DjangoELPaginationdoc'
Expand Down
13 changes: 13 additions & 0 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Documentation dependencies
sphinx>=5.0.0,<6.0.0
sphinx-rtd-theme>=1.0.0
sphinxcontrib-applehelp>=1.0.4
sphinxcontrib-devhelp>=1.0.2
sphinxcontrib-htmlhelp>=2.0.0
sphinxcontrib-serializinghtml>=1.1.5
sphinxcontrib-qthelp>=1.0.3
docutils>=0.17.1
jinja2>=3.0.0

# Project dependencies
django>=3.2.0
2 changes: 2 additions & 0 deletions release-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build>=1.0.0
twine>=4.0.0

0 comments on commit b5e9341

Please sign in to comment.