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

Fix the CI, bump tools #185

Merged
merged 1 commit into from Dec 28, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/check.yml
Expand Up @@ -61,7 +61,9 @@ jobs:
CI_RUN: "yes"
DIFF_AGAINST: HEAD
- name: Rename coverage report file
run: import os; import sys; os.rename(f".tox/.coverage.{os.environ['TOXENV']}", f".tox/.coverage.{os.environ['TOXENV']}-{sys.platform}")
run: |
import os; import sys
os.rename(f".tox/.coverage.{os.environ['TOXENV']}", f".tox/.coverage.{os.environ['TOXENV']}-{sys.platform}")
shell: python
- name: Upload coverage data
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -134,7 +136,7 @@ jobs:

publish:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
needs: [ check, coverage ]
needs: [check, coverage]
runs-on: ubuntu-22.04
steps:
- name: Setup python to build package
Expand Down
8 changes: 8 additions & 0 deletions .markdownlint.yaml
@@ -0,0 +1,8 @@
MD013:
code_blocks: false
headers: false
line_length: 120
tables: false

MD046:
style: fenced
50 changes: 34 additions & 16 deletions .pre-commit-config.yaml
Expand Up @@ -11,47 +11,65 @@ repos:
- id: debug-statements
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/asottile/add-trailing-comma
rev: v2.4.0
hooks:
- id: add-trailing-comma
args: [--py36-plus]
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
hooks:
- id: pyupgrade
args: [ "--py36-plus" ]
args: ["--py37-plus"]
- repo: https://github.com/PyCQA/isort
rev: v5.11.3
rev: 5.11.4
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 22.12.0
hooks:
- id: black
args: [ --safe ]
args: [--safe]
- repo: https://github.com/asottile/blacken-docs
rev: v1.12.1
hooks:
- id: blacken-docs
additional_dependencies: [ black==22.10 ]
additional_dependencies: [black==22.12]
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.9.0
hooks:
- id: rst-backticks
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.2.0
hooks:
- id: setup-cfg-fmt
- repo: https://github.com/tox-dev/tox-ini-fmt
rev: "0.5.2"
hooks:
- id: tox-ini-fmt
args: [ "-p", "fix_lint" ]
args: ["-p", "fix"]
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear==22.10.27
- flake8-comprehensions==3.10.1
- flake8-pytest-style==1.6
- flake8-spellcheck==0.28
- flake8-unused-arguments==0.0.12
- flake8-noqa==1.3
- pep8-naming==0.13.2
- flake8-bugbear==22.12.6
- flake8-comprehensions==3.10.1
- flake8-pytest-style==1.6
- flake8-spellcheck==0.28
- flake8-unused-arguments==0.0.12
- flake8-noqa==1.3
- pep8-naming==0.13.3
- flake8-pyproject==1.2.2
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v2.7.1"
hooks:
- id: prettier
additional_dependencies:
- prettier@2.7.1
- "@prettier/plugin-xml@2.2"
args: ["--print-width=120", "--prose-wrap=always"]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.32.2
hooks:
- id: markdownlint
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
3 changes: 3 additions & 0 deletions docs/changelog.rst
@@ -1,5 +1,8 @@
Changelog
=========
v3.9.0 (2022-12-28)
-------------------
- Move build backend to ``hatchling`` :pr:`185 - by :user:`gaborbernat`.

v3.8.1 (2022-12-04)
-------------------
Expand Down
42 changes: 7 additions & 35 deletions docs/conf.py
Expand Up @@ -4,50 +4,22 @@

from filelock import __version__

company = "tox-dev"
name = "filelock"
version = ".".join(__version__.split(".")[:2])
release = __version__
name, company = "filelock", "tox-dev"
version, release = ".".join(__version__.split(".")[:2]), __version__
copyright = f"2014-{date.today().year}, {company}"

extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.autosectionlabel",
"sphinx.ext.viewcode",
"sphinx.ext.extlinks",
"sphinx.ext.intersphinx",
"sphinx_autodoc_typehints",
]

templates_path = []
unused_docs = []
source_suffix = ".rst"
exclude_patterns = ["_build"]

master_doc = "index"
pygments_style = "default"

project = name
today_fmt = "%B %d, %Y"

html_theme = "furo"
html_favicon = "logo.svg"
html_logo = "logo.svg"
html_theme_options = {
"navigation_with_keys": True,
}
html_title = name
html_last_updated_fmt = datetime.now().isoformat()

autoclass_content = "class"
autodoc_member_order = "bysource"
autodoc_default_options = {
"member-order": "bysource",
"undoc-members": True,
"show-inheritance": True,
}
autodoc_typehints = "none"
always_document_param_types = False
typehints_fully_qualified = True
html_title, html_last_updated_fmt = name, datetime.now().isoformat()
pygments_style, pygments_dark_style = "sphinx", "monokai"
autoclass_content, autodoc_member_order, autodoc_typehints = "class", "bysource", "none"
autodoc_default_options = {"member-order": "bysource", "undoc-members": True, "show-inheritance": True}
autosectionlabel_prefix_document = True

intersphinx_mapping = {"python": ("https://docs.python.org/3", None)}
Expand Down
34 changes: 28 additions & 6 deletions docs/logo.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
73 changes: 65 additions & 8 deletions pyproject.toml
@@ -1,17 +1,74 @@
[build-system]
requires = [
"setuptools>=65.6.3",
"setuptools_scm>=7.0.5",
build-backend = "hatchling.build"
requires = ["hatchling>=1.11.1", "hatch-vcs>=0.3"]

[project]
name = "filelock"
description = "A platform independent file lock."
readme = "README.md"
license = "Unlicense"
maintainers = [{ name = "Bernát Gábor", email = "gaborjbernat@gmail.com" }]
urls.Documentation = "https://py-filelock.readthedocs.io"
urls.Homepage = "https://github.com/tox-dev/py-filelock"
urls.Source = "https://github.com/tox-dev/py-filelock"
urls.Tracker = "https://github.com/tox-dev/py-filelock/issues"
requires-python = ">=3.7"
optional-dependencies.testing = [
"covdefaults>=2.2.2",
"coverage>=7.0.1",
"pytest>=7.2",
"pytest-cov>=4",
"pytest-timeout>=2.1",
]
optional-dependencies.docs = ["furo>=2022.12.7", "sphinx>=5.3", "sphinx-autodoc-typehints>=1.19.5"]
keywords = ["application", "cache", "directory", "log", "user"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: The Unlicense (Unlicense)",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Internet",
"Topic :: Software Development :: Libraries",
"Topic :: System",
]
build-backend = 'setuptools.build_meta'
dynamic = ["version"]

[tool.hatch]
build.hooks.vcs.version-file = "src/filelock/version.py"
build.targets.sdist.include = ["/src", "/tests"]
version.source = "vcs"

[tool.coverage]
html.show_contexts = true
html.skip_covered = false
paths.source = ["src", ".tox/*/lib/*/site-packages", ".tox\\*\\Lib\\site-packages", "**/src", "**\\src"]
paths.other = [".", "*/py-filelock", "*\\py-filelock"]
report.fail_under = 76
run.parallel = true
run.plugins = ["covdefaults"]

[tool.black]
line-length = 120

[tool.isort]
line_length = 120
profile = "black"
known_first_party = ["filelock", "tests"]
known_first_party = ["filelock"]

[tool.mypy]
python_version = "3.11"
show_error_codes = true
strict = true
overrides = [{ module = ["appdirs.*", "jnius.*"], ignore_missing_imports = true }]

[tool.pep8]
max-line-length = "120"

[tool.setuptools_scm]
write_to = "src/filelock/version.py"
[tool.flake8]
max-complexity = 22
max-line-length = 120
unused-arguments-ignore-abstract-functions = true
noqa-require-code = true
dictionaries = ["en_US", "python", "technical", "django"]
77 changes: 0 additions & 77 deletions setup.cfg

This file was deleted.

5 changes: 0 additions & 5 deletions setup.py

This file was deleted.