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: Commcare #20220

Merged

Conversation

siddhant3030
Copy link
Contributor

@siddhant3030 siddhant3030 commented Dec 8, 2022

What

Commcare is a digital data collection platform for front-line workers working in offline settings. For organizations using Commcare having a native Airbyte connector to import data will allow for ingestion into their data warehouses and use of the data for analysis. Current processes involve ingestion with Python scripts, maintaining schemas ad-hoc in the scripts, and through Excel downloads.

How

The current version of the connector provides for ingesting data through Airbyte from multiple forms in an organization's Commcare application. A typical use case of a Commcare system involves a root project space in which multiple applications can be hosted and can be defined for multiple program interventions. The current connector defines the ingestion of data at the application level as that is the most common entry point for Commcare Applications. The implemented version of the connector will allow for all sync modes - full refresh and incremental including de-duped mode. A best-guess normalization is also provided to ease the normalization process using a couple of python libraries to guess the schema from the data fetched back through the API.

Pre-merge Checklist

Expand the relevant checklist and delete the others.

New Connector

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/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

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
  • If new credentials are required for use in CI, add them to GSM. Instructions.
  • /test connector=connectors/<name> command is passing
  • New Connector version released on Dockerhub by running the /publish command described here
  • After the connector is published, connector added to connector index as described here
  • Seed specs have been re-generated by building the platform and committing the changes to the seed spec files, as described here
Updating a connector

Community member or Airbyter

  • 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
    • Changelog updated in docs/integrations/<source or destination>/<name>.md including changelog. See changelog example
  • PR name follows PR naming conventions

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
  • If new credentials are required for use in CI, add them to GSM. Instructions.
  • /test connector=connectors/<name> command is passing
  • New Connector version released on Dockerhub and connector version bumped by running the /publish command described here
Connector Generator
  • Issue acceptance criteria met
  • PR name follows PR naming conventions
  • If adding a new generator, add it to the list of scaffold modules being tested
  • The generator test modules (all connectors with -scaffold in their name) have been updated with the latest scaffold by running ./gradlew :airbyte-integrations:connector-templates:generator:testScaffoldTemplates then checking in your changes
  • Documentation which references the generator is updated as needed

Tests

Unit Screenshot 2022-12-09 at 12 01 38 AM
Integration

Put your integration tests output here.

Acceptance Screenshot 2023-01-05 at 11 31 50 PM

@octavia-squidington-iv octavia-squidington-iv added the area/documentation Improvements or additions to documentation label Dec 8, 2022
@geekwhocodes
Copy link
Contributor

@sajarin I can review this PR.

@sajarin sajarin added the bounty-XL Maintainer program: claimable extra large bounty PR label Dec 9, 2022
@siddhant3030
Copy link
Contributor Author

Screenshot 2022-12-12 at 11 58 57 AM

Flake check

@geekwhocodes
Copy link
Contributor

Hi @siddhant3030, Thanks for your amazing contribution!
Could you please delete unused files?

  • source-commcare\source_commcare\schemas\TODO.md
  • source-commcare\sample_files

Also, can you upload a screenshot of integration tests?

It would be good if you move custom classes to separate file/s.

@sajarin
Copy link
Contributor

sajarin commented Dec 13, 2022

@siddhant3030 can you respond to the requested changes ASAP? Thanks!

@siddhant3030
Copy link
Contributor Author

@geekwhocodes Thank you for the suggestions. I'll work on this. Also we are fixing the acceptance test. As soon as we're done we can let you know. I'll also add the screenshot.

@sajarin
Copy link
Contributor

sajarin commented Dec 15, 2022

@siddhant3030 any update here? We're trying to get this merged before the end of the week. Otherwise, the merging might be significantly delayed due to the holidays. We're fairly close to finishing the review here.

@siddhant3030
Copy link
Contributor Author

@sajarin will try to push this today

@siddhant3030
Copy link
Contributor Author

siddhant3030 commented Dec 20, 2022

@geekwhocodes @sajarin can you help me with this? This is the only test case which is failing in acceptance test

Screenshot 2022-12-20 at 6 10 45 PM

@marcosmarxm
Copy link
Member

Hello 👋:skin-tone-2: and thank you for your contribution!

Airbyte has instituted a code freeze between 19 and 30 December, to make sure there are no disruptions during the holidays.
Because of this, reviewing and merging your contribution may take longer than usual.
We apologize for the delay, but we want everyone to have a quiet and happy holiday.

If you have any questions or need further clarification, please don't hesitate to ping via Slack.

@siddhant3030
Copy link
Contributor Author

@geekwhocodes @sajarin any updates on this? Needed your help the acceptance this. I have posted the query above

@sajarin
Copy link
Contributor

sajarin commented Jan 5, 2023

/publish connector=connectors/source-commcare run-tests=false

🕑 Publishing the following connectors:
connectors/source-commcare
https://github.com/airbytehq/airbyte/actions/runs/3849549492


Connector Did it publish? Were definitions generated?
connectors/source-commcare

if you have connectors that successfully published but failed definition generation, follow step 4 here ▶️

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 bounty bounty-XL Maintainer program: claimable extra large bounty PR community connectors/source/commcare
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

6 participants