-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add pre-commit with black, flake8 and refactor code * fix bugs and move contrib out of main package * update makefile and github ci workflow * bump version
- Loading branch information
1 parent
949d298
commit d4ee985
Showing
23 changed files
with
596 additions
and
488 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: "install" | ||
description: "install requirements" | ||
|
||
inputs: | ||
python-version: | ||
required: false | ||
description: "python version" | ||
default: "3.10" | ||
outputs: {} | ||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{inputs.python-version}} | ||
- name: install requirements | ||
run: pip install -r requirements.txt | ||
shell: bash | ||
- name: install package | ||
run: pip install . | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: ci | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- "**" | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code repository | ||
uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
uses: ./.github/actions/install | ||
- name: Run pre-commit | ||
run: pre-commit run --all-files | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.10"] | ||
steps: | ||
- name: Checkout code repository | ||
uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
uses: ./.github/actions/install | ||
- name: Run unit tests | ||
run: pytest | ||
env: | ||
python-version: ${{ matrix.python-version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.0.1 | ||
hooks: | ||
- id: check-ast | ||
- id: check-added-large-files | ||
- id: check-merge-conflict | ||
- id: check-case-conflict | ||
- id: check-docstring-first | ||
- id: check-json | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: mixed-line-ending | ||
- repo: local | ||
hooks: | ||
- id: black | ||
name: black | ||
entry: black . | ||
language: system | ||
types: [python] | ||
- id: flake8 | ||
name: flake8 | ||
entry: flake8 eparse tests | ||
language: system | ||
types: [python] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.