Skip to content

Commit

Permalink
revert FAIRmat changes, but kept code for first reference
Browse files Browse the repository at this point in the history
  • Loading branch information
sanbrock committed Jun 14, 2023
1 parent e01bc50 commit e929b71
Show file tree
Hide file tree
Showing 5 changed files with 185 additions and 250 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ on:
push:
branches:
- main # push commit to the main branch
- fairmat
pull_request:
branches:
- main # pull request to the main branch
- fairmat
workflow_dispatch: # allow manual triggering
inputs:
deploy:
Expand Down Expand Up @@ -81,8 +79,10 @@ jobs:
- name: Build User Manual
run: |
make pdf
make html
ls -lAFgh build/manual/build/html/index.html
ls -lAFgh build/manual/build/latex/nexus.pdf
- name: Build and Commit the User Manual
if: ${{ github.event.inputs.deploy && env.python_version == '3.7' }}
Expand Down
7 changes: 1 addition & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pdf ::
cp $(BUILD_DIR)/manual/build/latex/nexus.pdf $(BUILD_DIR)/manual/source/_static/NeXusManual.pdf

html ::
$(SPHINX) -b html $(BUILD_DIR)/manual/source/ $(BUILD_DIR)/manual/build/html
$(SPHINX) -b html -W $(BUILD_DIR)/manual/source/ $(BUILD_DIR)/manual/build/html

impatient-guide ::
$(SPHINX) -b html -W $(BUILD_DIR)/impatient-guide/ $(BUILD_DIR)/impatient-guide/build/html
Expand All @@ -84,11 +84,6 @@ all ::
@echo "HTML built: `ls -lAFgh $(BUILD_DIR)/manual/build/html/index.html`"
@echo "PDF built: `ls -lAFgh $(BUILD_DIR)/manual/build/latex/nexus.pdf`"

nexus-fairmat-proposal ::
$(MAKE) test
$(MAKE) clean
$(MAKE) prepare
$(SPHINX) -b html $(BUILD_DIR)/manual/source/ $(BUILD_DIR)/manual/build/html

# NeXus - Neutron and X-ray Common Data Format
#
Expand Down
80 changes: 14 additions & 66 deletions manual/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@

# -- Project information -----------------------------------------------------

project = 'NeXus-FAIRmat'
author = 'The FAIRmat collaboration'
copyright = u'2022-{}, {}'.format(datetime.datetime.now().year, author)
description = u'Proposal of NeXus expansion for FAIRmat data'
project = 'nexus'
author = 'NIAC, https://www.nexusformat.org'
copyright = u'1996-{}, {}'.format(datetime.datetime.now().year, author)
description = u'NeXus: A Common Data Format for Neutron, X-ray, and Muon Science'

# The full version, including alpha/beta/rc tags
version = u'unknown NXDL version'
Expand All @@ -46,7 +46,6 @@
'sphinx.ext.ifconfig',
'sphinx.ext.viewcode',
'sphinx.ext.githubpages',
'sphinx_comments',
'sphinx.ext.todo',
'sphinx_tabs.tabs'
]
Expand All @@ -68,9 +67,8 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'
# html_theme = 'sphinxdoc'
# html_theme = 'sphinx_rtd_theme'
# html_theme = 'alabaster'
html_theme = 'sphinxdoc'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand All @@ -79,70 +77,20 @@

# Add extra files
html_extra_path = ['CNAME']
html_logo = 'img/FAIRmat.png'

if html_theme== 'sphinx_rtd_theme':
html_theme_options = {
'logo_only': False,
'collapse_navigation': True,
'sticky_navigation': True,
'navigation_depth': 4,
'includehidden': True,
'titles_only': False
}
def setup(app):
app.add_css_file('to_rtd.css')
elif html_theme== 'alabaster': # Alabaster allows a very high degree of control form Sphinx conf.py
html_sidebars = {
'**': [
'about.html',
'navigation.html',
'relations.html',
'searchbox.html',
'google_search.html'
],
}
html_theme_options = {
'body_text_align': 'justify',
'logo_name': True,
'github_button': True,
'github_type': 'watch',
'github_repo': 'nexus_definitions/tree/fairmat',
'github_user': 'FAIRmat-Experimental',
'github_count': 'false', # We don't get the cute counter baloon if we want to point to the branch
'sidebar_width': '235px',
'page_width': '1000px',
'font_size': '12pt',
'font_family': 'Arial',
'description': 'Proposal of NeXus expansion for FAIRmat data.',
'show_powered_by': True,
'sidebar_header': '#ffffff',
'sidebar_hr': '#ffffff',
'sidebar_link': '#ffffff',
'sidebar_list': '#ffffff',
'sidebar_link_underscore': '#ffffff',
'sidebar_text': '#ffffff'
}
def setup(app):
app.add_css_file('to_alabaster.css')
else:
html_sidebars = {

html_sidebars = {
'**': [
'localtoc.html',
'relations.html',
'sourcelink.html',
'searchbox.html',
'localtoc.html',
'relations.html',
'sourcelink.html',
'searchbox.html',
'google_search.html'
],
}
],
}

# Output file base name for HTML help builder.
htmlhelp_basename = 'NeXusManualdoc'

comments_config = {
"hypothesis": True
}

# -- Options for Latex output -------------------------------------------------
latex_elements = {
'maxlistdepth':7, # some application definitions are deeply nested
Expand Down
54 changes: 23 additions & 31 deletions manual/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,40 +1,35 @@
.. image:: img/NeXus.png
:width: 40%

=======================================
User Manual and Reference Documentation
=======================================

Welcome to the user manual of the NeXus for FAIRmat project.

https://www.nexusformat.org/

.. toctree::
:maxdepth: 2

fairmat-cover
nexus-index
em-structure
mpes-structure
ellipsometry-structure
apm-structure
transport-structure
stm-structure
cgms-structure
laboratory-structure
north-structure


:numbered: 4

user_manual
examples/index
ref_doc
napi
community
installation
utilities
history
docs_about

-----------

.. rubric:: Publishing Information

| This commit time code <<AUTO_INJECT_COMMIT_TC>>.
| This commit identifier <<AUTO_INJECT_COMMIT_ID>>.
| This manual built |today|.
This manual built |today|.

.. seealso::

The extended NeXus documentation:
This document is available in these formats online:

:HTML:
https://manual.nexusformat.org/
Expand All @@ -51,14 +46,11 @@ https://www.nexusformat.org/
:PDF:
https://manual.nexusformat.org/_static/NXImpatient.pdf

FAIRmat website:

`<https://www.fair-di.eu/fairmat/fairmat_/consortium>`_

NOMAD website:

`<https://nomad-lab.eu/>`_



.. Suggestions for adding to this manual:
Look for some other "section" such as "introduction.rst" and act similarly.
Any examples go as text files in the examples/ subdirectory and are pulled into
Sphinx inside a :directive:`literalcode` directive. Look for the pattern
or wing it. If you are ambitious, add index entries. Many examples of the
constructs you might use are already in the manual.
Loading

0 comments on commit e929b71

Please sign in to comment.