Skip to content

Commit

Permalink
Merge branch 'main' into 2648-feat-add-a-generic-filestream-interface
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Sep 17, 2024
2 parents ce600f6 + 3d3ac7b commit 97b27d7
Show file tree
Hide file tree
Showing 26 changed files with 1,652 additions and 144 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/constraints.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
griffe==1.2.0
griffe==1.3.1
pip==24.2
poetry==1.8.3
poetry-plugin-export==1.8.0
poetry-dynamic-versioning==1.4.0
poetry-dynamic-versioning==1.4.1
pre-commit==3.8.0
nox==2024.4.15
nox-poetry==1.0.3
8 changes: 7 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ jobs:
pipx inject nox nox-poetry
nox --version
- uses: actions/cache@v4
if: matrix.session == 'tests'
with:
path: http_cache.sqlite
key: http_cache-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.sqlalchemy }}

- name: Run Nox
env:
SQLALCHEMY_VERSION: ${{ matrix.sqlalchemy }}
Expand All @@ -100,7 +106,7 @@ jobs:
if: always() && (matrix.session == 'tests')
with:
include-hidden-files: true
name: coverage-data-nox_${{ matrix.session }}-${{ matrix.os }}-py${{ matrix.python-version }}_sqlalchemy_${{ matrix.sqlalchemy }}
name: coverage-data-nox_-${{ matrix.os }}-py${{ matrix.python-version }}_sqlalchemy_${{ matrix.sqlalchemy }}
path: ".coverage.*"

tests-external:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# HTTP cache
http_cache.sqlite

# Local Poetry configuration file

poetry.toml
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ repos:
- id: check-readthedocs

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.4
rev: v0.6.5
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ plugins:
capabilities:
- about
- stream-maps
- record-flattening
- schema-flattening

# TODO: Declare settings and their types here:
settings:
Expand Down
2 changes: 1 addition & 1 deletion docs/capabilities.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ The following capabilities are supported by default.
.. autoattribute:: PluginCapabilities.ABOUT
.. autoattribute:: PluginCapabilities.BATCH
.. autoattribute:: PluginCapabilities.STREAM_MAPS
.. autoattribute:: PluginCapabilities.FLATTENING

