Skip to content
Closed
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
16 changes: 0 additions & 16 deletions .coveragerc

This file was deleted.

19 changes: 2 additions & 17 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,5 @@
# E: style errors
# W: style warnings
# C: complexity
# F401: module imported but unused
# F403: import *
# F811: redefinition of unused `name` from line `N`
# F841: local variable assigned but never used
# E402: module level import not at top of file
# I100: Import statements are in the wrong order
# I101: Imported names are in the wrong order. Should be
ignore = E, C, W, F401, F403, F811, F841, E402, I100, I101, D400
builtins = c, get_config
exclude =
.cache,
.github,
onbuild,
scripts,
share,
tools,
setup.py
# D: docstring warnings (unused pydocstyle extension)
ignore = E, C, W, D
16 changes: 16 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# dependabot.yaml reference: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
#
# Notes:
# - Status and logs from dependabot are provided at
# https://github.com/jupyterhub/systemdspawner/network/updates.
#
version: 2
updates:
# Maintain dependencies in our GitHub Workflows
- package-ecosystem: github-actions
directory: /
labels: [ci]
schedule:
interval: monthly
time: "05:00"
timezone: Etc/UTC
35 changes: 0 additions & 35 deletions .github/workflows/publish.yml

This file was deleted.

50 changes: 50 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# This is a GitHub workflow defining a set of jobs with a set of steps.
# ref: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
#
name: Release

# Always tests wheel building, but only publish to PyPI on pushed tags.
on:
pull_request:
paths-ignore:
- "**.md"
- ".github/workflows/*.yaml"
- "!.github/workflows/release.yaml"
push:
paths-ignore:
- "**.md"
- ".github/workflows/*.yaml"
- "!.github/workflows/release.yaml"
branches-ignore:
- "dependabot/**"
- "pre-commit-ci-update-config"
tags: ["**"]
workflow_dispatch:

jobs:
build-release:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: install build package
run: |
pip install --upgrade pip
pip install build
pip freeze

- name: build release
run: |
python -m build --sdist --wheel .
ls -l dist

- name: publish to pypi
uses: pypa/gh-action-pypi-publish@release/v1
if: startsWith(github.ref, 'refs/tags/')
with:
user: __token__
password: ${{ secrets.pypi_password }}
63 changes: 63 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# This is a GitHub workflow defining a set of jobs with a set of steps.
# ref: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
#
name: Tests

on:
pull_request:
paths-ignore:
- "**.md"
- ".github/workflows/*.yaml"
- "!.github/workflows/test.yaml"
push:
paths-ignore:
- "**.md"
- ".github/workflows/*.yaml"
- "!.github/workflows/test.yaml"
branches-ignore:
- "dependabot/**"
- "pre-commit-ci-update-config"
tags: ["**"]
workflow_dispatch:

env:
LDAP_HOST: 127.0.0.1

jobs:
test:
runs-on: ubuntu-22.04
timeout-minutes: 10

strategy:
fail-fast: false
matrix:
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python-version }}"

- name: Install Python dependencies
run: |
pip install --upgrade pip
pip install -e ".[test]"

- name: List packages
run: pip freeze

- name: Run tests
run: |
# start LDAP server
ci/docker-ldap.sh

pytest --cov=ldapauthenticator

# GitHub action reference: https://github.com/codecov/codecov-action
- uses: codecov/codecov-action@v3
86 changes: 0 additions & 86 deletions .github/workflows/test.yml

This file was deleted.

81 changes: 63 additions & 18 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,64 @@
# pre-commit is a tool to perform a predefined set of tasks manually and/or
# automatically before git commits are made.
#
# Config reference: https://pre-commit.com/#pre-commit-configyaml---top-level
#
# Common tasks
#
# - Run on all files: pre-commit run --all-files
# - Register git hooks: pre-commit install --install-hooks
#
repos:
- repo: https://github.com/asottile/reorder_python_imports
rev: v1.9.0
hooks:
- id: reorder-python-imports
- repo: https://github.com/ambv/black
rev: 19.10b0
hooks:
- id: black
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
hooks:
- id: end-of-file-fixer
- id: check-json
- id: check-yaml
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: requirements-txt-fixer
- id: flake8
# Autoformat: Python code, syntax patterns are modernized
- repo: https://github.com/asottile/pyupgrade
rev: v3.4.0
hooks:
- id: pyupgrade
args:
- --py38-plus

# Autoformat: Python code
- repo: https://github.com/PyCQA/autoflake
rev: v2.1.1
hooks:
- id: autoflake
# args ref: https://github.com/PyCQA/autoflake#advanced-usage
args:
- --in-place

# Autoformat: Python code
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort

# Autoformat: Python code
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black

# Autoformat: markdown, yaml
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.9-for-vscode
hooks:
- id: prettier

# Misc...
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
# ref: https://github.com/pre-commit/pre-commit-hooks#hooks-available
hooks:
- id: end-of-file-fixer
- id: check-case-conflict
- id: check-executables-have-shebangs

# Lint: Python code
- repo: https://github.com/pycqa/flake8
rev: "6.0.0"
hooks:
- id: flake8

# pre-commit.ci config reference: https://pre-commit.ci/#configuration
ci:
autoupdate_schedule: monthly
Loading