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

Drop Python 3.5/3.6; add Python 3.9/3.10 (#122, #123, #124, #125) #127

Merged
merged 2 commits into from Jun 8, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
52 changes: 23 additions & 29 deletions .github/workflows/main.yml
@@ -1,3 +1,4 @@
---
name: CI

on: [push]
Expand All @@ -7,33 +8,26 @@ jobs:

runs-on: ubuntu-latest

strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']

name: Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v1

- name: Set up Python 3.5
uses: actions/setup-python@v1
with:
python-version: 3.5

- name: Set up Python 3.6
uses: actions/setup-python@v1
with:
python-version: 3.6

- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7

- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8

- name: Install CI dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt

- name: Run tests
run: tox
- uses: actions/checkout@v2.3.5

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

- name: Update pip and install dev requirements
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt

- name: Lint
run: make lint

- name: Test
run: tox
2 changes: 1 addition & 1 deletion LICENSE
Expand Up @@ -2,7 +2,7 @@
License
=======

Copyright (c) 2013-2014 Will Kahn-Greene
Copyright (c) 2013-2022 Will Kahn-Greene
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
9 changes: 7 additions & 2 deletions Makefile
Expand Up @@ -7,12 +7,17 @@ help:

.PHONY: clean
clean: ## Clean build artifacts
rm -rf build dist dennis.egg-info .tox
rm -rf build dist dennis.egg-info
rm -rf docs/_build/*
rm -rf _pytest_cache/ .tox
find dennis/ tests/ -name __pycache__ | xargs rm -rf
find dennis/ tests/ -name '*.pyc' | xargs rm -rf

.PHONY: lint
lint: ## Lint and black reformat files
black --target-version=py35 dennis tests
black --target-version=py37 setup.py dennis tests
flake8 dennis tests

.PHONY: test
test: ## Run tests
tox
18 changes: 9 additions & 9 deletions requirements-dev.txt
@@ -1,12 +1,12 @@
-e .

# tools
black==19.3b0 ; python_version >= '3.6'
check-manifest==0.37
flake8==3.7.8
pytest==3.7.2
pytest-wholenodeid==0.2
Sphinx==1.7.7
tox==3.2.1
twine==1.11.0
wheel==0.31.1
black==22.3.0
check-manifest==0.48
flake8==4.0.1
pytest==7.1.2
Sphinx==4.3.2
tox==3.25.0
tox-gh-actions==2.9.1
twine==4.0.1
wheel==0.37.1
58 changes: 29 additions & 29 deletions setup.py
@@ -1,7 +1,7 @@
#######################################################################
# This file is part of dennis.
#
# Copyright (C) 2013-2014 Will Kahn-Greene
# Copyright (C) 2013-2022 Will Kahn-Greene
# Licensed under the Simplified BSD License. See LICENSE for full
# license.
#######################################################################
Expand All @@ -11,55 +11,55 @@
import os


READMEFILE = 'README.rst'
VERSIONFILE = os.path.join('dennis', '__init__.py')
READMEFILE = "README.rst"
VERSIONFILE = os.path.join("dennis", "__init__.py")
VSRE = r"""^__version__ = ['"]([^'"]*)['"]"""


def get_version():
version_file = open(VERSIONFILE, 'rt').read()
version_file = open(VERSIONFILE, "rt").read()
return re.search(VSRE, version_file, re.M).group(1)


setup(
name='dennis',
name="dennis",
version=get_version(),
description=(
'Utilities for working with PO and POT files to ease development '
'and improve localization quality'
"Utilities for working with PO and POT files to ease development "
"and improve localization quality"
),
long_description=open(READMEFILE).read(),
license='Simplified BSD License',
author='Will Kahn-Greene',
author_email='willkg@bluesock.org',
keywords='l10n localization PO POT lint translate development',
url='https://github.com/willkg/dennis',
license="Simplified BSD License",
author="Will Kahn-Greene",
author_email="willkg@bluesock.org",
keywords="l10n localization PO POT lint translate development",
url="https://github.com/willkg/dennis",
zip_safe=True,
packages=find_packages(),
include_package_data=True,
install_requires=[
'polib>=1.0.8',
'click>=6',
"polib>=1.0.8",
"click>=6",
],
entry_points="""
[console_scripts]
dennis-cmd=dennis.cmdline:click_run
""",
python_requires='>=3.5',
python_requires=">=3.7",
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'License :: OSI Approved :: BSD License',
'Operating System :: MacOS :: MacOS X',
'Operating System :: POSIX',
'Operating System :: POSIX :: Linux',
'Operating System :: Unix',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3 :: Only',
"Development Status :: 4 - Beta",
"Environment :: Console",
"License :: OSI Approved :: BSD License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX",
"Operating System :: POSIX :: Linux",
"Operating System :: Unix",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3 :: Only",
],
)
26 changes: 11 additions & 15 deletions tox.ini
@@ -1,18 +1,14 @@
# Tox (https://tox.readthedocs.io/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.

[tox]
envlist = py35,py36,py37,py38,py36-lint

[testenv]
commands = pip install -r requirements-dev.txt
pytest
envlist = py37,py38,py39,py310

[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310

[testenv:py36-lint]
basepython = python3.6
commands = pip install -r requirements-dev.txt
black --check --target-version=py35 dennis tests
flake8 dennis tests
[testenv]
commands =
pip install -r requirements-dev.txt
{posargs:pytest tests/}