Skip to content

Commit

Permalink
Merge branch 'main' into 1217-feature-automatic-catalog-inclusion-of-…
Browse files Browse the repository at this point in the history
…replication-keys
  • Loading branch information
edgarrmondragon authored Jan 4, 2023
2 parents fb41535 + 48dc863 commit dc588a4
Show file tree
Hide file tree
Showing 18 changed files with 712 additions and 331 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: actions/[email protected]

- name: Set up Python
uses: actions/setup-python@v4.3.1
uses: actions/setup-python@v4.4.0
with:
python-version: "3.10"

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
poetry --version
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4.3.1
uses: actions/setup-python@v4.4.0
with:
python-version: ${{ matrix.python-version }}
architecture: x64
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
poetry --version
- name: Setup Python 3.10
uses: actions/setup-python@v4.3.1
uses: actions/setup-python@v4.4.0
with:
python-version: '3.10'
architecture: x64
Expand Down Expand Up @@ -153,7 +153,7 @@ jobs:
poetry --version
- name: Set up Python
uses: actions/setup-python@v4.3.1
uses: actions/setup-python@v4.4.0
with:
python-version: '3.10'
cache: 'pip'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/version_bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
sudo chown -R $USER:$USER .git/objects
- name: Set up Python
uses: actions/setup-python@v4.3.1
uses: actions/setup-python@v4.4.0
with:
python-version: "3.10"
architecture: x64
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ repos:
)$
- repo: https://github.com/pycqa/isort
rev: v5.11.3
rev: 5.11.4
hooks:
- id: isort
exclude: (cookiecutter/.*|singer_sdk/helpers/_simpleeval/.*)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install poetry==1.2.*
- name: Install dependencies
run: |
poetry install
- name: Run lint command from tox.ini
run: |
poetry run tox -e lint
Expand Down
20 changes: 10 additions & 10 deletions cookiecutter/tap-template/{{cookiecutter.tap_id}}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ keywords = [
license = "Apache 2.0"

[tool.poetry.dependencies]
python = "<3.11,>=3.7.1"
requests = "^2.25.1"
python = "<3.12,>=3.7.1"
requests = "^2.28.1"
singer-sdk = { version="^0.16.0"}
fs-s3fs = { version = "^1.1.1", optional = true}

[tool.poetry.dev-dependencies]
pytest = "^6.2.5"
tox = "^3.24.4"
[tool.poetry.group.dev.dependencies]
pytest = "^7.2.0"
tox = "^4.1.3"
flake8 = "^3.9.2"
black = "^21.9b0"
pydocstyle = "^6.1.1"
mypy = "^0.910"
types-requests = "^2.26.1"
isort = "^5.10.1"
black = "^22.12.0"
pydocstyle = "^6.2.1"
mypy = "^0.991"
types-requests = "^2.28.11.7"
isort = "^5.11.4"

[tool.poetry.extras]
s3 = ["fs-s3fs"]
Expand Down
2 changes: 1 addition & 1 deletion cookiecutter/tap-template/{{cookiecutter.tap_id}}/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ envlist = py38
isolated_build = true

[testenv]
whitelist_externals = poetry
allowlist_externals = poetry

commands =
poetry install -v
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ keywords = [
license = "Apache 2.0"

[tool.poetry.dependencies]
python = "<3.11,>=3.7.1"
requests = "^2.25.1"
python = "<3.12,>=3.7.1"
requests = "^2.28.1"
singer-sdk = { version="^0.16.0"}
fs-s3fs = { version = "^1.1.1", optional = true}

[tool.poetry.dev-dependencies]
pytest = "^6.2.5"
tox = "^3.24.4"
pytest = "^7.2.0"
tox = "^4.1.3"
flake8 = "^3.9.2"
black = "^21.9b0"
pydocstyle = "^6.1.1"
mypy = "^0.910"
types-requests = "^2.26.1"
isort = "^5.10.1"
black = "^22.12.0"
pydocstyle = "^6.2.1"
mypy = "^0.991"
types-requests = "^2.28.11.7"
isort = "^5.11.4"

[tool.poetry.extras]
s3 = ["fs-s3fs"]
Expand Down
2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ This repo uses the [semantic-prs](https://github.com/Ezard/semantic-prs) GitHub

Pull requests should be named according to the conventional commit syntax to streamline changelog and release notes management. We encourage (but do not require) the use of conventional commits in commit messages as well.

In general, PR titles should follow the format "<type>: <desc>", where type is any one of these:
In general, PR titles should follow the format `<type>: <desc>`, where type is any one of these:

- `ci`
- `chore`
Expand Down
16 changes: 8 additions & 8 deletions docs/code_samples.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class TapCountries(Tap):
config options and does not require authentication.
"""
name = "tap-countries"
config_jsonschema = PropertiesList([]).to_dict()
config_jsonschema = th.PropertiesList([]).to_dict()

def discover_streams(self) -> List[Stream]:
"""Return a list containing the two stream types."""
Expand Down Expand Up @@ -127,11 +127,11 @@ class ParquetStream(Stream):
"""Dynamically detect the json schema for the stream.
This is evaluated prior to any records being retrieved.
"""
properties: List[Property] = []
for header in FAKECSV.split("\n")[0].split(",")
properties: List[th.Property] = []
for header in FAKECSV.split("\n")[0].split(","):
# Assume string type for all fields
properties.add(header, StringType())
return PropertiesList(*properties).to_dict()
properties.append(th.Property(header, th.StringType()))
return th.PropertiesList(*properties).to_dict()
```

Here is another example from the Parquet tap. This sample uses a
Expand All @@ -148,7 +148,7 @@ class ParquetStream(Stream):
"""Dynamically detect the json schema for the stream.
This is evaluated prior to any records being retrieved.
"""
properties: List[Property] = []
properties: List[th.Property] = []
# Get a schema object using the parquet and pyarrow libraries
parquet_schema = pq.ParquetFile(self.filepath).schema_arrow

Expand All @@ -160,10 +160,10 @@ class ParquetStream(Stream):
dtype = get_jsonschema_type(str(parquet_schema.types[i]))

# Add the new property to our list
properties.append(Property(name, dtype))
properties.append(th.Property(name, dtype))

# Return the list as a JSON Schema dictionary object
return PropertiesList(*properties).to_dict()
return th.PropertiesList(*properties).to_dict()
```

### Initialize a collection of tap streams with differing types
Expand Down
6 changes: 5 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ Meltano Singer SDK

The Meltano_ Singer SDK for Taps and Targets is the fastest way to build custom
data extractors and loaders! Taps and targets built on the SDK are automatically compliant with the
`Singer Spec`_, the de-facto open source standard for extract and load pipelines.
`Singer Spec`_, the de-facto open source standard for extract and load pipelines, and therefore Meltano_.

If you're looking to add support to Meltano for a new data tool that would be listed on the `Meltano Hub`_ as a utility, check out the `Meltano EDK`_ (Extension Development Kit) instead.

Future-proof extractors and loaders, with less code
---------------------------------------------------
Expand Down Expand Up @@ -75,6 +77,8 @@ Advanced Topics
.. _Singer: https://singer.io
.. _Singer Spec: https://hub.meltano.com/singer/spec
.. _Meltano: https://www.meltano.com
.. _Meltano EDK: https://edk.meltano.com
.. _Meltano Hub: https://hub.meltano.com/utilities/
.. _integrated with Meltano: https://docs.meltano.com/tutorials/custom-extractor#add-the-plugin-to-your-meltano-project
.. _contribute back: https://github.com/meltano/sdk/issues?q=is%3Aopen+is%3Aissue+label%3A%22accepting+merge+requests%22
.. _source code: https://github.com/meltano/sdk
Expand Down
Loading

0 comments on commit dc588a4

Please sign in to comment.