Skip to content

Commit

Permalink
FEAT: Add docstring check to CI for an initial subset files
Browse files Browse the repository at this point in the history
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 <ivan.ogasawara@gmail.com>

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
  • Loading branch information
xmnlab authored and toryhaavik committed Oct 29, 2019
1 parent 4b0c127 commit 4a1f5bc
Show file tree
Hide file tree
Showing 26 changed files with 1,835 additions and 432 deletions.
4 changes: 4 additions & 0 deletions ci/azure/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ jobs:
- bash: docker-compose run ibis flake8
displayName: 'Lint'

# TODO: change match-dir when docstrings are fixed for other backends
- bash: docker-compose run ibis pydocstyle --match-dir="(ibis|omniscidb)"
displayName: "Docstring check"

- bash: docker-compose run ibis black --check .
displayName: 'Ensure black formatting'
condition: ne(variables['PYTHON_NO_DOT_VERSION'], '35')
Expand Down
1 change: 1 addition & 0 deletions ci/requirements-3.5-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ dependencies:
- pre_commit
- psycopg2
- pyarrow<0.12
- pydocstyle
- pygit2
- pymapd>=0.8.3,<0.11.0
- pymysql
Expand Down
1 change: 1 addition & 0 deletions ci/requirements-3.6-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ dependencies:
- psycopg2
- pyarrow>=0.12
- pydata-google-auth
- pydocstyle=4.0.1
- pygit2
- pymapd>=0.12.0
- pymysql
Expand Down
1 change: 1 addition & 0 deletions ci/requirements-3.7-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ dependencies:
- psycopg2
- pyarrow>=0.12
- pydata-google-auth
- pydocstyle=4.0.1
- pygit2
- pymapd>=0.12.0
- pymysql
Expand Down
11 changes: 10 additions & 1 deletion conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""Settings for tests."""
import os
from pathlib import Path

Expand All @@ -7,7 +8,15 @@


@pytest.fixture(scope='session')
def data_directory():
def data_directory() -> Path:
"""
Fixture that returns the test data directory.
Returns
-------
Path
Test data directory
"""
root = Path(__file__).absolute().parent

default = root / 'ci' / 'ibis-testing-data'
Expand Down
1 change: 1 addition & 0 deletions ibis/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""Initialize Ibis module."""
from contextlib import suppress

import ibis.config_init # noqa: F401
Expand Down
2 changes: 1 addition & 1 deletion ibis/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class NotThisMethod(Exception):


def register_vcs_handler(vcs, method): # decorator
"""Decorator to mark a method as the handler for a particular VCS."""
"""Mark a method as the handler for a particular VCS."""
def decorate(f):
"""Store f in HANDLERS[vcs][method]."""
if vcs not in HANDLERS:
Expand Down

0 comments on commit 4a1f5bc

Please sign in to comment.