From a478d54be8f7e55ae51ee2fbc0c98a9d543a6951 Mon Sep 17 00:00:00 2001 From: Shay Palachy Date: Wed, 19 Jan 2022 15:38:11 +0200 Subject: [PATCH] Add 3.10 support + drop 3.6 support --- .flake8 | 24 ++++++++++++++++ .github/ISSUE_TEMPLATE/Bug_report.md | 32 +++++++++++++++++++++ .github/ISSUE_TEMPLATE/Feature_request.md | 6 ++++ .github/issue_template.md | 22 ++++++++++++++ .github/lint-markdown.sh | 16 +++++++++++ .github/stale.yml | 17 +++++++++++ .github/workflows/lint.yml | 35 +++++++++++++++++++++++ .github/workflows/test.yml | 35 +++++++++++++++++++++++ setup.py | 3 +- 9 files changed, 189 insertions(+), 1 deletion(-) create mode 100644 .flake8 create mode 100644 .github/ISSUE_TEMPLATE/Bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/Feature_request.md create mode 100644 .github/issue_template.md create mode 100755 .github/lint-markdown.sh create mode 100644 .github/stale.yml create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/test.yml diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..286cd6c --- /dev/null +++ b/.flake8 @@ -0,0 +1,24 @@ +[flake8] +# ignore = D203 +exclude = + # No need to traverse our git directory + .git, + # There's no value in checking cache directories + __pycache__, + # The conf file is mostly autogenerated, ignore it + docs/source/conf.py, + # The old directory contains Flake8 2.0 + old, + # This contains our built documentation + build, + # This contains builds of flake8 that we don't want to check + dist, + notebooks, + doc, + .venv, + .github, + .pytest_cache, + .eggs, + versioneer.py + _version.py +max-complexity = 10 diff --git a/.github/ISSUE_TEMPLATE/Bug_report.md b/.github/ISSUE_TEMPLATE/Bug_report.md new file mode 100644 index 0000000..0156af4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Bug_report.md @@ -0,0 +1,32 @@ +--- +name: Bug report +about: Create a report to help us improve + +--- + +Summary. + +## Expected Result + +What you expected. + +## Actual Result + +What happened instead. + +## Reproduction Steps + +```python +import pdpipe + +``` + +## System Information + + +``` + +``` + +Please provide some basic information about your system (Python version, +operating system, &c). diff --git a/.github/ISSUE_TEMPLATE/Feature_request.md b/.github/ISSUE_TEMPLATE/Feature_request.md new file mode 100644 index 0000000..d06eebb --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Feature_request.md @@ -0,0 +1,6 @@ +--- +name: Feature request +about: Suggest an idea for this project + +--- + diff --git a/.github/issue_template.md b/.github/issue_template.md new file mode 100644 index 0000000..b9bce24 --- /dev/null +++ b/.github/issue_template.md @@ -0,0 +1,22 @@ + + + +### Expected Behavior + + + +### Actual Behavior + + + +### Steps to Reproduce + +1. +2. +3. + + + +### Additional info + +- pdpipe version: diff --git a/.github/lint-markdown.sh b/.github/lint-markdown.sh new file mode 100755 index 0000000..3eab68d --- /dev/null +++ b/.github/lint-markdown.sh @@ -0,0 +1,16 @@ +#!/bin/bash +set -eu + +error () { echo "ERROR in '$file': $@" >&2; exit 1; } + +for file in "$@"; do + if grep '\x0D' "$file"; then + error 'Use LF to end lines, not CRLF' + fi + if grep -Pv '^(\[[^\]]+\]: .*|\[!.*\))$' "$file" | grep -Pvn '^.{0,90}$'; then + error 'Lines too long' + fi +done +# if grep -Pzo '(? + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. +# Comment to post when closing a stale issue. Set to `false` to disable +closeComment: false diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..a27b5c8 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,35 @@ + +name: Lint + +on: [push] + +jobs: + build: + runs-on: ${{ matrix.os }} + environment: + name: test + strategy: + fail-fast: false + matrix: + python-version: [3.8] + os: [ubuntu-latest] + + steps: + - name: Check out Git repository + uses: actions/checkout@v2 + + - name: set up python 3.8 + uses: actions/setup-python@v1 + with: + python-version: 3.8 + + # Install your linters here + - name: Install flake8 + run: | + python -m pip install flake8 + - name: Run linters + uses: wearerequired/lint-action@v1 + with: + flake8: true + continue_on_error: false + # Enable your linters here diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..7c1e6c2 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,35 @@ +name: Test + +on: [push, pull_request] + +jobs: + build: + runs-on: ${{ matrix.os }} + environment: + name: test + strategy: + fail-fast: false + matrix: + python-version: [3.7, 3.8, 3.9, '3.10'] + os: [ubuntu-latest, macOS-latest, windows-latest] + + steps: + - uses: actions/checkout@v1 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install --upgrade pytest codecov wheel + python -m pip install --only-binary=all numpy scipy pandas scikit-learn + python -m pip install -e ".[test]" + - name: Unit tests + run: | + python -m pytest + - name: Report coverage + run: | + python -m codecov diff --git a/setup.py b/setup.py index ec942bb..b2d5a7f 100644 --- a/setup.py +++ b/setup.py @@ -48,9 +48,10 @@ 'License :: OSI Approved :: MIT License', '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', 'Topic :: Software Development :: Libraries', 'Topic :: Software Development :: Libraries :: Python Modules', ],