From 7bc6e9921d12eeeb953bd64f17df318f6ad07ff9 Mon Sep 17 00:00:00 2001 From: Alex Hambley <33315205+alexhambley@users.noreply.github.com> Date: Wed, 11 Sep 2024 12:01:43 +0100 Subject: [PATCH] Update pylint config to ignore specific directories - Removed git ls-files - Added tests, ro-crate-metadata, create_ro_crate.py, upload_crate.py to be ignored by pylint. Moved these to pylintrc - create_ro_crate.py, upload_crate.py are ignored due to rocrate package depending on older version of urllib3, and knowledge graph project depends on newer version. --- .github/workflows/lint-and-test.yaml | 2 +- .pylintrc | 7 ++++--- __init__.py | 0 3 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 __init__.py diff --git a/.github/workflows/lint-and-test.yaml b/.github/workflows/lint-and-test.yaml index c0c3b72..ab1ae36 100644 --- a/.github/workflows/lint-and-test.yaml +++ b/.github/workflows/lint-and-test.yaml @@ -26,7 +26,7 @@ jobs: poetry install --all-extras -vv - name: Analysing the code with pylint run: | - poetry run pylint --errors-only $(git ls-files '*.py') --ignore=tests/SPARQL,ro-crate-metadata --ignore-patterns=workflowhub_graph/create_ro_crate.py + poetry run pylint -v --errors-only . - name: Testing the code with pytest run: | poetry run py.test tests --ignore=tests/SPARQL --ignore=ro-crate-metadata --ignore=workflowhub_graph/create_ro_crate.py diff --git a/.pylintrc b/.pylintrc index a39a42c..b5af4bb 100644 --- a/.pylintrc +++ b/.pylintrc @@ -36,7 +36,8 @@ fail-under = 10 # from-stdin = # Files or directories to be skipped. They should be base names, not paths. -ignore = ["CVS"] +ignore = CVS, tests, ro-crate-metadata, create_ro_crate.py, upload_crate.py + # Add files or directories matching the regular expressions patterns to the # ignore-list. The regex matches against paths and can be in Posix or Windows @@ -47,7 +48,7 @@ ignore = ["CVS"] # Files or directories matching the regular expression patterns are skipped. The # regex matches against base names, not paths. The default value ignores Emacs # file locks -ignore-patterns = ["^\\.#"] +ignore-patterns = ^\\.#, # List of module names for which member attributes should not be checked and will # not be imported (useful for modules/projects where namespaces are manipulated @@ -83,7 +84,7 @@ persistent = true # Minimum Python version to use for version dependent checks. Will default to the # version used to run pylint. -py-version = 3.10 +py-version = 3.11 # Discover python modules and packages in the file system subtree. # recursive = diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..e69de29