Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
gadfort committed Nov 6, 2023
1 parent fbaf68c commit 93d2eb8
Show file tree
Hide file tree
Showing 8 changed files with 81 additions and 18 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Documentation
on:
# Runs on all pushes to branches
push:
# Runs on all PRs
pull_request:
# Manual Dispatch
workflow_dispatch:

jobs:
docs:
name: Build docs

runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v3

- name: Install Requirements
run: |
python3 -m pip install --upgrade pip
python3 -m pip install .[docs]
- name: Build HTML
run: |
cd docs
make html
- name: Save HTML
uses: actions/upload-artifact@v3
with:
name: html
path: docs/_build/html
retention-days: 7
5 changes: 4 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@
templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

html_css_files = [
'custom.css',
]
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'alabaster'
html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']
2 changes: 0 additions & 2 deletions docs/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ scgallery

scgallery
designs
rules
report
7 changes: 0 additions & 7 deletions docs/report.rst

This file was deleted.

7 changes: 0 additions & 7 deletions docs/rules.rst

This file was deleted.

16 changes: 16 additions & 0 deletions docs/scgallery.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,19 @@ scgallery package
.. automodule:: scgallery.gallery
:members:
:undoc-members:

reports
-----------------

.. automodule:: scgallery.report
:members:
:undoc-members:
:show-inheritance:

rules
-----------------

.. automodule:: scgallery.rules
:members:
:undoc-members:
:show-inheritance:
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ dev = [
"pytest-xdist"
]
docs = [
"sphinx"
"sphinx",
"sphinx-rtd-theme"
]

[project.urls]
Expand Down
24 changes: 24 additions & 0 deletions scgallery/gallery.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,12 @@ def get_designs(self):

#######################################################
def set_remote(self, remote):
'''
Set the path to the remote credentials file.
Parameters:
remote (str): path to the credentials
'''
if remote:
remote = os.path.abspath(remote)
if not os.path.isfile(remote):
Expand All @@ -157,12 +163,24 @@ def set_remote(self, remote):

@property
def is_remote(self):
'''
Determine if the gallery is set to run remotely
Returns:
boolean: True, if running remotely, False if not
'''
if self.__remote:
return True
return False

#######################################################
def set_resume(self, resume):
'''
Set if the gallery should resume a previous run.
Parameters:
resume (boolean): Flag to indicate if resume should be used
'''
if resume:
resume = True
else:
Expand All @@ -171,6 +189,12 @@ def set_resume(self, resume):

@property
def is_resume(self):
'''
Determine if the gallery is set to resume a previous run
Returns:
boolean: True, if resuming, False if not
'''
return self.__resume

#######################################################
Expand Down

0 comments on commit 93d2eb8

Please sign in to comment.