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

🎉 New Source: Lever Hiring #6141

Merged
merged 9 commits into from
Sep 22, 2021
Merged

Conversation

yevhenii-ldv
Copy link
Contributor

What

closes #2981.

How

Describe the solution

Recommended reading order

  1. x.java
  2. y.python

Pre-merge Checklist

Expand the relevant checklist and delete the others.

Community member or Airbyter

  • Community member? Grant edit access to maintainers (instructions)
  • Secrets in the connector's spec are annotated with airbyte_secret
  • Unit & integration tests added and passing. Community members, please provide proof of success locally e.g: screenshot or copy-paste unit, integration, and acceptance test output. To run acceptance tests for a Python connector, follow instructions in the README. For java connectors run ./gradlew :airbyte-integrations:connectors:<name>:integrationTest.
  • Code reviews completed
  • Documentation updated
    • Connector's README.md
    • Connector's bootstrap.md. See description and examples
    • docs/SUMMARY.md
    • docs/integrations/<source or destination>/<name>.md including changelog. See changelog example
    • docs/integrations/README.md
    • airbyte-integrations/builds.md
  • PR name follows PR naming conventions
  • Connector added to connector index like described here

Airbyter

If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.

  • Create a non-forked branch based on this PR and test the below items on it
  • Build is successful
  • Credentials added to Github CI. Instructions.
  • /test connector=connectors/<name> command is passing.
  • New Connector version released on Dockerhub by running the /publish command described here

@github-actions github-actions bot added area/connectors Connector related issues area/documentation Improvements or additions to documentation labels Sep 16, 2021
@yevhenii-ldv
Copy link
Contributor Author

yevhenii-ldv commented Sep 16, 2021

/test connector=connectors/source-lever-hiring

🕑 connectors/source-lever-hiring https://github.com/airbytehq/airbyte/actions/runs/1241865675
✅ connectors/source-lever-hiring https://github.com/airbytehq/airbyte/actions/runs/1241865675
Python tests coverage:

	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                                                 Stmts   Miss  Cover
	 ------------------------------------------------------------------------
	 source_acceptance_test/__init__.py                       2      0   100%
	 source_acceptance_test/base.py                          10      4    60%
	 source_acceptance_test/config.py                        74      8    89%
	 source_acceptance_test/conftest.py                     108    108     0%
	 source_acceptance_test/plugin.py                        45     45     0%
	 source_acceptance_test/tests/__init__.py                 4      0   100%
	 source_acceptance_test/tests/test_core.py              158    109    31%
	 source_acceptance_test/tests/test_full_refresh.py       18     11    39%
	 source_acceptance_test/tests/test_incremental.py        69     38    45%
	 source_acceptance_test/utils/__init__.py                 6      0   100%
	 source_acceptance_test/utils/asserts.py                 37      2    95%
	 source_acceptance_test/utils/common.py                  41     25    39%
	 source_acceptance_test/utils/compare.py                 47     20    57%
	 source_acceptance_test/utils/connector_runner.py        82     49    40%
	 source_acceptance_test/utils/json_schema_helper.py      75     11    85%
	 ------------------------------------------------------------------------
	 TOTAL                                                  776    430    45%
	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                              Stmts   Miss  Cover
	 -----------------------------------------------------
	 source_lever_hiring/__init__.py       2      0   100%
	 source_lever_hiring/schemas.py      129     10    92%
	 source_lever_hiring/source.py        36      1    97%
	 source_lever_hiring/streams.py       78     13    83%
	 -----------------------------------------------------
	 TOTAL                               245     24    90%

@jrhizor jrhizor temporarily deployed to more-secrets September 16, 2021 14:00 Inactive
Copy link
Contributor

@avida avida left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, only minor comments

@yevhenii-ldv
Copy link
Contributor Author

yevhenii-ldv commented Sep 17, 2021

/test connector=connectors/source-lever-hiring

