Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maintenance cleanup #267

Merged
merged 1 commit into from
Oct 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions .flake8

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows/check-release.yml

This file was deleted.

27 changes: 12 additions & 15 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, "3.10"]
python-version: [3.7, 3.8, 3.9, "3.10", "3.11-dev"]
fail-fast: false

steps:
Expand All @@ -36,6 +36,15 @@ jobs:
name: codecov-umbrella
fail_ci_if_error: true

check_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}

docs:
runs-on: ubuntu-latest
steps:
Expand All @@ -48,20 +57,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/[email protected]
with:
extra_args: --all-files --hook-stage=manual
- name: Help message if pre-commit fail
if: ${{ failure() }}
run: |
echo "You can install pre-commit hooks to automatically run formatting"
echo "on each commit with:"
echo " pre-commit install"
echo "or you can run by hand on staged files with"
echo " pre-commit run"
echo "or after-the-fact on already committed files with"
echo " pre-commit run --all-files --hook-stage=manual"
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- uses: jupyterlab/maintainer-tools/.github/actions/pre-commit@v1

check_links:
runs-on: ubuntu-latest
Expand Down
11 changes: 5 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
ci:
skip: [check-jsonschema]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
Expand Down Expand Up @@ -54,10 +51,11 @@ repos:
hooks:
- id: mdformat

- repo: https://github.com/pycqa/flake8
rev: 5.0.4
- repo: https://github.com/john-hen/Flake8-pyproject
rev: 1.1.0.post0
hooks:
- id: flake8
- id: Flake8-pyproject
alias: flake8
additional_dependencies:
["flake8-bugbear==22.6.22", "flake8-implicit-str-concat==0.2.0"]
stages: [manual]
Expand All @@ -70,3 +68,4 @@ repos:
files: ^\.github/workflows/
types: [yaml]
args: ["--schemafile", "https://json.schemastore.org/github-workflow"]
stages: [manual]
26 changes: 23 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ docs = [
before-build-python = ["sudo apt-get update", "sudo apt-get install -qq octave octave-signal liboctave-dev"]
before-check-links = ["sudo apt-get update", "sudo apt-get install -qq octave octave-signal liboctave-dev"]

[tool.jupyter-releaser]
skip = ["check-links"]

[tool.hatch.version]
path = "oct2py/_version.py"

Expand Down Expand Up @@ -89,3 +86,26 @@ filterwarnings= [
"ignore:Using deprecated:UserWarning:oct2py",
"ignore:Key - value pairs:UserWarning:oct2py",
]

[tool.flake8]
ignore = "E501, W503, E402"
builtins = "\"c, get_config\""
exclude = [
".cache",
".github",
"docs",
]
enable-extensions = "\"G\""
extend-ignore = [
"G001",
"G002",
"G004",
"G200",
"G201",
"G202",
"E203",
]
per-file-ignores = [
"tests/*: B011",
"F841",
]