Skip to content

Commit 3d2abed

Browse files
authored
Merge pull request #155 from alan-turing-institute/docs-improvements
Documentation improvements
2 parents 969f761 + 0400f15 commit 3d2abed

20 files changed

+4189
-155
lines changed

.github/workflows/pre-commit.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ jobs:
4444
shell: bash
4545
run: |
4646
python -m pip install pre-commit
47-
- name: Cache Pre-Commit Hooks
48-
id: pre-commit-cache
49-
uses: actions/cache@v3
50-
with:
51-
path: ${{ env.PRE_COMMIT_HOME }}
52-
key: hooks-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('poetry.lock') }}
47+
# - name: Cache Pre-Commit Hooks
48+
# idna: pre-commit-cache
49+
# usnaes: actions/cache@v3
50+
# winath:
51+
# napath: ${{ env.PRE_COMMIT_HOME }}
52+
# nakey: hooks-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('poetry.lock') }}
5353
- name: Install Pre-Commit Hooks
5454
shell: bash
5555
if: steps.pre-commit-cache.outputs.cache-hit != 'true'

.readthedocs.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,19 @@ build:
1414
# nodejs: "19"
1515
# rust: "1.64"
1616
# golang: "1.19"
17+
jobs:
18+
# See https://docs.readthedocs.io/en/stable/build-customization.html#install-dependencies-with-poetry
19+
post_create_environment:
20+
# Install poetry
21+
# https://python-poetry.org/docs/#installing-manually
22+
- pip install poetry
23+
# Tell poetry to not use a virtual environment
24+
- poetry config virtualenvs.create false
25+
post_install:
26+
# Install dependencies with 'docs' dependency group
27+
# https://python-poetry.org/docs/managing-dependencies/#dependency-groups
28+
- poetry install --extras docs
29+
1730

1831
# Build documentation in the docs/ directory with Sphinx
1932
sphinx:
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
The sqlsynthgen Package
1+
API Reference
22
=======================
33

44
Submodules

docs/source/changelog.rst

Lines changed: 0 additions & 8 deletions
This file was deleted.

docs/source/configuration.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Configuration
2-
-------------
1+
Configuration Reference
2+
=======================
33

44
SqlSynthGen is configured using a YAML file, which is passed to several commands with the ``--config`` option.
55
Throughout the docs, we will refer to this file as ``config.yaml`` but it can be called anything (the exception being that there will be a naming conflict if you have a vocabulary table called ``config``).

docs/source/glossary.rst

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ Glossary
77

88
* - Term
99
- Definition
10-
* - Custom Generator
11-
- A user-defined Python function which will provide one or more random column values when called.
12-
* - Destination Database
13-
- A database where `sqlsynthgen` creates the source database schema and inserts the synthetic data it generates.
14-
* - Source Database
15-
- A database that `sqlsynthgen` will create a copy of.
10+
* - Row generator
11+
- A user-defined Python function which will provide one or more random column values for a single table when called.
12+
* - Story generator
13+
- A user-defined Python generator function that ``yields`` rows, possibly multiple rows for multiple tables.
14+
* - Destination database and destination schema
15+
- A database and a schema within that database where `sqlsynthgen` creates the synthetic data tables and inserts the synthetic data it generates.
16+
* - Source database and source schema
17+
- A database and a schema within that database that `sqlsynthgen` will create a copy of and mimic when creating synthetic data.
1618
* - Vocabulary Table
1719
- A table that can be copied in its entirety to the destination database.

docs/source/health_data.rst

Lines changed: 519 additions & 0 deletions
Large diffs are not rendered by default.

docs/source/index.rst

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
.. sqlsynthgen documentation master file, created by
2-
sphinx-quickstart on Fri Jan 13 15:18:50 2023.
3-
You can adapt this file completely to your liking, but it should at least
4-
contain the root `toctree` directive.
1+
.. _page-index:
52

6-
sqlsynthgen's documentation
7-
=======================================
3+
sqlsynthgen's Documentation
4+
---------------------------
85

96
**sqlsynthgen** is a package for making copies of relational databases and populating them with random data.
107

8+
If you are new to sqlsynthgen (SSG for short), we recommend going through the pages of this documentation roughly in order:
9+
After :ref:`installing <page-installation>` SSG and learning the basic commands that it uses from the :ref:`quick start guide <page-quickstart>`, the :ref:`introductory tutorial <page-introduction>` will walk you through a relatively simple use case in detail.
10+
You can then look at one of our other two example use cases, one for :ref:`financial data <page-example-loan-data>` and one for :ref:`health data <page-example-health-data>`.
11+
The latter also goes through some more advanced features of SSG and how to use them, that are relevant beyond health data use cases.
12+
1113
.. note::
1214

1315
This project will be under active development from Jan - Oct 2023
@@ -28,17 +30,17 @@ Contents:
2830

2931
installation
3032
quickstart
31-
tutorials/*
33+
introduction
34+
loan_data
35+
health_data
3236
configuration
33-
sqlsynthgen
37+
api
3438
faq
35-
changelog
3639
glossary
3740

3841

39-
Indices and tables
42+
Indices and Tables
4043
------------------
4144

4245
* :ref:`genindex`
4346
* :ref:`modindex`
44-
* :ref:`search`

docs/source/installation.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
.. _page-installation:
2+
13
Installation
24
============
35

4-
.. _enduser:
5-
66
End User
77
--------
88

0 commit comments

Comments
 (0)