Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Update dependencies to modern versions #43

Merged
merged 5 commits into from
Aug 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/publish-to-live-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish Python 🐍 distributions 📦 to pypi

on:
release:
types:
- published

jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to pypi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.

- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
40 changes: 40 additions & 0 deletions .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Publish Python 🐍 distributions 📦 to TestPyPI

on:
push:
branches:
- master

jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to TestPyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.

- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true
14 changes: 8 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,21 @@ name: CodeCov

on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
unit-tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: [ 3.7, 3.8, 3.9, ] # latest release minus two
python-version: [ 3.8, 3.9, "3.10", "3.11.0-rc.1" ] # latest release minus two
requirements-file: [
dj22_cms37.txt,
dj22_cms38.txt,
dj30_cms37.txt,
dj30_cms38.txt,
dj31_cms38.txt,
dj32_cms310.txt,
dj32_cms311.txt,
dj40_cms311.txt,
]
os: [
ubuntu-20.04,
Expand Down
47 changes: 47 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
ci:
autofix_commit_msg: |
ci: auto fixes from pre-commit hooks

for more information, see https://pre-commit.ci
autofix_prs: false
autoupdate_commit_msg: 'ci: pre-commit autoupdate'
autoupdate_schedule: monthly

repos:
- repo: https://github.com/asottile/pyupgrade
rev: v2.37.3
hooks:
- id: pyupgrade
args: ["--py38-plus"]

- repo: https://github.com/adamchainz/django-upgrade
rev: '1.7.0'
hooks:
- id: django-upgrade
args: [--target-version, "3.2"]

- repo: https://github.com/PyCQA/flake8
rev: 5.0.2
hooks:
- id: flake8

- repo: https://github.com/asottile/yesqa
rev: v1.3.0
hooks:
- id: yesqa

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-merge-conflict
- id: mixed-line-ending

- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort

- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
hooks:
- id: codespell
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ Changelog
=========


unreleased
==========

* Added support for Django 3.2 & 4
* Dropped support for Python < 3.8
* Dropped support for Django < 3.2


2.0.0 (2020-09-02)
==================

Expand Down
32 changes: 11 additions & 21 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
django CMS Icon
===============

|pypi| |build| |coverage|
|pypi| |coverage| |python| |django| |djangocms|

**django CMS Icon** is a plugin for `django CMS <http://django-cms.org>`_
that allows you to insert an icon (font or svg) into your project.

.. note::
.. note::

This project is endorsed by the `django CMS Association <https://www.django-cms.org/en/about-us/>`_.
That means that it is officially accepted by the dCA as being in line with our roadmap vision and development/plugin policy.
That means that it is officially accepted by the dCA as being in line with our roadmap vision and development/plugin policy.
Join us on `Slack <https://www.django-cms.org/slack/>`_.

.. image:: preview.gif
Expand All @@ -22,8 +22,8 @@ Contribute to this project and win rewards

Because this is a an open-source project, we welcome everyone to
`get involved in the project <https://www.django-cms.org/en/contribute/>`_ and
`receive a reward <https://www.django-cms.org/en/bounty-program/>`_ for their contribution.
Become part of a fantastic community and help us make django CMS the best CMS in the world.
`receive a reward <https://www.django-cms.org/en/bounty-program/>`_ for their contribution.
Become part of a fantastic community and help us make django CMS the best CMS in the world.

We'll be delighted to receive your
feedback in the form of issues and pull requests. Before submitting your
Expand All @@ -34,14 +34,6 @@ We're grateful to all contributors who have helped create and maintain this pack
Contributors are listed at the `contributors <https://github.com/django-cms/djangocms-icon/graphs/contributors>`_
section.

Documentation
=============

See ``REQUIREMENTS`` in the `setup.py <https://github.com/divio/djangocms-icon/blob/master/setup.py>`_
file for additional dependencies:

|python| |django| |djangocms|


Installation
------------
Expand Down Expand Up @@ -214,14 +206,12 @@ You can run tests by executing::

.. |pypi| image:: https://badge.fury.io/py/djangocms-icon.svg
:target: http://badge.fury.io/py/djangocms-icon
.. |build| image:: https://travis-ci.org/divio/djangocms-icon.svg?branch=master
:target: https://travis-ci.org/divio/djangocms-icon
.. |coverage| image:: https://codecov.io/gh/divio/djangocms-icon/branch/master/graph/badge.svg
:target: https://codecov.io/gh/divio/djangocms-icon
.. |coverage| image:: https://codecov.io/gh/django-cms/djangocms-icon/branch/master/graph/badge.svg
:target: https://codecov.io/gh/django-cms/djangocms-icon

.. |python| image:: https://img.shields.io/badge/python-3.5+-blue.svg
.. |python| image:: https://img.shields.io/badge/python-3.8+-blue.svg
:target: https://pypi.org/project/djangocms-icon/
.. |django| image:: https://img.shields.io/badge/django-2.2,%203.0,%203.1-blue.svg
.. |django| image:: https://img.shields.io/badge/django-3.2,%204.0-blue.svg
:target: https://www.djangoproject.com/
.. |djangocms| image:: https://img.shields.io/badge/django%20CMS-3.7%2B-blue.svg
.. |djangocms| image:: https://img.shields.io/badge/django%20CMS-3.9%2B-blue.svg
:target: https://www.django-cms.org/
8 changes: 8 additions & 0 deletions djangocms_icon/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _


class DjangocmsIconConfig(AppConfig):
name = 'djangocms_icon'
verbose_name = _("django CMS Icon")
default_auto_field = 'django.db.models.AutoField'
2 changes: 1 addition & 1 deletion djangocms_icon/cms_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class IconPlugin(CMSPluginBase):
]

