airbyte-source-rki-covid 0.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. airbyte-source-rki-covid-0.1.2/PKG-INFO +119 -0
  2. airbyte-source-rki-covid-0.1.2/README.md +120 -0
  3. airbyte-source-rki-covid-0.1.2/airbyte_source_rki_covid.egg-info/PKG-INFO +119 -0
  4. airbyte-source-rki-covid-0.1.2/airbyte_source_rki_covid.egg-info/SOURCES.txt +57 -0
  5. airbyte-source-rki-covid-0.1.2/airbyte_source_rki_covid.egg-info/dependency_links.txt +1 -0
  6. airbyte-source-rki-covid-0.1.2/airbyte_source_rki_covid.egg-info/entry_points.txt +2 -0
  7. airbyte-source-rki-covid-0.1.2/airbyte_source_rki_covid.egg-info/requires.txt +7 -0
  8. airbyte-source-rki-covid-0.1.2/airbyte_source_rki_covid.egg-info/top_level.txt +3 -0
  9. airbyte-source-rki-covid-0.1.2/integration_tests/__init__.py +3 -0
  10. airbyte-source-rki-covid-0.1.2/integration_tests/abnormal_state.json +44 -0
  11. airbyte-source-rki-covid-0.1.2/integration_tests/acceptance.py +14 -0
  12. airbyte-source-rki-covid-0.1.2/integration_tests/configured_catalog.json +861 -0
  13. airbyte-source-rki-covid-0.1.2/integration_tests/invalid_config.json +3 -0
  14. airbyte-source-rki-covid-0.1.2/integration_tests/sample_config.json +3 -0
  15. airbyte-source-rki-covid-0.1.2/integration_tests/sample_state.json +18 -0
  16. airbyte-source-rki-covid-0.1.2/setup.cfg +116 -0
  17. airbyte-source-rki-covid-0.1.2/setup.py +39 -0
  18. airbyte-source-rki-covid-0.1.2/source_rki_covid/__init__.py +8 -0
  19. airbyte-source-rki-covid-0.1.2/source_rki_covid/run.py +14 -0
  20. airbyte-source-rki-covid-0.1.2/source_rki_covid/schemas/german_history_deaths.json +13 -0
  21. airbyte-source-rki-covid-0.1.2/source_rki_covid/schemas/german_history_frozen_incidence.json +13 -0
  22. airbyte-source-rki-covid-0.1.2/source_rki_covid/schemas/german_history_hospitalization.json +60 -0
  23. airbyte-source-rki-covid-0.1.2/source_rki_covid/schemas/german_history_incidence.json +13 -0
  24. airbyte-source-rki-covid-0.1.2/source_rki_covid/schemas/german_history_recovered.json +13 -0
  25. airbyte-source-rki-covid-0.1.2/source_rki_covid/schemas/germany.json +132 -0
  26. airbyte-source-rki-covid-0.1.2/source_rki_covid/schemas/germany_age_groups.json +337 -0
  27. airbyte-source-rki-covid-0.1.2/source_rki_covid/schemas/germany_history_cases.json +13 -0
  28. airbyte-source-rki-covid-0.1.2/source_rki_covid/schemas/germany_states.json +90 -0
  29. airbyte-source-rki-covid-0.1.2/source_rki_covid/schemas/germany_states_age_groups.json +340 -0
  30. airbyte-source-rki-covid-0.1.2/source_rki_covid/schemas/states_history_cases.json +19 -0
  31. airbyte-source-rki-covid-0.1.2/source_rki_covid/schemas/states_history_deaths.json +19 -0
  32. airbyte-source-rki-covid-0.1.2/source_rki_covid/schemas/states_history_frozen_incidence.json +22 -0
  33. airbyte-source-rki-covid-0.1.2/source_rki_covid/schemas/states_history_hospitalization.json +68 -0
  34. airbyte-source-rki-covid-0.1.2/source_rki_covid/schemas/states_history_incidence.json +19 -0
  35. airbyte-source-rki-covid-0.1.2/source_rki_covid/schemas/states_history_recovered.json +19 -0
  36. airbyte-source-rki-covid-0.1.2/source_rki_covid/source.py +640 -0
  37. airbyte-source-rki-covid-0.1.2/source_rki_covid/spec.json +18 -0
  38. airbyte-source-rki-covid-0.1.2/unit_tests/__init__.py +3 -0
  39. airbyte-source-rki-covid-0.1.2/unit_tests/test_cached_stream_state.py +5 -0
  40. airbyte-source-rki-covid-0.1.2/unit_tests/test_incremental_germanhistorycases.py +56 -0
  41. airbyte-source-rki-covid-0.1.2/unit_tests/test_incremental_germanhistorydeaths.py +66 -0
  42. airbyte-source-rki-covid-0.1.2/unit_tests/test_incremental_germanhistoryfrozenIncidence.py +66 -0
  43. airbyte-source-rki-covid-0.1.2/unit_tests/test_incremental_germanhistoryhospitalization.py +66 -0
  44. airbyte-source-rki-covid-0.1.2/unit_tests/test_incremental_germanhistoryincidence.py +66 -0
  45. airbyte-source-rki-covid-0.1.2/unit_tests/test_incremental_germanhistoryrecovered.py +66 -0
  46. airbyte-source-rki-covid-0.1.2/unit_tests/test_incremental_streams.py +52 -0
  47. airbyte-source-rki-covid-0.1.2/unit_tests/test_source.py +21 -0
  48. airbyte-source-rki-covid-0.1.2/unit_tests/test_stateshistorycases.py +29 -0
  49. airbyte-source-rki-covid-0.1.2/unit_tests/test_stateshistorydeaths.py +29 -0
  50. airbyte-source-rki-covid-0.1.2/unit_tests/test_stateshistoryfrozenincidence.py +29 -0
  51. airbyte-source-rki-covid-0.1.2/unit_tests/test_stateshistoryhospitalization.py +29 -0
  52. airbyte-source-rki-covid-0.1.2/unit_tests/test_stateshistoryincidence.py +29 -0
  53. airbyte-source-rki-covid-0.1.2/unit_tests/test_stateshistoryrecovered.py +29 -0
  54. airbyte-source-rki-covid-0.1.2/unit_tests/test_stream_agegroup.py +18 -0
  55. airbyte-source-rki-covid-0.1.2/unit_tests/test_stream_germany.py +18 -0
  56. airbyte-source-rki-covid-0.1.2/unit_tests/test_stream_germany_states.py +18 -0
  57. airbyte-source-rki-covid-0.1.2/unit_tests/test_streams.py +67 -0
  58. airbyte-source-rki-covid-0.1.2/unit_tests/test_streams_states_agegroup.py +18 -0
