• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

gcivil-nyu-org / team4-wed-fall25 / 18

22 Oct 2025 08:01PM UTC coverage: 48.812%. Remained the same
18

api

travis-pro

web-flow
Merge pull request #51 from gcivil-nyu-org/develop

Syncing main with develop branch

15 of 77 new or added lines in 5 files covered. (19.48%)

66 existing lines in 4 files now uncovered.

226 of 463 relevant lines covered (48.81%)

0.49 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

46.67
/note2webapp/forms.py
1
from django import forms
1✔
2
from .models import ModelUpload, ModelVersion
1✔
3

4

5
# -------------------------
6
# Upload Form (for new upload)
7
# -------------------------
8
class UploadForm(forms.ModelForm):
1✔
9
    class Meta:
1✔
10
        model = ModelUpload
1✔
11
        fields = ["name"]
1✔
12

13

14
# -------------------------
15
# Version Form (for new version)
16
# -------------------------
17
class VersionForm(forms.ModelForm):
1✔
18
    class Meta:
1✔
19
        model = ModelVersion
1✔
20
        fields = ["model_file", "predict_file", "schema_file", "tag", "category"]
1✔
21

22
    def clean_model_file(self):
1✔
UNCOV
23
        file = self.cleaned_data.get("model_file")
×
24
        if file and not file.name.endswith(".pt"):
×
25
            raise forms.ValidationError("Only .pt files are allowed for Model File")
×
26
        return file
×
27

28
    def clean_predict_file(self):
1✔
UNCOV
29
        file = self.cleaned_data.get("predict_file")
×
30
        if file and not file.name.endswith(".py"):
×
31
            raise forms.ValidationError("Only .py files are allowed for Predict File")
×
32
        return file
×
33

34
    def clean_schema_file(self):
1✔
UNCOV
35
        file = self.cleaned_data.get("schema_file")
×
36
        if file and not file.name.endswith(".json"):
×
37
            raise forms.ValidationError("Only .json files allowed for schema")
×
38
        return file
×
39

40
    def clean_tag(self):
1✔
UNCOV
41
        tag = self.cleaned_data.get("tag")
×
42
        if not tag:
×
43
            raise forms.ValidationError("Tag is required")
×
44
        return tag
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc