Skip to content

Commit

Permalink
Remove spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
TraciebelWairimu committed Feb 28, 2024
1 parent 2619ae4 commit 570e83d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
7 changes: 7 additions & 0 deletions importer/config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
client_id = 'fhir-core-client'
client_secret = '1528b638-9344-4409-9cbf-10680b4ca5f5'
username = 'demo'
password = 'Amani123'
access_token_url = 'https://keycloak-stage.smartregister.org/auth/realms/FHIR_Android/protocol/openid-connect/token'
fhir_base_url = 'https://fhir.labs.smartregister.org/fhir'
keycloak_url = 'https://keycloak-stage.smartregister.org/auth/admin/realms/FHIR_Android'
6 changes: 3 additions & 3 deletions importer/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

global_access_token = ""


# This function takes in a csv file
# reads it and returns a list of strings/lines
# It ignores the first line (assumes headers)
Expand Down Expand Up @@ -968,8 +967,8 @@ def export_resources_to_csv(resource_type, parameter, value, limit):
logging.info("No Resources Found")
else:
logging.error(f"Failed to retrieve resource. Status code: {response[1]} response: {response[0]}")


class ResponseFilter(logging.Filter):
def __init__(self, param=None):
self.param = param
Expand Down Expand Up @@ -1024,6 +1023,7 @@ def main(
csv_file, export_resources, parameter, value, limit, access_token, resource_type, assign, setup, group,
roles_max,
cascade_delete,
only_response,
log_level
):
if log_level == "DEBUG":
Expand Down
2 changes: 1 addition & 1 deletion importer/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,4 +492,4 @@ def test_export_resource_to_csv(


if __name__ == "__main__":
unittest.main()
unittest.main()

0 comments on commit 570e83d

Please sign in to comment.