Skip to content

Commit 4a1f5bc

Browse files
xmnlabtoryhaavik
authored andcommitted
FEAT: Add docstring check to CI for an initial subset files
In this PR: - Fixed omniscidb docstrings - Fixed some docstrings - Added pydocstyle check for ./ibis/.py and ./ibis/omniscidb/*.py Current issues with pydocstyle: - PyCQA/pydocstyle#111 - PyCQA/pydocstyle#363 Author: Ivan Ogasawara <[email protected]> Closes #1996 from xmnlab/add-docstring-check and squashes the following commits: bcda303 [Ivan Ogasawara] Fixed pydocstyle command. 55ff381 [Ivan Ogasawara] Add pydocstyle match-dir parameter into CI recipe. 5b270e8 [Ivan Ogasawara] Add docstring check to CI and git pre-commit hook
1 parent 4b0c127 commit 4a1f5bc

26 files changed

+1835
-432
lines changed

ci/azure/linux.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ jobs:
7373
- bash: docker-compose run ibis flake8
7474
displayName: 'Lint'
7575

76+
# TODO: change match-dir when docstrings are fixed for other backends
77+
- bash: docker-compose run ibis pydocstyle --match-dir="(ibis|omniscidb)"
78+
displayName: "Docstring check"
79+
7680
- bash: docker-compose run ibis black --check .
7781
displayName: 'Ensure black formatting'
7882
condition: ne(variables['PYTHON_NO_DOT_VERSION'], '35')

ci/requirements-3.5-dev.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ dependencies:
2828
- pre_commit
2929
- psycopg2
3030
- pyarrow<0.12
31+
- pydocstyle
3132
- pygit2
3233
- pymapd>=0.8.3,<0.11.0
3334
- pymysql

ci/requirements-3.6-dev.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ dependencies:
2626
- psycopg2
2727
- pyarrow>=0.12
2828
- pydata-google-auth
29+
- pydocstyle=4.0.1
2930
- pygit2
3031
- pymapd>=0.12.0
3132
- pymysql

ci/requirements-3.7-dev.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ dependencies:
2626
- psycopg2
2727
- pyarrow>=0.12
2828
- pydata-google-auth
29+
- pydocstyle=4.0.1
2930
- pygit2
3031
- pymapd>=0.12.0
3132
- pymysql

conftest.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"""Settings for tests."""
12
import os
23
from pathlib import Path
34

@@ -7,7 +8,15 @@
78

89

910
@pytest.fixture(scope='session')
10-
def data_directory():
11+
def data_directory() -> Path:
12+
"""
13+
Fixture that returns the test data directory.
14+
15+
Returns
16+
-------
17+
Path
18+
Test data directory
19+
"""
1120
root = Path(__file__).absolute().parent
1221

1322
default = root / 'ci' / 'ibis-testing-data'

ibis/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"""Initialize Ibis module."""
12
from contextlib import suppress
23

34
import ibis.config_init # noqa: F401

ibis/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class NotThisMethod(Exception):
5757

5858

5959
def register_vcs_handler(vcs, method): # decorator
60-
"""Decorator to mark a method as the handler for a particular VCS."""
60+
"""Mark a method as the handler for a particular VCS."""
6161
def decorate(f):
6262
"""Store f in HANDLERS[vcs][method]."""
6363
if vcs not in HANDLERS:

0 commit comments

Comments
 (0)