From 20875153285036abec58fbc5ff50cb4006a63d5f Mon Sep 17 00:00:00 2001 From: "duncan.macleod" <duncan.macleod@ligo.org> Date: Fri, 1 Apr 2022 16:33:51 +0100 Subject: [PATCH] fix all instances of D400 add trailing periods for docstring summaries --- gwdatafind/api.py | 4 ++-- gwdatafind/conftest.py | 2 +- gwdatafind/io.py | 8 ++++---- gwdatafind/tests/__init__.py | 2 +- gwdatafind/tests/conftest.py | 6 +++--- gwdatafind/tests/test_api.py | 2 +- gwdatafind/tests/test_http.py | 2 +- gwdatafind/tests/test_main.py | 2 +- gwdatafind/tests/test_utils.py | 2 +- gwdatafind/ui.py | 8 ++++---- gwdatafind/utils.py | 6 +++--- setup.py | 2 +- 12 files changed, 23 insertions(+), 23 deletions(-) diff --git a/gwdatafind/api.py b/gwdatafind/api.py index 2a54387..4c1c7e3 100644 --- a/gwdatafind/api.py +++ b/gwdatafind/api.py @@ -15,7 +15,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -"""API URL implementation for GWDataFind +"""API URL implementation for GWDataFind. The functions in this module return URL paths to request on a given host to execute various GWDataFind queries. @@ -30,7 +30,7 @@ DEFAULT_SERVICE_PREFIX = "LDR/services/data/v1" def _prefix(func): - """Wrap ``func`` to prepend the path prefix automatically + """Wrap ``func`` to prepend the path prefix automatically. This just simplifies the functional constructions below. """ diff --git a/gwdatafind/conftest.py b/gwdatafind/conftest.py index b867371..3e1b9b6 100644 --- a/gwdatafind/conftest.py +++ b/gwdatafind/conftest.py @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with GWDataFind. If not, see <http://www.gnu.org/licenses/>. -"""Pytest hooks for gwdatafind +"""Pytest hooks for gwdatafind. """ import warnings diff --git a/gwdatafind/io.py b/gwdatafind/io.py index 8d0036b..072e688 100644 --- a/gwdatafind/io.py +++ b/gwdatafind/io.py @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with GWDataFind. If not, see <http://www.gnu.org/licenses/>. -"""I/O (mainly O) routines for GWDataFind +"""I/O (mainly O) routines for GWDataFind. """ import os.path @@ -32,7 +32,7 @@ __author__ = 'Duncan Macleod <duncan.macleod@ligo.org>' class LalCacheEntry( namedtuple('CacheEntry', ('obs', 'tag', 'segment', 'url')), ): - """Simplified version of `lal.utils.CacheEntry` + """Simplified version of `lal.utils.CacheEntry`. This is provided so that we don't have to depend on lalsuite. """ @@ -53,7 +53,7 @@ class LalCacheEntry( def lal_cache(urls): - """Convert a list of URLs into a LAL cache + """Convert a list of URLs into a LAL cache. Returns ------- @@ -85,7 +85,7 @@ class OmegaCacheEntry(namedtuple( def omega_cache(cache): - """Convert a list of `LalCacheEntry` into a list of `OmegaCacheEntry` + """Convert a list of `LalCacheEntry` into a list of `OmegaCacheEntry`. Returns ------- diff --git a/gwdatafind/tests/__init__.py b/gwdatafind/tests/__init__.py index 7ac3f44..70cb1ba 100644 --- a/gwdatafind/tests/__init__.py +++ b/gwdatafind/tests/__init__.py @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with GWDataFind. If not, see <http://www.gnu.org/licenses/>. -"""Tests for :mod:`gwdatafind` +"""Tests for :mod:`gwdatafind`. """ __author__ = 'Duncan Macleod <duncan.macleod@ligo.org>' diff --git a/gwdatafind/tests/conftest.py b/gwdatafind/tests/conftest.py index 2975c5b..d10e6db 100644 --- a/gwdatafind/tests/conftest.py +++ b/gwdatafind/tests/conftest.py @@ -15,7 +15,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -"""Test utilities +"""Test utilities. """ import os @@ -27,7 +27,7 @@ from . import yield_fixture @yield_fixture def response(): - """Patch an HTTPConnection to do nothing in particular + """Patch an HTTPConnection to do nothing in particular. Yields the patch for `http.client.HTTPConnection.getresponse` """ @@ -38,7 +38,7 @@ def response(): @yield_fixture def tmpname(): - """Return a temporary file name, cleaning up after the method returns + """Return a temporary file name, cleaning up after the method returns. """ name = tempfile.mktemp() open(name, 'w').close() diff --git a/gwdatafind/tests/test_api.py b/gwdatafind/tests/test_api.py index 3e65f8b..b66f872 100644 --- a/gwdatafind/tests/test_api.py +++ b/gwdatafind/tests/test_api.py @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with GWDataFind. If not, see <http://www.gnu.org/licenses/>. -"""Test suite for `gwdatafind.api` +"""Test suite for `gwdatafind.api`. This just asserts that the API implementation here matches the expectation from the v1 API for gwdatfind_server. diff --git a/gwdatafind/tests/test_http.py b/gwdatafind/tests/test_http.py index b949721..add847e 100644 --- a/gwdatafind/tests/test_http.py +++ b/gwdatafind/tests/test_http.py @@ -15,7 +15,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -"""Tests for :mod:`gwdatafind.http` +"""Tests for :mod:`gwdatafind.http`. """ import json diff --git a/gwdatafind/tests/test_main.py b/gwdatafind/tests/test_main.py index 7050009..ae02879 100644 --- a/gwdatafind/tests/test_main.py +++ b/gwdatafind/tests/test_main.py @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with GWDataFind. If not, see <http://www.gnu.org/licenses/>. -"""Tests for :mod:`gwdatafind.__main__` (the CLI) +"""Tests for :mod:`gwdatafind.__main__` (the CLI). """ import argparse diff --git a/gwdatafind/tests/test_utils.py b/gwdatafind/tests/test_utils.py index b25f4c2..72f2d3e 100644 --- a/gwdatafind/tests/test_utils.py +++ b/gwdatafind/tests/test_utils.py @@ -17,7 +17,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -"""Tests for :mod:`gwdatafind.utils` +"""Tests for :mod:`gwdatafind.utils`. """ from unittest import mock diff --git a/gwdatafind/ui.py b/gwdatafind/ui.py index c4d5d20..d95d2af 100644 --- a/gwdatafind/ui.py +++ b/gwdatafind/ui.py @@ -50,7 +50,7 @@ __all__ = [ # -- deprecated methods ------------------------- def connect(host=None, port=None): # pragma: no cover - """Open a new connection to a Datafind server + """Open a new connection to a Datafind server. This method will auto-select between HTTP and HTTPS based on port, and (for HTTPS) will automatically load the necessary X509 credentials @@ -112,7 +112,7 @@ def get(url, *args, **kwargs): def get_json(*args, **kwargs): - """Perform a GET request and return JSON + """Perform a GET request and return JSON. Parameters ---------- @@ -136,7 +136,7 @@ def get_json(*args, **kwargs): def _url(host, api_func, *args, **kwargs): - """Construct the full URL for a query to ``host`` using an API function + """Construct the full URL for a query to ``host`` using an API function. Parameters ---------- @@ -499,7 +499,7 @@ def find_urls( host=None, session=None, ): - """Query a GWDataFind host for all URLs for a dataset in an interval + """Query a GWDataFind host for all URLs for a dataset in an interval. Parameters ---------- diff --git a/gwdatafind/utils.py b/gwdatafind/utils.py index 4ae9b9e..ca641c6 100644 --- a/gwdatafind/utils.py +++ b/gwdatafind/utils.py @@ -17,7 +17,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -"""Utilities for the GW datafind service +"""Utilities for the GW datafind service. """ import os @@ -29,7 +29,7 @@ from igwn_auth_utils import x509 as igwn_x509 def get_default_host(): - """Returns the default host as stored in the ``${GWDATAFIND_SERVER}`` + """Returns the default host as stored in the ``${GWDATAFIND_SERVER}``. Returns ------- @@ -131,7 +131,7 @@ def find_credential(): # -- LIGO-T050017 filename parsing -------------------------------------------- def filename_metadata(filename): - """Return metadata parsed from a filename following LIGO-T050017 + """Return metadata parsed from a filename following LIGO-T050017. Parameters ---------- diff --git a/setup.py b/setup.py index 3694fd7..9b3cb72 100755 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with GWDataFind. If not, see <http://www.gnu.org/licenses/>. -"""Setup GWDataFind +"""Setup GWDataFind. """ from setuptools import setup -- GitLab