Skip to content

Commit

Permalink
Release v0.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
yarnabrina committed Jan 26, 2024
1 parent b9365a3 commit 4a4452a
Show file tree
Hide file tree
Showing 53 changed files with 5,509 additions and 492 deletions.
101 changes: 36 additions & 65 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ repos:
- id: detect-private-key
- id: end-of-file-fixer
- id: mixed-line-ending
- id: name-tests-test
args:
- --pytest-test-first
- id: no-commit-to-branch
- id: pretty-format-json
args:
Expand Down Expand Up @@ -49,14 +46,16 @@ repos:
- src
pass_filenames: false
- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.1.0
hooks:
- id: black-jupyter
- id: black
additional_dependencies:
- .[jupyter]
args:
- src
pass_filenames: false
- repo: https://github.com/pycqa/bandit
rev: 1.7.6
rev: 1.7.7
hooks:
- id: bandit
args:
Expand All @@ -68,24 +67,12 @@ repos:
- src
pass_filenames: false
- repo: https://github.com/pycqa/flake8
rev: 6.1.0
rev: 7.0.0
hooks:
- id: flake8
args:
- src
pass_filenames: false
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v1.7.1
# hooks:
# - id: mypy
# additional_dependencies:
# - pydantic
# args:
# - --ignore-missing-imports
# - --scripts-are-modules
# pass_filenames: false
# stages:
# - manual
- repo: https://github.com/PyCQA/pylint
rev: v3.0.3
hooks:
Expand All @@ -97,15 +84,8 @@ repos:
pass_filenames: false
stages:
- manual
# - repo: https://github.com/RobertCraigie/pyright-python
# rev: v1.1.337
# hooks:
# - id: pyright
# pass_filenames: false
# stages:
# - manual
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.9
rev: v0.1.14
hooks:
- id: ruff
args:
Expand All @@ -116,55 +96,46 @@ repos:
hooks:
- id: vulture
pass_filenames: false
# - repo: https://github.com/PyCQA/docformatter
# rev: v1.7.5
# hooks:
# - id: docformatter
# additional_dependencies:
# - tomli
# args:
# - --in-place
# - src
# pass_filenames: false
# - repo: https://github.com/adamchainz/blacken-docs
# rev: 1.16.0
# hooks:
# - id: blacken-docs
# args:
# - --line-length
# - "87"
# - --target-version
# - py311
# - repo: https://github.com/econchick/interrogate
# rev: 1.5.0
# hooks:
# - id: interrogate
# args:
# - src
# pass_filenames: false
# - repo: https://github.com/pycqa/pydocstyle
# rev: 6.3.0
# hooks:
# - id: pydocstyle
# additional_dependencies:
# - tomli
# args:
# - src
# pass_filenames: false
- repo: https://github.com/PyCQA/docformatter
rev: v1.7.5
hooks:
- id: docformatter
additional_dependencies:
- .[tomli]
args:
- --in-place
- src
pass_filenames: false
- repo: https://github.com/adamchainz/blacken-docs
rev: 1.16.0
hooks:
- id: blacken-docs
args:
- --line-length
- "87"
- --target-version
- py311
- repo: https://github.com/econchick/interrogate
rev: 1.5.0
hooks:
- id: interrogate
args:
- src
pass_filenames: false
- repo: https://github.com/tox-dev/pyproject-fmt
rev: 1.5.3
rev: 1.7.0
hooks:
- id: pyproject-fmt
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.15
rev: v0.16
hooks:
- id: validate-pyproject
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
additional_dependencies:
- tomli
- .[toml]
args:
- --write-changes
stages:
Expand Down
14 changes: 14 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2
python:
install:
- path: .
method: pip
extra_requirements:
- doc
build:
os: ubuntu-22.04
tools:
python: "3.11"
sphinx:
builder: html
configuration: docs/source/conf.py
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
# Query Package Documentation

