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
2 changes: 1 addition & 1 deletion coldfront/config/plugins/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
SPECTACULAR_SETTINGS = {
"TITLE": "RTS Coldfront API",
"DESCRIPTION": "HPC Project Management portal",
"VERSION": "2025.12.02",
"VERSION": "2026.10.08",
"SERVE_INCLUDE_SCHEMA": False,
}
1 change: 1 addition & 0 deletions coldfront/core/grant/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class GrantAdmin(SimpleHistoryAdmin):
"project",
"title",
"grant_number",
"nyu_cayuse_id",
"role",
"grant_pi_full_name",
"funding_agency",
Expand Down
1 change: 1 addition & 0 deletions coldfront/core/grant/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class Meta:
def __init__(self, *args, **kwargs):
super(GrantForm, self).__init__(*args, **kwargs)
self.fields["funding_agency"].queryset = self.fields["funding_agency"].queryset.order_by("name")
self.fields["nyu_cayuse_id"].required = True
self.fields["grant_start"].widget.attrs["class"] = "datepicker"
self.fields["grant_end"].widget.attrs["class"] = "datepicker"

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 5.2.18 on 2026-10-08 15:14

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('grant', '0001_initial'),
]

operations = [
migrations.AddField(
model_name='grant',
name='nyu_cayuse_id',
field=models.CharField(default='', max_length=255, verbose_name='NYU Cayuse ID'),
),
migrations.AddField(
model_name='historicalgrant',
name='nyu_cayuse_id',
field=models.CharField(default='', max_length=255, verbose_name='NYU Cayuse ID'),
),
]
2 changes: 2 additions & 0 deletions coldfront/core/grant/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class Grant(TimeStampedModel):
project (Project): links the project to the grant
title (str): grant title
grant_number (str): grant number from agency used for identification
nyu_cayuse_id (str): NYU Cayuse ID for the grant
role (str): role of the user in charge of the grant
grant_pi_full_name (str): PI's name
funding_agency (GrantFundingAgency): represents the agency funding the grant
Expand All @@ -91,6 +92,7 @@ class Grant(TimeStampedModel):
validators=[MinLengthValidator(3), MaxLengthValidator(255)],
max_length=255,
)
nyu_cayuse_id = models.CharField("NYU Cayuse ID", max_length=255, default="")
ROLE_CHOICES = (
("PI", "Principal Investigator (PI)"),
("CoPI", "Co-Principal Investigator (CoPI)"),
Expand Down
1 change: 1 addition & 0 deletions coldfront/core/grant/tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def __init__(self):
"project": project,
"title": "Quantum Halls",
"grant_number": "12345",
"nyu_cayuse_id": "CAYUSE-12345",
"role": "PI",
"grant_pi_full_name": "Stephanie Foster",
"funding_agency": grantFundingAgency,
Expand Down
2 changes: 2 additions & 0 deletions coldfront/core/grant/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def form_valid(self, form):
project=project_obj,
title=form_data.get("title"),
grant_number=form_data.get("grant_number"),
nyu_cayuse_id=form_data.get("nyu_cayuse_id"),
role=form_data.get("role"),
grant_pi_full_name=form_data.get("grant_pi_full_name"),
funding_agency=form_data.get("funding_agency"),
Expand Down Expand Up @@ -115,6 +116,7 @@ def test_func(self):
fields = [
"title",
"grant_number",
"nyu_cayuse_id",
"role",
"grant_pi_full_name",
"funding_agency",
Expand Down
2 changes: 1 addition & 1 deletion coldfront/plugins/api/openapi.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: 3.0.3
info:
title: RTS Coldfront API
version: 2025.12.02
version: 2026.10.08
description: HPC Project Management portal
paths:
/api/allocation-change-requests/:
Expand Down
2 changes: 1 addition & 1 deletion coldfront/plugins/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ class GrantSerializer(serializers.ModelSerializer):

class Meta:
model = Grant
fields = ("title", "funding_agency", "total_amount_awarded", "status")
fields = ("title", "nyu_cayuse_id", "funding_agency", "total_amount_awarded", "status")


class ProjectSerializer(serializers.ModelSerializer):
Expand Down
2 changes: 2 additions & 0 deletions coldfront/plugins/api/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def setUpTestData(self):
project=project,
title="Test grant",
grant_number="TEST-123",
nyu_cayuse_id="CAYUSE-123",
role="PI",
grant_pi_full_name="",
funding_agency=GrantFundingAgency.objects.create(name="Test agency"),
Expand Down Expand Up @@ -157,6 +158,7 @@ def test_project_query_params(self):
[
{
"title": "Test grant",
"nyu_cayuse_id": "CAYUSE-123",
"funding_agency": "Test agency",
"total_amount_awarded": 2000,
"status": "Active",
Expand Down
Loading