Skip to content

Pinax 21.05 Release Plan

KatherineMichel edited this page May 29, 2021 · 3 revisions

Table of Contents

Looking Ahead

Many of the following are changes that didn't make it into Pinax Release 20.XX. I plan to do a small, follow up release in April 2021 to implement some of the stragglers.

Pinax Roadmap

Pinax 21.05 Release Overview

  • Drop support for Django 3.0 (Official support ends in April 2021)
  • Continue support for Django 2.2, and Python 3.6, 3.7, and 3.8
  • Add support for Django 3.1 and 3.2, and Python 3.9

App Repo File Tree

.github/workflows/publish.yml will be added to auto-publish packages.

.circleci/config.yml
.github/workflows/publish.yml
pinax/
.gitignore
AUTHORS
LICENSE
Makefile
MANIFEST.in
README.md
makemigrations.py
runtests.py
setup.py
tox.ini

App Updates- Must Have

Update Makefile

Create or Update CircleCI config.yml

version: 2.1

common: &common
  working_directory: ~/repo
  steps:
    - checkout
    - restore_cache:
        keys:
          - v2-deps-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
          - v2-deps-
    - run:
        name: install dependencies
        command: pip install --user tox codecov "coverage<5"
    - run:
        name: run tox
        command: ~/.local/bin/tox
    - run:
        name: upload coverage report
        command: |
           if [[ "$UPLOAD_COVERAGE" != 0 ]]; then
               PATH=$HOME/.local/bin:$PATH
               coverage xml
               ~/.local/bin/codecov --required -X search gcov pycov -f coverage.xml --flags $CIRCLE_JOB
           fi
    - save_cache:
        paths:
          - .tox
          - ~/.cache/pip
          - ~/.local
          - ./eggs
        key: v2-deps-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}

jobs:
  lint:
    <<: *common
    docker:
      - image: circleci/python:3.9
        environment:
          - TOXENV=checkqa
          - UPLOAD_COVERAGE=0
  py36dj22:
    <<: *common
    docker:
      - image: circleci/python:3.6
        environment:
          TOXENV=py36-dj22
  py36dj31:
    <<: *common
    docker:
      - image: circleci/python:3.6
        environment:
          TOXENV=py36-dj31
  py36dj32:
    <<: *common
    docker:
      - image: circleci/python:3.6
        environment:
          TOXENV=py36-dj32
  py37dj22:
    <<: *common
    docker:
      - image: circleci/python:3.7
        environment:
          TOXENV=py37-dj22
  py37dj31:
    <<: *common
    docker:
      - image: circleci/python:3.7
        environment:
          TOXENV=py37-dj31
  py37dj32:
    <<: *common
    docker:
      - image: circleci/python:3.7
        environment:
          TOXENV=py37-dj32
  py38dj22:
    <<: *common
    docker:
      - image: circleci/python:3.8
        environment:
          TOXENV=py38-dj22
  py38dj31:
    <<: *common
    docker:
      - image: circleci/python:3.8
        environment:
          TOXENV=py38-dj31
  py38dj32:
    <<: *common
    docker:
      - image: circleci/python:3.8
        environment:
          TOXENV=py38-dj32
  py39dj22:
    <<: *common
    docker:
      - image: circleci/python:3.9
        environment:
          TOXENV=py39-dj22
  py39dj31:
    <<: *common
    docker:
      - image: circleci/python:3.9
        environment:
          TOXENV=py39-dj31
  py39dj32:
    <<: *common
    docker:
      - image: circleci/python:3.9
        environment:
          TOXENV=py39-dj32
workflows:
  version: 2
  test:
    jobs:
      - lint
      - py36dj22
      - py36dj31
      - py36dj32
      - py37dj22
      - py37dj31
      - py37dj32
      - py38dj22
      - py38dj31
      - py38dj32
      - py39dj22
      - py39dj31
      - py39dj32

Update tox.ini

# tox.ini

[flake8]
ignore = E265,E501,W504
max-line-length = 100
max-complexity = 10
exclude = **/*/migrations/*
inline-quotes = double

[isort]
multi_line_output=3
known_django=django
known_third_party=account,appconf,pinax
sections=FUTURE,STDLIB,DJANGO,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
include_trailing_comma=True
skip_glob=**/*/migrations/*

[coverage:run]
source = pinax
omit = **/*/conf.py,**/*/tests/*,**/*/migrations/*,**/*/admin.py
branch = true
data_file = .coverage

[coverage:report]
omit = **/*/conf.py,**/*/tests/*,**/*/migrations/*,**/*/admin.py
exclude_lines =
    coverage: omit
show_missing = True

[tox]
envlist =
    checkqa,
    py{36,37,38,39}-dj{22,31,32}
   
[testenv]
passenv = CI CIRCLECI CIRCLE_*
deps =
    coverage<5
    codecov
    dj22: Django>=2.2,<3.0
    dj31: Django>=3.1,<3.2
    dj32: Django>=3.2,<3.3
    master: https://github.com/django/django/tarball/master

usedevelop = True
commands =
    coverage run setup.py test
    coverage report -m --skip-covered

[testenv:checkqa]
commands =
    flake8 pinax
    isort --recursive --check-only --diff pinax -sp tox.ini
deps =
    flake8 == 3.9.0
    flake8-quotes == 3.2.0
    isort == 5.8.0

Update Third-Party Dependencies

Update setup.py

Supported Django and Python Versions
------------------------------------

