Skip to content

Commit 8d47ea8

Browse files
Merge pull request #5 from Quansight/nox-config
Nox config
2 parents f530511 + 95b5255 commit 8d47ea8

File tree

9 files changed

+233
-186
lines changed

9 files changed

+233
-186
lines changed

.flake8

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[flake8]
2+
max-line-length = 80
3+
per-file-ignores =
4+
upath/__init__.py: F401
5+
exclude =
6+
.noxfile,
7+
.nox,
8+
__pycache__,
9+
.git,
10+
.github,
11+
.gitignore,
12+
.pytest_cache,
13+
14+

.github/workflows/python.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ jobs:
2020
- name: Test with pytest
2121
run: |
2222
nox -s smoke
23+
- name: Lint
24+
run: |
25+
nox -s lint
2326
- name: build package
2427
run: |
2528
nox -s build

environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ dependencies:
1818
- pip
1919
- pip:
2020
- hadoop-test-cluster
21+
- nox
2122

noxfile.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import nox
2+
from pathlib import Path
23

34

45
@nox.session(python=False)
@@ -7,6 +8,18 @@ def develop(session):
78
session.run(*"flit install -s".split())
89

910

11+
@nox.session(python=False)
12+
def black(session):
13+
session.install("black")
14+
session.run(*"black upath noxfile.py setup.py".split())
15+
16+
17+
@nox.session(python=False)
18+
def lint(session):
19+
session.install("flake8")
20+
session.run(*"flake8".split())
21+
22+
1023
@nox.session(python=False)
1124
def install(session):
1225
session.install(".")
@@ -22,3 +35,12 @@ def smoke(session):
2235
def build(session):
2336
session.install("flit")
2437
session.run(*"flit build".split())
38+
39+
40+
@nox.session(python=False)
41+
def rm_dirs(session):
42+
paths = ["build", "dist"]
43+
for path in paths:
44+
p = Path(path)
45+
if p.exists():
46+
session.run(*f"rm -rf {str(p)}".split())

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,7 @@ test = [
4343
include = []
4444

4545
[tool.flit.entrypoints]
46+
47+
[tool.black]
48+
line-length = 80
49+
target-version = ['py38']

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
with open("README.md") as f:
66
long_description = f.read()
7-
7+
88
setuptools.setup(
99
name="universal_pathlib",
1010
version=__version__,
@@ -15,5 +15,5 @@
1515
python_requires=">=3.7",
1616
description="pathlib api extended to use fsspec backends",
1717
long_description=long_description,
18-
long_description_content_type='text/markdown'
18+
long_description_content_type="text/markdown",
1919
)

0 commit comments

Comments
 (0)