Skip to content

Commit

Permalink
articles: refactors article schema
Browse files Browse the repository at this point in the history
* adds “experiment”, “author”, “short_description”

* introduces “type” for “htm”, “md” in the “body” and
“short_description”

* closes cernopendata#1313

Signed-off-by: Pamfilos Fokianos <pamfilosf@gmail.com>
  • Loading branch information
pamfilos committed Sep 5, 2017
1 parent 7f15e5f commit aedecfe
Show file tree
Hide file tree
Showing 6 changed files with 92 additions and 32 deletions.
29 changes: 23 additions & 6 deletions cernopendata/jsonschemas/records/article-v1.0.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,37 @@
"type": "string",
"title": "Title"
},
"type": {
"type": "string",
"title": "Type"
},
"collections": {
"type": "array",
"items": {
"type": "string",
"title": "Collection"
}
},
"short_description": {
"type": "object",
"properties": {
"type": {
"type":"string"
},
"content": {
"type":"string"
}
}
},
"body": {
"type": "string",
"title": "Body"
"type": "object",
"properties": {
"type": {
"type":"string"
},
"content": {
"type":"string"
}
}
},
"author": {
"type": "string"
},
"created": {
"type": "string"
Expand Down
21 changes: 19 additions & 2 deletions cernopendata/mappings/records/article-v1.0.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@
"secondary": {
"type": "string",
"analyzer": "collections"
},
"experiment": {
"type": "string",
"analyzer": "collections"
},
"year": {
"type": "string",
"analyzer": "collections"
}
}
},
Expand All @@ -41,11 +49,20 @@
"title": {
"type": "string"
},
"type": {
"author": {
"type": "string"
},
"short_description": {
"properties": {
"format": {"type": "string"},
"content": {"type": "string"}
}
},
"body": {
"type": "string"
"properties": {
"format": {"type": "string"},
"content": {"type": "string"}
}
},
"files": {
"properties": {
Expand Down
54 changes: 34 additions & 20 deletions cernopendata/modules/fixtures/data/articles/news/news.json
Original file line number Diff line number Diff line change
@@ -1,52 +1,66 @@
[
{
"title": "Explore ATLAS Open Data resources",
"type": "html",
"body": "<p>Starting today, the data from 100 trillion proton collisions is now public on the Open Data Portal! This marks the world's first open release of 8 TeV data, gathered from the Large Hadron Collider in 2012.</p><p>Given its strong emphasis on learning, the release of ATLAS Open Data is accompanied by additional resources that are available via the ATLAS educational platform. The resources guide users through the data, explain how to visualise and how to download and use the data, and even provides open-source software. As part of this, ATLAS has made seven physics analyses available for users to get started with their research. By releasing additional resources and comprehensive documentation ATLAS aims at bridging the gap between phycisists and the public.</p>",
"short_description": {
"content": "The data from 100 trillion proton collisions is now public on the Open Data Portal!",
"format": "html"
},
"body": {
"content": "<p>Starting today, the data from 100 trillion proton collisions is now public on the Open Data Portal! This marks the world's first open release of 8 TeV data, gathered from the Large Hadron Collider in 2012.</p><p>Given its strong emphasis on learning, the release of ATLAS Open Data is accompanied by additional resources that are available via the ATLAS educational platform. The resources guide users through the data, explain how to visualise and how to download and use the data, and even provides open-source software. As part of this, ATLAS has made seven physics analyses available for users to get started with their research. By releasing additional resources and comprehensive documentation ATLAS aims at bridging the gap between phycisists and the public.</p>",
"format": "html"
},
"collections": [
{"secondary": "ATLAS Collaboration"},
{"secondary": "ATLAS"}
{"experiment": "ATLAS"}
],
"author": "ATLAS Collaboration",
"created": "July 29th 2016"
},
{
"title": "CMS releases new batch of research data from LHC",
"type": "html",
"body": "<p>Today, the <a href=\"\">CMS Collaboration at CERN</a> has released more than <a href=\"http://opendata.cern.ch/search?ln=en&p=Run2011A+AND+collection%3ACMS-Primary-Datasets+OR+collection%3ACMS-Simulated-Datasets+OR+collection%3ACMS-Derived-Datasets\">300 terabytes (TB) of high-quality open data</a>. These include over 100 TB, or 2.5 inverse femtobarns (fb−1), of data from proton collisions at 7 TeV, making up half the data collected at the LHC by the CMS detector in 2011. This follows a previous release from November 2014, which made available around 27 TB of research data collected in 2010.</p><p>Available on the CERN Open Data Portal — which is built in collaboration with members of CERN’s IT Department and Scientific Information Service — the collision data are released into the public domain under the CC0 waiver and come in types: The so-called \"<a href=\"http://opendata.cern.ch/search?ln=en&p=Run2011A+AND+collection%3ACMS-Primary-Datasets\">primary datasets</a>\" are in the same format used by the CMS Collaboration to perform research. The \"<a href=\"http://opendata.cern.ch/search?ln=en&p=Run2011A+AND+collection%3ACMS-Derived-Datasets\">derived datasets</a>\" on the other hand require a lot less computing power and can be readily analysed by university or high-school students, and CMS has provided a limited number of datasets in this format. <a href=\"http://cms.web.cern.ch/news/cms-releases-new-batch-research-data-lhc\">Read full release announcement</a></p>",
"body": {
"content": "<p>Today, the <a href=\"\">CMS Collaboration at CERN</a> has released more than <a href=\"http://opendata.cern.ch/search?ln=en&p=Run2011A+AND+collection%3ACMS-Primary-Datasets+OR+collection%3ACMS-Simulated-Datasets+OR+collection%3ACMS-Derived-Datasets\">300 terabytes (TB) of high-quality open data</a>. These include over 100 TB, or 2.5 inverse femtobarns (fb−1), of data from proton collisions at 7 TeV, making up half the data collected at the LHC by the CMS detector in 2011. This follows a previous release from November 2014, which made available around 27 TB of research data collected in 2010.</p><p>Available on the CERN Open Data Portal — which is built in collaboration with members of CERN’s IT Department and Scientific Information Service — the collision data are released into the public domain under the CC0 waiver and come in types: The so-called \"<a href=\"http://opendata.cern.ch/search?ln=en&p=Run2011A+AND+collection%3ACMS-Primary-Datasets\">primary datasets</a>\" are in the same format used by the CMS Collaboration to perform research. The \"<a href=\"http://opendata.cern.ch/search?ln=en&p=Run2011A+AND+collection%3ACMS-Derived-Datasets\">derived datasets</a>\" on the other hand require a lot less computing power and can be readily analysed by university or high-school students, and CMS has provided a limited number of datasets in this format. <a href=\"http://cms.web.cern.ch/news/cms-releases-new-batch-research-data-lhc\">Read full release announcement</a></p>",
"format": "html"
},
"collections": [
{"secondary": "CMS Collaboration"},
{"secondary": "CMS"}
{"experiment": "CMS"}
],
"author": "CMS Collaboration",
"created": "April 22nd 2016"
},
{
"title": "ATLAS Higgs Machine Learning Challenge",
"type": "html",
"body": "<p>The dataset from the ATLAS Higgs Machine Learning Challenge has <a href=\"/collection/ATLAS-Higgs-Challenge-2014\">been released</a> on CERN Open Data Portal.</p><p><a href=\"http://www.atlas.ch/news/2014/are-you-up-for-higgs-challenge.html\">The Challenge</a>, which ran from May to September 2014, was to develop an algorithm that improved the detection of the Higgs boson signal. The <a href=\"http://www.atlas.ch/news/2013/higgs-into-fermions.html\">specific sample</a> used simulated Higgs particles into two tau particles inside the ATLAS detector. The downloadable sample was provided for participants at the host platform on Kaggle’s website. With almost 1,785 teams competing, the event was a huge success. Participants applied and developed cutting edge Machine Learning techniques, which have been shown to be better than existing traditional high-energy physics tools.</p><p>The dataset was removed at the end of the Challenge but due to high public demand, ATLAS as organiser of the event, has decided to house it in the CERN Open Data Portal where it will be available permanently. The 60MB zipped ASCII file can be decoded without a special software, and a few scripts are provided to help users get started. Detailed documentation for physicists and data scientists is also available. Thanks to the Digital Object Identifiers (DOIs) in CERN Open Data Portal, the dataset and accompanying material can be cited like any other paper.</p><p>The <a href=\"http://atlas.ch/news/2014/machine-learning-wins-the-higgs-challenge.html\">Challenge’s winner</a> Gábor Melis and recipients of the Special High Energy Physics meets Machine Learning Award, Tianqi Chen and Tong He, will be visiting CERN to deliver talks on their winning algorithms on 19 May.</p>",
"body": {
"content": "<p>The dataset from the ATLAS Higgs Machine Learning Challenge has <a href=\"/collection/ATLAS-Higgs-Challenge-2014\">been released</a> on CERN Open Data Portal.</p><p><a href=\"http://www.atlas.ch/news/2014/are-you-up-for-higgs-challenge.html\">The Challenge</a>, which ran from May to September 2014, was to develop an algorithm that improved the detection of the Higgs boson signal. The <a href=\"http://www.atlas.ch/news/2013/higgs-into-fermions.html\">specific sample</a> used simulated Higgs particles into two tau particles inside the ATLAS detector. The downloadable sample was provided for participants at the host platform on Kaggle’s website. With almost 1,785 teams competing, the event was a huge success. Participants applied and developed cutting edge Machine Learning techniques, which have been shown to be better than existing traditional high-energy physics tools.</p><p>The dataset was removed at the end of the Challenge but due to high public demand, ATLAS as organiser of the event, has decided to house it in the CERN Open Data Portal where it will be available permanently. The 60MB zipped ASCII file can be decoded without a special software, and a few scripts are provided to help users get started. Detailed documentation for physicists and data scientists is also available. Thanks to the Digital Object Identifiers (DOIs) in CERN Open Data Portal, the dataset and accompanying material can be cited like any other paper.</p><p>The <a href=\"http://atlas.ch/news/2014/machine-learning-wins-the-higgs-challenge.html\">Challenge’s winner</a> Gábor Melis and recipients of the Special High Energy Physics meets Machine Learning Award, Tianqi Chen and Tong He, will be visiting CERN to deliver talks on their winning algorithms on 19 May.</p>",
"format": "html"
},
"collections": [
{"secondary": "ATLAS Collaboration"},
{"secondary": "ATLAS"}
{"experiment": "ATLAS"}
],
"author": "ATLAS Collaboration",
"created": "February 17th 2015"
},
{
"title": "ALICE releases educational datasets",
"type": "html",
"body": "<p>ALICE is making a public release of a number of datasets customised for demonstration and educational purpose. A number of reconstructed data files which are not statistically representative are included to allow plotting transverse momentum and pseudorapidity distributions. More advanced analysis and tools as well as larger data samples will be available in future releases.</p><p>At this stage we are making available a set of outreach and educational analysis exercises. These are based on specifically-selected ALICE data and are widely used for the particle physics masterclasses. These exercises expose simplified tools, which however give the feel of the real tools employed by the physicists for the data analysis, and come in the form of analysis packages and small datasets organised as root files. Each analysis downloads on demand the required software and data from a common graphics interface.</p><p>The documentation coming with these exercises contains both some physics introduction and the instructions for running the programs, which highlight some of the ALICE physics. One exercise is the search for particles containing strange quarks, based on their V0 decays; the motivation is to give an insight to strangeness enhancement, one of the first signatures for the Quark-Gluon Plasma (QGP). Another exercise basically looks at charged particle tracks; the aim is to calculate the nuclear modification factor RAA, by comparing particle yields in the case of lead-lead and proton-proton collisions; the fact that RAA is less than one indicates the suppression of charged particles due to interactions of partons with the QGP.</p>",
"body": {
"format": "html",
"content": "<p>ALICE is making a public release of a number of datasets customised for demonstration and educational purpose. A number of reconstructed data files which are not statistically representative are included to allow plotting transverse momentum and pseudorapidity distributions. More advanced analysis and tools as well as larger data samples will be available in future releases.</p><p>At this stage we are making available a set of outreach and educational analysis exercises. These are based on specifically-selected ALICE data and are widely used for the particle physics masterclasses. These exercises expose simplified tools, which however give the feel of the real tools employed by the physicists for the data analysis, and come in the form of analysis packages and small datasets organised as root files. Each analysis downloads on demand the required software and data from a common graphics interface.</p><p>The documentation coming with these exercises contains both some physics introduction and the instructions for running the programs, which highlight some of the ALICE physics. One exercise is the search for particles containing strange quarks, based on their V0 decays; the motivation is to give an insight to strangeness enhancement, one of the first signatures for the Quark-Gluon Plasma (QGP). Another exercise basically looks at charged particle tracks; the aim is to calculate the nuclear modification factor RAA, by comparing particle yields in the case of lead-lead and proton-proton collisions; the fact that RAA is less than one indicates the suppression of charged particles due to interactions of partons with the QGP.</p>"
},
"collections": [
{"secondary": "ALICE Collaboration"},
{"secondary": "ALICE"}
{"experiment": "ALICE"}
],
"author": "ALICE Collaboration",
"created": "November 20th 2014"
},
{
"title": "CMS releases first batch of high-level LHC open data",
"type": "html",
"body": "<p>The Compact Muon Solenoid (CMS) Collaboration at CERN is excited to announce the public release of the first batch of high-level, analysable and open data from the Large Hadron Collider (LHC), recorded by the CMS detector. The datasets are available on the new CERN Open Data Portal and are being released into the public domain under the Creative Commons CC0 waiver, in keeping with CMS’s commitment to data preservation and open data. <a href=\"http://cms.web.cern.ch/news/cms-releases-first-batch-high-level-lhc-open-data\">Read full release announcement</a></p>",
"body": {
"content": "<p>The Compact Muon Solenoid (CMS) Collaboration at CERN is excited to announce the public release of the first batch of high-level, analysable and open data from the Large Hadron Collider (LHC), recorded by the CMS detector. The datasets are available on the new CERN Open Data Portal and are being released into the public domain under the Creative Commons CC0 waiver, in keeping with CMS’s commitment to data preservation and open data. <a href=\"http://cms.web.cern.ch/news/cms-releases-first-batch-high-level-lhc-open-data\">Read full release announcement</a></p>",
"format": "html"
},
"collections": [
{"secondary": "CMS Collaboration"},
{"secondary": "CMS"}
{"experiment": "CMS"}
],
"author": "CMS Collaboration",
"created": "November 20th 2014"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
],
"title": "LHCb External Data Access Policy",
"collections": [
{ "experiment": "LHCb" },
{ "primary": "Data-Policies" }
],
"authors": {
"name": "Clarke, Peter",
"affiliation": "U. Edinburgh"
},
"accelerator": "CERN LHC",
"experiment": "LHCb",
"description": "5 p",
"summary": "This document contains the LHCb Data Access Policy. This was adopted at the Collaboration Board meeting on 27th Feb 2013.",
"collaboration": "LHCb collaboration",
Expand Down
3 changes: 2 additions & 1 deletion cernopendata/static/templates/search/briefs/articles.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ <h4>
</a>
<span class="btn btn-primary pull-right">Article</span>
</h4>
<p>{{record.metadata.body}}</p>
<p ng-if="record.metadata.short_description.content">{{record.metadata.short_description.content}}</p>
<p ng-if="!record.metadata.short_description.content">{{record.metadata.body.content | limitTo: 200}}</p>
<div class="text-right">
<ul class="list-inline">
<li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,26 @@
<div class="panel-heading">
<h2 style="display: inline;">
{{record.title}}
{% if record.get("author", None) %}
<h5>
<strong>Author:</strong> {{record.author}}
</h5>
{% endif %}
<h4>
{% for collection in record.collections%}
<span class="label label-success">{{collection}}</span>
{% for key in collection %}
<span class="{{key}} label label-success">{{collection[key]}}</span>
{% endfor %}
{% endfor %}
</h4>
</h2>
</div>
<div class="panel-body">
{{record.body |safe}}
{% if record.get("body", {}).get("format", None) == "html" %}
{{record.get("body", {}).get("content", None) |safe}}
{% elif record.get("body", {}).get("format", None) == "md" %}
{{record.get("body", {}).get("content", None) |safe }}
{% endif %}
<hr>
<div>
<span>
Expand Down

0 comments on commit aedecfe

Please sign in to comment.