+-----------------+-----+-----+-----+-----+
| Django / Python | 3.6 | 3.7 | 3.8 | 3.9 |
+=================+=====+=====+=====+=====+
|  2.2            |  *  |  *  |  *  |  *  |
+-----------------+-----+-----+-----+=====+
|  3.1            |  *  |  *  |  *  |  *  |
+-----------------+-----+-----+-----+=====+
|  3.2            |  *  |  *  |  *  |  *  |
+-----------------+-----+-----+-----+-----+

Note: Development Status` is not always Production/Stable``

    classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Environment :: Web Environment",
        "Framework :: Django",
        "Framework :: Django :: 2.2",
        "Framework :: Django :: 3.1",
        "Framework :: Django :: 3.2",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.6",
        "Programming Language :: Python :: 3.7",
        "Programming Language :: Python :: 3.8",
        "Programming Language :: Python :: 3.9",
        "Topic :: Software Development :: Libraries :: Python Modules",
    ],

Update Version Number, Supported Versions Matrix, and Change Log

Update README.md

#### Supported Django and Python Versions

Django / Python | 3.6 | 3.7 | 3.8 | 3.9
--------------- | --- | --- | --- | ---  
2.2  |  *  |  *  |  *  |  *   
3.1  |  *  |  *  |  *  |  *  
3.2  |  *  |  *  |  *  |  *  

Remove 'python setup.py test'

'python setup.py test' will become deprecated. See: https://github.com/pypa/setuptools/issues/1684

Pinax Starter App, Pinax CLI, and Pinax Starter Projects

pinax-starter-app Updates

pinax-cli Updates

Drop Django 2.0 Support in Pinax Starter Projects

Automation

Add Support for Black

Pending stable release ([Django Technical Board has adopted Black as Django's official formatter](https://twitter.com/andrewgodwin/status/1127027840296177666))

(See: https://github.com/pinax/pinax/issues/146)

Improve Authors File Automation

In June 2019, I created an issue about automating adding authors to AUTHORS files in each repo (See: https://github.com/pinax/pinax/issues/148).

Mfon created a script to manually generate a list of authors to add.

Thea Flowers, who spoke at PyCon 2019 about the topic of AUTHORS file automation, recently reminded me of the AUTHORS file automation script used by pip and I passed the example on to Mfon.

Mfon used it to improve upon his original AUTHORS file script. This can be used for next release.

The script is currently run manually. Preferably, the script will eventually run automatically.

GitHub Actions- Auto-Publish to PyPI

PyPI has a GitHub Action that can be used to auto-publish a package to PyPI or PyPI test instance.

James is on board with adding the official PyPI Publish GitHub Action to every Pinax app included in the release.

The PyPI username and password or an API token for each app can be stored as encrypted variables in the secrets section of the repo, or possibly as an organization-wide secret.

The workflow can also be setup to publish first to the test instance of PyPI, TestPyPI.

(After implementation, this issue can be closed: "Auto-publish packages using CircleCI")

GitHub Actions- Test Matrix and CI

Convert CircleCI to GitHub Actions Continuous Integration

For apps that were included in the 18.01 release, the existing .circleci/config.yml will need to be deleted. For those that weren't, any existing .travis.yml will need to be deleted

All references to CircleCI throughout the repo will need to be removed, for instance, in the tox.ini file.

A .github/workflows/test.yml file will need to be added to the repo.

.github/workflows/test.yml Example

Replace tox with a GitHub Action

We will consider replacing CircleCI with GitHub Actions CI.

While it's tempting to go one step further and use GitHub Actions in place of tox as well, Pinax already has a well-established local testing process handled by tox and a Makefile.

Perhaps it's best to leave tox in place and re-evaluate in the future as GitHub Actions tools and examples mature.

If CircleCI is replaced with GitHub Actions CI, any reference to CircleCI needs to be removed.

App Updates- Nice to Have

Update Templates

SemVer Bots

Several Probot apps based on the Semantic Versioning specification can be used together to automate the release process. Unfortunately, this suite of apps was written specifically for node.js, but the possibility of creating a Python version has been brought up in a Probot issue.

Several Probot apps of interest:

Documentation Automation

(See also issue: "Automatic site building and deployments with mkdocs")

From Last Release

Update .gitignore

Remove .coveragerc

Remove setup.cfg

Update MANIFEST.in

Update Standard License

Remove CONTRIBUTING.md

Miscellaneous

Community Plan Updates

Double Check Dependencies

Double check dependency versions in tox file and setup.py. I'm not sure that these were all consistent in the 20.XX release. Also, check dependency wording and versions in README.mds. Should these entries have dependency versions or not?

PyPI Classifer

It was suggested by a contributors that the following PyPI classifer be added to each setup.py (See example: https://github.com/pinax/pinax-notifications/blob/master/setup.py#L90)

'Programming Language :: Python :: 3 :: Only',

tox Command

Is this tox command in Makefile the best choice?

tox --parallel--safe-build```

Third Party Import Sorting

Double check that tox third-party import sorting is correct and does not include unnecessary info.

Remove References to six

Check for six in Django User Accounts tox file and other tox files of other projects.

Possible New Best Practices

  • In Change Log, link to PR

History

Move any history information into dedication History section.

Security Policy

Pinax does not have a dedicated security plan.

Although it's rare to have a Pinax security issue brought up, it's an important aspect of maintenance.

A security policy can be added to an organizational-level, default, community health files repo as a file named SECURITY.md.

Although more detailed than what would be needed for Pinax, check out Django's security policy for an example of a thorough, large-scale policy.

(For more info, see: "Adding a security policy to your repo")

Reference

Clone this wiki locally