Skip to content

Commit bfafaa9

Browse files
authored
Merge pull request #537 from MetaCell/main
update dev from main
2 parents 0229e32 + 33659a6 commit bfafaa9

6 files changed

Lines changed: 64 additions & 12 deletions

File tree

applications/composer/backend/backend/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,7 @@
396396

397397
SOCIAL_AUTH_ORCID_KEY = "APP-GRRGRZ5EZQLQ6WZT"
398398
SOCIAL_AUTH_ORCID_SECRET = "a1363a17-22b0-4a99-81fc-a1a86a371251"
399+
SOCIAL_AUTH_ORCID_SCOPE = ["openid"]
399400

400401
SOCIAL_AUTH_AUTHENTICATION_BACKENDS = ("social_core.backends.orcid.ORCIDOAuth2",)
401402
AUTHENTICATION_BACKENDS = (
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Generated by Django on 2025-03-04
2+
3+
from django.db import migrations
4+
5+
6+
def convert_reference_uri_https_to_http(apps, schema_editor):
7+
"""
8+
Converts all reference_uri values from https to http.
9+
"""
10+
ConnectivityStatement = apps.get_model("composer", "ConnectivityStatement")
11+
12+
# Get all statements with reference_uri starting with https://
13+
statements_with_https = ConnectivityStatement.objects.filter(
14+
reference_uri__startswith="https://uri.interlex.org/composer/uris/set/"
15+
)
16+
17+
# Update each statement to use http instead of https
18+
for statement in statements_with_https:
19+
statement.reference_uri = statement.reference_uri.replace("https://", "http://", 1)
20+
statement.save(update_fields=["reference_uri"])
21+
22+
23+
def reverse_convert_reference_uri_http_to_https(apps, schema_editor):
24+
"""
25+
Reverse migration: Converts reference_uri values back from http to https.
26+
"""
27+
ConnectivityStatement = apps.get_model("composer", "ConnectivityStatement")
28+
29+
# Get all statements with reference_uri starting with http://
30+
statements_with_http = ConnectivityStatement.objects.filter(
31+
reference_uri__startswith="http://uri.interlex.org/composer/uris/set/"
32+
)
33+
34+
# Update each statement to use https instead of http
35+
for statement in statements_with_http:
36+
statement.reference_uri = statement.reference_uri.replace("http://", "https://", 1)
37+
statement.save(update_fields=["reference_uri"])
38+
39+
40+
class Migration(migrations.Migration):
41+
42+
dependencies = [
43+
("composer", "0097_relationship_custom_ingestion_code"),
44+
]
45+
46+
operations = [
47+
migrations.RunPython(
48+
convert_reference_uri_https_to_http,
49+
reverse_code=reverse_convert_reference_uri_http_to_https
50+
),
51+
]

applications/composer/backend/composer/utils.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def doi_uri(doi):
1515

1616

1717
def create_reference_uri(population_name, population_index):
18-
return f"https://uri.interlex.org/composer/uris/set/{population_name}/{population_index}"
18+
return f"http://uri.interlex.org/composer/uris/set/{population_name}/{population_index}"
1919

2020
def join_entities(entities):
2121
# Joins entity names with commas, and 'and' before the last name
@@ -45,5 +45,3 @@ def generate_connectivity_statement_curie_id_for_composer_statements(statement):
4545
if statement.population:
4646
return f"neuron type {statement.population.name} {statement.population_index}"
4747
return None
48-
49-
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
packaging==21.3
2-
Django==4.2.26
1+
packaging>=22.0
2+
Django==4.2.29
33
uvicorn==0.20.0
44
starlette>=0.41.3
55
pillow>=11.0.0
66
psycopg2-binary==2.9.5
7-
djangorestframework==3.14.0
7+
djangorestframework==3.15.2
88
django-filter==23.5
99
django-fsm==2.8.1
1010
django-fsm-admin@git+https://github.com/gadventures/django-fsm-admin@master
@@ -14,15 +14,17 @@ django-jazzmin==2.6.0
1414
drf-spectacular==0.25.1
1515
drf-spectacular-sidecar==2022.12.1
1616
drf-writable-nested==0.7.0
17-
social-auth-app-django==5.0.0
17+
social-auth-app-django==5.4.3
1818
pyontutils==0.1.38
1919
drf-react-template-framework==0.0.17
20-
aiohttp==3.11.18
20+
aiohttp==3.13.3
2121
crossref-commons==0.0.7
22-
neurondm==0.1.8
22+
neurondm==0.1.10
2323
django-cors-headers==4.3.1
2424
django-debug-toolbar==4.3.0
2525
django-sslserver-v2==1.0
26-
black==22.12.0
26+
black==26.3.1
2727
pytest==8.3.3
2828
python-dotenv==1.1.0
29+
awscli==1.44.38
30+
pyasn1==0.6.3
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION = "6.0.0"
1+
VERSION = "6.0.1"

applications/composer/frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "frontend",
3-
"version": "6.0.0",
3+
"version": "6.0.1",
44
"private": true,
55
"main": "index.js",
66
"proxy": "http://127.0.0.1:8000/",

0 commit comments

Comments
 (0)