Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
25c6cce
task: update metadatax package version
ElodieENSTA Feb 2, 2026
fcd5cae
fix(backend): migrations
ElodieENSTA Feb 2, 2026
bb53bb5
fix(backend): tests
ElodieENSTA Feb 2, 2026
588e506
feat(website): add graphql codegen
ElodieENSTA Feb 2, 2026
e8acd20
feat(backend): update team member model
ElodieENSTA Feb 2, 2026
61b430d
feat(team members): update query to gql
ElodieENSTA Feb 2, 2026
5ebd47f
feat(collaborators): update query to gql
ElodieENSTA Feb 3, 2026
8535e86
feat(news): update query to gql
ElodieENSTA Feb 3, 2026
359f999
feat(scientific talks): update query to gql
ElodieENSTA Feb 3, 2026
e1d2576
feat(projects): update query to gql
ElodieENSTA Feb 3, 2026
76e701f
feat(deployments): update query to gql
ElodieENSTA Feb 3, 2026
68b699d
feat(bibliography): update query to gql
ElodieENSTA Feb 3, 2026
b57b5c5
fix(seed)
ElodieENSTA Feb 3, 2026
f75be72
3.1.0-0
ElodieENSTA Feb 3, 2026
500ab07
clean utils.ts
ElodieENSTA Feb 3, 2026
3b3f619
Merge branch 'master' into feat/APLOSE-377-Update-metadatax
ElodieENSTA Feb 4, 2026
eeb8b57
poetry lock
ElodieENSTA Feb 4, 2026
63e2263
fix(webiste): bibliography display
ElodieENSTA Feb 6, 2026
e79297f
feat(webiste): display ongoing deployments
ElodieENSTA Feb 9, 2026
9eae57b
update python dependencies
ElodieENSTA Feb 9, 2026
7361da0
3.1.0-1
ElodieENSTA Feb 9, 2026
d9d1327
Merge branch 'refs/heads/master' into feat/APLOSE-377-Update-metadatax
ElodieENSTA Feb 11, 2026
a5365b2
update mx
ElodieENSTA Feb 11, 2026
d051814
update mx
ElodieENSTA Feb 11, 2026
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,349 changes: 1,349 additions & 0 deletions backend/api/migrations/0001_v3_0.py

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion backend/api/migrations/0031_delete_news.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ class Migration(migrations.Migration):

dependencies = [
("api", "0030_spectroconfig_name_dataset_unicity_constraint"),
("osmosewebsite", "0007_news"),
]

