Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiwei2017 committed Apr 10, 2022
2 parents 82dab6d + f4e1429 commit 6685f55
Show file tree
Hide file tree
Showing 14 changed files with 47 additions and 33 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
python-version: '3.9'

- name: Upgrade pip
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: '3.8'
python-version: '3.9'
- name: Run flake8 check
run: make flake8
- name: Run mypy check
Expand All @@ -43,7 +43,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.6, 3.7, 3.8.5, 3.8, 3.9]
python-version: ['3.7', '3.8.5', '3.8', '3.9', '3.10']
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
Expand Down Expand Up @@ -71,10 +71,10 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Deploying

Assume that bump2version_ is installed. To deploy the package, just run::

$ bump2version patch named_enum/version.py # possible: major / minor / patch
$ bump2version patch # possible: major / minor / patch
$ git push
$ git push --tags

Expand Down
3 changes: 2 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ named-enum
.. python version badge from PyPI
.. image:: https://img.shields.io/pypi/pyversions/named-enum.svg
:target: https://pypi.python.org/pypi/named-enum/
:alt: Python 3.6 | Python 3.7 | Python 3.8
:alt: Python 3.7 | Python 3.8 | Python3.9 | Python3.10

.. pypi format
.. image:: https://img.shields.io/pypi/format/named-enum.svg
Expand Down Expand Up @@ -411,5 +411,6 @@ Author
------

* `Zhiwei Zhang <https://github.com/zhiwei2017>`_ - *Maintainer* - `zhiwei2017@gmail.com <mailto:zhiwei2017@gmail.com?subject=[GitHub]Named%20Enum>`_
* `Jianlan Shao <https://github.com/Lan314>`_ - *Developer* - `jianlan.shao@gmail.com <mailto:jianlan.shao@gmail.com?subject=[GitHub]Named%20Enum>`_

