Skip to content

Commit

Permalink
more for doc
Browse files Browse the repository at this point in the history
  • Loading branch information
xavierr committed Jan 26, 2024
1 parent 1753096 commit 2b3fea4
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 18 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,4 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: sphinx/_build/html

- name: Commit updated documentation
run: |
cd ${GITHUB_WORKSPACE}
git config --global user.email "${GIT_USER_EMAIL}"
git config --global user.name "${GIT_USER_NAME}"
git config pull.rebase false
git add .
git commit --allow-empty -m "Automatic update of github pages"
git push origin master

9 changes: 5 additions & 4 deletions sphinx/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

About <about>
self
References <battery>
Class Index <battery>
Resources <resources>
Contribute <contribute>


Expand Down Expand Up @@ -178,9 +179,9 @@ directly from the web. Commands for both options are given below:
Contributing
------------

We welcome contributions from the community to enhance and expand the
ontology. If you have suggestions, improvements, or additional chemical
substance information to contribute, please refer to our :ref:`contributing guidelins<contribute:Contributing to the ontology>`.
We welcome contributions from the community to enhance and expand the ontology. If you have suggestions, improvements,
or additional chemical substance information to contribute, please refer to our :ref:`contributing
guidelins<contribute:Contributing to the ontology>`.

Acknowledgements
~~~~~~~~~~~~~~~~
Expand Down
19 changes: 19 additions & 0 deletions sphinx/resources.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Resources
=========

Best Practices
--------------
- `Data on the Web Best Practices <https://www.w3.org/TR/dwbp/>`_
- `Best Practices for Publishing Linked Data <https://www.w3.org/TR/ld-bp/>`_

Tabular Data
------------
- `Model for Tabular Data and Metadata on the Web <https://www.w3.org/TR/2015/REC-tabular-data-model-20151217/>`_
- `Metadata Vocabulary for Tabular Data <https://www.w3.org/TR/2015/REC-tabular-metadata-20151217/>`_

RDF Vocabularies
----------------
- `RDF Schema <https://www.w3.org/TR/rdf-schema/>`_
- `Simple Knowledge Organization System (SKOS) <https://www.w3.org/2004/02/skos/>`_
- `Dublin Core <https://www.dublincore.org/specifications/dublin-core/dcmi-terms/>`_
- `Schema.org <https://schema.org/>`_
13 changes: 8 additions & 5 deletions sphinx/ttl_to_rst.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ def extract_terms_info_sparql(g: Graph)-> list:
PREFIXES = """
PREFIX emmo: <http://emmo.info/emmo#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
"""

list_entity_types = ["IRI", "prefLabel", "Elucidation", "Alternative Label(s)", "IEC Reference", "IUPAC Reference", "Wikipedia Reference"]
list_entity_types = ["IRI", "prefLabel", "Elucidation", "Alternative Label(s)", "IEC Reference", "IUPAC Reference", "Wikipedia Reference", "Wikidata Reference", "Comment", ]

query = PREFIXES + """
SELECT ?iri ?prefLabel ?elucidation (GROUP_CONCAT(?altLabel; SEPARATOR=", ") AS ?altLabels) ?iecref ?iupacref ?wikipediaref
SELECT ?iri ?prefLabel ?elucidation (GROUP_CONCAT(?altLabel; SEPARATOR=", ") AS ?altLabels) ?iecref ?iupacref ?wikipediaref ?wikidataref ?comment
WHERE {
?iri skos:prefLabel ?prefLabel.
Expand All @@ -37,6 +38,8 @@ def extract_terms_info_sparql(g: Graph)-> list:
OPTIONAL { ?iri emmo:EMMO_50c298c2_55a2_4068_b3ac_4e948c33181f ?iecref . }
OPTIONAL { ?iri emmo:EMMO_fe015383_afb3_44a6_ae86_043628697aa2 ?iupacref . }
OPTIONAL { ?iri emmo:EMMO_c84c6752_6d64_48cc_9500_e54a3c34898d ?wikipediaref . }
OPTIONAL { ?iri emmo:EMMO_26bf1bef_d192_4da6_b0eb_d2209698fb54 ?wikidataref . }
OPTIONAL { ?iri rdfs:comment ?comment . }
}
GROUP BY ?iri ?prefLabel ?elucidation
Expand All @@ -62,9 +65,9 @@ def extract_terms_info_sparql(g: Graph)-> list:
def render_rst_top() -> str:

top_rst = """
==========
References
==========
===========
Class Index
===========
"""

Expand Down

0 comments on commit 2b3fea4

Please sign in to comment.