operations = [
Expand Down
16 changes: 10 additions & 6 deletions backend/osmosewebsite/admin/team_member.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
@admin.action(description="Mark selected members as former members")
def make_former(model_admin, request, queryset):
"""TeamMember admin action to make it a former member"""
queryset.update(is_former_member=True)
queryset.update(type=TeamMember.Type.FORMER)


@admin.register(TeamMember)
Expand All @@ -19,20 +19,21 @@ class TeamMemberAdmin(ExtendedModelAdmin):
"__str__",
"show_institutions",
"position",
"is_former_member",
"type",
"level",
]
search_fields = ["contact__first_name", "contact__last_name"]
list_filter = ["type"]
search_fields = ["person__first_name", "person__last_name"]
fieldsets = [
(
None,
{
"fields": [
"contact",
"person",
"type",
"position",
"picture",
"biography",
"is_former_member",
"level",
]
},
Expand All @@ -56,5 +57,8 @@ class TeamMemberAdmin(ExtendedModelAdmin):
def show_institutions(self, obj: TeamMember):
"""show_spectro_configs"""
return self.list_queryset(
obj.contact.current_institutions.all(), to_str=lambda i: i.name
obj.person.institution_relations.all(),
to_str=lambda rel: f"{rel.institution} ({rel.team.name})"
if rel.team
else str(rel.institution),
)
12 changes: 6 additions & 6 deletions backend/osmosewebsite/management/commands/seed.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from django.core.management.base import BaseCommand
from faker import Faker
from metadatax.common.models import Contact
from metadatax.common.models import Person

from backend.osmosewebsite.models import (
TeamMember,
Expand Down Expand Up @@ -63,12 +63,12 @@ def _create_team_members(self):
for _ in range(0, random.randrange(start=5, stop=25)):
profile = fake.profile()
websites = profile["website"]
contact = Contact.objects.create(
person = Person.objects.create(
first_name=fake.first_name(),
last_name=fake.last_name(),
)
TeamMember.objects.create(
contact=contact,
person=person,
position=profile["job"],
biography="\n".join(fake.paragraphs(5)),
picture=f"https://api.dicebear.com/7.x/identicon/svg?seed={profile['name']}",
Expand All @@ -81,12 +81,12 @@ def _create_team_members(self):
for _ in range(0, random.randrange(start=1, stop=15)):
profile = fake.profile()
websites = profile["website"]
contact = Contact.objects.create(
person = Person.objects.create(
first_name=fake.first_name(),
last_name=fake.last_name(),
)
TeamMember.objects.create(
contact=contact,
person=person,
position=profile["job"],
biography="\n".join(fake.paragraphs(5)),
picture=f"https://api.dicebear.com/7.x/identicon/svg?seed={profile['name']}",
Expand All @@ -95,7 +95,7 @@ def _create_team_members(self):
personal_website_url=websites[1] if len(websites) > 1 else None,
github_url=websites[2] if len(websites) > 2 else None,
linkedin_url=websites[3] if len(websites) > 3 else None,
is_former_member=True,
type=TeamMember.Type.FORMER,
)

def _generate_html_body(self):
Expand Down
281 changes: 281 additions & 0 deletions backend/osmosewebsite/migrations/0001_v3_0.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,281 @@
# Generated by Django 3.2.25 on 2026-02-02 15:10

import django.contrib.postgres.fields
from django.db import migrations, models
import django.db.migrations.operations.special
import django.db.models.deletion
import tinymce.models


class Migration(migrations.Migration):

replaces = [
("osmosewebsite", "0001_initial"),
("osmosewebsite", "0002_auto_20231124_1025"),
("osmosewebsite", "0003_auto_20231124_1037"),
("osmosewebsite", "0004_auto_20231124_1101"),
("osmosewebsite", "0005_auto_20231127_1508"),
("osmosewebsite", "0006_alter_teammember_options"),
("osmosewebsite", "0007_news"),
("osmosewebsite", "0008_auto_20231130_1754"),
("osmosewebsite", "0009_alter_news_osmose_member_authors"),
("osmosewebsite", "0010_collaborator_project"),
("osmosewebsite", "0011_rename_vignette_project_thumbnail"),
("osmosewebsite", "0012_project_collaborators"),
("osmosewebsite", "0013_collaborator_url"),
("osmosewebsite", "0007_auto_20231206_0954"),
("osmosewebsite", "0010_merge_20231206_1102"),
("osmosewebsite", "0011_rename_vignette_news_thumbnail"),
("osmosewebsite", "0014_merge_20231206_1444"),
("osmosewebsite", "0008_auto_20240103_1132"),
("osmosewebsite", "0012_merge_20240108_1138"),
("osmosewebsite", "0015_merge_20240108_1547"),
("osmosewebsite", "0016_alter_teammember_mail_address"),
("osmosewebsite", "0017_alter_teammember_biography"),
("osmosewebsite", "0018_alter_collaborator_options"),
("osmosewebsite", "0019_collaborator_show_on_aplose_home"),
("osmosewebsite", "0020_trap"),
("osmosewebsite", "0021_auto_20240909_0918"),
("osmosewebsite", "0022_project_metadatax_project"),
("osmosewebsite", "0023_project_contact"),
("osmosewebsite", "0024_scientifictalks_presenters"),
("osmosewebsite", "0025_alter_scientifictalk_intro"),
("osmosewebsite", "0026_add_scientist"),
("osmosewebsite", "0027_update_team_member"),
("osmosewebsite", "0028_add_bibliography"),
("osmosewebsite", "0029_add_bibliography_tag"),
("osmosewebsite", "0030_add_scientist_constraint"),
("osmosewebsite", "0031_alter_teammember_scientist"),
("osmosewebsite", "0032_update_bibliography_model"),
("osmosewebsite", "0033_alter_project_metadatax_project"),
("osmosewebsite", "0034_migrate_bibliography_to_metadatax"),
]

initial = True

dependencies = [
("common", "0006_clean"),
("acquisition", "0005_clean"),
]
run_before = [
("common", "0008_refacto_common"),
("acquisition", "0006_refacto_common"),
]

operations = [
migrations.CreateModel(
name="Collaborator",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"level",
models.IntegerField(
blank=True, null=True, verbose_name="Sorting level"
),
),
("name", models.CharField(max_length=255, unique=True)),
("thumbnail", models.URLField()),
("url", models.URLField(blank=True, null=True)),
("show_on_home_page", models.BooleanField(default=False)),
("show_on_aplose_home", models.BooleanField(default=False)),
],
options={
"ordering": ["level", "name"],
},
),
migrations.CreateModel(
name="TeamMember",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"level",
models.IntegerField(
blank=True, null=True, verbose_name="Sorting level"
),
),
("position", models.CharField(max_length=255)),
("biography", models.TextField(blank=True, null=True)),
("picture", models.URLField()),
(
"mail_address",
models.EmailField(
blank=True,
max_length=254,
null=True,
verbose_name="Mail address",
),
),
(
"research_gate_url",
models.URLField(
blank=True, null=True, verbose_name="Research Gate URL"
),
),
(
"personal_website_url",
models.URLField(
blank=True, null=True, verbose_name="Personal website URL"
),
),
(
"github_url",
models.URLField(blank=True, null=True, verbose_name="Github URL"),
),
(
"linkedin_url",
models.URLField(blank=True, null=True, verbose_name="LinkedIn URL"),
),
(
"is_former_member",
models.BooleanField(default=False, verbose_name="Is former member"),
),
(
"contact",
models.OneToOneField(
on_delete=django.db.models.deletion.RESTRICT,
related_name="team_member",
to="common.contact",
),
),
],
options={
"ordering": ["level"],
},
),
migrations.CreateModel(
name="ScientificTalk",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("title", models.CharField(max_length=255, unique=True)),
("intro", models.CharField(blank=True, max_length=255, null=True)),
("date", models.DateField(blank=True, null=True)),
("thumbnail", models.URLField(default="")),
(
"other_presenters",
django.contrib.postgres.fields.ArrayField(
base_field=models.CharField(blank=True, max_length=255),
blank=True,
null=True,
size=None,
),
),
(
"osmose_member_presenters",
models.ManyToManyField(blank=True, to="osmosewebsite.TeamMember"),
),
],
options={
"ordering": ["-date"],
},
),
migrations.CreateModel(
name="Project",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("title", models.CharField(max_length=255, unique=True)),
("intro", models.CharField(max_length=255)),
("start", models.DateField(blank=True, null=True)),
("end", models.DateField(blank=True, null=True)),
("body", tinymce.models.HTMLField()),
("thumbnail", models.URLField(default="")),
(
"other_contacts",
django.contrib.postgres.fields.ArrayField(
base_field=models.CharField(blank=True, max_length=255),
blank=True,
null=True,
size=None,
),
),
(
"collaborators",
models.ManyToManyField(blank=True, to="osmosewebsite.Collaborator"),
),
(
"metadatax_project",
models.OneToOneField(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="website_project",
to="acquisition.project",
),
),
(
"osmose_member_contacts",
models.ManyToManyField(blank=True, to="osmosewebsite.TeamMember"),
),
],
options={
"ordering": ["-end"],
},
),
migrations.CreateModel(
name="News",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("title", models.CharField(max_length=255, unique=True)),
("intro", models.CharField(max_length=255)),
("body", tinymce.models.HTMLField()),
("date", models.DateField(blank=True, null=True)),
("thumbnail", models.URLField(default="")),
(
"other_authors",
django.contrib.postgres.fields.ArrayField(
base_field=models.CharField(blank=True, max_length=255),
blank=True,
null=True,
size=None,
),
),
(
"osmose_member_authors",
models.ManyToManyField(blank=True, to="osmosewebsite.TeamMember"),
),
],
options={
"verbose_name_plural": "news",
"ordering": ["-date"],
},
),
]
Loading