From 39eda24e0dfb0e39f8336f124868b6526ad4614e Mon Sep 17 00:00:00 2001 From: Brian Leonard Date: Wed, 1 May 2024 11:49:44 -0700 Subject: [PATCH] source-openweather: ensure inline schemas, updated cdk, poetry (where possible) (#37209) --- .../connectors/source-openweather/README.md | 76 ++++++++---- .../source-openweather/metadata.yaml | 26 ++-- .../connectors/source-openweather/poetry.lock | 57 +++++---- .../source-openweather/pyproject.toml | 11 +- .../source_openweather/manifest.yaml | 114 ++++++++++++++++-- .../source_openweather/schemas/onecall.json | 88 -------------- docs/integrations/sources/openweather.md | 4 +- 7 files changed, 205 insertions(+), 171 deletions(-) delete mode 100644 airbyte-integrations/connectors/source-openweather/source_openweather/schemas/onecall.json diff --git a/airbyte-integrations/connectors/source-openweather/README.md b/airbyte-integrations/connectors/source-openweather/README.md index a995dba6879c..1d912dd9d1d1 100644 --- a/airbyte-integrations/connectors/source-openweather/README.md +++ b/airbyte-integrations/connectors/source-openweather/README.md @@ -1,36 +1,55 @@ -# Openweather Source +# Openweather source connector -This is the repository for the Openweather configuration based source connector. + +This is the repository for the Openweather source connector, written in Python. For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.com/integrations/sources/openweather). ## Local development -#### Create credentials +### Prerequisites +* Python (~=3.9) +* Poetry (~=1.7) - installation instructions [here](https://python-poetry.org/docs/#installation) + + +### Installing the connector +From this connector directory, run: +```bash +poetry install --with dev +``` + + +### Create credentials **If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.com/integrations/sources/openweather) to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_openweather/spec.yaml` file. Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information. -See `integration_tests/sample_config.json` for a sample config file. +See `sample_files/sample_config.json` for a sample config file. -**If you are an Airbyte core member**, copy the credentials in Lastpass under the secret name `source openweather test creds` -and place them into `secrets/config.json`. -### Locally running the connector docker image +### Locally running the connector +``` +poetry run source-openweather spec +poetry run source-openweather check --config secrets/config.json +poetry run source-openweather discover --config secrets/config.json +poetry run source-openweather read --config secrets/config.json --catalog sample_files/configured_catalog.json +``` +### Running unit tests +To run unit tests locally, from the connector directory run: +``` +poetry run pytest unit_tests +``` -#### Build -**Via [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md) (recommended):** +### Building the docker image +1. Install [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md) +2. Run the following command to build the docker image: ```bash airbyte-ci connectors --name=source-openweather build ``` -An image will be built with the tag `airbyte/source-openweather:dev`. +An image will be available on your host with the tag `airbyte/source-openweather:dev`. -**Via `docker build`:** -```bash -docker build -t airbyte/source-openweather:dev . -``` -#### Run +### Running as a docker container Then run any of the connector commands as follows: ``` docker run --rm airbyte/source-openweather:dev spec @@ -39,29 +58,34 @@ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-openweather:dev discov docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-openweather:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json ``` -## Testing +### Running our CI test suite You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md): ```bash airbyte-ci connectors --name=source-openweather test ``` ### Customizing acceptance Tests -Customize `acceptance-test-config.yml` file to configure tests. See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference) for more information. +Customize `acceptance-test-config.yml` file to configure acceptance tests. See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference) for more information. If your connector requires to create or destroy resources for use during acceptance tests create fixtures for it and place them inside integration_tests/acceptance.py. -## Dependency Management -All of your dependencies should go in `setup.py`, NOT `requirements.txt`. The requirements file is only used to connect internal Airbyte dependencies in the monorepo for local development. -We split dependencies between two groups, dependencies that are: -* required for your connector to work need to go to `MAIN_REQUIREMENTS` list. -* required for the testing need to go to `TEST_REQUIREMENTS` list +### Dependency Management +All of your dependencies should be managed via Poetry. +To add a new dependency, run: +```bash +poetry add +``` -### Publishing a new version of the connector +Please commit the changes to `pyproject.toml` and `poetry.lock` files. + +## Publishing a new version of the connector You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what? 1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-openweather test` -2. Bump the connector version in `metadata.yaml`: increment the `dockerImageTag` value. Please follow [semantic versioning for connectors](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#semantic-versioning-for-connectors). +2. Bump the connector version (please follow [semantic versioning for connectors](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#semantic-versioning-for-connectors)): + - bump the `dockerImageTag` value in in `metadata.yaml` + - bump the `version` value in `pyproject.toml` 3. Make sure the `metadata.yaml` content is up to date. -4. Make the connector documentation and its changelog is up to date (`docs/integrations/sources/openweather.md`). +4. Make sure the connector documentation and its changelog is up to date (`docs/integrations/sources/openweather.md`). 5. Create a Pull Request: use [our PR naming conventions](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#pull-request-title-convention). 6. Pat yourself on the back for being an awesome contributor. 7. Someone from Airbyte will take a look at your PR and iterate with you to merge it into master. - +8. Once your PR is merged, the new version of the connector will be automatically published to Docker Hub and our connector registry. \ No newline at end of file diff --git a/airbyte-integrations/connectors/source-openweather/metadata.yaml b/airbyte-integrations/connectors/source-openweather/metadata.yaml index 0a1fa0f3dbe1..462da02da712 100644 --- a/airbyte-integrations/connectors/source-openweather/metadata.yaml +++ b/airbyte-integrations/connectors/source-openweather/metadata.yaml @@ -2,29 +2,29 @@ data: allowedHosts: hosts: - api.openweathermap.org - remoteRegistries: - pypi: - enabled: true - packageName: airbyte-source-openweather - registries: - oss: - enabled: true - cloud: - enabled: false - connectorSubtype: api - connectorType: source connectorBuildOptions: baseImage: docker.io/airbyte/python-connector-base:1.2.0@sha256:c22a9d97464b69d6ef01898edf3f8612dc11614f05a84984451dde195f337db9 + connectorSubtype: api + connectorType: source definitionId: 561d7787-b45e-4f3b-af58-0163c3ba9d5a - dockerImageTag: 0.2.1 + dockerImageTag: 0.2.3 dockerRepository: airbyte/source-openweather + documentationUrl: https://docs.airbyte.com/integrations/sources/openweather githubIssueLabel: source-openweather icon: openweather.svg license: MIT name: Openweather + registries: + cloud: + enabled: false + oss: + enabled: true releaseStage: alpha + remoteRegistries: + pypi: + enabled: true + packageName: airbyte-source-openweather supportLevel: community - documentationUrl: https://docs.airbyte.com/integrations/sources/openweather tags: - language:python - cdk:low-code diff --git a/airbyte-integrations/connectors/source-openweather/poetry.lock b/airbyte-integrations/connectors/source-openweather/poetry.lock index 00866a3a07a8..23d9663df0d6 100644 --- a/airbyte-integrations/connectors/source-openweather/poetry.lock +++ b/airbyte-integrations/connectors/source-openweather/poetry.lock @@ -1,40 +1,39 @@ -# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. [[package]] name = "airbyte-cdk" -version = "0.74.0" +version = "0.80.0" description = "A framework for writing Airbyte Connectors." optional = false -python-versions = ">=3.9" +python-versions = "<4.0,>=3.9" files = [ - {file = "airbyte-cdk-0.74.0.tar.gz", hash = "sha256:74241a055c205403a951383f43801067b7f451370e14d553d13d0cc476cbfff7"}, - {file = "airbyte_cdk-0.74.0-py3-none-any.whl", hash = "sha256:7e5b201d69ec0e7daab7e627dbc6add4dbba4a2f779132e86aaf6713650ff4d5"}, + {file = "airbyte_cdk-0.80.0-py3-none-any.whl", hash = "sha256:060e92323a73674fa4e9e2e4a1eb312b9b9d072c9bbe5fa28f54ef21cb4974f3"}, + {file = "airbyte_cdk-0.80.0.tar.gz", hash = "sha256:1383512a83917fecca5b24cea4c72aa5c561cf96dd464485fbcefda48fe574c5"}, ] [package.dependencies] airbyte-protocol-models = "0.5.1" backoff = "*" cachetools = "*" -Deprecated = ">=1.2,<2.0" +Deprecated = ">=1.2,<1.3" dpath = ">=2.0.1,<2.1.0" genson = "1.2.2" isodate = ">=0.6.1,<0.7.0" Jinja2 = ">=3.1.2,<3.2.0" -jsonref = ">=0.2,<1.0" +jsonref = ">=0.2,<0.3" jsonschema = ">=3.2.0,<3.3.0" pendulum = "<3.0.0" pydantic = ">=1.10.8,<2.0.0" pyrate-limiter = ">=3.1.0,<3.2.0" python-dateutil = "*" -PyYAML = ">=6.0.1" +PyYAML = ">=6.0.1,<7.0.0" requests = "*" -requests-cache = "*" +requests_cache = "*" wcmatch = "8.4" [package.extras] -dev = ["avro (>=1.11.2,<1.12.0)", "cohere (==4.21)", "fastavro (>=1.8.0,<1.9.0)", "freezegun", "langchain (==0.0.271)", "markdown", "mypy", "openai[embeddings] (==0.27.9)", "pandas (==2.0.3)", "pdf2image (==1.16.3)", "pdfminer.six (==20221105)", "pyarrow (>=15.0.0,<15.1.0)", "pytesseract (==0.3.10)", "pytest", "pytest-cov", "pytest-httpserver", "pytest-mock", "requests-mock", "tiktoken (==0.4.0)", "unstructured (==0.10.27)", "unstructured.pytesseract (>=0.3.12)", "unstructured[docx,pptx] (==0.10.27)"] -file-based = ["avro (>=1.11.2,<1.12.0)", "fastavro (>=1.8.0,<1.9.0)", "markdown", "pdf2image (==1.16.3)", "pdfminer.six (==20221105)", "pyarrow (>=15.0.0,<15.1.0)", "pytesseract (==0.3.10)", "unstructured (==0.10.27)", "unstructured.pytesseract (>=0.3.12)", "unstructured[docx,pptx] (==0.10.27)"] -sphinx-docs = ["Sphinx (>=4.2,<5.0)", "sphinx-rtd-theme (>=1.0,<2.0)"] +file-based = ["avro (>=1.11.2,<1.12.0)", "fastavro (>=1.8.0,<1.9.0)", "markdown", "pdf2image (==1.16.3)", "pdfminer.six (==20221105)", "pyarrow (>=15.0.0,<15.1.0)", "pytesseract (==0.3.10)", "unstructured.pytesseract (>=0.3.12)", "unstructured[docx,pptx] (==0.10.27)"] +sphinx-docs = ["Sphinx (>=4.2,<4.3)", "sphinx-rtd-theme (>=1.0,<1.1)"] vector-db-based = ["cohere (==4.21)", "langchain (==0.0.271)", "openai[embeddings] (==0.27.9)", "tiktoken (==0.4.0)"] [[package]] @@ -289,13 +288,13 @@ files = [ [[package]] name = "exceptiongroup" -version = "1.2.0" +version = "1.2.1" description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" files = [ - {file = "exceptiongroup-1.2.0-py3-none-any.whl", hash = "sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14"}, - {file = "exceptiongroup-1.2.0.tar.gz", hash = "sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68"}, + {file = "exceptiongroup-1.2.1-py3-none-any.whl", hash = "sha256:5258b9ed329c5bbdd31a309f53cbfb0b155341807f6ff7606a1e801a891b29ad"}, + {file = "exceptiongroup-1.2.1.tar.gz", hash = "sha256:a4785e48b045528f5bfe627b6ad554ff32def154f42372786903b7abcfe1aa16"}, ] [package.extras] @@ -313,13 +312,13 @@ files = [ [[package]] name = "idna" -version = "3.6" +version = "3.7" description = "Internationalized Domain Names in Applications (IDNA)" optional = false python-versions = ">=3.5" files = [ - {file = "idna-3.6-py3-none-any.whl", hash = "sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f"}, - {file = "idna-3.6.tar.gz", hash = "sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca"}, + {file = "idna-3.7-py3-none-any.whl", hash = "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0"}, + {file = "idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc"}, ] [[package]] @@ -366,13 +365,13 @@ i18n = ["Babel (>=2.7)"] [[package]] name = "jsonref" -version = "0.3.0" -description = "jsonref is a library for automatic dereferencing of JSON Reference objects for Python." +version = "0.2" +description = "An implementation of JSON Reference for Python" optional = false -python-versions = ">=3.3,<4.0" +python-versions = "*" files = [ - {file = "jsonref-0.3.0-py3-none-any.whl", hash = "sha256:9480ad1b500f7e795daeb0ef29f9c55ae3a9ab38fb8d6659b6f4868acb5a5bc8"}, - {file = "jsonref-0.3.0.tar.gz", hash = "sha256:68b330c6815dc0d490dbb3d65ccda265ddde9f7856fd2f3322f971d456ea7549"}, + {file = "jsonref-0.2-py3-none-any.whl", hash = "sha256:b1e82fa0b62e2c2796a13e5401fe51790b248f6d9bf9d7212a3e31a3501b291f"}, + {file = "jsonref-0.2.tar.gz", hash = "sha256:f3c45b121cf6257eafabdc3a8008763aed1cd7da06dbabc59a9e4d2a5e4e6697"}, ] [[package]] @@ -855,18 +854,18 @@ fixture = ["fixtures"] [[package]] name = "setuptools" -version = "69.2.0" +version = "69.5.1" description = "Easily download, build, install, upgrade, and uninstall Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "setuptools-69.2.0-py3-none-any.whl", hash = "sha256:c21c49fb1042386df081cb5d86759792ab89efca84cf114889191cd09aacc80c"}, - {file = "setuptools-69.2.0.tar.gz", hash = "sha256:0ff4183f8f42cd8fa3acea16c45205521a4ef28f73c6391d8a25e92893134f2e"}, + {file = "setuptools-69.5.1-py3-none-any.whl", hash = "sha256:c636ac361bc47580504644275c9ad802c50415c7522212252c033bd15f301f32"}, + {file = "setuptools-69.5.1.tar.gz", hash = "sha256:6c1fccdac05a97e598fb0ae3bbed5904ccb317337a51139dcd51453611bbb987"}, ] [package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] -testing = ["build[virtualenv]", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.9)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "mypy (==1.9)", "packaging (>=23.2)", "pip (>=19.1)", "pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff (>=0.2.1)", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] +testing = ["build[virtualenv]", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.9)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "mypy (==1.9)", "packaging (>=23.2)", "pip (>=19.1)", "pytest (>=6,!=8.1.1)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (>=0.2.1)", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] testing-integration = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "packaging (>=23.2)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] [[package]] @@ -1029,4 +1028,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.9,<3.12" -content-hash = "f2e54e7857735a9e46d63807a60b76373823881c9d6ff352105d75b82119e297" +content-hash = "990042bd8aff2361370f7cea38b2dffbadb5bd28397a241166061ec2619f6426" diff --git a/airbyte-integrations/connectors/source-openweather/pyproject.toml b/airbyte-integrations/connectors/source-openweather/pyproject.toml index f8945611bc0f..14c45ff6e4be 100644 --- a/airbyte-integrations/connectors/source-openweather/pyproject.toml +++ b/airbyte-integrations/connectors/source-openweather/pyproject.toml @@ -3,13 +3,13 @@ requires = [ "poetry-core>=1.0.0",] build-backend = "poetry.core.masonry.api" [tool.poetry] -version = "0.2.1" +version = "0.2.3" name = "source-openweather" -description = "Source implementation for Open Weather." +description = "Source implementation for Openweather." authors = [ "Airbyte ",] license = "MIT" readme = "README.md" -documentation = "https://docs.airbyte.com/integrations/sources/orb" +documentation = "https://docs.airbyte.com/integrations/sources/openweather" homepage = "https://airbyte.com" repository = "https://github.com/airbytehq/airbyte" [[tool.poetry.packages]] @@ -17,13 +17,12 @@ include = "source_openweather" [tool.poetry.dependencies] python = "^3.9,<3.12" -airbyte-cdk = "^0.74.0" +airbyte-cdk = "0.80.0" [tool.poetry.scripts] source-openweather = "source_openweather.run:run" [tool.poetry.group.dev.dependencies] pytest = "^6.2" -requests-mock = "^1.11.0" +requests-mock = "^1.9.3" pytest-mock = "^3.6.1" - diff --git a/airbyte-integrations/connectors/source-openweather/source_openweather/manifest.yaml b/airbyte-integrations/connectors/source-openweather/source_openweather/manifest.yaml index b74f3ee6732e..10fd36d3787c 100644 --- a/airbyte-integrations/connectors/source-openweather/source_openweather/manifest.yaml +++ b/airbyte-integrations/connectors/source-openweather/source_openweather/manifest.yaml @@ -12,8 +12,12 @@ definitions: url_base: "https://api.openweathermap.org/data/3.0/" http_method: "GET" request_parameters: - lat: "{% if -90.00 <= config['lat']|float <= 90.00 %}{{ config['lat'] }}{% else %} WRONG LATITUDE{% endif %}" - lon: "{% if -180.00 <= config['lon']|float <= 180.00 %}{{ config['lon'] }}{% else %}WRONG LONGITUDE{% endif %}" + lat: + "{% if -90.00 <= config['lat']|float <= 90.00 %}{{ config['lat'] }}{% else + %} WRONG LATITUDE{% endif %}" + lon: + "{% if -180.00 <= config['lon']|float <= 180.00 %}{{ config['lon'] }}{% + else %}WRONG LONGITUDE{% endif %}" appid: "{{ config['appid'] }}" lang: "{{ config.get('lang')}}" units: "{{ config.get('units')}}" @@ -65,6 +69,92 @@ definitions: # incremental_sync: # $ref: "#/definitions/incremental_sync_base" + schema_loader: + type: InlineSchemaLoader + schema: + $schema: http://json-schema.org/draft-07/schema# + type: object + additionalProperties: true + properties: + lat: + description: Latitude of the requested location + type: number + lon: + description: Longitude of the requested location + type: number + timezone: + description: Time zone name for the requested location + type: string + timezone_offset: + description: Time offset in seconds from UTC + type: number + current: + description: Contains current weather data + type: object + additionalProperties: true + properties: + dt: + description: Time of the data forecasted + type: number + sunrise: + description: Sunrise time + type: number + sunset: + description: Sunset time + type: number + temp: + description: Temperature + type: number + feels_like: + description: Apparent (feels like) temperature + type: number + pressure: + description: Atmospheric pressure on the sea level + type: number + humidity: + description: Humidity percentage + type: number + dew_point: + description: Dew point temperature + type: number + uvi: + description: UV index + type: number + clouds: + description: Cloudiness percentage + type: number + visibility: + description: Visibility distance + type: number + wind_speed: + description: Wind speed in meters per second + type: number + wind_deg: + description: Wind direction in degrees + type: number + weather: + description: Weather condition + type: array + rain: + description: Information about precipitation in the last hour + type: object + additionalProperties: true + properties: + 1h: + description: Rain volume for the last hour + type: number + minutely: + description: Minute forecast for the next hour + type: array + hourly: + description: Weather forecast for the next 48 hours + type: array + daily: + description: Weather forecast for the next 7 days + type: array + alerts: + description: Weather alerts for the requested location + type: array streams: - "#/definitions/onecall_stream" @@ -87,26 +177,34 @@ spec: properties: lat: type: string - pattern: "^(\\+|-)?(?:90(?:(?:\\.0+)?)|(?:[0-9]|[1-8][0-9])(?:(?:\\.[0-9]+)?))$" - description: "Latitude, decimal (-90; 90). If you need the geocoder to automatic convert city names and zip-codes to geo coordinates and the other way around, please use our Geocoding API" + pattern: "^[-]?\\d{1,2}(\\.\\d+)?$" + description: + "Latitude, decimal (-90; 90). If you need the geocoder to automatic + convert city names and zip-codes to geo coordinates and the other way around, + please use our Geocoding API" examples: - "45.7603" - "-21.249107858038816" lon: type: string - pattern: "^(\\+|-)?(?:180(?:(?:\\.0+)?)|(?:[0-9]|[1-9][0-9]|1[0-7][0-9])(?:(?:\\.[0-9]+)?))$" - description: "Longitude, decimal (-180; 180). If you need the geocoder to automatic convert city names and zip-codes to geo coordinates and the other way around, please use our Geocoding API" + pattern: "^[-]?\\d{1,2}(\\.\\d+)?$" + description: + "Longitude, decimal (-180; 180). If you need the geocoder to + automatic convert city names and zip-codes to geo coordinates and the other + way around, please use our Geocoding API" examples: - "4.835659" - "-70.39482074115321" - - "180.000" appid: type: string description: "API KEY" airbyte_secret: true units: type: string - description: "Units of measurement. standard, metric and imperial units are available. If you do not use the units parameter, standard units will be applied by default." + description: + "Units of measurement. standard, metric and imperial units are + available. If you do not use the units parameter, standard units will be + applied by default." enum: - standard - metric diff --git a/airbyte-integrations/connectors/source-openweather/source_openweather/schemas/onecall.json b/airbyte-integrations/connectors/source-openweather/source_openweather/schemas/onecall.json deleted file mode 100644 index e06c9fbcadaa..000000000000 --- a/airbyte-integrations/connectors/source-openweather/source_openweather/schemas/onecall.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": true, - "properties": { - "lat": { - "type": "number" - }, - "lon": { - "type": "number" - }, - "timezone": { - "type": "string" - }, - "timezone_offset": { - "type": "number" - }, - "current": { - "type": "object", - "additionalProperties": true, - "properties": { - "dt": { - "type": "number" - }, - "sunrise": { - "type": "number" - }, - "sunset": { - "type": "number" - }, - "temp": { - "type": "number" - }, - "feels_like": { - "type": "number" - }, - "pressure": { - "type": "number" - }, - "humidity": { - "type": "number" - }, - "dew_point": { - "type": "number" - }, - "uvi": { - "type": "number" - }, - "clouds": { - "type": "number" - }, - "visibility": { - "type": "number" - }, - "wind_speed": { - "type": "number" - }, - "wind_deg": { - "type": "number" - }, - "weather": { - "type": "array" - }, - "rain": { - "type": "object", - "additionalProperties": true, - "properties": { - "1h": { - "type": "number" - } - } - } - } - }, - "minutely": { - "type": "array" - }, - "hourly": { - "type": "array" - }, - "daily": { - "type": "array" - }, - "alerts": { - "type": "array" - } - } -} diff --git a/docs/integrations/sources/openweather.md b/docs/integrations/sources/openweather.md index cffea874f569..af164bfae797 100644 --- a/docs/integrations/sources/openweather.md +++ b/docs/integrations/sources/openweather.md @@ -34,7 +34,9 @@ The free plan allows 60 calls per minute and 1,000,000 calls per month, you won' | Version | Date | Pull Request | Subject | | :--- | :--- | :--- | :--- | -| 0.2.1 | 2024-04-07 | [36876](https://github.com/airbytehq/airbyte/pull/36876) | Fix bug in how lat and lon parameters can be set | +| 0.2.3 | 2024-04-19 | [37209](https://github.com/airbytehq/airbyte/pull/37209) | Upgrade to CDK 0.80.0 and manage dependencies with Poetry. | +| 0.2.2 | 2024-04-15 | [37209](https://github.com/airbytehq/airbyte/pull/37209) | Base image migration: remove Dockerfile and use the python-connector-base image | +| 0.2.1 | 2024-04-12 | [37209](https://github.com/airbytehq/airbyte/pull/37209) | schema descriptions | | 0.2.0 | 2023-08-31 | [29983](https://github.com/airbytehq/airbyte/pull/29983) | Migrate to Low Code Framework | | 0.1.6 | 2022-06-21 | [16136](https://github.com/airbytehq/airbyte/pull/16136) | Update openweather onecall api to 3.0. | | 0.1.5 | 2022-06-21 | [13864](https://github.com/airbytehq/airbyte/pull/13864) | No changes. Used connector to test publish workflow changes. |