diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..bd35ebe --- /dev/null +++ b/.gitattributes @@ -0,0 +1,6 @@ + +*.py linguist-language=Python + +*.html linguist-detectable=false +*.sh linguist-detectable=false +*.vimrc linguist-detectable=false diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml new file mode 100644 index 0000000..121beb1 --- /dev/null +++ b/.github/workflows/python-package.yml @@ -0,0 +1,50 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Python package + +on: + push: + branches: [ "master", "dev", "gha" ] + pull_request: + branches: [ "master", "dev", "gha" ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: + - "3.13" + - "3.12" + - "3.11" + - "3.10" + - "3.9" + - "3.8" + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install flake8 pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + + - name: Test with unittest + run: | + python3 -m unittest discover tests diff --git a/CHANGES.md b/CHANGES.md index 834fcdd..365cf81 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,13 @@ # **py2be** Changes +## 0.0.3 - 1st September 2025 + +* GitHub Actions; +* badges; +* .gitattributes; + + ## 0.0.2 - 11th August 2025 * name fixes; diff --git a/README.md b/README.md index 8f3f361..240da98 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,13 @@ # py2be -Simple Python library determining whether strings indicate truey or falsy values. - +![Language](https://img.shields.io/badge/Python-3776AB?style=flat&logo=python&logoColor=white) +[![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) +[![GitHub release](https://img.shields.io/github/v/release/synesissoftware/py2be.svg)](https://github.com/synesissoftware/py2be/releases/latest) +[![Last Commit](https://img.shields.io/github/last-commit/synesissoftware/py2be)](https://github.com/synesissoftware/py2be/commits/master) [![PyPI version](https://badge.fury.io/py/py2be.svg)](https://badge.fury.io/py/py2be) +Simple Python library determining whether strings indicate truey or falsy values. + ## Introduction @@ -87,7 +91,7 @@ Defect reports, feature requests, and pull requests are welcome on https://githu ### Related projects * [**to-be**](https://github.com/synesissoftware/to-be) (**C**); -* [**to-be.Ruby**](https://github.com/synesissoftware/to-be.Ruby); +* [**to_be.Ruby**](https://github.com/synesissoftware/to_be.Ruby); * [**to-be.Rust**](https://github.com/synesissoftware/to-be.Rust); diff --git a/py2be/__init__.py b/py2be/__init__.py index da87163..717d952 100644 --- a/py2be/__init__.py +++ b/py2be/__init__.py @@ -8,7 +8,7 @@ __license__ = 'BSD-3-Clause' __maintainer__ = 'Matt Wilson' __status__ = 'Beta' -__version__ = '0.0.2' +__version__ = '0.0.3' from .truthy import ( str2bool, diff --git a/setup.py b/setup.py index 00fe4ca..39a5c40 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ setuptools.setup( name='py2be', - version='0.0.2', + version='0.0.3', author='Matt Wilson', author_email='matthew@synesis.com.au',