🕑 connectors/source-lever-hiring https://github.com/airbytehq/airbyte/actions/runs/1245577305
✅ connectors/source-lever-hiring https://github.com/airbytehq/airbyte/actions/runs/1245577305
Python tests coverage:

	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                                                 Stmts   Miss  Cover
	 ------------------------------------------------------------------------
	 source_acceptance_test/__init__.py                       2      0   100%
	 source_acceptance_test/base.py                          10      4    60%
	 source_acceptance_test/config.py                        74      8    89%
	 source_acceptance_test/conftest.py                     108    108     0%
	 source_acceptance_test/plugin.py                        45     45     0%
	 source_acceptance_test/tests/__init__.py                 4      0   100%
	 source_acceptance_test/tests/test_core.py              158    109    31%
	 source_acceptance_test/tests/test_full_refresh.py       18     11    39%
	 source_acceptance_test/tests/test_incremental.py        69     38    45%
	 source_acceptance_test/utils/__init__.py                 6      0   100%
	 source_acceptance_test/utils/asserts.py                 37      2    95%
	 source_acceptance_test/utils/common.py                  41     25    39%
	 source_acceptance_test/utils/compare.py                 47     20    57%
	 source_acceptance_test/utils/connector_runner.py        82     49    40%
	 source_acceptance_test/utils/json_schema_helper.py      75     11    85%
	 ------------------------------------------------------------------------
	 TOTAL                                                  776    430    45%
	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                              Stmts   Miss  Cover
	 -----------------------------------------------------
	 source_lever_hiring/__init__.py       2      0   100%
	 source_lever_hiring/schemas.py      144     13    91%
	 source_lever_hiring/source.py        30      1    97%
	 source_lever_hiring/streams.py       78     13    83%
	 -----------------------------------------------------
	 TOTAL                               254     27    89%

@jrhizor jrhizor temporarily deployed to more-secrets September 17, 2021 13:08 Inactive
Copy link
Contributor

@Zirochkaa Zirochkaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@sherifnada sherifnada removed the request for review from tuliren September 20, 2021 02:51
schema.pop("title", None)
schema.pop("description", None)
for name, prop in schema.get("properties", {}).items():
prop.pop("title", None)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the value of removing these? can you add a comment?

I'm wondering if we shouldn't have title and description set where possible since it may be a useful documentation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The title field will "copy" the field name in Camel Case, and the desctiption field will remain empty. Globally, we may not remove these when generating schemas, but they do not carry absolutely any payload, so we remove them.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense. Can you add a comment with this context?

@@ -0,0 +1,43 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also please annotate oauth parameters like described in this issue #6166

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

base_params = {"includeDeactivated": True}


class OpportynityChildStream(LeverHiringStream, ABC):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you create a follow up issue to add caching once it's enabled by default in the CDK?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

created #6352

@yevhenii-ldv
Copy link
Contributor Author

yevhenii-ldv commented Sep 21, 2021

/test connector=connectors/source-lever-hiring

🕑 connectors/source-lever-hiring https://github.com/airbytehq/airbyte/actions/runs/1257869782
✅ connectors/source-lever-hiring https://github.com/airbytehq/airbyte/actions/runs/1257869782
Python tests coverage:

	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                                                 Stmts   Miss  Cover
	 ------------------------------------------------------------------------
	 source_acceptance_test/__init__.py                       2      0   100%
	 source_acceptance_test/base.py                          10      4    60%
	 source_acceptance_test/config.py                        74      8    89%
	 source_acceptance_test/conftest.py                     108    108     0%
	 source_acceptance_test/plugin.py                        45     45     0%
	 source_acceptance_test/tests/__init__.py                 4      0   100%
	 source_acceptance_test/tests/test_core.py              158    109    31%
	 source_acceptance_test/tests/test_full_refresh.py       18     11    39%
	 source_acceptance_test/tests/test_incremental.py        69     38    45%
	 source_acceptance_test/utils/__init__.py                 6      0   100%
	 source_acceptance_test/utils/asserts.py                 37      2    95%
	 source_acceptance_test/utils/common.py                  41     25    39%
	 source_acceptance_test/utils/compare.py                 47     20    57%
	 source_acceptance_test/utils/connector_runner.py        82     49    40%
	 source_acceptance_test/utils/json_schema_helper.py      75     11    85%
	 ------------------------------------------------------------------------
	 TOTAL                                                  776    430    45%
	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                              Stmts   Miss  Cover
	 -----------------------------------------------------
	 source_lever_hiring/__init__.py       2      0   100%
	 source_lever_hiring/schemas.py      144     13    91%
	 source_lever_hiring/source.py        29      1    97%
	 source_lever_hiring/streams.py       79     13    84%
	 -----------------------------------------------------
	 TOTAL                               254     27    89%

@jrhizor jrhizor temporarily deployed to more-secrets September 21, 2021 13:52 Inactive
@yevhenii-ldv
Copy link
Contributor Author

@sherifnada Please see the updates made after your comments.

@sherifnada
Copy link
Contributor