def get_render_template(self, context, instance, placeholder):
return 'djangocms_icon/{}/icon.html'.format(instance.template)
return f'djangocms_icon/{instance.template}/icon.html'


plugin_pool.register_plugin(IconPlugin)
1 change: 0 additions & 1 deletion djangocms_icon/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from django.utils.translation import gettext_lazy as _

from cms.models import CMSPlugin

from djangocms_attributes_field.fields import AttributesField

from .fields import Icon
Expand Down
5 changes: 5 additions & 0 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
bump2version
Django>3.2
pip-tools
pre-commit
wheel
62 changes: 62 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#
# This file is autogenerated by pip-compile with python 3.10
# To update, run:
#
# pip-compile
#
--trusted-host pypi.python.org
--trusted-host pypi.org
--trusted-host files.pythonhosted.org

asgiref==3.5.2
# via django
build==0.8.0
# via pip-tools
bump2version==1.0.1
# via -r requirements.in
cfgv==3.3.1
# via pre-commit
click==8.1.3
# via pip-tools
distlib==0.3.5
# via virtualenv
django==4.1
# via -r requirements.in
filelock==3.8.0
# via virtualenv
identify==2.5.3
# via pre-commit
nodeenv==1.7.0
# via pre-commit
packaging==21.3
# via build
pep517==0.13.0
# via build
pip-tools==6.8.0
# via -r requirements.in
platformdirs==2.5.2
# via virtualenv
pre-commit==2.20.0
# via -r requirements.in
pyparsing==3.0.9
# via packaging
pyyaml==6.0
# via pre-commit
sqlparse==0.4.2
# via django
toml==0.10.2
# via pre-commit
tomli==2.0.1
# via
# build
# pep517
virtualenv==20.16.3
# via pre-commit
wheel==0.37.1
# via
# -r requirements.in
# pip-tools

# The following packages are considered to be unsafe in a requirements file:
# pip
# setuptools
50 changes: 50 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
[bumpversion]
current_version = 2.0.0
commit = True
tag = False

[bumpversion:file:djangocms_icon/__init__.py]
search = __version__ = '{current_version}'
replace = __version__ = '{new_version}'

[bumpversion:file:CHANGELOG.rst]
search =
unreleased
==========
replace =
unreleased
==========

{new_version} {utcnow:%%Y-%%m-%%d}
================

[flake8]
max-line-length = 119
exclude =
*.egg-info,
.eggs,
.git,
.settings,
.tox,
build,
data,
dist,
docs,
*migrations*,
requirements,
tmp

[isort]
line_length = 119
skip = manage.py, *migrations*, .tox, .eggs, data, .env, .venv
include_trailing_comma = true
multi_line_output = 5
lines_after_imports = 2
default_section = THIRDPARTY
sections = FUTURE, STDLIB, DJANGO, THIRDPARTY, FIRSTPARTY, LOCALFOLDER
known_first_party = djangocms_icon
known_cms = cms, menus
known_django = django

[codespell]
skip = *.js,*.po,./node_modules/*,./.idea/*,./.env/*,./.venv/*,./build/*,./djangocms_icon.egg-info/*
Loading