Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions applications/composer/backend/backend/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@

SOCIAL_AUTH_ORCID_KEY = "APP-GRRGRZ5EZQLQ6WZT"
SOCIAL_AUTH_ORCID_SECRET = "a1363a17-22b0-4a99-81fc-a1a86a371251"
SOCIAL_AUTH_ORCID_SCOPE = ["openid"]

SOCIAL_AUTH_AUTHENTICATION_BACKENDS = ("social_core.backends.orcid.ORCIDOAuth2",)
AUTHENTICATION_BACKENDS = (
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Generated by Django on 2025-03-04

from django.db import migrations


def convert_reference_uri_https_to_http(apps, schema_editor):
"""
Converts all reference_uri values from https to http.
"""
ConnectivityStatement = apps.get_model("composer", "ConnectivityStatement")

# Get all statements with reference_uri starting with https://
statements_with_https = ConnectivityStatement.objects.filter(
reference_uri__startswith="https://uri.interlex.org/composer/uris/set/"
)

# Update each statement to use http instead of https
for statement in statements_with_https:
statement.reference_uri = statement.reference_uri.replace("https://", "http://", 1)
statement.save(update_fields=["reference_uri"])


def reverse_convert_reference_uri_http_to_https(apps, schema_editor):
"""
Reverse migration: Converts reference_uri values back from http to https.
"""
ConnectivityStatement = apps.get_model("composer", "ConnectivityStatement")

# Get all statements with reference_uri starting with http://
statements_with_http = ConnectivityStatement.objects.filter(
reference_uri__startswith="http://uri.interlex.org/composer/uris/set/"
)

# Update each statement to use https instead of http
for statement in statements_with_http:
statement.reference_uri = statement.reference_uri.replace("http://", "https://", 1)
statement.save(update_fields=["reference_uri"])


class Migration(migrations.Migration):

dependencies = [
("composer", "0097_relationship_custom_ingestion_code"),
]

operations = [
migrations.RunPython(
convert_reference_uri_https_to_http,
reverse_code=reverse_convert_reference_uri_http_to_https
),
]
4 changes: 1 addition & 3 deletions applications/composer/backend/composer/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def doi_uri(doi):


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

def join_entities(entities):
# Joins entity names with commas, and 'and' before the last name
Expand Down Expand Up @@ -45,5 +45,3 @@ def generate_connectivity_statement_curie_id_for_composer_statements(statement):
if statement.population:
return f"neuron type {statement.population.name} {statement.population_index}"
return None


16 changes: 9 additions & 7 deletions applications/composer/backend/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
packaging==21.3
Django==4.2.26
packaging>=22.0
Django==4.2.29
uvicorn==0.20.0
starlette>=0.41.3
pillow>=11.0.0
psycopg2-binary==2.9.5
djangorestframework==3.14.0
djangorestframework==3.15.2
django-filter==23.5
django-fsm==2.8.1
django-fsm-admin@git+https://github.com/gadventures/django-fsm-admin@master
Expand All @@ -14,15 +14,17 @@ django-jazzmin==2.6.0
drf-spectacular==0.25.1
drf-spectacular-sidecar==2022.12.1
drf-writable-nested==0.7.0
social-auth-app-django==5.0.0
social-auth-app-django==5.4.3
pyontutils==0.1.38
drf-react-template-framework==0.0.17
aiohttp==3.11.18
aiohttp==3.13.3
crossref-commons==0.0.7
neurondm==0.1.8
neurondm==0.1.10
django-cors-headers==4.3.1
django-debug-toolbar==4.3.0
django-sslserver-v2==1.0
black==22.12.0
black==26.3.1
pytest==8.3.3
python-dotenv==1.1.0
awscli==1.44.38
pyasn1==0.6.3
2 changes: 1 addition & 1 deletion applications/composer/backend/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = "6.0.0"
VERSION = "6.0.1"
2 changes: 1 addition & 1 deletion applications/composer/frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "frontend",
"version": "6.0.0",
"version": "6.0.1",
"private": true,
"main": "index.js",
"proxy": "http://127.0.0.1:8000/",
Expand Down
Loading