Skip to content

Commit

Permalink
update docs and move to pydata scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
rettigl committed Dec 20, 2024
1 parent 222e307 commit bf30852
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 11 deletions.
1 change: 0 additions & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ jobs:
- name: copy tutorial files to docs
run: |
cp -r $GITHUB_WORKSPACE/tutorial $GITHUB_WORKSPACE/docs/
cp -r $GITHUB_WORKSPACE/specsscan/config $GITHUB_WORKSPACE/docs/specsscan/
mkdir $GITHUB_WORKSPACE/docs/tests
cp -r $GITHUB_WORKSPACE/tests/data $GITHUB_WORKSPACE/docs/tests/
Expand Down
27 changes: 24 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def _get_project_meta():
with open("../pyproject.toml") as pyproject:
file_contents = pyproject.read()

return tomlkit.parse(file_contents)["tool"]["poetry"]
return tomlkit.parse(file_contents)["project"]


pkg_meta = _get_project_meta()
Expand Down Expand Up @@ -89,15 +89,36 @@ def _get_project_meta():
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "**.ipynb_checkpoints"]

Check warning on line 92 in docs/conf.py

View workflow job for this annotation

GitHub Actions / lint

Unknown word (ipynb)


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "sphinx_rtd_theme"
html_theme = "pydata_sphinx_theme"

Check warning on line 100 in docs/conf.py

View workflow job for this annotation

GitHub Actions / lint

Unknown word (pydata)

html_theme_options = {
"github_url": "https://github.com/OpenCOMPES/specsanalyzer",
"primary_sidebar_end": ["indices.html"],
"navbar_center": ["version-switcher", "navbar-nav"],
"show_nav_level": 2,
"show_version_warning_banner": True,
# maybe better to use _static/switcher.json on github pages link instead of the following
"switcher": {
"json_url": "https://raw.githubusercontent.com/OpenCOMPES/docs/main/specsanalyzer/switcher.json",
"version_match": version,
},
"content_footer_items": ["last-updated"],
}

html_context = {
"github_user": "OpenCOMPES",
"github_repo": "specsanalyzer",
"github_version": "main",
"doc_path": "docs",
}

# 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 Down
6 changes: 3 additions & 3 deletions docs/specsanalyzer/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ API
Default specsanalyzer configuration settings
***************************************************

.. literalinclude:: ../../specsanalyzer/config/default.yaml
.. literalinclude:: ../../src/specsanalyzer/config/default.yaml
:language: yaml

Default specsscan configuration settings
***************************************************

.. literalinclude:: ../../specsscan/config/default.yaml
.. literalinclude:: ../../src/specsscan/config/default.yaml
:language: yaml

Example configuration file for the trARPES setup at FHI-Berlin
*********************************************************************************

.. literalinclude:: ../../specsscan/config/example_config_FHI.yaml
.. literalinclude:: ../../src/specsscan/config/example_config_FHI.yaml
:language: yaml
8 changes: 4 additions & 4 deletions src/specsanalyzer/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,10 +495,10 @@ def crop_tool(
)

def update(hline, vline, v_vals):
lineh1.set_ydata(hline[0])
lineh2.set_ydata(hline[1])
linev1.set_xdata(vline[0])
linev2.set_xdata(vline[1])
lineh1.set_ydata([hline[0]])
lineh2.set_ydata([hline[1]])
linev1.set_xdata([vline[0]])
linev2.set_xdata([vline[1]])
mesh_obj.set_clim(vmin=v_vals[0], vmax=v_vals[1])
fig.canvas.draw_idle()

Expand Down

0 comments on commit bf30852

Please sign in to comment.