@avida is the first coverage report useful? e.g:

 source_acceptance_test/__init__.py                       2      0   100%
	 source_acceptance_test/base.py                          10      4    60%
	 source_acceptance_test/config.py                        74      8    89%
	 source_acceptance_test/conftest.py                     108    108     0%
	 source_acceptance_test/plugin.py                        45     45     0%
	 source_acceptance_test/tests/__init__.py                 4      0   100%
	 source_acceptance_test/tests/test_core.py              158    109    31%
	 source_acceptance_test/tests/test_full_refresh.py       18     11    39%
	 source_acceptance_test/tests/test_incremental.py        69     38    45%
	 source_acceptance_test/utils/__init__.py                 6      0   100%
	 source_acceptance_test/utils/asserts.py                 37      2    95%
	 source_acceptance_test/utils/common.py                  41     25    39%
	 source_acceptance_test/utils/compare.py                 47     20    57%
	 source_acceptance_test/utils/connector_runner.py        82     49    40%
	 source_acceptance_test/utils/json_schema_helper.py      75     11    85%
	 ------------------------------------------------------------------------
	 TOTAL                                                  776    430    45%

What are the coverage numbers here? Are they just counting the coverage of the SAT unit tests itself? that should be unrelated here right?

schema.pop("title", None)
schema.pop("description", None)
for name, prop in schema.get("properties", {}).items():
prop.pop("title", None)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense. Can you add a comment with this context?

…urochkin/lever-hiring-source

� Conflicts:
�	airbyte-config/init/src/main/resources/seed/source_definitions.yaml
@yevhenii-ldv
Copy link
Contributor Author

yevhenii-ldv commented Sep 22, 2021

/test connector=connectors/source-lever-hiring

🕑 connectors/source-lever-hiring https://github.com/airbytehq/airbyte/actions/runs/1261208622
✅ connectors/source-lever-hiring https://github.com/airbytehq/airbyte/actions/runs/1261208622
Python tests coverage:

	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                                                 Stmts   Miss  Cover
	 ------------------------------------------------------------------------
	 source_acceptance_test/__init__.py                       2      0   100%
	 source_acceptance_test/base.py                          10      4    60%
	 source_acceptance_test/config.py                        74      8    89%
	 source_acceptance_test/conftest.py                     108    108     0%
	 source_acceptance_test/plugin.py                        45     45     0%
	 source_acceptance_test/tests/__init__.py                 4      0   100%
	 source_acceptance_test/tests/test_core.py              158    109    31%
	 source_acceptance_test/tests/test_full_refresh.py       18     11    39%
	 source_acceptance_test/tests/test_incremental.py        69     38    45%
	 source_acceptance_test/utils/__init__.py                 6      0   100%
	 source_acceptance_test/utils/asserts.py                 37      2    95%
	 source_acceptance_test/utils/common.py                  41     25    39%
	 source_acceptance_test/utils/compare.py                 47     20    57%
	 source_acceptance_test/utils/connector_runner.py        82     49    40%
	 source_acceptance_test/utils/json_schema_helper.py      75     11    85%
	 ------------------------------------------------------------------------
	 TOTAL                                                  776    430    45%
	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                              Stmts   Miss  Cover
	 -----------------------------------------------------
	 source_lever_hiring/__init__.py       2      0   100%
	 source_lever_hiring/schemas.py      144     13    91%
	 source_lever_hiring/source.py        29      1    97%
	 source_lever_hiring/streams.py       79     13    84%
	 -----------------------------------------------------
	 TOTAL                               254     27    89%

@yevhenii-ldv yevhenii-ldv temporarily deployed to more-secrets September 22, 2021 09:33 Inactive
@jrhizor jrhizor temporarily deployed to more-secrets September 22, 2021 09:34 Inactive
@yevhenii-ldv
Copy link
Contributor Author

yevhenii-ldv commented Sep 22, 2021

/publish connector=connectors/source-lever-hiring

🕑 connectors/source-lever-hiring https://github.com/airbytehq/airbyte/actions/runs/1261233405
✅ connectors/source-lever-hiring https://github.com/airbytehq/airbyte/actions/runs/1261233405

@jrhizor jrhizor temporarily deployed to more-secrets September 22, 2021 09:41 Inactive
@yevhenii-ldv yevhenii-ldv merged commit 7316206 into master Sep 22, 2021
@yevhenii-ldv yevhenii-ldv deleted the ykurochkin/lever-hiring-source branch September 22, 2021 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues area/documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New Source: Lever Hiring
5 participants