{"id":43352187,"url":"https://github.com/dimagi/data-and-analytics-etl","last_synced_at":"2026-02-02T02:32:40.040Z","repository":{"id":220372880,"uuid":"696431279","full_name":"dimagi/data-and-analytics-etl","owner":"dimagi","description":"Lambda code and testing for the Data \u0026 Analytics team's ETL project","archived":false,"fork":false,"pushed_at":"2025-04-15T15:31:52.000Z","size":46,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-15T16:43:38.542Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dimagi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-09-25T18:20:10.000Z","updated_at":"2024-07-16T17:36:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"faa6b4d4-7e45-4f0d-ae32-82caa9290170","html_url":"https://github.com/dimagi/data-and-analytics-etl","commit_stats":null,"previous_names":["dimagi/data-and-analytics-etl"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dimagi/data-and-analytics-etl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimagi%2Fdata-and-analytics-etl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimagi%2Fdata-and-analytics-etl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimagi%2Fdata-and-analytics-etl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimagi%2Fdata-and-analytics-etl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dimagi","download_url":"https://codeload.github.com/dimagi/data-and-analytics-etl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimagi%2Fdata-and-analytics-etl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29001654,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T01:32:03.847Z","status":"online","status_checked_at":"2026-02-02T02:00:07.448Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-02T02:32:38.360Z","updated_at":"2026-02-02T02:32:40.031Z","avatar_url":"https://github.com/dimagi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# data-and-analytics-etl\nLambda code and testing for the Data \u0026amp; Analytics team's ETL project.\n\n## Setting things up locally\nTo install requirements for this repo, run:\n`pip install -r requirements.txt`\n\n## Running tests against the repo\nTests in this repo have been implemented with unittest.\n\nTo run all tests, in the main directory run:\n`py -m unittest`\n\nTo run tests from a specific file, run:\n`py -m unittest testing/{file_path}.py`\n\nTo run tests from a specific class within a file, run:\n`py -m unittest testing.{file_path}.{class_name}`\n\nTo run a specific test, run:\n`py -m unittest testing.{file_path}.{class_name}.{test_name}`\n\n## Creating new tests\nAll new tests should be created in a uniform way to make understanding them easier.  First, all test files should be created in the Testing folder or a subfolder of it and have a file name in the format of `tests_{name}.py`.  Next, tests need to be implemented as functions in a class inheriting from `unittest.TestCase`. Finally, tests should make sure to implement the proper mocks to run properly, and use functions from `testing/util.py` as needed.  A common structure that many current tests take the form of is the following:\n\n```\nimport unittest\nfrom testing.util import run_test_cases\n...\n\n{implement mocks here}\n\nclass TestClass(unittest.TestCase):\n    def test_method(self):\n        test_data = [\n            {\n                'name': 'test_case_name',\n                'expect_exception': {False/True},\n                'exception': {None/Exception('Reason')},\n                ...\n            },\n            ...\n        ]\n\n        def test_function(self, test_case):\n            {test_body}\n\n        run_test_cases(self, test_data, test_function)\n\n    ...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimagi%2Fdata-and-analytics-etl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdimagi%2Fdata-and-analytics-etl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimagi%2Fdata-and-analytics-etl/lists"}