Skip to content

Commit

Permalink
Modern linting and packaging tooling and config
Browse files Browse the repository at this point in the history
  • Loading branch information
ogrisel committed Oct 13, 2023
1 parent 90d6658 commit 22bf764
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 59 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install ruff
- name: Install pre-commit
shell: bash
run: |
python -V
python -m pip install ruff
- name: Run ruff
python -m pip install pre-commit
- name: Run pre-commit linters
shell: bash
run: |
ruff .
pre-commit run --files *
build:
strategy:
Expand Down
16 changes: 16 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 23.9.1
hooks:
- id: black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.292
hooks:
- id: ruff
args: ["--fix", "--show-source"]
4 changes: 3 additions & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Dependencies for running the tests with pytest
# Linting tools
ruff
pre-commit
# Dependencies for running the tests with pytest
pytest
pytest-cov
psutil
Expand Down
39 changes: 39 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[build-system]
requires = ["flit_core"]
build-backend = "flit_core.buildapi"

[tool.flit.metadata]
module = "cloudpickle"
author = "The cloudpickle developer team"
author-email='[email protected]'
home-page = "https://github.com/cloudpipe/cloudpickle"
description-file = "README.md"
requires-python = ">=3.8"
license = "BSD-3-Clause"
classifiers = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: POSIX',
'Operating System :: Microsoft :: Windows',
'Operating System :: MacOS :: MacOS X',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Scientific/Engineering',
'Topic :: System :: Distributed Computing',
]

[tool.black]
line-length = 88
target_version = ['py38', 'py39', 'py310', 'py311', 'py312']
preview = true

[tool.ruff]
line-length = 88
target-version = "py38"
54 changes: 0 additions & 54 deletions setup.py

This file was deleted.

0 comments on commit 22bf764

Please sign in to comment.