SciPost Code Repository
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SciPost
Manage
Activity
Members
Labels
Plan
Issues
118
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SciPost
SciPost
Commits
74254455
Commit
74254455
authored
1 year ago
by
George Katsikas
Browse files
Options
Downloads
Patches
Plain Diff
move proofs repo constants inside model
parent
a0043ae6
No related branches found
No related tags found
1 merge request
!42
Add git integration to server
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scipost_django/production/constants.py
+0
-13
0 additions, 13 deletions
scipost_django/production/constants.py
scipost_django/production/models.py
+17
-3
17 additions, 3 deletions
scipost_django/production/models.py
with
17 additions
and
16 deletions
scipost_django/production/constants.py
+
0
−
13
View file @
74254455
...
...
@@ -74,16 +74,3 @@ PRODUCTION_ALL_WORK_LOG_TYPES = (
"
Cited people have been notified/invited to SciPost
"
,
),
)
PROOFS_REPO_UNINITIALIZED
=
"
uninitialized
"
PROOFS_REPO_CREATED
=
"
created
"
PROOFS_REPO_TEMPLATE_ONLY
=
"
template_only
"
PROOFS_REPO_TEMPLATE_FORMATTED
=
"
template_formatted
"
PROOFS_REPO_PRODUCTION_READY
=
"
production_ready
"
PROOFS_REPO_STATUSES
=
(
(
PROOFS_REPO_UNINITIALIZED
,
"
The repository does not exist
"
),
(
PROOFS_REPO_CREATED
,
"
The repository exists but is empty
"
),
(
PROOFS_REPO_TEMPLATE_ONLY
,
"
The repository contains the bare template
"
),
(
PROOFS_REPO_TEMPLATE_FORMATTED
,
"
The repository contains the automatically formatted template
"
),
(
PROOFS_REPO_PRODUCTION_READY
,
"
The repository is ready for production
"
),
)
This diff is collapsed.
Click to expand it.
scipost_django/production/models.py
+
17
−
3
View file @
74254455
...
...
@@ -24,8 +24,6 @@ from .constants import (
PRODUCTION_STREAM_COMPLETED
,
PROOFS_STATUSES
,
PROOFS_UPLOADED
,
PROOFS_REPO_STATUSES
,
PROOFS_REPO_UNINITIALIZED
,
)
from
.managers
import
(
ProductionStreamQuerySet
,
...
...
@@ -246,6 +244,22 @@ class ProofsRepository(models.Model):
ProofsRepository is a GitLab repository of Proofs for a Submission.
"""
PROOFS_REPO_UNINITIALIZED
=
"
uninitialized
"
PROOFS_REPO_CREATED
=
"
created
"
PROOFS_REPO_TEMPLATE_ONLY
=
"
template_only
"
PROOFS_REPO_TEMPLATE_FORMATTED
=
"
template_formatted
"
PROOFS_REPO_PRODUCTION_READY
=
"
production_ready
"
PROOFS_REPO_STATUSES
=
(
(
PROOFS_REPO_UNINITIALIZED
,
"
The repository does not exist
"
),
(
PROOFS_REPO_CREATED
,
"
The repository exists but is empty
"
),
(
PROOFS_REPO_TEMPLATE_ONLY
,
"
The repository contains the bare template
"
),
(
PROOFS_REPO_TEMPLATE_FORMATTED
,
"
The repository contains the automatically formatted template
"
,
),
(
PROOFS_REPO_PRODUCTION_READY
,
"
The repository is ready for production
"
),
)
stream
=
models
.
OneToOneField
(
ProductionStream
,
on_delete
=
models
.
CASCADE
,
...
...
@@ -371,7 +385,7 @@ def production_stream_create_proofs_repo(sender, instance, created, **kwargs):
if
created
:
ProofsRepository
.
objects
.
create
(
stream
=
instance
,
status
=
PROOFS_REPO_UNINITIALIZED
,
status
=
ProofsRepository
.
PROOFS_REPO_UNINITIALIZED
,
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment