-
-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
65713ea
commit 0f93ff8
Showing
19 changed files
with
1,287 additions
and
340 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,11 @@ on: | |
- '**' | ||
pull_request: {} | ||
|
||
env: | ||
COLUMNS: 120 | ||
UV_PYTHON: 3.12 | ||
UV_FROZEN: '1' | ||
|
||
jobs: | ||
test: | ||
name: test ${{ matrix.python-version }}, rust ${{ matrix.rust-version }} on ${{ matrix.os }} | ||
|
@@ -36,18 +41,16 @@ jobs: | |
runs-on: ${{ matrix.os }}-latest | ||
|
||
env: | ||
PYTHON: ${{ matrix.python-version }} | ||
UV_PYTHON: ${{ matrix.python-version }} | ||
RUST: ${{ matrix.rust-version }} | ||
OS: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: set up python | ||
uses: actions/setup-python@v5 | ||
- uses: astral-sh/setup-uv@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
allow-prereleases: true | ||
enable-cache: true | ||
|
||
- name: install rust | ||
uses: actions-rs/toolchain@v1 | ||
|
@@ -59,11 +62,6 @@ jobs: | |
- name: cache rust | ||
uses: Swatinem/rust-cache@v1 | ||
|
||
- run: pip install -r requirements/pyproject.txt -r requirements/testing.txt | ||
|
||
- run: pip install -e . | ||
- run: pip freeze | ||
|
||
- if: matrix.os == 'ubuntu' | ||
run: | | ||
mkdir -p ${{ github.workspace }}/protected | ||
|
@@ -75,22 +73,22 @@ jobs: | |
env: | ||
WATCHFILES_TEST_PERMISSION_DENIED_PATH: ${{ github.workspace }}/protected | ||
|
||
- run: coverage xml | ||
- run: uv run coverage xml | ||
|
||
- uses: codecov/[email protected] | ||
with: | ||
file: ./coverage.xml | ||
env_vars: PYTHON,RUST,OS | ||
env_vars: UV_PYTHON,RUST,OS | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v5 | ||
- uses: astral-sh/setup-uv@v5 | ||
with: | ||
python-version: '3.10' | ||
enable-cache: true | ||
|
||
- name: install rust | ||
uses: actions-rs/toolchain@v1 | ||
|
@@ -103,13 +101,11 @@ jobs: | |
- name: cache rust | ||
uses: Swatinem/rust-cache@v1 | ||
|
||
- run: pip install -r requirements/pyproject.txt -r requirements/linting.txt | ||
|
||
- run: pip install -e . | ||
- run: uv sync --group lint | ||
|
||
- uses: pre-commit/[email protected] | ||
with: | ||
extra_args: --all-files | ||
extra_args: --all-files --verbose | ||
env: | ||
SKIP: no-commit-to-branch | ||
|
||
|
@@ -118,16 +114,13 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: set up python | ||
uses: actions/setup-python@v5 | ||
- uses: astral-sh/setup-uv@v5 | ||
with: | ||
python-version: '3.10' | ||
enable-cache: true | ||
|
||
- name: install | ||
run: pip install -r requirements/docs.txt | ||
- run: uv sync --group docs | ||
|
||
- name: build site | ||
run: mkdocs build | ||
- run: make docs | ||
|
||
- name: store docs site | ||
uses: actions/upload-artifact@v4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,4 @@ docs/_build/ | |
/watchfiles/*.so | ||
/target/ | ||
/site/ | ||
/.python-version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,95 +1,117 @@ | ||
[build-system] | ||
requires = ['maturin>=0.14.16,<2'] | ||
build-backend = 'maturin' | ||
requires = ["maturin>=0.14.16,<2"] | ||
build-backend = "maturin" | ||
|
||
[project] | ||
name = 'watchfiles' | ||
requires-python = '>=3.9' | ||
description = 'Simple, modern and high performance file watching and code reload in python.' | ||
name = "watchfiles" | ||
requires-python = ">=3.9" | ||
description = "Simple, modern and high performance file watching and code reload in python." | ||
authors = [ | ||
{name ='Samuel Colvin', email = '[email protected]'}, | ||
{name ="Samuel Colvin", email = "[email protected]"}, | ||
] | ||
dependencies = [ | ||
'anyio>=3.0.0', | ||
"anyio>=3.0.0", | ||
] | ||
classifiers = [ | ||
'Development Status :: 5 - Production/Stable', | ||
'Environment :: Console', | ||
'Programming Language :: Python', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3 :: Only', | ||
'Programming Language :: Python :: 3.9', | ||
'Programming Language :: Python :: 3.10', | ||
'Programming Language :: Python :: 3.11', | ||
'Programming Language :: Python :: 3.12', | ||
'Programming Language :: Python :: 3.13', | ||
'Intended Audience :: Developers', | ||
'Intended Audience :: Information Technology', | ||
'Intended Audience :: System Administrators', | ||
'License :: OSI Approved :: MIT License', | ||
'Operating System :: POSIX :: Linux', | ||
'Operating System :: Microsoft :: Windows', | ||
'Operating System :: MacOS', | ||
'Environment :: MacOS X', | ||
'Topic :: Software Development :: Libraries :: Python Modules', | ||
'Topic :: System :: Filesystems', | ||
'Framework :: AnyIO', | ||
"Development Status :: 5 - Production/Stable", | ||
"Environment :: Console", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: 3.13", | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Information Technology", | ||
"Intended Audience :: System Administrators", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: POSIX :: Linux", | ||
"Operating System :: Microsoft :: Windows", | ||
"Operating System :: MacOS", | ||
"Environment :: MacOS X", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
"Topic :: System :: Filesystems", | ||
"Framework :: AnyIO", | ||
] | ||
dynamic = [ | ||
'license', | ||
'readme', | ||
'version' | ||
"license", | ||
"readme", | ||
"version" | ||
] | ||
|
||
[project.scripts] | ||
watchfiles = 'watchfiles.cli:cli' | ||
watchfiles = "watchfiles.cli:cli" | ||
|
||
[project.urls] | ||
Homepage = 'https://github.com/samuelcolvin/watchfiles' | ||
Documentation = 'https://watchfiles.helpmanual.io' | ||
Funding = 'https://github.com/sponsors/samuelcolvin' | ||
Source = 'https://github.com/samuelcolvin/watchfiles' | ||
Changelog = 'https://github.com/samuelcolvin/watchfiles/releases' | ||
Homepage = "https://github.com/samuelcolvin/watchfiles" | ||
Documentation = "https://watchfiles.helpmanual.io" | ||
Funding = "https://github.com/sponsors/samuelcolvin" | ||
Source = "https://github.com/samuelcolvin/watchfiles" | ||
Changelog = "https://github.com/samuelcolvin/watchfiles/releases" | ||
|
||
[dependency-groups] | ||
dev = [ | ||
"coverage>=7.6.10", | ||
"dirty-equals>=0.8.0", | ||
"maturin>=1.8.1", | ||
"pytest>=7.4.4", | ||
"pytest-mock>=3.14.0", | ||
"pytest-pretty>=1.2.0", | ||
"pytest-timeout>=2.3.1", | ||
] | ||
lint = [ | ||
"mypy>=1.14.1", | ||
"ruff>=0.9.0", | ||
"trio>=0.28.0", | ||
] | ||
docs = [ | ||
"mdx-include>=1.4.2", | ||
"mkdocs>=1.6.1", | ||
"mkdocs-material>=9.5.49", | ||
"mkdocstrings[python]>=0.25.1", | ||
] | ||
|
||
[tool.maturin] | ||
module-name = "watchfiles._rust_notify" | ||
bindings = 'pyo3' | ||
bindings = "pyo3" | ||
|
||
[tool.pytest.ini_options] | ||
testpaths = 'tests' | ||
log_format = '%(name)s %(levelname)s: %(message)s' | ||
filterwarnings = 'error' | ||
testpaths = "tests" | ||
log_format = "%(name)s %(levelname)s: %(message)s" | ||
filterwarnings = "error" | ||
timeout = 10 | ||
|
||
[tool.coverage.run] | ||
source = ['watchfiles'] | ||
source = ["watchfiles"] | ||
branch = true | ||
|
||
[tool.coverage.report] | ||
precision = 2 | ||
exclude_lines = [ | ||
'pragma: no cover', | ||
'raise NotImplementedError', | ||
'raise NotImplemented', | ||
'if TYPE_CHECKING:', | ||
'@overload', | ||
"pragma: no cover", | ||
"raise NotImplementedError", | ||
"raise NotImplemented", | ||
"if TYPE_CHECKING:", | ||
"@overload", | ||
] | ||
omit = ['*/__main__.py'] | ||
omit = ["*/__main__.py"] | ||
|
||
[tool.ruff] | ||
line-length = 120 | ||
target-version = 'py38' | ||
target-version = "py38" | ||
lint.mccabe = { max-complexity = 14 } | ||
lint.extend-select = ['Q', 'RUF100', 'C90', 'UP', 'I'] | ||
lint.flake8-quotes = {inline-quotes = 'single', multiline-quotes = 'double'} | ||
lint.pydocstyle = { convention = 'google' } | ||
format.quote-style = 'single' | ||
lint.extend-select = ["Q", "RUF100", "C90", "UP", "I"] | ||
lint.flake8-quotes = {inline-quotes = "single", multiline-quotes = "double"} | ||
lint.pydocstyle = { convention = "google" } | ||
format.quote-style = "single" | ||
|
||
[tool.mypy] | ||
strict = true | ||
warn_return_any = false | ||
show_error_codes = true | ||
|
||
[[tool.mypy.overrides]] | ||
module = ['trio.*'] | ||
module = ["trio.*"] | ||
ignore_missing_imports = true |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.