* Installation: [PyPI](https://pypi.org/project/query-package-documentation/)
* Documentation: [Read the Docs](https://query-package-documentation.readthedocs.io)
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
7 changes: 7 additions & 0 deletions docs/source/cli.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
cli module
==========

.. automodule:: cli
:members:
:undoc-members:
:show-inheritance:
86 changes: 86 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
"""Configure Sphinx documentation."""
# pylint: disable=invalid-name
import sys

import generative_ai

sys.path.insert(0, "../src")

project = "query-package-documentation"
version = str(generative_ai.__version__)
project_copyright = "2024, Anirban Ray"
author = "Anirban Ray"
release = f"v{version}"

extensions = [
"myst_parser",
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
"sphinx.ext.napoleon",
"sphinx_copybutton",
]
source_suffix = {".md": "markdown", ".rst": "restructuredtext"}

smartquotes = False
today_fmt = "%Y-%m-%d"
highlight_language = "python3"
pygments_style = "friendly"
add_function_parentheses = False
add_module_names = False
option_emphasise_placeholders = True

html_theme = "furo"
html_theme_options = {"top_of_page_button": None}
html_title = f"{project} {release}"

html_last_updated_fmt = "%B %d, %Y"
html_use_index = True
html_split_index = False
html_copy_source = False
html_show_sourcelink = False
html_show_sphinx = False
html_output_encoding = "utf-8"

python_display_short_literal_types = True

myst_enable_extensions = [
"amsmath",
"attrs_inline",
"colon_fence",
"deflist",
"dollarmath",
"fieldlist",
"html_admonition",
"html_image",
"linkify",
"replacements",
"smartquotes",
"strikethrough",
"substitution",
"tasklist",
]

autoclass_content = "class"
autodoc_inherit_docstrings = True
autodoc_member_order = "bysource"
autodoc_typehints = "both"
autodoc_typehints_description_target = "documented"
autodoc_typehints_format = "short"

intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
"langchain": ("https://api.python.langchain.com/en/stable", None),
"numpydoc": ("https://numpydoc.readthedocs.io/en/stable", None),
}

napoleon_google_docstring = False
napoleon_numpy_docstring = True
napoleon_include_init_with_doc = False
napoleon_use_param = True
napoleon_use_keyword = True
napoleon_use_rtype = True
napoleon_preprocess_types = True

copybutton_prompt_text = r">>> |\.\.\. |\$ "
copybutton_prompt_is_regexp = True
copybutton_line_continuation_character = "\\"
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
generative\_ai.dataset\_generation.orchestrate\_generation module
=================================================================

.. automodule:: generative_ai.dataset_generation.orchestrate_generation
:members:
:undoc-members:
:show-inheritance:
21 changes: 21 additions & 0 deletions docs/source/generative_ai.dataset_generation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
generative\_ai.dataset\_generation package
==========================================

Submodules
----------

.. toctree::
:maxdepth: 3

generative_ai.dataset_generation.orchestrate_generation
generative_ai.dataset_generation.step_1_generation
generative_ai.dataset_generation.step_2_generation
generative_ai.dataset_generation.utils_generation

Module contents
---------------

.. automodule:: generative_ai.dataset_generation
:members:
:undoc-members:
:show-inheritance:
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
generative\_ai.dataset\_generation.step\_1\_generation module
=============================================================

.. automodule:: generative_ai.dataset_generation.step_1_generation
:members:
:undoc-members:
:show-inheritance:
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
generative\_ai.dataset\_generation.step\_2\_generation module
=============================================================

.. automodule:: generative_ai.dataset_generation.step_2_generation
:members:
:undoc-members:
:show-inheritance:
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
generative\_ai.dataset\_generation.utils\_generation module
===========================================================

.. automodule:: generative_ai.dataset_generation.utils_generation
:members:
:undoc-members:
:show-inheritance:
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
generative\_ai.information\_retrieval.orchestrate\_retrieval module
===================================================================

.. automodule:: generative_ai.information_retrieval.orchestrate_retrieval
:members:
:undoc-members:
:show-inheritance:
Loading

0 comments on commit 4a4452a

Please sign in to comment.