Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add document_info to schema #46

Merged
merged 3 commits into from
Oct 7, 2016
Merged

Conversation

captainsafia
Copy link
Member

This adds a document_info object to the schema to hold the title and author of the document.

cc: @minrk @rgbkrk

"metadata": {},
"nbformat": 4,
"nbformat_minor": 0,
"document_info": {
Copy link
Member

@rgbkrk rgbkrk Sep 9, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we likely want title and author directly in the metadata section instead of a new top level key.

"metadata": {
  "author": "Jean Tester",
  "title": "Test Notebook"
}

@rgbkrk
Copy link
Member

rgbkrk commented Sep 9, 2016

Thanks for taking the lead on this!

@westurner
Copy link
Contributor

westurner commented Sep 9, 2016

  • Users can specify multiple authors as structured values
  • For schema.org, "title" is name http://schema.org/name

Expressing multiple authors with schema.org JSONLD:

{"@context": ["http://schema.org/", {"jupyter": "https://jupyter.org/ns/#" }],
 "@type": ["CreativeWork", "jupyter:JupyterNotebook"],
 "metadata": {
   "name": "Jupyter Notebook Title",
   "author": [
       {"@type": "Person",
         "name": "Author 1"},
       {"@type": "Person", 
         "familyName": "lastname",
         "givenName": "firstname",
         "worksFor": {"@type": "Organization", "name": "UniversityXYZ"},
         "affiliation": {"...":"..."},
         "url": "..."}
    ],
    "funder": [{"name": "UniversityXYZ"],
    "license": "https://creativecommons.org/licenses/by-sa/4.0/",
    "license": {"@type": "CreativeWork",
          "name": "CC by-SA 4.0",
          "url": "https://creativecommons.org/licenses/by-sa/4.0/"},
}

See also:

@westurner westurner mentioned this pull request Sep 9, 2016
3 tasks
@minrk
Copy link
Member

minrk commented Sep 9, 2016

Thanks, @captainsafia! I agree with @rgbkrk's comment (also see discussion in #45) that I'd prefer this to add a definition for metadata fields: authors and title, rather than new fields in the schema, which has more complex spec-change implications.

@captainsafia
Copy link
Member Author

Updated.

@westurner
Copy link
Contributor

Could we please do name instead of 'title'?

On Friday, September 9, 2016, Safia Abdalla notifications@github.com
wrote:

Updated.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#46 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AADGy_XLsRMn83SXSJDk9bN8b85BDSnOks5qoYh7gaJpZM4J4raO
.

@captainsafia
Copy link
Member Author

Could we please do name instead of 'title'?

I'm hesitant to use name instead of title as it's fairly ambiguous, especially now that this document-specific info is stored in the metadata object. The benefits of aligning with the spec in my mind do not outweigh the confusion some users and devs might experience with the ambiguous naming.

@westurner
Copy link
Contributor

I'm hesitant to use name instead of title as it's fairly ambiguous, especially now that this document-specific info is stored in the metadata object. The benefits of aligning with the spec in my mind do not outweigh the confusion some users and devs might experience with the ambiguous naming.

  • Search engines pick up <title> and http://schema.org/name
  • To make it possible for search engines to index notebook metadata later would require (impossible) migration; so it makes sense to fully specify with a web standard schema now.

Here's this, which is forked from your pull:

@minrk
Copy link
Member

minrk commented Sep 12, 2016

I think title is a better choice for the title of a document. name is ambiguous, because it is easily confused with the filename, etc, and we intend to use this field specifically for title purposes. If the document went on nbviewer, etc. this is the string that would go in <title>, so title makes sense to me as the field name.

cc @ellisonbg and @fperez who have expressed interest in title/author metadata

"description": "The title of the notebook document",
"type": "string"
},
"author": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

author probably needs to be a list of authors with a few fields, as described in #45 (comment)

@westurner
Copy link
Contributor

I disagree. I think that, if the objective is to store metadata that will
be indexed by search engines (and EAV metadata repositories like (RDF)
triplestores), then it makes sense to use attributes/properties which are
indexed by search engines (e.g. schema:name).

On Monday, September 12, 2016, Min RK notifications@github.com wrote:

I think title is a better choice for the title of a document. name is
ambiguous, because it is easily confused with the filename, etc, and we
intend to use this field specifically for title purposes. If the
document went on nbviewer, etc. this is the string that would go in

<title>, so title makes sense to me as the field name.

cc @ellisonbg https://github.com/ellisonbg and @fperez
https://github.com/fperez who have expressed interest in title/author
metadata


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#46 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AADGy5MVYyIBBkdYohguaWnm46rR5sWUks5qpQ80gaJpZM4J4raO
.

@westurner
Copy link
Contributor

<title>{{obj.name}}</title>

On Monday, September 12, 2016, Wes Turner wes.turner@gmail.com wrote:

I disagree. I think that, if the objective is to store metadata that will
be indexed by search engines (and EAV metadata repositories like (RDF)
triplestores), then it makes sense to use attributes/properties which are
indexed by search engines (e.g. schema:name).

On Monday, September 12, 2016, Min RK <notifications@github.com
javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:

I think title is a better choice for the title of a document. name is
ambiguous, because it is easily confused with the filename, etc, and we
intend to use this field specifically for title purposes. If the
document went on nbviewer, etc. this is the string that would go in

<title>, so title makes sense to me as the field name.

cc @ellisonbg https://github.com/ellisonbg and @fperez
https://github.com/fperez who have expressed interest in title/author
metadata


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#46 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AADGy5MVYyIBBkdYohguaWnm46rR5sWUks5qpQ80gaJpZM4J4raO
.

@ellisonbg
Copy link
Contributor

I agree with @minrk that "title" is a much better way of spelling this out. Also authors should be a list. Fully in favor of this though!

},
"author": {
"description": "The author(s) of the notebook document",
"type": "string"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@minrk @ellisonbg does it need to be a literal list or can a string suffice?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Especially if we are tackling Latex Export, I think it should be a list of object. Authors can have emails, phones affiliations, and be corresponding authors. Making it objects, leave it flexible.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

List<Object> then?

Copy link
Contributor

@westurner westurner Sep 28, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From #46 (comment):

This makes author a list edit: (and adds a few properties which could be used for author metadata form generation): westurner/nbformat@c298b08

@westurner
Copy link
Contributor

I agree with @minrk that "title" is a much better way of spelling this out.

Also authors should be a list.

I agree.

This makes author a list (and adds a few properties): westurner@c298b08

@captainsafia
Copy link
Member Author

captainsafia commented Sep 28, 2016

Welp! Sorry for the delay. Updates are now present in PR. The only piece of data required for author is the name so we don't place too many requirements on users off the bat.

"type": "string"
}
},
"additionalProperties": true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, this gives us the flexibility to provide other fields later.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thanks!

@minrk minrk added this to the 4.2 milestone Oct 7, 2016
@minrk minrk merged commit f406b86 into jupyter:master Oct 7, 2016
@minrk minrk mentioned this pull request Oct 7, 2016
@rgbkrk
Copy link
Member

rgbkrk commented Oct 7, 2016

Woo!

@westurner
Copy link
Contributor

westurner commented Mar 31, 2017

#91 "Store notebook title/name in metadata"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants