This is forked from the [Attio branch] of Airbyte's monorepo. Because it's not a strict Git fork (to avoid mirroring the entire monorepo) we'll need to keep it synced manually.
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip intstall '.[tests]'
Note: If you are adding new dependencies, put them in setup.py, not requirements.txt.
Credentials are managed via a JSON file.
mkdir secrets
cp integration_tests/sample_config.json secrets/config.json
And fill in in the required credentials.
Set up and validate credentials:
python main.py spec
python main.py check --config secrets/config.json
python main.py discover --config secrets/config.json
Perform extraction and pipe to a file:
cp integration_tests/configured_catalog.json my_configured_catalog.json
Edit the configured catalog to match the streams discovered above.
python main.py read --config secrets/config.json --catalog my_configured_catalog.json > extraction_output.json
Build the Docker image:
docker build -t luabase/source-notion .
And then update meltano.yaml
in the meltano-extract
repo to point to the local image.
python -m pytest unit_tests
Place custom tests inside integration_tests/
folder, then, from the connector root, run:
python -m pytest integration_tests
Acceptance tests are used by Airbyte to test that the source conforms to standard functionality.
Customize acceptance-test-config.yml
file to configure tests. See Connector Acceptance Tests 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.
To run your integration tests with acceptance tests, from the connector root, run
docker build . -t luabase/source-notion:dev \
&& python -m pytest -p connector_acceptance_test.plugin