Skip to content

Commit

Permalink
v1.2.9
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 89abf00 commit c74987e
Show file tree
Hide file tree
Showing 35 changed files with 740 additions and 686 deletions.
@@ -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.

10 changes: 5 additions & 5 deletions .coveragerc
Expand Up @@ -7,6 +7,11 @@
# (boolean, default False): whether to measure branch coverage in addition to statement coverage
branch = True

omit =
venv/*
tests/*
setup.py


[report]
# Regexes for lines to exclude from consideration
Expand All @@ -29,8 +34,3 @@ exclude_lines=

ignore_errors = True

omit =
venv/*
tests/*
setup.py
conf_lib_platform.py
6 changes: 3 additions & 3 deletions .docs/README_template.rst
Expand Up @@ -2,7 +2,7 @@ lib_platform
============


Version v1.2.7 as of 2020-10-09 see `Changelog`_
Version v1.2.9 as of 2023-07-21 see `Changelog`_


.. include:: ./badges.rst
Expand All @@ -11,10 +11,10 @@ Version v1.2.7 as of 2020-10-09 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
23 changes: 14 additions & 9 deletions .docs/badges.rst
@@ -1,16 +1,20 @@
|travis_build| |license| |jupyter| |pypi|
|build_badge| |codeql| |license| |jupyter| |pypi|
|pypi-downloads| |black| |codecov| |cc_maintain| |cc_issues| |cc_coverage| |snyk|

|codecov| |better_code| |cc_maintain| |cc_issues| |cc_coverage| |snyk|


.. |travis_build| image:: https://img.shields.io/travis/bitranox/lib_platform/master.svg
:target: https://travis-ci.org/bitranox/lib_platform
.. |build_badge| image:: https://github.com/bitranox/lib_platform/actions/workflows/python-package.yml/badge.svg
:target: https://github.com/bitranox/lib_platform/actions/workflows/python-package.yml


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

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

.. |jupyter| image:: https://mybinder.org/badge_logo.svg
:target: https://mybinder.org/v2/gh/bitranox/lib_platform/master?filepath=lib_platform.ipynb
:target: https://mybinder.org/v2/gh/bitranox/lib_platform/master?filepath=lib_platform.ipynb

.. for the pypi status link note the dashes, not the underscore !
.. |pypi| image:: https://img.shields.io/pypi/status/lib-platform?label=PyPI%20Package
Expand All @@ -19,9 +23,6 @@
.. |codecov| image:: https://img.shields.io/codecov/c/github/bitranox/lib_platform
:target: https://codecov.io/gh/bitranox/lib_platform

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

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

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

.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black

.. |pypi-downloads| image:: https://img.shields.io/pypi/dm/lib-platform
:target: https://pypi.org/project/lib-platform/
:alt: PyPI - Downloads
2 changes: 1 addition & 1 deletion .docs/commandline_help.rst
@@ -1,4 +1,4 @@
.. code-block:: bash
.. code-block::
Usage: lib_platform [OPTIONS] COMMAND [ARGS]...
Expand Down
12 changes: 6 additions & 6 deletions .docs/installation.rst
@@ -1,7 +1,7 @@
- Before You start, its highly recommended to update pip and setup tools:


.. code-block:: bash
.. code-block::
python -m pip --upgrade pip
python -m pip --upgrade setuptools
Expand All @@ -12,14 +12,14 @@
- to install the latest version from github via pip:


.. code-block:: bash
.. code-block::
python -m pip install --upgrade git+https://github.com/bitranox/lib_platform.git
- include it into Your requirements.txt:

.. code-block:: bash
.. code-block::
# Insert following line in Your requirements.txt:
# for the latest Release on pypi:
Expand All @@ -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:: bash
.. code-block::
# cd ~
$ git clone https://github.com/bitranox/lib_platform.git
$ cd lib_platform
python setup.py install
python -m pip install -e .[test]
.. include:: ./installation_via_makefile.rst
10 changes: 9 additions & 1 deletion .docs/installation_via_pypi.rst
@@ -1,5 +1,13 @@
- to install the latest release from PyPi via pip (recommended):

.. code-block:: bash
.. code-block::
python -m pip install --upgrade lib_platform
- to install the latest release from PyPi via pip, including test dependencies:

.. code-block::
python -m pip install --upgrade lib_platform[test]
4 changes: 2 additions & 2 deletions .docs/tested_under.rst
@@ -1,3 +1,3 @@
tested on linux "bionic" with python 3.6, 3.7, 3.8, 3.9-dev, pypy3 - architectures: amd64, ppc64le, s390x, arm64
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/lib_platform>`_, flake8 style checking ,mypy static type checking ,tested under `Linux, macOS, Windows <https://travis-ci.org/bitranox/lib_platform>`_, automatic daily builds and monitoring
`100% code coverage <https://codeclimate.com/github/bitranox/lib_platform/test_coverage>`_, flake8 style checking ,mypy static type checking ,tested under `Linux, macOS, Windows <https://github.com/bitranox/lib_platform/actions/workflows/python-package.yml>`_, automatic daily builds and monitoring
5 changes: 5 additions & 0 deletions .flake8
@@ -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
70 changes: 70 additions & 0 deletions .github/workflows/codeql-analysis.yml
@@ -0,0 +1,70 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ master, development ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master, development ]
schedule:
- cron: '40 13 * * 6'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'python' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

0 comments on commit c74987e

Please sign in to comment.