@@ -0,0 +1,119 @@
1
+ Metadata-Version: 2.1
2
+ Name: airbyte-source-rki-covid
3
+ Version: 0.1.2
4
+ Summary: Source implementation for Rki Covid.
5
+ Author: Airbyte
6
+ Author-email: contact@airbyte.io
7
+ Description-Content-Type: text/markdown
8
+ Requires-Dist: airbyte-cdk
9
+ Provides-Extra: tests
10
+ Requires-Dist: requests-mock~=1.9.3; extra == "tests"
11
+ Requires-Dist: pytest~=6.1; extra == "tests"
12
+ Requires-Dist: pytest-mock~=3.6.1; extra == "tests"
13
+ Requires-Dist: airbyte-cdk; extra == "tests"
14
+
15
+ # RKI Covid Source
16
+
17
+ This is the repository for the RkI (Robert Koch-Institut - von Marlon Lückert) Covid-19 source connector, written in Python.
18
+ For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.io/integrations/sources/rki-covid).
19
+
20
+ ```
21
+ Germany:
22
+ 1. /germany
23
+ 2. /germany/age-groups
24
+ 3. /germany/history/cases/:days
25
+ 4. /germany/history/incidence/:days
26
+ 5. /germany/history/deaths/:days
27
+ 6. /germany/history/recovered/:days
28
+ 7. /germany/history/frozen-incidence/:days
29
+ 8. /germany/history/hospitalization/:days
30
+ 9. /germany/states
31
+ 10. /germany/states/age-groups
32
+ 11. /germany/states/history/cases/:days
33
+ 12. /germany/states/history/incidence/:days
34
+ 13. /germany/states/history/frozen-incidence/:days
35
+ 14. /germany/states/history/deaths/:days
36
+ 15. /germany/states/history/recovered/:days
37
+ 16. /germany/states/history/hospitalization/:days
38
+ ```
39
+
40
+ **To iterate on this connector, make sure to complete this prerequisites section.**
41
+
42
+
43
+ From this connector directory, create a virtual environment:
44
+ ```
45
+ python -m venv .venv
46
+ ```
47
+
48
+ This will generate a virtualenv for this module in `.venv/`. Make sure this venv is active in your
49
+ development environment of choice. To activate it from the terminal, run:
50
+ ```
51
+ source .venv/bin/activate
52
+ pip install -r requirements.txt
53
+ pip install '.[tests]'
54
+ ```
55
+ If you are in an IDE, follow your IDE's instructions to activate the virtualenv.
56
+
57
+ Note that while we are installing dependencies from `requirements.txt`, you should only edit `setup.py` for your dependencies. `requirements.txt` is
58
+ used for editable installs (`pip install -e`) to pull in Python dependencies from the monorepo and will call `setup.py`.
59
+ 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
60
+ should work as you expect.
61
+
62
+ **If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.io/integrations/sources/rki-covid)
63
+ to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_rki_covid/spec.json` file.
64
+ Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
65
+ See `integration_tests/sample_config.json` for a sample config file.
66
+
67
+ **If you are an Airbyte core member**, copy the credentials in Lastpass under the secret name `source rki-covid test creds`
68
+ and place them into `secrets/config.json`.
69
+
70
+ ```
71
+ python main.py spec
72
+ python main.py check --config secrets/config.json
73
+ python main.py discover --config secrets/config.json
74
+ python main.py read --config secrets/config.json --catalog integration_tests/configured_catalog.json
75
+ ```
76
+
77
+
78
+
79
+ **Via [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md) (recommended):**
80
+ ```bash
81
+ airbyte-ci connectors --name=source-rki-covid build
82
+ ```
83
+
84
+ An image will be built with the tag `airbyte/source-rki-covid:dev`.
85
+
86
+ **Via `docker build`:**
87
+ ```bash
88
+ docker build -t airbyte/source-rki-covid:dev .
89
+ ```
90
+
91
+ Then run any of the connector commands as follows:
92
+ ```
93
+ docker run --rm airbyte/source-rki-covid:dev spec
94
+ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-rki-covid:dev check --config /secrets/config.json
95
+ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-rki-covid:dev discover --config /secrets/config.json
96
+ docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-rki-covid:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
97
+ ```
98
+
99
+ You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md):
100
+ ```bash
101
+ airbyte-ci connectors --name=source-rki-covid test
102
+ ```
103
+
104
+ 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.
105
+ 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.
106
+
107
+ 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.
108
+ We split dependencies between two groups, dependencies that are:
109
+ * required for your connector to work need to go to `MAIN_REQUIREMENTS` list.
110
+ * required for the testing need to go to `TEST_REQUIREMENTS` list
111
+
112
+ You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what?
113
+ 1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-rki-covid test`
114
+ 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).
115
+ 3. Make sure the `metadata.yaml` content is up to date.
116
+ 4. Make the connector documentation and its changelog is up to date (`docs/integrations/sources/rki-covid.md`).
117
+ 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).
118
+ 6. Pat yourself on the back for being an awesome contributor.
119
+ 7. Someone from Airbyte will take a look at your PR and iterate with you to merge it into master.
@@ -0,0 +1,120 @@
1
+ # RKI Covid Source
2
+
3
+ This is the repository for the RkI (Robert Koch-Institut - von Marlon Lückert) Covid-19 source connector, written in Python.
4
+ For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.io/integrations/sources/rki-covid).
5
+
6
+ ## Local development
7
+ ### Developed Streams (Endpoints)
8
+ ```
9
+ Germany:
10
+ 1. /germany
11
+ 2. /germany/age-groups
12
+ 3. /germany/history/cases/:days
13
+ 4. /germany/history/incidence/:days
14
+ 5. /germany/history/deaths/:days
15
+ 6. /germany/history/recovered/:days
16
+ 7. /germany/history/frozen-incidence/:days
17
+ 8. /germany/history/hospitalization/:days
18
+ 9. /germany/states
19
+ 10. /germany/states/age-groups
20
+ 11. /germany/states/history/cases/:days
21
+ 12. /germany/states/history/incidence/:days
22
+ 13. /germany/states/history/frozen-incidence/:days
23
+ 14. /germany/states/history/deaths/:days
24
+ 15. /germany/states/history/recovered/:days
25
+ 16. /germany/states/history/hospitalization/:days
26
+ ```
27
+
28
+ ### Prerequisites
29
+ **To iterate on this connector, make sure to complete this prerequisites section.**
30
+
31
+ #### Minimum Python version required `= 3.7.0`
32
+
33
+ #### Build & Activate Virtual Environment and install dependencies
34
+ From this connector directory, create a virtual environment:
35
+ ```
36
+ python -m venv .venv
37
+ ```
38
+
39
+ This will generate a virtualenv for this module in `.venv/`. Make sure this venv is active in your
40
+ development environment of choice. To activate it from the terminal, run:
41
+ ```
42
+ source .venv/bin/activate
43
+ pip install -r requirements.txt
44
+ pip install '.[tests]'
45
+ ```
46
+ If you are in an IDE, follow your IDE's instructions to activate the virtualenv.
47
+
48
+ Note that while we are installing dependencies from `requirements.txt`, you should only edit `setup.py` for your dependencies. `requirements.txt` is
49
+ used for editable installs (`pip install -e`) to pull in Python dependencies from the monorepo and will call `setup.py`.
50
+ 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
51
+ should work as you expect.
52
+
53
+ #### Create credentials
54
+ **If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.io/integrations/sources/rki-covid)
55
+ to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_rki_covid/spec.json` file.
56
+ Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
57
+ See `integration_tests/sample_config.json` for a sample config file.
58
+
59
+ **If you are an Airbyte core member**, copy the credentials in Lastpass under the secret name `source rki-covid test creds`
60
+ and place them into `secrets/config.json`.
61
+
62
+ ### Locally running the connector
63
+ ```
64
+ python main.py spec
65
+ python main.py check --config secrets/config.json
66
+ python main.py discover --config secrets/config.json
67
+ python main.py read --config secrets/config.json --catalog integration_tests/configured_catalog.json
68
+ ```
69
+
70
+ ### Locally running the connector docker image
71
+
72
+
73
+ #### Build
74
+ **Via [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md) (recommended):**
75
+ ```bash
76
+ airbyte-ci connectors --name=source-rki-covid build
77
+ ```
78
+
79
+ An image will be built with the tag `airbyte/source-rki-covid:dev`.
80
+
81
+ **Via `docker build`:**
82
+ ```bash
83
+ docker build -t airbyte/source-rki-covid:dev .
84
+ ```
85
+
86
+ #### Run
87
+ Then run any of the connector commands as follows:
88
+ ```
89
+ docker run --rm airbyte/source-rki-covid:dev spec
90
+ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-rki-covid:dev check --config /secrets/config.json
91
+ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-rki-covid:dev discover --config /secrets/config.json
92
+ docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-rki-covid:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
93
+ ```
94
+
95
+ ## Testing
96
+ You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md):
97
+ ```bash
98
+ airbyte-ci connectors --name=source-rki-covid test
99
+ ```
100
+
101
+ ### Customizing acceptance Tests
102
+ 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.
103
+ 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.
104
+
105
+ ## Dependency Management
106
+ 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.
107
+ We split dependencies between two groups, dependencies that are:
108
+ * required for your connector to work need to go to `MAIN_REQUIREMENTS` list.
109
+ * required for the testing need to go to `TEST_REQUIREMENTS` list
110
+
111
+ ### Publishing a new version of the connector
112
+ You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what?
113
+ 1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-rki-covid test`
114
+ 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).
115
+ 3. Make sure the `metadata.yaml` content is up to date.
116
+ 4. Make the connector documentation and its changelog is up to date (`docs/integrations/sources/rki-covid.md`).
117
+ 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).
118
+ 6. Pat yourself on the back for being an awesome contributor.
119
+ 7. Someone from Airbyte will take a look at your PR and iterate with you to merge it into master.
120
+
@@ -0,0 +1,119 @@
1
+ Metadata-Version: 2.1
2
+ Name: airbyte-source-rki-covid
3
+ Version: 0.1.2
4
+ Summary: Source implementation for Rki Covid.
5
+ Author: Airbyte
6
+ Author-email: contact@airbyte.io
7
+ Description-Content-Type: text/markdown
8
+ Requires-Dist: airbyte-cdk
9
+ Provides-Extra: tests
10
+ Requires-Dist: requests-mock~=1.9.3; extra == "tests"
11
+ Requires-Dist: pytest~=6.1; extra == "tests"
12
+ Requires-Dist: pytest-mock~=3.6.1; extra == "tests"
13
+ Requires-Dist: airbyte-cdk; extra == "tests"
14
+
15
+ # RKI Covid Source
16
+
17
+ This is the repository for the RkI (Robert Koch-Institut - von Marlon Lückert) Covid-19 source connector, written in Python.
18
+ For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.io/integrations/sources/rki-covid).
19
+
20
+ ```
21
+ Germany:
22
+ 1. /germany
23
+ 2. /germany/age-groups
24
+ 3. /germany/history/cases/:days
25
+ 4. /germany/history/incidence/:days
26
+ 5. /germany/history/deaths/:days
27
+ 6. /germany/history/recovered/:days
28
+ 7. /germany/history/frozen-incidence/:days
29
+ 8. /germany/history/hospitalization/:days
30
+ 9. /germany/states
31
+ 10. /germany/states/age-groups
32
+ 11. /germany/states/history/cases/:days
33
+ 12. /germany/states/history/incidence/:days
34
+ 13. /germany/states/history/frozen-incidence/:days
35
+ 14. /germany/states/history/deaths/:days
36
+ 15. /germany/states/history/recovered/:days
37
+ 16. /germany/states/history/hospitalization/:days
38
+ ```
39
+
40
+ **To iterate on this connector, make sure to complete this prerequisites section.**
41
+
42
+
43
+ From this connector directory, create a virtual environment:
44
+ ```
45
+ python -m venv .venv
46
+ ```
47
+
48
+ This will generate a virtualenv for this module in `.venv/`. Make sure this venv is active in your
49
+ development environment of choice. To activate it from the terminal, run:
50
+ ```
51
+ source .venv/bin/activate
52
+ pip install -r requirements.txt
53
+ pip install '.[tests]'
54
+ ```
55
+ If you are in an IDE, follow your IDE's instructions to activate the virtualenv.
56
+
57
+ Note that while we are installing dependencies from `requirements.txt`, you should only edit `setup.py` for your dependencies. `requirements.txt` is
58
+ used for editable installs (`pip install -e`) to pull in Python dependencies from the monorepo and will call `setup.py`.
59
+ 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
60
+ should work as you expect.
61
+
62
+ **If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.io/integrations/sources/rki-covid)
63
+ to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_rki_covid/spec.json` file.
64
+ Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
65
+ See `integration_tests/sample_config.json` for a sample config file.
66
+
67
+ **If you are an Airbyte core member**, copy the credentials in Lastpass under the secret name `source rki-covid test creds`
68
+ and place them into `secrets/config.json`.
69
+
70
+ ```
71
+ python main.py spec
72
+ python main.py check --config secrets/config.json
73
+ python main.py discover --config secrets/config.json
74
+ python main.py read --config secrets/config.json --catalog integration_tests/configured_catalog.json
75
+ ```
76
+
77
+
78
+
79
+ **Via [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md) (recommended):**
80
+ ```bash
81
+ airbyte-ci connectors --name=source-rki-covid build
82
+ ```
83
+
84
+ An image will be built with the tag `airbyte/source-rki-covid:dev`.
85
+
86
+ **Via `docker build`:**
87
+ ```bash
88
+ docker build -t airbyte/source-rki-covid:dev .
89
+ ```
90
+
91
+ Then run any of the connector commands as follows:
92
+ ```
93
+ docker run --rm airbyte/source-rki-covid:dev spec
94
+ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-rki-covid:dev check --config /secrets/config.json
95
+ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-rki-covid:dev discover --config /secrets/config.json
96
+ docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-rki-covid:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
97
+ ```
98
+
99
+ You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md):
100
+ ```bash
101
+ airbyte-ci connectors --name=source-rki-covid test
102
+ ```
103
+
104
+ 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.
105
+ 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.
106
+
107
+ 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.
108
+ We split dependencies between two groups, dependencies that are:
109
+ * required for your connector to work need to go to `MAIN_REQUIREMENTS` list.
110
+ * required for the testing need to go to `TEST_REQUIREMENTS` list
111
+
112
+ You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what?
113
+ 1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-rki-covid test`
114
+ 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).
115
+ 3. Make sure the `metadata.yaml` content is up to date.
116
+ 4. Make the connector documentation and its changelog is up to date (`docs/integrations/sources/rki-covid.md`).
117
+ 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).
118
+ 6. Pat yourself on the back for being an awesome contributor.
119
+ 7. Someone from Airbyte will take a look at your PR and iterate with you to merge it into master.
@@ -0,0 +1,57 @@
1
+ README.md
2
+ setup.cfg
3
+ setup.py
4
+ airbyte_source_rki_covid.egg-info/PKG-INFO
5
+ airbyte_source_rki_covid.egg-info/SOURCES.txt
6
+ airbyte_source_rki_covid.egg-info/dependency_links.txt
7
+ airbyte_source_rki_covid.egg-info/entry_points.txt
8
+ airbyte_source_rki_covid.egg-info/requires.txt
9
+ airbyte_source_rki_covid.egg-info/top_level.txt
10
+ integration_tests/__init__.py
11
+ integration_tests/abnormal_state.json
12
+ integration_tests/acceptance.py
13
+ integration_tests/configured_catalog.json
14
+ integration_tests/invalid_config.json
15
+ integration_tests/sample_config.json
16
+ integration_tests/sample_state.json
17
+ source_rki_covid/__init__.py
18
+ source_rki_covid/run.py
19
+ source_rki_covid/source.py
20
+ source_rki_covid/spec.json
21
+ source_rki_covid/schemas/german_history_deaths.json
22
+ source_rki_covid/schemas/german_history_frozen_incidence.json
23
+ source_rki_covid/schemas/german_history_hospitalization.json
24
+ source_rki_covid/schemas/german_history_incidence.json
25
+ source_rki_covid/schemas/german_history_recovered.json
26
+ source_rki_covid/schemas/germany.json
27
+ source_rki_covid/schemas/germany_age_groups.json
28
+ source_rki_covid/schemas/germany_history_cases.json
29
+ source_rki_covid/schemas/germany_states.json
30
+ source_rki_covid/schemas/germany_states_age_groups.json
31
+ source_rki_covid/schemas/states_history_cases.json
32
+ source_rki_covid/schemas/states_history_deaths.json
33
+ source_rki_covid/schemas/states_history_frozen_incidence.json
34
+ source_rki_covid/schemas/states_history_hospitalization.json
35
+ source_rki_covid/schemas/states_history_incidence.json
36
+ source_rki_covid/schemas/states_history_recovered.json
37
+ unit_tests/__init__.py
38
+ unit_tests/test_cached_stream_state.py
39
+ unit_tests/test_incremental_germanhistorycases.py
40
+ unit_tests/test_incremental_germanhistorydeaths.py
41
+ unit_tests/test_incremental_germanhistoryfrozenIncidence.py
42
+ unit_tests/test_incremental_germanhistoryhospitalization.py
43
+ unit_tests/test_incremental_germanhistoryincidence.py
44
+ unit_tests/test_incremental_germanhistoryrecovered.py
45
+ unit_tests/test_incremental_streams.py
46
+ unit_tests/test_source.py
47
+ unit_tests/test_stateshistorycases.py
48
+ unit_tests/test_stateshistorydeaths.py
49
+ unit_tests/test_stateshistoryfrozenincidence.py
50
+ unit_tests/test_stateshistoryhospitalization.py
51
+ unit_tests/test_stateshistoryincidence.py
52
+ unit_tests/test_stateshistoryrecovered.py
53
+ unit_tests/test_stream_agegroup.py
54
+ unit_tests/test_stream_germany.py
55
+ unit_tests/test_stream_germany_states.py
56
+ unit_tests/test_streams.py
57
+ unit_tests/test_streams_states_agegroup.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ source-rki-covid = source_rki_covid.run:run
@@ -0,0 +1,7 @@
1
+ airbyte-cdk
2
+
3
+ [tests]
4
+ requests-mock~=1.9.3
5
+ pytest~=6.1
6
+ pytest-mock~=3.6.1
7
+ airbyte-cdk
@@ -0,0 +1,3 @@
1
+ integration_tests
2
+ source_rki_covid
3
+ unit_tests
@@ -0,0 +1,3 @@
1
+ #
2
+ # Copyright (c) 2021 Airbyte, Inc., all rights reserved.
3
+ #
@@ -0,0 +1,44 @@
1
+ {
2
+ "germany_history_cases": {
3
+ "date": "2024-04-06T00:00:00.000Z"
4
+ },
5
+ "german_history_incidence": {
6
+ "date": "2024-04-06T00:00:00.000Z"
7
+ },
8
+ "german_history_deaths": {
9
+ "date": "2024-04-06T00:00:00.000Z"
10
+ },
11
+ "german_history_recovered": {
12
+ "date": "2024-04-06T00:00:00.000Z"
13
+ },
14
+ "german_history_hospitalization": {
15
+ "date": "2024-04-07T00:00:00.000Z"
16
+ },
17
+ "german_history_frozen_incidence": {
18
+ "date": "2024-01-01T00:00:00.000Z"
19
+ },
20
+ "germany_states": {
21
+ "date": "2024-01-01T00:00:00.000Z"
22
+ },
23
+ "germany_states_age_groups": {
24
+ "date": "2024-01-01T00:00:00.000Z"
25
+ },
26
+ "states_history_cases": {
27
+ "date": "2024-01-01T00:00:00.000Z"
28
+ },
29
+ "states_history_incidence": {
30
+ "date": "2024-01-01T00:00:00.000Z"
31
+ },
32
+ "states_history_frozen_incidence": {
33
+ "date": "2024-01-01T00:00:00.000Z"
34
+ },
35
+ "states_history_deaths": {
36
+ "date": "2024-01-01T00:00:00.000Z"
37
+ },
38
+ "states_history_recovered": {
39
+ "date": "2024-01-01T00:00:00.000Z"
40
+ },
41
+ "states_history_hospitalization": {
42
+ "date": "2024-01-01T00:00:00.000Z"
43
+ }
44
+ }
@@ -0,0 +1,14 @@
1
+ #
2
+ # Copyright (c) 2023 Airbyte, Inc., all rights reserved.
3
+ #
4
+
5
+
6
+ import pytest
7
+
8
+ pytest_plugins = ("connector_acceptance_test.plugin",)
9
+
10
+
11
+ @pytest.fixture(scope="session", autouse=True)
12
+ def connector_setup():
13
+ """This fixture is a placeholder for external resources that acceptance test might require."""
14
+ yield