Skip to content

Commit

Permalink
v2.1.3
Browse files Browse the repository at this point in the history
--------
2023-07-21:
    - require minimum python 3.8
    - remove python 3.7 tests
    - introduce PEP517 packaging standard
    - introduce pyproject.toml build-system
    - remove mypy.ini
    - remove pytest.ini
    - remove setup.cfg
    - remove setup.py
    - remove .bettercodehub.yml
    - remove .travis.yml
    - update black config
    - clean ./tests/test_cli.py
    - add codeql badge
    - move 3rd_party_stubs outside the src directory to ``./.3rd_party_stubs``
    - add pypy 3.10 tests
    - add python 3.12-dev tests
  • Loading branch information
bitranox committed Jul 21, 2023
1 parent 2a0aacd commit 92aa4dc
Show file tree
Hide file tree
Showing 27 changed files with 334 additions and 690 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
put 3rd party stubs in this directory needed to pass mypy on travis.
put 3rd party stubs in this directory needed to pass mypy on Github Actions.

in the travis.yml the MYPYPATH is set to this directory.
in the Github Actions the MYPYPATH is set to this directory.

for local testing, put the *.pyi Files into another central directory and set the mypy path accordingly.
the reason for that is, that a certain *.pyi have to be only found once by mypy, otherwise it will throw an error.
Expand All @@ -17,6 +17,6 @@ the module "external_test" is used in project_a, and project_b, and package_a im
-- project_B ------- package_b_dir --- 3rd_party_stubs --- external_test.pyi


for travis test of project_A we need to set the MYPYPATH to .../projects/project_A/package_a_dir/3rd_party_stubs
for travis test of project_A we need to set the MYPYPATH to .../projects/project_A/3rd_party_stubs

for local tests, we need to set the MYPYPATH to .../projects/stub_directory , not to find external_test.pyi twice.
6 changes: 0 additions & 6 deletions .bettercodehub.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .docs/README_template.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ rst_include
===========


Version v2.1.2.2 as of 2022-06-03 see `Changelog`_
Version v2.1.3 as of 2023-07-21 see `Changelog`_


.. include:: ./badges.rst
Expand All @@ -11,10 +11,10 @@ Version v2.1.2.2 as of 2022-06-03 see `Changelog`_

----

