Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source Linnworks: re-enable in registry #35557

Merged
merged 6 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
66 changes: 29 additions & 37 deletions airbyte-integrations/connectors/source-linnworks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,51 +7,39 @@ For information about how to use this connector within Airbyte, see [the documen

### Prerequisites

**To iterate on this connector, make sure to complete this prerequisites section.**
* Python (~=3.9)
* Poetry (~=1.7) - installation instructions [here](https://python-poetry.org/docs/#installation)

#### Minimum Python version required `= 3.7.0`
### Installing the connector

#### Build & Activate Virtual Environment and install dependencies

From this connector directory, create a virtual environment:

```bash
python -m venv .venv
```

This will generate a virtualenv for this module in `.venv/`. Make sure this venv is active in your
development environment of choice. To activate it from the terminal, run:
From this connector directory, run:

```bash
source .venv/bin/activate
pip install -r requirements.txt
pip install '.[tests]'
poetry install --with dev
```

If you are in an IDE, follow your IDE's instructions to activate the virtualenv.
### Create credentials

Note that while we are installing dependencies from `requirements.txt`, you should only edit `setup.py` for your dependencies. `requirements.txt` is
used for editable installs (`pip install -e`) to pull in Python dependencies from the monorepo and will call `setup.py`.
If this is mumbo jumbo to you, don't worry about it, just put your deps in `setup.py` but install using `pip install -r requirements.txt` and everything
should work as you expect.

#### Create credentials

**If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.io/integrations/sources/linnworks)
to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_linnworks/spec.json` file.
**If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.com/integrations/sources/linnworks)
to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_linnworks/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.

**If you are an Airbyte core member**, copy the credentials in Lastpass under the secret name `source linnworks test creds`
and place them into `secrets/config.json`.

### Locally running the connector

```bash
python main.py spec
python main.py check --config secrets/config.json
python main.py discover --config secrets/config.json
python main.py read --config secrets/config.json --catalog integration_tests/configured_catalog.json
poetry run source-linnworks spec
poetry run source-linnworks check --config secrets/config.json
poetry run source-linnworks discover --config secrets/config.json
poetry run source-linnworks read --config secrets/config.json --catalog integration_tests/configured_catalog.json
```

### Running unit tests

To run unit tests locally, from the connector directory run:

```bash
poetry run pytest unit_tests
```

### Locally running the connector docker image
Expand Down Expand Up @@ -151,13 +139,17 @@ airbyte-ci connectors --name=source-linnworks test
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.
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
### 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:
All of your dependencies should be managed via Poetry.

To add a new dependency, run:

```bash
poetry add <package-name>
```

* required for your connector to work need to go to `MAIN_REQUIREMENTS` list.
* required for the testing need to go to `TEST_REQUIREMENTS` list
Please commit the changes to `pyproject.toml` and `poetry.lock` files.

### Publishing a new version of the connector

Expand Down
10 changes: 5 additions & 5 deletions airbyte-integrations/connectors/source-linnworks/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ data:
connectorSubtype: api
connectorType: source
definitionId: 7b86879e-26c5-4ef6-a5ce-2be5c7b46d1e
dockerImageTag: 0.1.6
dockerImageTag: 0.1.7
dockerRepository: airbyte/source-linnworks
documentationUrl: https://docs.airbyte.com/integrations/sources/linnworks
githubIssueLabel: source-linnworks
icon: linnworks.svg
license: MIT
name: Linnworks
registries: # Removed from registries due to LEGACY STATE
registries:
cloud:
enabled: false
enabled: true
oss:
enabled: false
enabled: true
releaseStage: alpha
remoteRegistries:
pypi:
enabled: false
enabled: true
packageName: airbyte-source-linnworks
supportLevel: community
tags:
Expand Down
Loading
Loading