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

122 generate unique UUID #132

Merged
merged 13 commits into from
Feb 8, 2024
Merged

122 generate unique UUID #132

merged 13 commits into from
Feb 8, 2024

Conversation

TraciebelWairimu
Copy link
Contributor

IMPORTANT: Where possible all PRs must be linked to a Github issue

Fixes #122

Engineer Checklist

  • I have run ./gradlew spotlessApply to check my code follows the project's style guide
  • I have built and run the efsity jar to verify my change fixes the issue and/or does not break the application

importer/main.py Outdated
@@ -139,12 +139,12 @@ def create_user_resources(user_id, user):
logging.info("Creating user resources")
# generate uuids
if len(str(user[4]).strip()) == 0:
Copy link
Member

Choose a reason for hiding this comment

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

please refactor all the code in this function by destructuring user and removing references by index.

eg.

a, b, c, d = user

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

@Wambere Wambere requested a review from pld February 8, 2024 10:21
@pld pld merged commit 5410037 into main Feb 8, 2024
4 checks passed
@pld pld deleted the 122-generate-unique-uuid branch February 8, 2024 17:24
TraciebelWairimu added a commit that referenced this pull request Feb 13, 2024
* Change Physical_Type to type in locations_payload.json structure

* Generate unique uuid for locations

* Generate unique/repeatable uuid for build_org_affiliation and create_user_resources functions

* Create tests to check if the generated unique_uuid is unique and repeatable

* Fix the test_uuid_generated_for_locations_is_unique_and_repeatable test case

* Refactor all the code in the create_user_resources function, destructure user and remove references by index

* Refactor test_main.py imports

* Refactor the code, destructure user and remove references by index
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generate unique uuid
2 participants