automated tests, Travis Matrix, Documentation, Badges, etc. are managed with `PizzaCutter <https://github
automated tests, Github Actions, Documentation, Badges, etc. are managed with `PizzaCutter <https://github
.com/bitranox/PizzaCutter>`_ (cookiecutter on steroids)

Python version required: 3.6.0 or newer
Python version required: 3.8.0 or newer

.. include:: ./tested_under.rst

Expand Down
13 changes: 6 additions & 7 deletions .docs/badges.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
|build_badge| |license| |pypi| |pypi-downloads| |black|

|codecov| |better_code| |cc_maintain| |cc_issues| |cc_coverage| |snyk|
|build_badge| |codeql| |license| |pypi|
|pypi-downloads| |black| |codecov| |cc_maintain| |cc_issues| |cc_coverage| |snyk|



.. |build_badge| image:: https://github.com/bitranox/rst_include/actions/workflows/python-package.yml/badge.svg
:target: https://github.com/bitranox/rst_include/actions/workflows/python-package.yml


.. |codeql| image:: https://github.com/bitranox/rst_include/actions/workflows/codeql-analysis.yml/badge.svg?event=push
:target: https://github.com//bitranox/rst_include/actions/workflows/codeql-analysis.yml

.. |license| image:: https://img.shields.io/github/license/webcomics/pywine.svg
:target: http://en.wikipedia.org/wiki/MIT_License

Expand All @@ -21,9 +23,6 @@
.. |codecov| image:: https://img.shields.io/codecov/c/github/bitranox/rst_include
:target: https://codecov.io/gh/bitranox/rst_include

.. |better_code| image:: https://bettercodehub.com/edge/badge/bitranox/rst_include?branch=master
:target: https://bettercodehub.com/results/bitranox/rst_include

.. |cc_maintain| image:: https://img.shields.io/codeclimate/maintainability-percentage/bitranox/rst_include?label=CC%20maintainability
:target: https://codeclimate.com/github/bitranox/rst_include/maintainability
:alt: Maintainability
Expand All @@ -36,7 +35,7 @@
:target: https://codeclimate.com/github/bitranox/rst_include/test_coverage
:alt: Code Coverage

.. |snyk| image:: https://img.shields.io/snyk/vulnerabilities/github/bitranox/rst_include
.. |snyk| image:: https://snyk.io/test/github/bitranox/rst_include/badge.svg
:target: https://snyk.io/test/github/bitranox/rst_include

.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
Expand Down
4 changes: 2 additions & 2 deletions .docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@
python -m pip install --upgrade -r /<path>/requirements.txt
- to install the latest development version from source code:
- to install the latest development version, including test dependencies from source code:

.. code-block::
# cd ~
$ git clone https://github.com/bitranox/rst_include.git
$ cd rst_include
python setup.py install
python -m pip install -e .[test]
.. include:: ./installation_via_makefile.rst
8 changes: 8 additions & 0 deletions .docs/installation_via_pypi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,11 @@
.. code-block::
python -m pip install --upgrade rst_include
- to install the latest release from PyPi via pip, including test dependencies:

.. code-block::
python -m pip install --upgrade rst_include[test]
4 changes: 2 additions & 2 deletions .docs/tested_under.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
tested on recent linux with python 3.6, 3.7, 3.8, 3.9, 3.10, pypy-3.8 - architectures: amd64
tested on recent linux with python 3.8, 3.9, 3.10, 3.11, 3.12-dev, pypy-3.9, pypy-3.10 - architectures: amd64

`100% code coverage <https://codecov.io/gh/bitranox/rst_include>`_, flake8 style checking ,mypy static type checking ,tested under `Linux, macOS, Windows <https://github.com/bitranox/rst_include/actions/workflows/python-package.yml>`_, automatic daily builds and monitoring
`100% code coverage <https://codeclimate.com/github/bitranox/rst_include/test_coverage>`_, flake8 style checking ,mypy static type checking ,tested under `Linux, macOS, Windows <https://github.com/bitranox/rst_include/actions/workflows/python-package.yml>`_, automatic daily builds and monitoring
5 changes: 5 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[flake8]
max_line_length = 160
ignore = E123, E203, E402, F401, F403, F405, W503
exclude = .git, __pycache__, build, dist, .eggs, .hg, .mypy_cache, .nox, .tox, .venv, _build, buck-out
max-complexity = 20
87 changes: 46 additions & 41 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
# MYPY tests
MYPY_DO_TESTS: "True"
MYPY_OPTIONS: "--follow-imports=normal --ignore-missing-imports --implicit-reexport --install-types --no-warn-unused-ignores --non-interactive --strict"
MYPYPATH: "./rst_include/3rd_party_stubs"
MYPYPATH: "./.3rd_party_stubs"

# coverage
DO_COVERAGE: "True"
Expand All @@ -71,15 +71,15 @@ jobs:
matrix:
include:
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-software
# https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#available-versions-of-python-and-pypy

- os: windows-latest
python-version: "3.10"
python-version: "3.11"
env:
cEXPORT: "SET"
BUILD_DOCS: "False"
DEPLOY_SDIST: "False"
DEPLOY_WHEEL: "False"
DEPLOY_TEST: "False"
BUILD: "False"
BUILD_TEST: "False"
MYPY_DO_TESTS: "True"
# Setup tests
DO_SETUP_INSTALL: "True"
Expand All @@ -89,87 +89,91 @@ jobs:


- os: ubuntu-latest
python-version: "3.6"
python-version: "3.8"
env:
BUILD_DOCS: "False"
DEPLOY_SDIST: "True"
DEPLOY_WHEEL: "True"
DEPLOY_TEST: "True"
BUILD: "True"
BUILD_TEST: "True"
MYPY_DO_TESTS: "True"
DO_SETUP_INSTALL: "True"
DO_SETUP_INSTALL_TEST: "False"
DO_SETUP_INSTALL_TEST: "True"
DO_CLI_TEST: "True"

