Skip to content

Commit

Permalink
Merge c5f86ea into 1fbb43b
Browse files Browse the repository at this point in the history
  • Loading branch information
jezdez committed Feb 2, 2021
2 parents 1fbb43b + c5f86ea commit 8bef51f
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 13 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/test.yml
@@ -0,0 +1,51 @@
name: Test

on: [push, pull_request]

jobs:
build:
name: build (Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.6', '3.7', '3.8', '3.9']
django-version: ['2.2', '3.0', '3.1', 'dev']

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key:
${{ matrix.python-version }}-v1-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/tox.ini') }}
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
env:
DJANGO: ${{ matrix.django-version }}

- name: Upload coverage
uses: codecov/codecov-action@v1
with:
name: Python ${{ matrix.python-version }}
8 changes: 8 additions & 0 deletions CHANGES.rst
@@ -1,6 +1,14 @@
Changes
=======

1.6.0 (unreleased)
------------------

- Dropped support for Python 2.7 and 3.5! [jezdez]
- Dropped support for Django 1.11, 2.0 and 2.1! [jezdez]
- Add support for Python 3.9. [jezdez]
- Move CI to GitHub Actions: https://github.com/jazzband/django-smart-selects/actions [jezdez]

1.5.9 (2020-08-28)
------------------

Expand Down
6 changes: 4 additions & 2 deletions README.md
@@ -1,7 +1,9 @@
# Django Smart Selects

[![Jazzband](https://jazzband.co/static/img/badge.svg)](https://jazzband.co/) [![Build Status](https://travis-ci.org/jazzband/django-smart-selects.svg?branch=master)](https://travis-ci.org/jazzband/django-smart-selects) [![Coverage Status](https://coveralls.io/repos/github/jazzband/django-smart-selects/badge.svg?branch=master)](https://coveralls.io/github/jazzband/django-smart-selects?branch=master) [![PyPI](https://img.shields.io/pypi/v/django-smart-selects.svg)](https://pypi.org/project/django-smart-selects/)

[![Jazzband](https://jazzband.co/static/img/badge.svg)](https://jazzband.co/)
[![Build Status](https://github.com/jazzband/django-smart-selects/workflows/Test/badge.svg)](https://github.com/jazzband/django-smart-selects/actions)
[![Coverage Status](https://codecov.io/gh/jazzband/django-smart-selects/branch/master/graph/badge.svg)](https://codecov.io/gh/jazzband/django-smart-selects)
[![PyPI](https://img.shields.io/pypi/v/django-smart-selects.svg)](https://pypi.org/project/django-smart-selects/)

This package allows you to quickly filter or group "chained" models by adding a custom foreign key or many to many field to your models. This will use an AJAX query to load only the applicable chained objects.

Expand Down
9 changes: 7 additions & 2 deletions setup.py
Expand Up @@ -6,7 +6,8 @@

setup(
name="django-smart-selects",
version="1.5.9",
use_scm_version={"version_scheme": "post-release"},
setup_requires=["setuptools_scm"],
description="Django application to handle chained model fields.",
long_description=long_desc,
long_description_content_type="text/markdown",
Expand All @@ -15,9 +16,13 @@
url="https://github.com/jazzband/django-smart-selects",
packages=find_packages(),
include_package_data=True,
python_requires=">=3.6",
install_requires=["django>=1.8", "six"],
classifiers=[
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
],
)
7 changes: 7 additions & 0 deletions smart_selects/__init__.py
@@ -0,0 +1,7 @@
from pkg_resources import get_distribution, DistributionNotFound

try:
__version__ = get_distribution("django-smart-selects").version
except DistributionNotFound:
# package is not installed
__version__ = None
25 changes: 16 additions & 9 deletions tox.ini
@@ -1,21 +1,14 @@
[tox]
envlist =
py{27,35,36}-dj111
py{35,36,37}-dj20
py{35,36,37}-dj21
py{35,36,37,38}-dj22
py{36,37,38}-dj{30,31,master}
py{36,37,38,39}-dj{22,30,31,dev}
flake8

[testenv]
deps =
dj111: django>=1.11,<2.0
dj20: django>=2.0,<2.1
dj21: django>=2.1,<2.2
dj22: django>=2.2,<3.0
dj30: django>=3.0,<3.1
dj31: Django>=3.1,<3.2
djmaster: https://github.com/django/django/archive/master.tar.gz
djdev: https://github.com/django/django/archive/master.tar.gz
coverage
mock
commands =
Expand All @@ -28,3 +21,17 @@ deps =
flake8
commands =
flake8 manage.py setup.py smart_selects test_app

[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38
3.9: py39

[gh-actions:env]
DJANGO =
2.2: dj22
3.0: dj30
3.1: dj31
dev: djdev

0 comments on commit 8bef51f

Please sign in to comment.