Skip to content

Conversation

GeneCodeSavvy
Copy link
Collaborator

@GeneCodeSavvy GeneCodeSavvy commented Jul 8, 2025

This PR refactors the DNA complexity score calculation to be more extensible and support multiple providers beyond IDT. The changes include generalizing function names, updating docstrings to be provider-agnostic, and preparing the script for future modularity improvements.

NOTE: This PR introduces breaking changes.

BREAKING CHANGE

Previous json file format:

{
    "username": "hxrsh.09",
	"password": "xxxxxxxx",
	"ClientID": "harsh",
	"ClientSecret": "xxxxx-xxxx-xxxx-xxxx-xxxxxxxxx"
}

New json file format:

{
	"idt": {
		"username": "hxrsh.09",
		"password": "xxxxxxxx",
		"client_id": "harsh",
		"client_secret": "xxxxx-xxxx-xxxx-xxxx-xxxxxxxxx"
	}
}

The new format stores the credentials as { "provider_name": { "key": "value", ... } }. It also adheres to snake case for all keys.

@GeneCodeSavvy
Copy link
Collaborator Author

GeneCodeSavvy commented Jul 8, 2025

The test are passing on my system. The environment variables will have to be updated for CI / CD

@jakebeal
Copy link
Contributor

Before I approve and we merge, can you please provide the exact update that will be needed to make it pass?

@GeneCodeSavvy
Copy link
Collaborator Author

We need to update the secrets for the CI / CD. The secret IDT_CREDENTIALS should now be just CREDENTIALS in the specified format.

For users, the credentials should also be stored in the specified format, in the test_secret_credentials.json file.

New json file format:

{
	"idt": {
		"username": "hxrsh.09",
		"password": "xxxxxxxx",
		"client_id": "harsh",
		"client_secret": "xxxxx-xxxx-xxxx-xxxx-xxxxxxxxx"
	}
}

The new format stores the credentials as { "provider_name": { "key": "value", ... } }. It also adheres to snake case for all keys.

'--provider',
'idt',
'--credentials',
str(test_dir.parent / 'test_secret_idt_credentials.json'),
Copy link
Contributor

Choose a reason for hiding this comment

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

I have updated the secrets, but the tests are currently failing because some of the references are still to the old credentials and not the updated credentials.

@GeneCodeSavvy
Copy link
Collaborator Author

The tests are currently failing due to a mismatch in word casing:
client_id is being saved as ClientId.

This update should resolve the issue.

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.

2 participants