- os: ubuntu-latest
python-version: "3.7"
python-version: "3.9"
env:
BUILD_DOCS: "False"
DEPLOY_SDIST: "True"
DEPLOY_WHEEL: "True"
DEPLOY_TEST: "True"
BUILD: "True"
BUILD_TEST: "True"
MYPY_DO_TESTS: "True"
DO_SETUP_INSTALL: "True"
DO_SETUP_INSTALL_TEST: "False"
DO_SETUP_INSTALL_TEST: "True"
DO_CLI_TEST: "True"

- os: ubuntu-latest
python-version: "3.8"
python-version: "3.10"
env:
BUILD_DOCS: "False"
DEPLOY_SDIST: "True"
DEPLOY_WHEEL: "True"
DEPLOY_TEST: "True"
BUILD: "True"
BUILD_TEST: "True"
MYPY_DO_TESTS: "True"
DO_SETUP_INSTALL: "True"
DO_SETUP_INSTALL_TEST: "False"
DO_SETUP_INSTALL_TEST: "True"
DO_CLI_TEST: "True"

- os: ubuntu-latest
python-version: "3.9"
python-version: "3.11"
env:
BUILD_DOCS: "False"
DEPLOY_SDIST: "True"
DEPLOY_WHEEL: "True"
DEPLOY_TEST: "True"
BUILD_DOCS: "True"
BUILD: "True"
BUILD_TEST: "True"
MYPY_DO_TESTS: "True"
DO_SETUP_INSTALL: "True"
DO_SETUP_INSTALL_TEST: "False"
DO_SETUP_INSTALL_TEST: "True"
DO_CLI_TEST: "True"

- os: ubuntu-latest
python-version: "3.10"
python-version: "3.12-dev"
env:
BUILD_DOCS: "True"
DEPLOY_SDIST: "True"
DEPLOY_WHEEL: "True"
DEPLOY_TEST: "True"
BUILD: "True"
BUILD_TEST: "True"
MYPY_DO_TESTS: "True"
DO_SETUP_INSTALL: "True"
DO_SETUP_INSTALL_TEST: "True"
DO_CLI_TEST: "True"

- os: ubuntu-latest
python-version: "pypy-3.9"
env:
BUILD_DOCS: "False"
BUILD: "True"
BUILD_TEST: "True"
MYPY_DO_TESTS: "True"
DO_SETUP_INSTALL: "True"
DO_SETUP_INSTALL_TEST: "True"
DO_CLI_TEST: "True"

- os: ubuntu-latest
python-version: "pypy-3.8"
python-version: "pypy-3.10"
env:
BUILD_DOCS: "False"
DEPLOY_SDIST: "True"
DEPLOY_WHEEL: "True"
DEPLOY_TEST: "True"
MYPY_DO_TESTS: "False"
BUILD: "True"
BUILD_TEST: "True"
MYPY_DO_TESTS: "True"
DO_SETUP_INSTALL: "True"
DO_SETUP_INSTALL_TEST: "False"
DO_SETUP_INSTALL_TEST: "True"
DO_CLI_TEST: "True"

- os: macos-latest
python-version: "3.10"
python-version: "3.11"
env:
cPREFIX: "" # prefix before commands - used for wine, there the prefix is "wine"
cPYTHON: "python3" # command to launch python interpreter (it's different on macOS, there we need python3)
cPIP: "python3 -m pip" # command to launch pip (it's different on macOS, there we need pip3)
BUILD_DOCS: "False"
DEPLOY_SDIST: "True"
DEPLOY_WHEEL: "True"
DEPLOY_TEST: "True"
BUILD: "True"
BUILD_TEST: "True"
MYPY_DO_TESTS: "True"
# Setup tests
DO_SETUP_INSTALL: "True"
Expand All @@ -185,7 +189,8 @@ jobs:
- uses: actions/checkout@v3

- name: Setting up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
# see: https://github.com/actions/setup-python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand Down
Loading

0 comments on commit 92aa4dc

Please sign in to comment.