Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
NOCSurfaceProcesses
GeoSpatialTools
Commits
60f866e3
Commit
60f866e3
authored
1 month ago
by
Joseph Siddons
Browse files
Options
Download
Email Patches
Plain Diff
chore: add lint rules for test, ruff fixes for test
parent
8cf21307
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
pyproject.toml
pyproject.toml
+6
-4
test/test_kdtree.py
test/test_kdtree.py
+2
-2
No files found.
pyproject.toml
View file @
60f866e3
...
...
@@ -52,7 +52,7 @@ all = [
line-length
=
80
indent-width
=
4
target-version
=
"py311"
exclude
=
[
".eggs"
,
".git"
,
".venv"
,
"build"
,
"venv"
,
"test"
]
exclude
=
[
".eggs"
,
".git"
,
".venv"
,
"build"
,
"venv"
]
[tool.ruff.lint]
extend-select
=
[
...
...
@@ -76,6 +76,10 @@ select = [
"W"
,
# pycodestyle warnings
]
[tool.ruff.lint.per-file-ignores]
"docs/*.py"
=
[
"D100"
,
"D101"
,
"D102"
,
"D103"
]
"test/**/*test*.py"
=
[
"D100"
,
"D101"
,
"D102"
,
"D103"
,
"N802"
,
"S101"
]
[tool.ruff.format]
quote-style
=
"double"
# Like Black, use double quotes for strings.
indent-style
=
"space"
# Like Black, indent with spaces, rather than tabs.
...
...
@@ -102,6 +106,4 @@ quiet-level = 3
Repository
=
"https://git.noc.ac.uk/nocsurfaceprocesses/geospatialtools"
[dependency-groups]
dev
=
[
"bpython>=0.25"
,
]
dev
=
["bpython>=0.25"]
This diff is collapsed.
Click to expand it.
test/test_kdtree.py
View file @
60f866e3
...
...
@@ -2,7 +2,7 @@ import unittest
import
random
from
numpy
import
min
,
argmin
from
GeoSpatialTools
import
haversine
,
KDTree
,
Record
from
GeoSpatialTools
import
KDTree
,
Record
class
TestKDTree
(
unittest
.
TestCase
):
...
...
@@ -87,7 +87,7 @@ class TestKDTree(unittest.TestCase):
kt
.
insert
(
Record
(
45
,
-
21
,
uid
=
"1"
))
kt
.
insert
(
Record
(
45
,
-
21
,
uid
=
"2"
))
r
,
d
=
kt
.
query
(
Record
(
44
,
-
21
,
uid
=
"3"
))
r
,
_
=
kt
.
query
(
Record
(
44
,
-
21
,
uid
=
"3"
))
assert
len
(
r
)
==
2
def
test_wrap
(
self
):
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment