From 6f929d95c07fb4c8a8b300246a3f1465ac61b214 Mon Sep 17 00:00:00 2001 From: Joshua Gould Date: Fri, 28 Oct 2022 14:33:49 -0400 Subject: [PATCH 1/2] added ci --- .github/workflows/test.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..37c97ee --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,29 @@ +name: test +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: true + matrix: + python-version: [ 3.8, 3.9] + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + pip install --upgrade pip + SETUPTOOLS_SCM_PRETEND_VERSION=0.0.1 pip install .[test] + - name: Test with pytest + run: | + pytest + env: + CI: true From 5bea580bb258354c2ff2c793f5b911dd95c2c2c3 Mon Sep 17 00:00:00 2001 From: Joshua Gould Date: Fri, 28 Oct 2022 14:38:22 -0400 Subject: [PATCH 2/2] added pre-commit --- .pre-commit-config.yaml | 29 +++++++++++++++++++++++++++++ README.rst | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..c89a754 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,29 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.3.0 + hooks: + # - id: double-quote-string-fixer # for single quotes: uncomment and add black config “skip-string-normalization” + - id: trailing-whitespace + - id: end-of-file-fixer + - repo: https://github.com/PyCQA/docformatter + rev: v1.5.0 + hooks: + - id: docformatter + args: ["--wrap-summaries=100", "--wrap-descriptions=100"] + - repo: https://github.com/psf/black + rev: 22.10.0 + hooks: + - id: black + - repo: https://github.com/pycqa/isort + rev: 5.10.1 + hooks: + - id: isort + - repo: https://github.com/csachs/pyproject-flake8 + rev: v5.0.4a1.post1 + hooks: + - id: pyproject-flake8 + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v3.0.0-alpha.4 + hooks: + - id: prettier + types_or: [css, javascript] diff --git a/README.rst b/README.rst index 35271cb..1a0f4c6 100644 --- a/README.rst +++ b/README.rst @@ -12,7 +12,7 @@ Installation .. code:: ipython3 pip install backedarray - + Examples --------