========================
Custom base capabilities
Expand Down Expand Up @@ -60,5 +61,4 @@ The following capabilities have to be implemented in the target.
.. autoattribute:: TargetCapabilities.SOFT_DELETE
.. autoattribute:: TargetCapabilities.HARD_DELETE
.. autoattribute:: TargetCapabilities.DATATYPE_FAILSAFE
.. autoattribute:: TargetCapabilities.RECORD_FLATTENING
.. autoattribute:: TargetCapabilities.TARGET_SCHEMA
12 changes: 7 additions & 5 deletions docs/stream_maps.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,9 @@ can be referenced directly by mapping expressions.
- `fake` - a [`Faker`](inv:faker:std:doc#index) instance, configurable via `faker_config`
(see previous example) - see the built-in [standard providers](inv:faker:std:doc#providers)
for available methods
- `Faker` - the [`Faker`](inv:faker:std:doc#fakerclass) class. This was made available to enable consistent data
masking by allowing users to call `Faker.seed()`.

```{tip}
The `fake` object and `Faker` are only available if the plugin specifies `faker` as an additional dependency (through the `singer-sdk` `faker` extra, or directly).
The `fake` object is only available if the plugin specifies `faker` as an additional dependency (through the `singer-sdk` `faker` extra, or directly).
```

:::{versionadded} 0.35.0
Expand All @@ -264,6 +262,10 @@ The `faker` object.
The `Faker` class.
:::

:::{versionchanged} TODO
The `Faker` class was deprecated in favor of instance methods on the `fake` object.
:::

#### Automatic Schema Detection

For performance reasons, type detection is performed at runtime using text analysis
Expand Down Expand Up @@ -475,9 +477,9 @@ To generate consistent masked values, you must provide the **same seed each time
stream_maps:
customers:
# will always generate the same value for the same seed
first_name: Faker.seed(_['first_name']) or fake.first_name()
first_name: fake.seed_instance(_['first_name']) or fake.first_name()
faker_config:
# IMPORTANT: `fake` and `Faker` names are only available if faker_config is defined.
# IMPORTANT: `fake` is only available if the `faker` extra is installed
locale: en_US
```
Expand Down
1,001 changes: 1,001 additions & 0 deletions fixtures/csv/customers.csv

Large diffs are not rendered by default.

51 changes: 51 additions & 0 deletions fixtures/csv/employees.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
id,first_name,last_name,email,ip_address
1,Tobye,Tallach,[email protected],159.80.54.64
2,Bret,Auchterlonie,[email protected],63.179.228.179
3,Chester,Leban,[email protected],109.23.123.220
4,Weston,Venny,[email protected],80.78.0.69
5,Alejoa,Hassen,[email protected],193.70.126.231
6,Otes,Ioselevich,[email protected],55.238.240.160
7,Dolley,Mc Ilwrick,[email protected],225.224.151.67
8,Cliff,Druitt,[email protected],216.35.85.142
9,Alfreda,Parysiak,[email protected],234.124.93.69
10,Alfonso,Wotherspoon,[email protected],34.94.1.132
11,Jemmy,Gavriel,[email protected],69.13.142.245
12,Ezechiel,Binion,[email protected],85.203.127.191
13,Burk,Blowfelde,[email protected],74.133.42.177
14,Danette,Brealey,[email protected],249.85.157.243
15,Brent,Collcutt,[email protected],68.202.67.52
16,Filbert,Wane,[email protected],51.190.146.189
17,Amory,Brewers,[email protected],147.155.225.194
18,Giraud,Reen,[email protected],134.254.177.66
19,Burtie,Siebert,[email protected],47.194.48.217
20,Adam,Maddick,[email protected],165.16.248.228
21,Callean,Vernall,[email protected],243.145.198.197
22,Olympie,Itzakovitz,[email protected],40.55.240.15
23,Jacky,Emney,[email protected],216.72.80.81
24,Isidoro,Novello,[email protected],153.171.11.150
25,Kora,Liversedge,[email protected],131.126.97.242
26,Salaidh,McMenamie,[email protected],228.231.31.219
27,Corey,Dowdeswell,[email protected],203.73.30.64
28,Brodie,Holwell,[email protected],64.200.225.25
29,Trudey,Ungerer,[email protected],122.82.88.41
30,Doralin,Maxted,[email protected],37.78.14.199
31,Maurie,Marklin,[email protected],22.181.178.6
32,Hermann,Voase,[email protected],155.126.157.84
33,Fanchette,Callaway,[email protected],121.161.80.246
34,Sara-ann,Birdall,[email protected],35.64.166.83
35,Harriot,Clipsham,[email protected],78.103.253.219
36,Bonita,Woolway,[email protected],70.114.50.135
37,Arleyne,MacComiskey,[email protected],80.22.221.216
38,Ethelbert,Covill,[email protected],52.66.186.124
39,Irita,Knee,[email protected],239.247.34.120
40,Naoma,Janca,[email protected],189.63.152.60
41,Kayne,Mizzen,[email protected],84.133.236.10
42,Estell,Stuckford,[email protected],246.168.153.22
43,Larine,Stack,[email protected],197.176.195.68
44,Rikki,Newbold,[email protected],27.245.43.243
45,Romonda,Charer,[email protected],137.144.236.93
46,Letizia,Monksfield,[email protected],209.47.5.147
47,Sinclare,McAreavey,[email protected],251.250.216.206
48,Athene,Haysham,[email protected],81.227.231.240
49,Gale,Tracy,[email protected],93.138.226.205
50,Dareen,O'Shields,[email protected],27.226.127.240
Loading

0 comments on commit 97b27d7

Please sign in to comment.