Skip to content

Commit

Permalink
Use GitHub Actions for testing + Pull Python 3.6 support
Browse files Browse the repository at this point in the history
  • Loading branch information
shaypal5 committed Jan 13, 2022
1 parent 691ede8 commit 1fc7214
Show file tree
Hide file tree
Showing 9 changed files with 189 additions and 2 deletions.
24 changes: 24 additions & 0 deletions .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
32 changes: 32 additions & 0 deletions .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


```
<paste here>
```

Please provide some basic information about your system (Python version,
operating system, &c).
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/Feature_request.md
@@ -0,0 +1,6 @@
---
name: Feature request
about: Suggest an idea for this project

---

22 changes: 22 additions & 0 deletions .github/issue_template.md
@@ -0,0 +1,22 @@



### Expected Behavior



### Actual Behavior



### Steps to Reproduce

1.
2.
3.



### Additional info

- pdpipe version:
16 changes: 16 additions & 0 deletions .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 '(?<![-=\n]\n\n)(?<=\n)(#+ \N*\w\N*|\N*\w\N*\n-+)\n' "$file"; then
# error 'Need two blank lines before heading'
# fi
17 changes: 17 additions & 0 deletions .github/stale.yml
@@ -0,0 +1,17 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
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
35 changes: 35 additions & 0 deletions .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
35 changes: 35 additions & 0 deletions .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
4 changes: 2 additions & 2 deletions setup.py
Expand Up @@ -48,10 +48,10 @@
'Development Status :: 4 - Beta',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 3.5',
'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',
'Intended Audience :: Developers',
Expand Down

0 comments on commit 1fc7214

Please sign in to comment.