**[ ~ Dependencies scanned by** `PyUp.io <https://pyup.io>`_ **~ ]**
2 changes: 1 addition & 1 deletion named_enum/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""Define the version of the web service"""
__version__ = "1.1.0"
__version__ = "1.2.0"
16 changes: 7 additions & 9 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
-r base.txt
bandit~=1.7
flake8~=3.8
mypy==0.910
pytest~=5.0
pytest-cov~=2.6
pytest-runner~=4.4
codecov~=2.1
coverage~=5.1
tox~=3.20
bandit<1.8,>=1.7
flake8<4.1,>=4.0
mypy==0.941
pytest<7.2,>=7.1
pytest-cov<3.1,>=3.0
codecov<2.2,>=2.1
tox<3.25,>=3.24
4 changes: 2 additions & 2 deletions requirements/doc.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-r base.txt
sphinx~=3.3
sphinx_rtd_theme~=0.5
sphinx<4.5,>=4.4
sphinx_rtd_theme<1.1,>=1.0
10 changes: 6 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
[bumpversion]
current_version = 1.1.0
current_version = 1.2.0
commit = True
tag = True
tag = False

[bumpversion:file:./named_enum/version.py]

[flake8]
ignore = F401,E501
select = B,C,E,F,W,T4
max-line-length = 99
max-complexity = 18
exclude =
exclude =
.git,
__pycache__

Expand All @@ -18,7 +20,7 @@ ignore_missing_imports = false
[tool:pytest]
doctest_encoding = latin1
testpaths = tests
addopts =
addopts =
--verbose
--doctest-modules
--doctest-glob=tests/*.txt
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,10 @@ def _parse_requirements(filename):
"Development Status :: 5 - Production/Stable",
"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",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: Implementation",
"Topic :: Utilities",
"Natural Language :: English",
Expand Down
8 changes: 6 additions & 2 deletions tests/enum/test_cls_NamedEnum.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@
... TOM_AND_JERRY = ("Tom", "Jerry")
... MIKE_AND_MOLLY = ("Mike", "Molly")
... except TypeError as e:
... if sys.version_info >= (3, 9):
... if (3, 9) <= sys.version_info < (3, 10):
... str(e) == "<lambda>() missing 1 required positional argument: 'third'"
... elif sys.version_info >= (3, 10):
... str(e) == "NamedTuple.__new__() missing 1 required positional argument: 'third'"
... else:
... str(e) == "__new__() missing 1 required positional argument: 'third'"
True
Expand All @@ -36,8 +38,10 @@
... TOM_AND_JERRY = ("Tom", "Jerry", "Cat", "Mouse")
... MIKE_AND_MOLLY = ("Mike", "Molly", "Husband", "Wife")
... except TypeError as e:
... if sys.version_info >= (3, 9):
... if (3, 9) <= sys.version_info < (3, 10):
... str(e) == "<lambda>() takes 4 positional arguments but 5 were given"
... elif sys.version_info >= (3, 10):
... str(e) == "NamedTuple.__new__() takes 4 positional arguments but 5 were given"
... else:
... str(e) == "__new__() takes 4 positional arguments but 5 were given"
True
Expand Down
8 changes: 6 additions & 2 deletions tests/enum/test_cls_PairEnum.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
... SIMPSONS = ("Homer", "Bart", "Marge")
... DUCKS = ("Huey", "Dewey", "Louie")
... except TypeError as e:
... if sys.version_info >= (3, 9):
... if (3, 9) <= sys.version_info < (3, 10):
... str(e) == "<lambda>() takes 3 positional arguments but 4 were given"
... elif sys.version_info >= (3, 10):
... str(e) == "NamedTuple.__new__() takes 3 positional arguments but 4 were given"
... else:
... str(e) == "__new__() takes 3 positional arguments but 4 were given"
True
Expand All @@ -20,8 +22,10 @@
... SIMPSONS = "Homer"
... DUCKS = "Huey"
... except TypeError as e:
... if sys.version_info >= (3, 9):
... if (3, 9) <= sys.version_info < (3, 10):
... str(e) == "<lambda>() missing 1 required positional argument: 'second'"
... elif sys.version_info >= (3, 10):
... str(e) == "NamedTuple.__new__() missing 1 required positional argument: 'second'"
... else:
... str(e) == "__new__() missing 1 required positional argument: 'second'"
True
Expand Down
8 changes: 6 additions & 2 deletions tests/enum/test_func_namedenum.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ Test script for namedenum with only typename::
... TOM_AND_JERRY = ("Tom", "Jerry")
... MIKE_AND_MOLLY = ("Mike", "Molly")
... except TypeError as e:
... if sys.version_info >= (3, 9):
... if (3, 9) <= sys.version_info < (3, 10):
... str(e) == "<lambda>() missing 1 required positional argument: 'third'"
... elif sys.version_info >= (3, 10):
... str(e) == "NamedTuple.__new__() missing 1 required positional argument: 'third'"
... else:
... str(e) == "__new__() missing 1 required positional argument: 'third'"
True
Expand All @@ -50,8 +52,10 @@ Test script for namedenum with only typename::
... TOM_AND_JERRY = ("Tom", "Jerry", "Cat", "Mouse")
... MIKE_AND_MOLLY = ("Mike", "Molly", "Husband", "Wife")
... except TypeError as e:
... if sys.version_info >= (3, 9):
... if (3, 9) <= sys.version_info < (3, 10):
... str(e) == "<lambda>() takes 4 positional arguments but 5 were given"
... elif sys.version_info >= (3, 10):
... str(e) == "NamedTuple.__new__() takes 4 positional arguments but 5 were given"
... else:
... str(e) == "__new__() takes 4 positional arguments but 5 were given"
True
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = flake8, mypy, bandit, python3.6, python3.7, python3.8, python3.9
envlist = flake8, mypy, bandit, py37, py38, py39, py310
skipsdist = true

[testenv]
Expand Down

0 comments on commit 6685f55

Please sign in to comment.