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
60d35712
Commit
60d35712
authored
6 years ago
by
Jorran de Wit
Browse files
Options
Downloads
Patches
Plain Diff
Fix templatetag outdated after volumes/issues recontruction
parent
aef2bbfd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
stats/templates/stats/statistics.html
+127
-127
127 additions, 127 deletions
stats/templates/stats/statistics.html
stats/templatetags/stats_extras.py
+6
-4
6 additions, 4 deletions
stats/templatetags/stats_extras.py
with
133 additions
and
131 deletions
stats/templates/stats/statistics.html
+
127
−
127
View file @
60d35712
...
@@ -21,141 +21,141 @@
...
@@ -21,141 +21,141 @@
<p>
Clicking on a Journal/Volume/Issue gives aggregates for all publications in that object.
</p>
<p>
Clicking on a Journal/Volume/Issue gives aggregates for all publications in that object.
</p>
<ul>
<ul>
{% for journal in journals|dictsort:"doi_label" %}
{% for journal in journals|dictsort:"doi_label" %}
<li><a
href=
"{% url 'stats:statistics' journal_doi_label=journal.doi_label %}"
>
{{ journal }}
</a></li>
<li><a
href=
"{% url 'stats:statistics' journal_doi_label=journal.doi_label %}"
>
{{ journal }}
</a></li>
<ul>
<ul>
{% for year in journal|journal_publication_years %}
{% for year in journal|journal_publication_years %}
<li><a
href=
"{% url 'stats:statistics' journal_doi_label=journal.doi_label year=year %}"
>
{{ year }}
</a></li>
<li><a
href=
"{% url 'stats:statistics' journal_doi_label=journal.doi_label year=year %}"
>
{{ year }}
</a></li>
{% endfor %}
{% endfor %}
</ul>
</ul>
<ul>
<ul>
{% for volume in journal.volume
_set
.all|dictsort:"number" %}
{% for volume in journal.volume
s
.all|dictsort:"number" %}
<li><a
href=
"{% url 'stats:statistics' journal_doi_label=journal.doi_label volume_nr=volume.number %}"
>
{{ volume }}
</a></li>
<li><a
href=
"{% url 'stats:statistics' journal_doi_label=journal.doi_label volume_nr=volume.number %}"
>
{{ volume }}
</a></li>
<ul>
<ul>
{% for issue in volume.issue
_set
.all|dictsort:"number" %}
{% for issue in volume.issue
s
.all|dictsort:"number" %}
<li><a
href=
"{% url 'stats:statistics' journal_doi_label=journal.doi_label volume_nr=volume.number issue_nr=issue.number %}"
>
{{ issue }}
</a></li>
<li><a
href=
"{% url 'stats:statistics' journal_doi_label=journal.doi_label volume_nr=volume.number issue_nr=issue.number %}"
>
{{ issue }}
</a></li>
{% endfor %}
{% endfor %}
</ul>
</ul>
{% endfor %}
{% endfor %}
</ul>
</ul>
{% endfor %}
{% endfor %}
</ul>
</ul>
{% if journal %}
{% if journal %}
<h2>
Results:
</h2>
<h2>
Results:
</h2>
<table
class=
"table"
>
<table
class=
"table"
>
<tr>
<tr>
<th>
DOI label
</th>
<th>
DOI label
</th>
{% if year %}
{% if year %}
<th>
Year
</th>
<th>
Year
</th>
<th>
Nr submissions
<br/>
(distinct)
</th>
<th>
Nr submissions
<br/>
(distinct)
</th>
<th>
Nr submissions
<br/>
(including resubmissions)
</th>
<th>
Nr submissions
<br/>
(including resubmissions)
</th>
<th>
Nr assignment failed
</th>
<th>
Nr assignment failed
</th>
<th>
Nr accepted/
<br/>
published
</th>
<th>
Nr accepted/
<br/>
published
</th>
<th>
Nr rejected
</th>
<th>
Nr rejected
</th>
<th>
Nr withdrawn
</th>
<th>
Nr withdrawn
</th>
{% else %}
{% else %}
<th>
Nr publications
</th>
<th>
Nr publications
</th>
<th>
Duration average
</th>
<th>
Duration average
</th>
<th>
Citation rate (per paper per year)
</th>
<th>
Citation rate (per paper per year)
</th>
{% endif %}
{% endif %}
</tr>
</tr>
<tr>
<tr>
{% if issue %}
{% if issue %}
<td>
{{ issue.doi_label }}
</td>
<td>
{{ issue.doi_label }}
</td>
<td>
{% nr_publications issue %}
</td>
<td>
{% nr_publications issue %}
</td>
<td>
{% avg_processing_duration issue as avg %}{{ avg|floatformat:2 }} days
</td>
<td>
{% avg_processing_duration issue as avg %}{{ avg|floatformat:2 }} days
</td>
<td>
{% citation_rate issue as cr %}{{ cr|floatformat:2 }}
</td>
<td>
{% citation_rate issue as cr %}{{ cr|floatformat:2 }}
</td>
{% elif volume %}
{% elif volume %}
<td>
{{ volume.doi_label }}
</td>
<td>
{{ volume.doi_label }}
</td>
<td>
{% nr_publications volume %}
</td>
<td>
{% nr_publications volume %}
</td>
<td>
{% avg_processing_duration volume as avg %}{{ avg|floatformat:2 }} days
</td>
<td>
{% avg_processing_duration volume as avg %}{{ avg|floatformat:2 }} days
</td>
<td>
{% citation_rate volume as cr %}{{ cr|floatformat:2 }}
</td>
<td>
{% citation_rate volume as cr %}{{ cr|floatformat:2 }}
</td>
{% else %}
{% else %}
<td>
{{ journal.doi_label }}
</td>
<td>
{{ journal.doi_label }}
</td>
{% if year %}
{% if year %}
<td>
{{ year }}
</td>
<td>
{{ year }}
</td>
<td>
{{ submissions|submissions_count_distinct }}
</td>
<td>
{{ submissions|submissions_count_distinct }}
</td>
<td>
{{ submissions|length }}
</td>
<td>
{{ submissions|length }}
</td>
<td>
{{ submissions.assignment_failed.count }}
</td>
<td>
{{ submissions.assignment_failed.count }}
</td>
<td>
{{ submissions.accepted.count|add:submissions.published.count }}
</td>
<td>
{{ submissions.accepted.count|add:submissions.published.count }}
</td>
<td>
{{ submissions.rejected.count }}
</td>
<td>
{{ submissions.rejected.count }}
</td>
<td>
{{ submissions.withdrawn.count }}
</td>
<td>
{{ submissions.withdrawn.count }}
</td>
{% else %}
{% else %}
<td>
{% nr_publications journal %}
</td>
<td>
{% nr_publications journal %}
</td>
<td>
{% avg_processing_duration journal as avg %}{{ avg|floatformat:2 }} days
</td>
<td>
{% avg_processing_duration journal as avg %}{{ avg|floatformat:2 }} days
</td>
<td>
{% citation_rate journal as cr %}{{ cr|floatformat:2 }}
</td>
<td>
{% citation_rate journal as cr %}{{ cr|floatformat:2 }}
</td>
{% endif %}
{% endif %}
{% endif %}
{% endif %}
</tr>
</tr>
</table>
</table>
<table
class=
"table"
>
<table
class=
"table"
>
<tr>
<tr>
<th>
DOI label
</th>
<th>
DOI label
</th>
<th
colspan=
"3"
>
Nr per Tier
</th>
<th
colspan=
"3"
>
Nr per Tier
</th>
<th
colspan=
"3"
>
Citation rate (per paper per year)
</th>
<th
colspan=
"3"
>
Citation rate (per paper per year)
</th>
</tr>
</tr>
<tr>
<tr>
<th></th>
<th></th>
<th>
I
</th>
<th>
I
</th>
<th>
II
</th>
<th>
II
</th>
<th>
IIII
</th>
<th>
IIII
</th>
<th>
I
</th>
<th>
I
</th>
<th>
II
</th>
<th>
II
</th>
<th>
IIII
</th>
<th>
IIII
</th>
</tr>
</tr>
<tr>
<tr>
{% if issue %}
{% if issue %}
<td>
{{ issue.doi_label }}
</td>
<td>
{{ issue.doi_label }}
</td>
<td>
{% nr_publications issue tier=1 %}
</td>
<td>
{% nr_publications issue tier=1 %}
</td>
<td>
{% nr_publications issue tier=2 %}
</td>
<td>
{% nr_publications issue tier=2 %}
</td>
<td>
{% nr_publications issue tier=3 %}
</td>
<td>
{% nr_publications issue tier=3 %}
</td>
<td>
{% citation_rate issue tier=1 as cr %}{{ cr|floatformat:2 }}
</td>
<td>
{% citation_rate issue tier=1 as cr %}{{ cr|floatformat:2 }}
</td>
<td>
{% citation_rate issue tier=2 as cr %}{{ cr|floatformat:2 }}
</td>
<td>
{% citation_rate issue tier=2 as cr %}{{ cr|floatformat:2 }}
</td>
<td>
{% citation_rate issue tier=3 as cr %}{{ cr|floatformat:2 }}
</td>
<td>
{% citation_rate issue tier=3 as cr %}{{ cr|floatformat:2 }}
</td>
{% elif volume %}
{% elif volume %}
<td>
{{ volume.doi_label }}
</td>
<td>
{{ volume.doi_label }}
</td>
<td>
{% nr_publications volume tier=1 %}
</td>
<td>
{% nr_publications volume tier=1 %}
</td>
<td>
{% nr_publications volume tier=2 %}
</td>
<td>
{% nr_publications volume tier=2 %}
</td>
<td>
{% nr_publications volume tier=3 %}
</td>
<td>
{% nr_publications volume tier=3 %}
</td>
<td>
{% citation_rate volume tier=1 as cr %}{{ cr|floatformat:2 }}
</td>
<td>
{% citation_rate volume tier=1 as cr %}{{ cr|floatformat:2 }}
</td>
<td>
{% citation_rate volume tier=2 as cr %}{{ cr|floatformat:2 }}
</td>
<td>
{% citation_rate volume tier=2 as cr %}{{ cr|floatformat:2 }}
</td>
<td>
{% citation_rate volume tier=3 as cr %}{{ cr|floatformat:2 }}
</td>
<td>
{% citation_rate volume tier=3 as cr %}{{ cr|floatformat:2 }}
</td>
{% else %}
{% else %}
<td>
{{ journal.doi_label }}
</td>
<td>
{{ journal.doi_label }}
</td>
<td>
{% nr_publications journal tier=1 %}
</td>
<td>
{% nr_publications journal tier=1 %}
</td>
<td>
{% nr_publications journal tier=2 %}
</td>
<td>
{% nr_publications journal tier=2 %}
</td>
<td>
{% nr_publications journal tier=3 %}
</td>
<td>
{% nr_publications journal tier=3 %}
</td>
<td>
{% citation_rate journal tier=1 as cr %}{{ cr|floatformat:2 }}
</td>
<td>
{% citation_rate journal tier=1 as cr %}{{ cr|floatformat:2 }}
</td>
<td>
{% citation_rate journal tier=2 as cr %}{{ cr|floatformat:2 }}
</td>
<td>
{% citation_rate journal tier=2 as cr %}{{ cr|floatformat:2 }}
</td>
<td>
{% citation_rate journal tier=3 as cr %}{{ cr|floatformat:2 }}
</td>
<td>
{% citation_rate journal tier=3 as cr %}{{ cr|floatformat:2 }}
</td>
{% endif %}
{% endif %}
</tr>
</tr>
</table>
</table>
{% endif %}
{% endif %}
{% if year %}
{% if year %}
<h2>
Refereeing stats for {{ year }}
</h2>
<h2>
Refereeing stats for {{ year }}
</h2>
<table
class=
"table"
>
<table
class=
"table"
>
<tr>
<tr>
<th>
Nr refereeing
<br/>
invitations
</th>
<th>
Nr refereeing
<br/>
invitations
</th>
<th>
Nr accepted
</th>
<th>
Nr accepted
</th>
<th>
Nr declined
</th>
<th>
Nr declined
</th>
<th>
Nr pending
</th>
<th>
Nr pending
</th>
<th>
Nr reports
<br/>
obtained
</th>
<th>
Nr reports
<br/>
obtained
</th>
<th>
Nr obtained
<br/>
(invited)
</th>
<th>
Nr obtained
<br/>
(invited)
</th>
<th>
Nr obtained
<br/>
(contributed)
</th>
<th>
Nr obtained
<br/>
(contributed)
</th>
</tr>
</tr>
<tr>
<tr>
<td>
{{ nr_ref_inv }}
</td>
<td>
{{ nr_ref_inv }}
</td>
<td>
{{ nr_acc }} ({% widthratio nr_acc nr_ref_inv 100 %}
%
)
</td>
<td>
{{ nr_acc }} ({% widthratio nr_acc nr_ref_inv 100 %}
%
)
</td>
<td>
{{ nr_dec }} ({% widthratio nr_dec nr_ref_inv 100 %}
%
)
</td>
<td>
{{ nr_dec }} ({% widthratio nr_dec nr_ref_inv 100 %}
%
)
</td>
<td>
{{ nr_pen }} ({% widthratio nr_pen nr_ref_inv 100 %}
%
)
</td>
<td>
{{ nr_pen }} ({% widthratio nr_pen nr_ref_inv 100 %}
%
)
</td>
<td>
{{ nr_rep_obt }}
</td>
<td>
{{ nr_rep_obt }}
</td>
<td>
{{ nr_rep_obt_inv }} ({% widthratio nr_rep_obt_inv nr_rep_obt 100 %}
%
)
</td>
<td>
{{ nr_rep_obt_inv }} ({% widthratio nr_rep_obt_inv nr_rep_obt 100 %}
%
)
</td>
<td>
{{ nr_rep_obt_con }} ({% widthratio nr_rep_obt_con nr_rep_obt 100 %}
%
)
</td>
<td>
{{ nr_rep_obt_con }} ({% widthratio nr_rep_obt_con nr_rep_obt 100 %}
%
)
</td>
</tr>
</tr>
</table>
</table>
{% endif %}
{% endif %}
...
...
This diff is collapsed.
Click to expand it.
stats/templatetags/stats_extras.py
+
6
−
4
View file @
60d35712
...
@@ -33,8 +33,10 @@ def submissions_count_distinct(submissions):
...
@@ -33,8 +33,10 @@ def submissions_count_distinct(submissions):
@register.filter
(
name
=
'
journal_publication_years
'
)
@register.filter
(
name
=
'
journal_publication_years
'
)
def
journal_publication_years
(
journal
):
def
journal_publication_years
(
journal
):
"""
Return a sorted list of active years of the Journal.
"""
years
=
[]
years
=
[]
for
volume
in
journal
.
volume_set
.
all
():
if
journal
.
has_volumes
:
if
volume
.
until_date
.
year
not
in
years
:
years
=
journal
.
volumes
.
dates
(
'
until_date
'
,
'
year
'
)
years
.
append
(
volume
.
until_date
.
year
)
else
:
return
sorted
(
years
)
years
=
journal
.
publications
.
dates
(
'
publication_date
'
,
'
year
'
)
return
[
x
.
year
for
x
in
years
]
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