Skip to content

Commit

Permalink
Merge pull request #165 from shtalinberg/develop
Browse files Browse the repository at this point in the history
bump 4.0.0
  • Loading branch information
shtalinberg committed Apr 2, 2023
2 parents 0d35f95 + cd1dc85 commit a5a8aaf
Show file tree
Hide file tree
Showing 55 changed files with 464 additions and 371 deletions.
86 changes: 86 additions & 0 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Tox

on: [push, pull_request]

jobs:
tox-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.8"
- run: pip install --upgrade pip
- run: pip install tox
- run: tox -e lint # Perhaps use ${{ job.name }}

tox-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.8"
- run: pip install --upgrade pip
- run: pip install tox
- run: tox -e docs || true # Fix error and remove "|| true"!

tox-docs-linkcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.8"
- run: pip install --upgrade pip
- run: pip install tox
- run: tox -e docs-linkcheck || true # Fix error and remove "|| true"!

build:
strategy:
fail-fast: false
max-parallel: 5
matrix:
os: [ubuntu-latest] # [macos-latest, ubuntu-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10']
django-version: ["==3.2.*", "==4.0.*", "==4.1.*"]
# exclude:
# # Django 4.0 no longer supports python 3.7
# - python-version: 3.7
# django-version: "==4.0.*"

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}

- name: Get pip cache dir
id: pip-cache
run: |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: Cache
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key:
-${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.py') }}
restore-keys: |
-${{ matrix.python-version }}-v1-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade tox tox-gh-actions
- name: Tox tests
run: |
tox -v
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
name: Python ${{ matrix.python-version }}
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ doc/_build
/help-man
dist/
~$
.venv*
.venv/
.coverage
.ropeproject
.DS_Store
MANIFEST
tests/settings_local.py
*.log
.tox/
.tox/
*.egg-info/
10 changes: 0 additions & 10 deletions .hgignore

This file was deleted.

43 changes: 0 additions & 43 deletions .travis.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"python.formatting.provider": "black"
}
8 changes: 2 additions & 6 deletions HACKING
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,15 @@ Here are the steps needed to set up a development and testing environment.
Creating a development environment
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The development environment is created in a virtualenv. The environment
creation requires the *make* and *virtualenv* programs to be installed.
The development environment is created in a venv. The environment
creation requires the *make* program to be installed.

To install *make* under Debian/Ubuntu::

$ sudo apt-get install build-essential

Under Mac OS/X, *make* is available as part of XCode.

To install virtualenv::

$ sudo pip install virtualenv

At this point, from the root of this branch, run the command::

$ make
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Copyright (c) 2009-2013 Francesco Banconi
Copyright (c) 2015-2017 Oleksandr Shtalinberg
Copyright (c) 2015-2023 Oleksandr Shtalinberg

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
12 changes: 5 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@

# Define these variables based on the system Python versions.
PYTHON3 = python3
VENV3 = .venv3

LINTER = flake8 --show-source endless_pagination/ tests/
LINTER = flake8 --show-source el_pagination/ tests/
MANAGE = python ./tests/manage.py

PYTHON = $(PYTHON3)
VENV = $(VENV3)

DOC_INDEX = doc/_build/html/index.html
VENV_ACTIVATE = $(VENV)/bin/activate
WITH_VENV = ./tests/with_venv.sh $(VENV)
VENV_ACTIVATE = .venv/bin/activate
WITH_VENV = ./tests/with_venv.sh .venv

all: develop

Expand All @@ -28,7 +26,7 @@ clean:
find . -name '__pycache__' -type d -delete

cleanall: clean
rm -rfv $(VENV2) $(VENV3)
rm -rfv .venv

check: test lint

Expand All @@ -51,7 +49,7 @@ help:
@echo 'make shell - Enter Django interactive interpreter'
@echo 'make server - Run Django development server'
@echo 'make clean - Get rid of bytecode files, build dirs, dist files'
@echo 'make cleanall - Clean and also get rid of the virtualenvs'
@echo 'make cleanall - Clean and also get rid of the venvs'
@echo -e '\nDefine the env var PY3 to work using Python 3.'
@echo 'E.g. to create a Python 3 development environment:'
@echo ' - make PY3=1'
Expand Down
2 changes: 1 addition & 1 deletion PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: django-el-pagination
Version: 3.3.0
Version: 4.0.0
Summary: Django pagination tools supporting Ajax, multiple and lazy pagination, Twitter-style and Digg-style pagination.
Home-page: https://github.com/shtalinberg/django-el-pagination
Author: Oleksandr Shtalinberg
Expand Down
14 changes: 8 additions & 6 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|
| |travis-ci-status| |codecov|
| |build-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 All @@ -12,8 +12,10 @@ like multiple or lazy pagination.
This app **django-el-pagination** forked from django-endless-pagination==2.0 (https://github.com/frankban/django-endless-pagination)

From version 3.0.0 drop support Django<1.8. For support Django<1.8 use django-endless-pagination==2.x.x

From version 3.3.0 drop support Django<1.11. For support Django<1.11 use django-endless-pagination<3.3.x

From version 4.0.0 drop support Django<3.2. For support Django<3.2 use django-endless-pagination<4.0.x

The initial idea, which has guided the development of this application,
is to allow pagination of web contents in `very few steps
Expand All @@ -33,15 +35,15 @@ Pull requests are welcome. See `Contributing Guide
<http://django-el-pagination.readthedocs.io/en/latest/contributing.html>`_.


.. |travis-ci-status| image:: https://travis-ci.org/shtalinberg/django-el-pagination.svg?branch=develop
:target: https://travis-ci.org/shtalinberg/django-el-pagination
.. |build-ci-status| image:: https://github.com/jazzband/shtalinberg/django-el-pagination/Test/badge.svg
:target: https://github.com/shtalinberg/django-el-pagination/actions
.. |docs| image:: https://readthedocs.org/projects/django-el-pagination/badge/?version=latest&style=flat
:target: https://django-el-pagination.readthedocs.io/
.. |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
:target: https://pypi.python.org/pypi/django-el-pagination/
.. |python-versions| image:: https://img.shields.io/pypi/pyversions/django-el-pagination.svg
.. |django-versions| image:: https://img.shields.io/badge/django-1.8%20or%20newer-green.svg
.. |codecov| image:: https://codecov.io/gh/shtalinberg/django-el-pagination/branch/develop/graph/badge.svg
:target: https://codecov.io/gh/shtalinberg/django-el-pagination
.. |django-versions| image:: https://img.shields.io/pypi/djversions/django-el-pagination.svg
.. |codecov| image:: https://codecov.io/gh/shtalinberg/django-el-pagination/branch/master/graph/badge.svg
:target: https://codecov.io/gh/shtalinberg/django-el-pagination
14 changes: 13 additions & 1 deletion doc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,21 @@ Changelog
=========


Version 4.0.0
~~~~~~~~~~~~~

**New feature**: Django 4.1.x support.
Django EL(Endless) Pagination now supports Django from 3.2.x to 4.1.x
supports Python 3.8, 3.9, 3.10


Version 3.3.0
~~~~~~~~~~~~~

**New feature**: Django 3.0.x support.
Django EL(Endless) Pagination now supports Django from 1.11.x to 3.0.x
Dropped support for Python 2.x
Dropped support for Python 2.x


Version 3.2.4
~~~~~~~~~~~~~
Expand All @@ -22,12 +31,14 @@ Bug-fix release
**Fix**: cycle in show_pages with django 2.0
fix tests for PageList.get_rendered()


Version 3.2.2
~~~~~~~~~~~~~
Bug-fix release

**Fix**: fix UnicodeEncodeError with translate in templates


Version 3.2.0
~~~~~~~~~~~~~
**New feature**: Django 2.0.x support.
Expand Down Expand Up @@ -57,6 +68,7 @@ Version 3.2.0
utils.UnicodeMixin
utils.text


Version 3.1.0
~~~~~~~~~~~~~
**Template changes**:
Expand Down
6 changes: 3 additions & 3 deletions doc/conf.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
"""Django EL(Endless) Pagination documentation build configuration file."""

from __future__ import unicode_literals


AUTHOR = 'Oleksandr Shtalinberg and Francesco Banconi'
APP = 'Django EL(Endless) Pagination'
TITLE = APP + ' Documentation'
VERSION = '3.2.4'
VERSION = '4.0.0'


# Add any Sphinx extension module names here, as strings. They can be
Expand All @@ -23,7 +23,7 @@

# General information about the project.
project = APP
copyright = '2009-2018, ' + AUTHOR
copyright = '2009-2023, ' + AUTHOR

# The short X.Y version.
version = release = VERSION
Expand Down
10 changes: 3 additions & 7 deletions doc/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,15 @@ Please, change code and submit all pull requests into branch `develop`
Creating a development environment
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The development environment is created in a virtualenv. The environment
creation requires the *make* and *virtualenv* programs to be installed.
The development environment is created in a venv. The environment
creation requires the *make* program to be installed.

To install *make* under Debian/Ubuntu::

$ sudo apt-get install build-essential

Under Mac OS/X, *make* is available as part of XCode.

To install virtualenv::

$ sudo pip install virtualenv

At this point, from the root of this branch, run the command::

$ make
Expand Down Expand Up @@ -56,7 +52,7 @@ tests, define the environment variable SKIP_SELENIUM, e.g.::
$ make test SKIP_SELENIUM=1

Integration tests are excluded by default when using Python 3. The test suite
requires Python >= 2.6.1.
requires Python >= 3.8.x.

Run the tests and lint/pep8 checks::

Expand Down
2 changes: 1 addition & 1 deletion doc/generic_views.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ If the developer wants pagination of publishers, in *views.py* we have code clas
template_name = "myapp/publisher_list.html"
context_object_name = "publisher_list"

or fuction-based::
or function-based::

def entry_index(request, template='myapp/publisher_list.html'):
context = {
Expand Down
Loading

0 comments on commit a5a8aaf

Please sign in to comment.