From 6717ad73055c87a08035a9e31adaf00e01c8fc5b Mon Sep 17 00:00:00 2001 From: Gaute Hope Date: Tue, 14 Sep 2021 14:46:35 +0200 Subject: [PATCH] pyproject: include pylint, pytest, setup.cfg --- pylintrc | 6 ------ pyproject.toml | 27 +++++++++++++++++++++++++++ pytest.ini | 8 -------- setup.cfg | 2 -- 4 files changed, 27 insertions(+), 16 deletions(-) delete mode 100644 pylintrc delete mode 100644 pytest.ini delete mode 100644 setup.cfg diff --git a/pylintrc b/pylintrc deleted file mode 100644 index d685bdc70..000000000 --- a/pylintrc +++ /dev/null @@ -1,6 +0,0 @@ -[MASTER] -extension-pkg-whitelist=netCDF4,numpy,scipy - -[MESSAGES CONTROL] -disable = all -enable = F,unreachable,duplicate-key,unnecessary-semicolon,global-variable-not-assigned,unused-variable,unused-wildcard-import,binary-op-exception,bad-format-string,anomalous-backslash-in-string,bad-open-mode,E0001,E0011,E0012,E0100,E0101,E0102,E0103,E0104,E0105,E0107,E0108,E0110,E0111,E0112,E0113,E0114,E0115,E0116,E0117,E0118,E0202,E0203,E0211,E0213,E0236,E0237,E0238,E0239,E0240,E0241,E0301,E0302,E0303,E0401,E0402,E0601,E0602,E0603,E0604,E0611,E0632,E0633,E0701,E0702,E0703,E0704,E0710,E0711,E0712,E1003,E1101,E1102,E1111,E1120,E1121,E1123,E1124,E1125,E1126,E1127,E1128,E1129,E1130,E1131,E1132,E1133,E1134,E1135,E1136,E1137,E1138,E1139,E1200,E1201,E1205,E1206,E1300,E1301,E1302,E1303,E1304,E1305,E1306,E1310,E1700,E1701 diff --git a/pyproject.toml b/pyproject.toml index 9f4d0d499..fda7f7514 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,6 +5,9 @@ description = "OpenDrift - a framework for ocean trajectory modeling" authors = ["Knut-Frode Dagestad "] license = "GPLv2" +# [tool.poetry.scripts] +# hodograph = "opendrift.scripts.hodograph" + [tool.poetry.dependencies] python = "^3.7" matplotlib = ">=3.1" @@ -34,3 +37,27 @@ yapf = "^0.31.0" [build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" + +[tool.pytest.ini_options] +minversion = "6.0" +addopts = "--benchmark-disable" +testpaths = [ + "tests", +] +norecursedirs = [ + "wps", + "benchmarks", + "test_data" +] +markers = [ + "slow:mark tests as slow", + "veryslow:mark test as very slow" +] + +[tool.pylint.master] +extension-pkg-whitelist="netCDF4,numpy,scipy" + +[tool.pylint.messages_control] +disable = "all" +enable = "F,unreachable,duplicate-key,unnecessary-semicolon,global-variable-not-assigned,unused-variable,unused-wildcard-import,binary-op-exception,bad-format-string,anomalous-backslash-in-string,bad-open-mode,E0001,E0011,E0012,E0100,E0101,E0102,E0103,E0104,E0105,E0107,E0108,E0110,E0111,E0112,E0113,E0114,E0115,E0116,E0117,E0118,E0202,E0203,E0211,E0213,E0236,E0237,E0238,E0239,E0240,E0241,E0301,E0302,E0303,E0401,E0402,E0601,E0602,E0603,E0604,E0611,E0632,E0633,E0701,E0702,E0703,E0704,E0710,E0711,E0712,E1003,E1101,E1102,E1111,E1120,E1121,E1123,E1124,E1125,E1126,E1127,E1128,E1129,E1130,E1131,E1132,E1133,E1134,E1135,E1137,E1138,E1139,E1200,E1201,E1205,E1206,E1300,E1301,E1302,E1303,E1304,E1305,E1306,E1310,E1700,E1701" + diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index ab5151cfa..000000000 --- a/pytest.ini +++ /dev/null @@ -1,8 +0,0 @@ -[pytest] -testpaths = tests -norecursedirs = wps benchmarks test_data -addopts = --benchmark-disable - -markers = - slow: marks tests as slow - veryslow: marks tests as very slow diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 31ad82b6a..000000000 --- a/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[aliases] -test = pytest