Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
35da209
Automatic pre-commit fixes
Oct 3, 2025
bb14ced
Fixed a test
Oct 3, 2025
cda6164
base and create mypy fixes
Oct 3, 2025
e63c8bc
Some mypy fixes to generator.py
Oct 3, 2025
f28d7b9
Fixed variances in tests
Oct 5, 2025
20ff9ed
Mypy fixes in generators.py
Oct 6, 2025
49954de
mypy fixes in interactive.py
Oct 6, 2025
3e01c57
More mypy fixes in interactive.py
Oct 6, 2025
ea02cf3
mypy clean: dump, generators, interactive, providers
Oct 7, 2025
63f781e
Mypy fixed dump, interactive, main, serialize_metadata
Oct 7, 2025
3a5527b
mypy clean in datafaker dir
Oct 7, 2025
3fffbad
pre-commit rewrites
Oct 7, 2025
55acf14
test_dump is mypy clean
Oct 7, 2025
c3709b8
Some mypy cleaning of tests directory
Oct 7, 2025
113c4d2
Much more cleaning. mypy clean
Oct 8, 2025
10b02c5
precommit cleanup, NullPartitionedGrouped fix
Oct 8, 2025
42fb24a
Many, many cleanups.
Oct 9, 2025
b86e106
More cleaning
Oct 9, 2025
e1dec20
Lots of pylint cleaning
Oct 10, 2025
2894044
Precommit clean!
Oct 13, 2025
7728e6a
Merge remote-tracking branch 'safehr/main' into precommit
Oct 13, 2025
2a4982f
Pre-commit cleaned.
Oct 15, 2025
05ea378
Add running tests to pre-commit.yml
Oct 15, 2025
91036ce
Github actions starting PostgreSQL
Oct 15, 2025
69e0933
Fixed test_unique_constraint_fails
Oct 16, 2025
820700e
Cleaned up
Oct 16, 2025
433bb19
Fixed tests
Oct 16, 2025
d1b07dc
cleaned
Oct 16, 2025
79990a1
Move real test runner to tests.yml, overwriting bad test runner
Oct 17, 2025
9d0ec47
Added poetry initialisation to test runner
Oct 17, 2025
83438bb
More test fixes
Oct 17, 2025
2306b12
Another attempt to get tests.yml working
Oct 17, 2025
079598f
Fixed choice variant proposals
Oct 22, 2025
89a5d57
MetaData in df.py fixed
Oct 22, 2025
b9b2353
Moved DIstributionGenerator to providers.py
Oct 24, 2025
3d9e7f0
Answering a PR comment
Nov 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ on:
env:
# This should be the default but we'll be explicit
PRE_COMMIT_HOME: ~/.caches/pre-commit
PYTHON_VERSION: "3.9"
PYTHON_VERSION: "3.10"
jobs:
the_job:
clean-check:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
Expand Down
39 changes: 10 additions & 29 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,50 +8,31 @@ on:
- main
env:
# This should be the default but we'll be explicit
PYTHON_VERSION: "3.9"
PYTHON_VERSION: "3.10"
jobs:
the_job:
unit-tests:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15
env:
POSTGRES_PASSWORD: password
ports:
- 5432:5432
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Bootstrap poetry
- name: Start PostgreSQL
shell: bash
run: |
python -m ensurepip
python -m pip install --upgrade pip
python -m pip install poetry
sudo systemctl start postgresql.service
- name: Install poetry
shell: bash
run: |
sudo apt install python3-poetry
- name: Configure poetry
shell: bash
run: |
python -m poetry config virtualenvs.in-project true
# - name: Cache Poetry dependencies
# uses: actions/cache@v3
# id: poetry-cache
# with:
# path: .venv
# key: venv-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('poetry.lock') }}
- name: Install dependencies
shell: bash
if: steps.poetry-cache.outputs.cache-hit != 'true'
run: |
python -m poetry install --all-extras
- name: Create src database
shell: bash
run: |
PGPASSWORD=password psql --host=localhost --username=postgres --set="ON_ERROR_STOP=1" --file=tests/examples/src.dump
- name: Run Unit Tests
- name: Run tests
shell: bash
run: |
REQUIRES_DB=1 poetry run python -m unittest discover --verbose tests
poetry run python -m unittest
12 changes: 5 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,22 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
rev: v6.0.0
hooks:
- id: trailing-whitespace
exclude: docs/(source|build/html)/_static/
- id: end-of-file-fixer
exclude: docs/source/_static/
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/markdownlint/markdownlint
# Note the "v"
rev: v0.11.0
rev: v0.12.0
hooks:
- id: markdownlint
args: [--style=mdl_style.rb]
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.8.0.4
rev: v0.11.0.1
hooks:
- id: shellcheck
- repo: local
Expand All @@ -39,8 +40,7 @@ repos:
language: system
types: ['python']
exclude: (?x)(
tests/examples|
tests/workspace
tests/examples
)
- id: isort
name: isort
Expand All @@ -49,7 +49,6 @@ repos:
types: ['python']
exclude: (?x)(
tests/examples|
tests/workspace|
examples
)
- id: pylint
Expand All @@ -76,7 +75,6 @@ repos:
language: system
exclude: (?x)(
tests/examples|
tests/workspace|
examples
)
types: ['python']
5 changes: 2 additions & 3 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ ignore=CVS

# Add files or directories matching the regex patterns to the ignore-list. The
# regex matches against paths.
ignore-paths=tests/examples,
tests/workspace
ignore-paths=tests/examples

# Files or directories matching the regex patterns are skipped. The regex
# matches against base names, not paths.
Expand Down Expand Up @@ -53,7 +52,7 @@ persistent=yes

# Min Python version to use for version dependend checks. Will default to the
# version used to run pylint.
py-version=3.9
py-version=3.10

# When enabled, pylint would attempt to guess common misconfiguration and emit
# user-friendly hints instead of false-positive error messages.
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.9"
python: "3.10"
# You can also specify other tool versions:
# nodejs: "19"
# rust: "1.64"
Expand Down
10 changes: 0 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,6 @@ Executing unit tests is straightforward:
python -m unittest discover --verbose tests/
```

for tests that are currently maintained.

## Running functional tests

These tests do not currently work, and will be replaced by unit tests.

Functional tests require PostgreSQL to be installed.

*WARNING: Some MacOS systems [do not recognise the 'en_US.utf8' locale](https://apple.stackexchange.com/questions/206495/load-a-locale-from-usr-local-share-locale-in-os-x). As a workaround, replace `en_US.utf8` with `en_US.UTF-8` on every `*.dump` file.*

## Building documentation locally

```bash
Expand Down
Loading