Skip to content

Commit

Permalink
Merge pull request #18 from blueinkhq/feature/add-header-provisions
Browse files Browse the repository at this point in the history
Feature/add header provisions
  • Loading branch information
joe-sheldon authored Oct 13, 2023
2 parents 2020645 + 6189c31 commit 146b789
Show file tree
Hide file tree
Showing 42 changed files with 2,326 additions and 1,213 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/build-wheel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
on:
push:
branches:
- main
- develop

jobs:
build_wheel:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Build wheel and install
run: |
python -m pip install --user --upgrade build
python -m build
- name: archive build artifacts
uses: actions/upload-artifact@v3
with:
name: dist-files
path: dist/*
# #pip install .
# find ./dist/*.whl | xargs pip install
# python simple_test.py
# - name: Configure Git
# run: |
# git config --global user.email "apwheele@gmail.com"
# git config --global user.name "apwheele"
# - name: Commit and push wheel
# run: |
# git add -f ./dist/*.whl
# git commit -m 'pushing new wheel'
# git push
50 changes: 50 additions & 0 deletions .github/workflows/helper-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: PyTests

on: [push]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4

with:
python-version: ${{ matrix.python-version }}

- name: Cache pip modules
id: cache-pip
uses: actions/cache@v3
env:
cache-name: cache-pip-modules
with:
path: ~/.cache/pip
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('requirements.txt') }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
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 BundleHelper
run: |
pytest ./src/blueink/tests/test_bundle_helper.py
- name: Test PersonHelper
run: |
pytest ./src/blueink/tests/test_person_helper.py
14 changes: 14 additions & 0 deletions .github/workflows/style-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Style Checks

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: psf/black@stable
with:
options: "--check --verbose"
src: "./src"
version: "~= 22.0"
18 changes: 18 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-added-large-files
- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black
language_version: python3.9
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort
Loading

0 comments on commit 146b789

Please sign in to comment.