-
Notifications
You must be signed in to change notification settings - Fork 2
My/document #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
My/document #37
Changes from all commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
cdf7980
Template for sphinx documentation
myyong 78210a5
Auto generate document for aa one function
myyong d83f7a7
Add path to code
myyong 139c775
Edit toctree
myyong 8fe7c92
Editing module path for toctree
myyong 5cd2de0
First pass autosummary
myyong 9d113e1
RTD theme, removed autodoc
myyong 28ea3da
Auto generated rtd files
myyong 1f9f193
Add path for readthedocs
myyong 9c80dba
Add requirements.txt
myyong cc5de6f
List directory structure
myyong 13644e2
Add yaml file, relocate requirements
myyong d6d0996
Add yaml file, update requirements
myyong e6e55a9
Modify requirements
myyong d4f14c5
Fix conf.py location
myyong a7885f0
Fix Python version
myyong 93261d2
Merge branch 'main' into my/document
myyong 3532e7f
Removed placeholder docs
myyong 5bde836
Enable napoleon extension
myyong e287c27
Docstrings for Settings module
myyong 2659373
Organise db test env vars
Iain-S ba5936e
Template for sphinx documentation
myyong c9b7c26
Auto generate document for aa one function
myyong 1b1f9b0
Add path to code
myyong 323f840
Edit toctree
myyong 7127093
Editing module path for toctree
myyong 2e0fc03
First pass autosummary
myyong d07a5eb
RTD theme, removed autodoc
myyong 49fdc50
Auto generated rtd files
myyong 55d0adf
Add path for readthedocs
Iain-S c140868
Add requirements.txt
myyong d69b6e9
List directory structure
myyong 23b4959
Add yaml file, relocate requirements
myyong b86f919
Add yaml file, update requirements
myyong 38cf617
Modify requirements
myyong 5a84393
Fix conf.py location
myyong f9926fb
Fix Python version
myyong a53e92f
Removed placeholder docs
myyong b119139
Enable napoleon extension
myyong e605e39
Add pydocstyle pre-commit hook
Iain-S aee5aa6
Fix pydocstyle issues
Iain-S aae0ecf
Merge pull request #39 from alan-turing-institute/iain-s/document
myyong 099ae18
Merge branch 'my/document' of https://github.com/alan-turing-institut…
myyong 19be1b1
Added docstrings and removed blank lines.
myyong 40ef43c
Removed args and returns where None.
myyong 771c413
Include mimesis to enable BaseProvider class import
myyong 157f521
Merge branch 'main' into my/document
Iain-S File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -135,3 +135,7 @@ dmypy.json | |
|
|
||
| .fake | ||
| sqlsynthgen/config.ini | ||
|
|
||
| # sphinx | ||
| docs/build/* | ||
| docs/temp/* | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # .readthedocs.yaml | ||
| # Read the Docs configuration file | ||
| # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
|
||
| # Required | ||
| version: 2 | ||
|
|
||
| # Set the version of Python and other tools you might need | ||
| build: | ||
| os: ubuntu-22.04 | ||
| tools: | ||
| python: "3.9" | ||
| # You can also specify other tool versions: | ||
| # nodejs: "19" | ||
| # rust: "1.64" | ||
| # golang: "1.19" | ||
|
|
||
| # Build documentation in the docs/ directory with Sphinx | ||
| sphinx: | ||
| configuration: docs/source/conf.py | ||
|
|
||
| # If using Sphinx, optionally build your docs in additional formats such as PDF | ||
| # formats: | ||
|
|
||
| # Optionally declare the Python requirements required to build your docs | ||
| python: | ||
| install: | ||
| - requirements: docs/requirements.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| alabaster==0.7.13 ; python_version >= "3.9" and python_version < "4.0" | ||
| babel==2.11.0 ; python_version >= "3.9" and python_version < "4.0" | ||
| certifi==2022.12.7 ; python_version >= "3.9" and python_version < "4" | ||
| cfgv==3.3.1 ; python_version >= "3.9" and python_version < "4.0" | ||
| charset-normalizer==3.0.1 ; python_version >= "3.9" and python_version < "4" | ||
| click==8.1.3 ; python_version >= "3.9" and python_version < "4.0" | ||
| colorama==0.4.6 ; python_version >= "3.9" and python_version < "4.0" and platform_system == "Windows" or python_version >= "3.9" and python_version < "4.0" and sys_platform == "win32" | ||
| distlib==0.3.6 ; python_version >= "3.9" and python_version < "4.0" | ||
| docutils==0.17.1 ; python_version >= "3.9" and python_version < "4.0" | ||
| filelock==3.9.0 ; python_version >= "3.9" and python_version < "4.0" | ||
| greenlet==2.0.1 ; python_version >= "3.9" and (platform_machine == "aarch64" or platform_machine == "ppc64le" or platform_machine == "x86_64" or platform_machine == "amd64" or platform_machine == "AMD64" or platform_machine == "win32" or platform_machine == "WIN32") and python_version < "4.0" | ||
| identify==2.5.15 ; python_version >= "3.9" and python_version < "4.0" | ||
| idna==3.4 ; python_version >= "3.9" and python_version < "4" | ||
| imagesize==1.4.1 ; python_version >= "3.9" and python_version < "4.0" | ||
| importlib-metadata==6.0.0 ; python_version >= "3.9" and python_version < "3.10" | ||
| inflect==6.0.2 ; python_version >= "3.9" and python_version < "4.0" | ||
| jinja2==3.1.2 ; python_version >= "3.9" and python_version < "4.0" | ||
| markupsafe==2.1.2 ; python_version >= "3.9" and python_version < "4.0" | ||
| mimesis==6.1.1 ; python_version >= "3.9" and python_version < "4.0" | ||
| nodeenv==1.7.0 ; python_version >= "3.9" and python_version < "4.0" | ||
| packaging==23.0 ; python_version >= "3.9" and python_version < "4.0" | ||
| platformdirs==2.6.0 ; python_version >= "3.9" and python_version < "4.0" | ||
| pockets==0.9.1 ; python_version >= "3.9" and python_version < "4.0" | ||
| pre-commit==3.0.0 ; python_version >= "3.9" and python_version < "4.0" | ||
| psycopg2-binary==2.9.5 ; python_version >= "3.9" and python_version < "4.0" | ||
| pydantic==1.10.2 ; python_version >= "3.9" and python_version < "4.0" | ||
| pydantic[dotenv]==1.10.2 ; python_version >= "3.9" and python_version < "4.0" | ||
| pygments==2.14.0 ; python_version >= "3.9" and python_version < "4.0" | ||
| python-docs-theme==2022.1 ; python_version >= "3.9" and python_version < "4.0" | ||
| python-dotenv==0.21.0 ; python_version >= "3.9" and python_version < "4.0" | ||
| pytz==2022.7.1 ; python_version >= "3.9" and python_version < "4.0" | ||
| pyyaml==6.0 ; python_version >= "3.9" and python_version < "4.0" | ||
| requests==2.28.2 ; python_version >= "3.9" and python_version < "4" | ||
| setuptools==66.1.1 ; python_version >= "3.9" and python_version < "4.0" | ||
| six==1.16.0 ; python_version >= "3.9" and python_version < "4.0" | ||
| snowballstemmer==2.2.0 ; python_version >= "3.9" and python_version < "4.0" | ||
| sphinx-rtd-theme==1.1.1 ; python_version >= "3.9" and python_version < "4.0" | ||
| sphinx==5.3.0 ; python_version >= "3.9" and python_version < "4.0" | ||
| sphinxcontrib-applehelp==1.0.4 ; python_version >= "3.9" and python_version < "4.0" | ||
| sphinxcontrib-devhelp==1.0.2 ; python_version >= "3.9" and python_version < "4.0" | ||
| sphinxcontrib-htmlhelp==2.0.0 ; python_version >= "3.9" and python_version < "4.0" | ||
| sphinxcontrib-jsmath==1.0.1 ; python_version >= "3.9" and python_version < "4.0" | ||
| sphinxcontrib-napoleon==0.7 ; python_version >= "3.9" and python_version < "4.0" | ||
| sphinxcontrib-qthelp==1.0.3 ; python_version >= "3.9" and python_version < "4.0" | ||
| sphinxcontrib-serializinghtml==1.1.5 ; python_version >= "3.9" and python_version < "4.0" | ||
| sqlacodegen @ git+https://github.com/agronholm/sqlacodegen.git@3.0.0rc1 ; python_version >= "3.9" and python_version < "4.0" | ||
| sqlalchemy-utils==0.38.3 ; python_version >= "3.9" and python_version < "4.0" | ||
| sqlalchemy==1.4.44 ; python_version >= "3.9" and python_version < "4.0" | ||
| typer==0.7.0 ; python_version >= "3.9" and python_version < "4.0" | ||
| typing-extensions==4.4.0 ; python_version >= "3.9" and python_version < "4.0" | ||
| urllib3==1.26.14 ; python_version >= "3.9" and python_version < "4" | ||
| virtualenv==20.17.1 ; python_version >= "3.9" and python_version < "4.0" | ||
| zipp==3.11.0 ; python_version >= "3.9" and python_version < "3.10" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| Changelog | ||
| ========= | ||
|
|
||
| **2023-01-30** | ||
|
|
||
| - [Feature]: Detect tables, create Python classes | ||
| - [Feature]: Populate classes with random values. | ||
| - [Feature]: Create new tables, load values. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| """Sphinx configuration""" | ||
| # Configuration file for the Sphinx documentation builder. | ||
| # | ||
| # For the full list of built-in configuration values, see the documentation: | ||
| # https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
|
||
| # -- Project information ----------------------------------------------------- | ||
| # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information | ||
|
|
||
| import os | ||
| import pathlib | ||
| import sys | ||
|
|
||
| sys.path.insert(0, pathlib.Path(__file__).parents[2].resolve().as_posix()) | ||
| sys.path.insert(0, os.path.abspath("../..")) | ||
|
|
||
| project = "sqlsynthgen" # pylint: disable=C0103 | ||
| copyright = "2023, anon" # pylint: disable=C0103,W0622 | ||
| author = "anon" # pylint: disable=C0103 | ||
| release = "0.0" # pylint: disable=C0103 | ||
|
|
||
| # -- General configuration --------------------------------------------------- | ||
| # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration | ||
|
|
||
| extensions: list[str] = [ | ||
| "sphinx.ext.duration", | ||
| "sphinx.ext.doctest", | ||
| "sphinx.ext.autodoc", | ||
| "sphinx.ext.autosummary", | ||
| "sphinx_rtd_theme", | ||
| "sphinxcontrib.napoleon", | ||
| ] | ||
|
|
||
| autodoc_mock_imports: list[str] = ["typer", "pydantic", "sqlalchemy"] | ||
|
|
||
| templates_path: list[str] = ["_templates"] | ||
| exclude_patterns: list[str] = [] | ||
|
|
||
| # -- Options for HTML output ------------------------------------------------- | ||
| # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output | ||
|
|
||
| html_theme = "sphinx_rtd_theme" # pylint: disable=C0103 | ||
| html_static_path = ["_static"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| .. sqlsynthgen documentation master file, created by | ||
| sphinx-quickstart on Fri Jan 13 15:18:50 2023. | ||
| You can adapt this file completely to your liking, but it should at least | ||
| contain the root `toctree` directive. | ||
|
|
||
| Draft sqlsynthgen's documentation | ||
| ======================================= | ||
|
|
||
| **sqlsynthgen** is a etc | ||
|
|
||
| .. note:: | ||
|
|
||
| This project will be under active development from Jan - Oct 2023 | ||
|
|
||
| Contents: | ||
| --------- | ||
|
|
||
| .. toctree:: | ||
| :maxdepth: 2 | ||
|
|
||
| changelog | ||
| installation | ||
| modules | ||
|
|
||
|
|
||
| Indices and tables | ||
| ------------------ | ||
|
|
||
| * :ref:`genindex` | ||
| * :ref:`modindex` | ||
| * :ref:`search` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| Installation | ||
| ============ | ||
|
|
||
| Get started | ||
| ------------ | ||
|
|
||
| To use sqlsynthgen, first install it using poetry: | ||
|
|
||
| .. code-block:: console | ||
|
|
||
| (<your_poetry_shell>) $ poetry add sqlsynthgen | ||
|
|
||
|
|
||
| .. Test print integer function | ||
| .. --------------------------- | ||
|
|
||
| .. To test print integer function, | ||
| .. you can use the ``sqlsynthgen.docs.print_int`` function: | ||
|
|
||
| .. .. autofunction:: sqlsynthgen.docs.print_int | ||
|
|
||
| .. The ``phone`` argument should be of type integer. Otherwise, :py:func:`sqlsynthgen.docs.print_int` | ||
| .. will raise an exception. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| sqlsynthgen | ||
| =========== | ||
|
|
||
| .. toctree:: | ||
| :maxdepth: 1 | ||
|
|
||
| sqlsynthgen |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| sqlsynthgen package | ||
| =================== | ||
|
|
||
| Submodules | ||
| ---------- | ||
|
|
||
| sqlsynthgen.create module | ||
| ------------------------- | ||
|
|
||
| .. automodule:: sqlsynthgen.create | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
|
|
||
| sqlsynthgen.main module | ||
| ----------------------- | ||
|
|
||
| .. automodule:: sqlsynthgen.main | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
|
|
||
| sqlsynthgen.make module | ||
| ----------------------- | ||
|
|
||
| .. automodule:: sqlsynthgen.make | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
|
|
||
| sqlsynthgen.providers module | ||
| ---------------------------- | ||
|
|
||
| .. automodule:: sqlsynthgen.providers | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
|
|
||
| sqlsynthgen.settings module | ||
| --------------------------- | ||
|
|
||
| .. automodule:: sqlsynthgen.settings | ||
| :members: | ||
| :show-inheritance: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # remember to place requirements in docs/ | ||
| poetry export --without-hashes --format=requirements.txt > requirements.txt | ||
|
|
||
| # this does not clean, use make clean html from docs instead? | ||
| sphinx-build -b html docs/source docs/build/html | ||
|
|
||
| # sweep up autodocs, check out options | ||
| rm docs/source/modules.rst | ||
| rm docs/source/sqlsynthgen.rst | ||
| sphinx-apidoc -o docs/source sqlsynthgen/ | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.