Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
eed0eb7
client id changes
ashwinisukale Mar 10, 2025
89a7eeb
remove duplicate import
kaysiz Mar 10, 2025
16c6ff8
Add method to generate 32 character client_id
kaysiz Mar 10, 2025
cf5205c
Add mysql db for local dev
kaysiz Mar 11, 2025
9a7033b
Add mysql library
kaysiz Mar 11, 2025
f22d8cb
Add db connection settings
kaysiz Mar 11, 2025
d217532
move model to models.py to fix circular ddependency issue
kaysiz Mar 11, 2025
9c20eec
move serializer to serializers.py to fix circular dependnecy
kaysiz Mar 11, 2025
95d6579
refactor and update imports
kaysiz Mar 11, 2025
3ca2ff3
Add migrations for client table
kaysiz Mar 11, 2025
f5cce3e
rename views file and make folder a package
kaysiz Mar 11, 2025
76f9675
Send email and added more validation
ashwinisukale Mar 20, 2025
65461ab
Some refactoring in api structure
ashwinisukale Mar 24, 2025
0d7de83
Moved the urls to common urls and now it is working
ashwinisukale Mar 25, 2025
e4fbc2b
add migration for update of the of the email attribute on client
kaysiz Mar 26, 2025
d3d44ea
Rate limit part will be done next release
ashwinisukale Mar 27, 2025
9f8e524
moved the variables to env file
ashwinisukale Mar 27, 2025
927d54e
Addressed code review comments
ashwinisukale Apr 15, 2025
d84483d
Merge branch 'dev' into client_id_ror
ashwinisukale Apr 15, 2025
724df3a
Allow null values
ashwinisukale Apr 15, 2025
30de336
client id changes (#422)
ashwinisukale Apr 16, 2025
7b83b60
clean up the requirements.tx file
kaysiz Apr 16, 2025
6362e6b
Merge branch 'dev' into client_id_ror
kaysiz Apr 16, 2025
304cf7e
Client ID registration (#429)
kaysiz Apr 16, 2025
be7e234
Add config for github workflow
kaysiz Apr 16, 2025
953ad9b
Add config for github workflow
kaysiz Apr 16, 2025
324963d
add config for db for staging github workflow
kaysiz Apr 16, 2025
7a3d6d2
add config for db for release github workflow
kaysiz Apr 16, 2025
e54532e
Client ID registration (#430)
kaysiz Apr 16, 2025
8ae50c5
fix mysql setup
kaysiz Apr 16, 2025
c2c24ea
Merge branch 'dev' into client_id_ror
kaysiz Apr 16, 2025
8941a9f
Merge pull request #431 from ror-community/client_id_ror
lizkrznarich Apr 16, 2025
7d3facc
fix mysql setup
kaysiz Apr 16, 2025
141b74e
fix mysql setup (#432)
kaysiz Apr 16, 2025
9a018a5
skip db look up for dev
kaysiz Apr 16, 2025
ae8b656
skip db look up for dev
kaysiz Apr 16, 2025
b1f4f12
Merge branch 'dev' into client_id_ror
kaysiz Apr 16, 2025
882dc4e
Client id ror (#433)
kaysiz Apr 16, 2025
dd079ce
update test db config
lizkrznarich Apr 16, 2025
617fa33
Merge pull request #434 from ror-community/liz-dev-action
lizkrznarich Apr 16, 2025
7d697bc
update db config
lizkrznarich Apr 16, 2025
bd1cc29
Merge pull request #435 from ror-community/liz-dev-action
lizkrznarich Apr 16, 2025
4c90e55
Merge branch 'dev' of github.com:ror-community/ror-api into client_id…
kaysiz Apr 16, 2025
7cf4d4b
fix failing tests
kaysiz Apr 16, 2025
1c7288f
Update config for staging and release
kaysiz Apr 16, 2025
8d906bd
fix test package import
lizkrznarich Apr 16, 2025
b0045d9
Merge pull request #436 from ror-community/client_id_ror
lizkrznarich Apr 16, 2025
8ac0457
remove unneeded test
lizkrznarich Apr 16, 2025
6c36220
Merge pull request #437 from ror-community/liz-dev-action
lizkrznarich Apr 16, 2025
3116c8e
Setup email sending for client api registration
kaysiz Apr 24, 2025
75fb990
Add content for client registration email
kaysiz Apr 24, 2025
e036ffa
fix variable substitution on template strings
kaysiz Apr 24, 2025
af95edc
refactor the email templates
kaysiz Apr 24, 2025
e9d8484
Merge pull request #438 from ror-community/ks-setup-emails
lizkrznarich Apr 24, 2025
ddb5b55
Add fix for https://github.com/ror-community/ror-roadmap/issues/310
adambuttrick May 1, 2025
92ce69d
Add fix for https://github.com/ror-community/ror-roadmap/issues/307
adambuttrick May 1, 2025
35a21c5
Add unit tests for https://github.com/ror-community/ror-roadmap/issue…
adambuttrick May 1, 2025
70d24e0
Client ID Registration: QA feedback (#441)
kaysiz May 8, 2025
80f1d43
Update name for from_email for client id registration (#442)
kaysiz May 8, 2025
215456c
update support email address (#443)
kaysiz May 8, 2025
4cdaa04
Client ID registration (#444)
kaysiz May 14, 2025
a94ff03
Merge pull request #439 from ror-community/202504-external-id-none-in…
jrhoads Jun 3, 2025
7a86367
Merge pull request #440 from ror-community/2025-04-generaterorid-chec…
jrhoads Jun 3, 2025
427a080
Merge pull request #447 from ror-community/master
jrhoads Jun 16, 2025
de9cec3
Merge pull request #448 from ror-community/dev
jrhoads Jun 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rorapi/common/csv_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def update_record_from_csv(csv_data, version):
temp_ext_ids = [i for i in temp_ext_ids if i['type'] != t]

else:
if not temp_preferred in temp_all:
if temp_preferred is not None and temp_preferred not in temp_all:
errors.append("Changes to external ID object with type {} result in preferred value '{}' not in all values '{}'".format(t, temp_preferred, ", ".join(temp_all)))
# remove all of type and replace with new obj
new_ext_id_obj = {
Expand Down
2 changes: 1 addition & 1 deletion rorapi/management/commands/generaterorid.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def check_ror_id(version):
ror_id = get_ror_id(generate_ror_id())
errors, organization = retrieve_organization(ror_id, version)
if errors is None:
check_ror_id(version)
return check_ror_id(version)
return ror_id


Expand Down
35 changes: 35 additions & 0 deletions rorapi/tests/tests_unit/tests_generaterorid_v1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
from django.test import SimpleTestCase
from unittest.mock import patch
from rorapi.management.commands import generaterorid
from rorapi.common.models import Errors
from rorapi.settings import ROR_API

DUPLICATE_ID_RAW = "duplicateid"
UNIQUE_ID_RAW = "uniqueid"
DUPLICATE_ROR_ID = f"{ROR_API['ID_PREFIX']}{DUPLICATE_ID_RAW}"
UNIQUE_ROR_ID = f"{ROR_API['ID_PREFIX']}{UNIQUE_ID_RAW}"
TEST_VERSION = 'v1'

class GenerateRorIdCommandTestCase(SimpleTestCase):

@patch('rorapi.management.commands.generaterorid.get_ror_id')
@patch('rorapi.management.commands.generaterorid.retrieve_organization')
@patch('rorapi.management.commands.generaterorid.generate_ror_id')
def test_check_ror_id_handles_collision_and_returns_unique(
self, mock_generate_ror_id, mock_retrieve_organization, mock_get_ror_id
):
mock_generate_ror_id.side_effect = [
DUPLICATE_ROR_ID,
UNIQUE_ROR_ID
]

mock_get_ror_id.side_effect = lambda x: x

mock_retrieve_organization.side_effect = [
(None, {'id': DUPLICATE_ROR_ID, 'name': 'Mock Duplicate Org'}),
(Errors(f"ROR ID '{UNIQUE_ROR_ID}' does not exist"), None)
]

result_ror_id = generaterorid.check_ror_id(TEST_VERSION)

self.assertEqual(result_ror_id, UNIQUE_ROR_ID)
35 changes: 35 additions & 0 deletions rorapi/tests/tests_unit/tests_generaterorid_v2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
from django.test import SimpleTestCase
from unittest.mock import patch
from rorapi.management.commands import generaterorid
from rorapi.common.models import Errors
from rorapi.settings import ROR_API

DUPLICATE_ID_RAW = "duplicateid"
UNIQUE_ID_RAW = "uniqueid"
DUPLICATE_ROR_ID = f"{ROR_API['ID_PREFIX']}{DUPLICATE_ID_RAW}"
UNIQUE_ROR_ID = f"{ROR_API['ID_PREFIX']}{UNIQUE_ID_RAW}"
TEST_VERSION = 'v2'

class GenerateRorIdCommandTestCase(SimpleTestCase):

@patch('rorapi.management.commands.generaterorid.get_ror_id')
@patch('rorapi.management.commands.generaterorid.retrieve_organization')
@patch('rorapi.management.commands.generaterorid.generate_ror_id')
def test_check_ror_id_handles_collision_and_returns_unique(
self, mock_generate_ror_id, mock_retrieve_organization, mock_get_ror_id
):
mock_generate_ror_id.side_effect = [
DUPLICATE_ROR_ID,
UNIQUE_ROR_ID
]

mock_get_ror_id.side_effect = lambda x: x

mock_retrieve_organization.side_effect = [
(None, {'id': DUPLICATE_ROR_ID, 'name': 'Mock Duplicate Org'}),
(Errors(f"ROR ID '{UNIQUE_ROR_ID}' does not exist"), None)
]

result_ror_id = generaterorid.check_ror_id(TEST_VERSION)

self.assertEqual(result_ror_id, UNIQUE_ROR_ID)
Loading