Skip to content

Commit

Permalink
#57 fix doc import errors and organize default index
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtavis committed Feb 24, 2024
1 parent e994400 commit 9ce0e76
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 24 deletions.
19 changes: 13 additions & 6 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
Wikidata and Wikipedia language data extraction

Installation
------------
============

.. code-block:: shell
pip install scribe-data
Expand All @@ -56,14 +57,20 @@ Installation
import scribe_data
Contents
========

.. toctree::
:maxdepth: 2

scribe_data/index

Contributing
============

.. toctree::
:maxdepth: 2
:caption: Contents

extract_transform/index
load/index
checkquery
utils
notes

Project Indices
Expand Down
4 changes: 2 additions & 2 deletions docs/source/notes.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.. mdinclude:: ../../.github/docs/CONTRIBUTING_NO_BACK_LINKS.md

License
=======

.. literalinclude:: ../../LICENSE.txt
:language: text

.. mdinclude:: ../../.github/docs/CONTRIBUTING_NO_BACK_LINKS.md

.. mdinclude:: ../../CHANGELOG.md
File renamed without changes.
File renamed without changes.
10 changes: 10 additions & 0 deletions docs/source/scribe_data/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
scribe_data
===========

.. toctree::
:maxdepth: 1

extract_transform/index
load/index
checkquery
utils
File renamed without changes.
File renamed without changes.
24 changes: 12 additions & 12 deletions src/scribe_data/checkquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,13 +296,13 @@ def check_positive_int(value: str, err_msg: str) -> int:
err_msg : str
Used when value fails validation.
Raises
------
argparse.ArgumentTypeError
Returns
-------
int : the validated number.
Raises
------
argparse.ArgumentTypeError
"""
try:
number = int(value)
Expand All @@ -323,13 +323,13 @@ def check_limit(limit: str) -> int:
limit : str
The LIMIT to be validated.
Raises
------
argparse.ArgumentTypeError
Returns
-------
int : the validated LIMIT.
Raises
------
argparse.ArgumentTypeError
"""
return check_positive_int(limit, "LIMIT must be an integer of value 1 or greater.")

Expand All @@ -343,13 +343,13 @@ def check_timeout(timeout: str) -> int:
timeout : str
The timeout to be validated.
Raises
------
argparse.ArgumentTypeError
Returns
-------
int : the validated timeout.
Raises
------
argparse.ArgumentTypeError
"""
return check_positive_int(
timeout, "timeout must be an integer of value 1 or greater."
Expand Down
8 changes: 4 additions & 4 deletions src/scribe_data/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@ def _find(source_key: str, source_value: str, target_key: str, error_msg: str):
error_msg : str
The message displayed when a value cannot be found.
Raises
------
ValueError : when a source_value is not supported.
Returns
-------
The 'target' value given the passed arguments.
Raises
------
ValueError : when a source_value is not supported.
"""
norm_source_value = source_value.lower()

Expand Down

0 comments on commit 9ce0e76

Please sign in to comment.