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
a7e8ef82
Commit
a7e8ef82
authored
7 years ago
by
Jorran de Wit
Browse files
Options
Downloads
Patches
Plain Diff
Remove ArxivCallable mixin
parent
bf1a8734
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
commentaries/models.py
+2
-6
2 additions, 6 deletions
commentaries/models.py
scipost/behaviors.py
+0
-10
0 additions, 10 deletions
scipost/behaviors.py
scipost/services.py
+0
-6
0 additions, 6 deletions
scipost/services.py
submissions/models.py
+14
-2
14 additions, 2 deletions
submissions/models.py
with
16 additions
and
24 deletions
commentaries/models.py
+
2
−
6
View file @
a7e8ef82
...
...
@@ -4,7 +4,7 @@ from django.core.urlresolvers import reverse
from
django.template
import
Template
,
Context
from
journals.constants
import
SCIPOST_JOURNALS_DOMAINS
from
scipost.behaviors
import
ArxivCallable
,
TimeStampedModel
from
scipost.behaviors
import
TimeStampedModel
from
scipost.models
import
Contributor
from
scipost.constants
import
SCIPOST_DISCIPLINES
,
DISCIPLINE_PHYSICS
,
SCIPOST_SUBJECT_AREAS
...
...
@@ -12,7 +12,7 @@ from .constants import COMMENTARY_TYPES
from
.managers
import
CommentaryManager
class
Commentary
(
ArxivCallable
,
TimeStampedModel
):
class
Commentary
(
TimeStampedModel
):
"""
A Commentary contains all the contents of a SciPost Commentary page for a given publication.
"""
...
...
@@ -72,10 +72,6 @@ class Commentary(ArxivCallable, TimeStampedModel):
def
__str__
(
self
):
return
self
.
pub_title
@classmethod
def
same_version_exists
(
self
,
identifier
):
return
self
.
objects
.
filter
(
arxiv_identifier
=
identifier
).
exists
()
def
title_label
(
self
):
context
=
Context
({
'
scipost_url
'
:
reverse
(
'
commentaries:commentary
'
,
args
=
(
self
.
arxiv_or_DOI_string
,)),
...
...
This diff is collapsed.
Click to expand it.
scipost/behaviors.py
+
0
−
10
View file @
a7e8ef82
...
...
@@ -4,16 +4,6 @@ from django.utils import timezone
from
.db.fields
import
AutoDateTimeField
class
ArxivCallable
(
object
):
'''
Models that contain a Arxiv identification should contain these
methods to be compatible with the ArxivCaller().
'''
@classmethod
def
same_version_exists
(
self
,
identifier
):
'''
Check if the given identifier already is present in the database.
'''
raise
NotImplementedError
class
TimeStampedModel
(
models
.
Model
):
"""
All objects should inherit from this abstract model.
...
...
This diff is collapsed.
Click to expand it.
scipost/services.py
+
0
−
6
View file @
a7e8ef82
# Module for making external api calls as needed in the submissions cycle
import
feedparser
import
requests
import
re
import
datetime
import
dateutil.parser
from
django.template
import
Template
,
Context
from
.behaviors
import
ArxivCallable
from
strings
import
arxiv_caller_errormessages
class
DOICaller
:
def
__init__
(
self
,
doi_string
):
...
...
This diff is collapsed.
Click to expand it.
submissions/models.py
+
14
−
2
View file @
a7e8ef82
...
...
@@ -16,7 +16,6 @@ from .managers import SubmissionManager, EditorialAssignmentManager, EICRecommen
from
.utils
import
ShortSubmissionCycle
,
DirectRecommendationSubmissionCycle
,
\
GeneralSubmissionCycle
from
scipost.behaviors
import
ArxivCallable
from
scipost.constants
import
TITLE_CHOICES
from
scipost.fields
import
ChoiceArrayField
from
scipost.models
import
Contributor
...
...
@@ -28,7 +27,7 @@ from journals.models import Publication
###############
# Submissions:
###############
class
Submission
(
ArxivCallable
,
models
.
Model
):
class
Submission
(
models
.
Model
):
# Main submission fields
author_comments
=
models
.
TextField
(
blank
=
True
,
null
=
True
)
author_list
=
models
.
CharField
(
max_length
=
1000
,
verbose_name
=
"
author list
"
)
...
...
@@ -164,6 +163,19 @@ class Submission(ArxivCallable, models.Model):
return
self
.
reports
.
awaiting_vetting
().
count
()
class
SubmissionEvent
(
models
.
Model
):
partner
=
models
.
ForeignKey
(
'
partners.Partner
'
,
on_delete
=
models
.
CASCADE
,
related_name
=
'
events
'
)
event
=
models
.
CharField
(
max_length
=
64
,
choices
=
PARTNER_EVENTS
)
comments
=
models
.
TextField
(
blank
=
True
)
noted_on
=
models
.
DateTimeField
(
auto_now_add
=
True
)
noted_by
=
models
.
ForeignKey
(
User
,
on_delete
=
models
.
CASCADE
)
def
__str__
(
self
):
return
'
%s: %s
'
%
(
str
(
self
.
partner
),
self
.
get_event_display
())
######################
# Editorial workflow #
######################
...
...
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