From 5b86274cad95a893e39301c4ac23805c2d95c8c4 Mon Sep 17 00:00:00 2001 From: Javier Gonzalez Date: Tue, 15 Sep 2020 18:58:13 -0400 Subject: [PATCH 1/6] using ska-theme --- docs/conf.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index cc85dd68..81108455 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -108,7 +108,12 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'default' +html_theme = 'bootstrap-ska' +html_theme_options = { +logotext1: 'Ska!' , +logotext2: 'Kadi', +logotext3: '', +} # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the From 6721dc615dd6eab706f2e5d1eeca9d7a2fd28d73 Mon Sep 17 00:00:00 2001 From: Javier Gonzalez Date: Tue, 15 Sep 2020 19:03:57 -0400 Subject: [PATCH 2/6] using ska-theme (fixup) --- docs/conf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 81108455..8f5f9aae 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -110,9 +110,9 @@ # a list of builtin themes. html_theme = 'bootstrap-ska' html_theme_options = { -logotext1: 'Ska!' , -logotext2: 'Kadi', -logotext3: '', + 'logotext1': 'Ska!' , + 'logotext2': 'Kadi', + 'logotext3': '', } # Theme options are theme-specific and customize the look and feel of a theme From 4ed7d6a3efb4915e543d098eecde1e3b50f71bd4 Mon Sep 17 00:00:00 2001 From: Javier Gonzalez Date: Tue, 15 Sep 2020 19:07:09 -0400 Subject: [PATCH 3/6] replace obsolete pngmath with imgmath --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 8f5f9aae..50bea9d4 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -30,7 +30,7 @@ # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', - 'sphinx.ext.pngmath', + 'sphinx.ext.imgmath', 'sphinx.ext.viewcode'] try: From b94e38110f4a6c0422f7034ad7333c4cda5177d1 Mon Sep 17 00:00:00 2001 From: Javier Gonzalez Date: Tue, 22 Sep 2020 17:19:37 -0400 Subject: [PATCH 4/6] added link to tool_doc page on cxc --- docs/conf.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index 50bea9d4..f13cefd9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -113,6 +113,9 @@ 'logotext1': 'Ska!' , 'logotext2': 'Kadi', 'logotext3': '', + 'homepage_url': 'https://cxc.cfa.harvard.edu/mta/ASPECT/tool_doc', + 'homepage_text': 'ska', + 'homepage_text_2': 'tools' } # Theme options are theme-specific and customize the look and feel of a theme From 2e37e2b4345db5ea90c35d77297ce11bb30dfd40 Mon Sep 17 00:00:00 2001 From: Javier Gonzalez Date: Tue, 29 Sep 2020 14:25:43 -0400 Subject: [PATCH 5/6] trivial change in docs. When using doctest block, the double-colon is not required. --- kadi/commands/states.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kadi/commands/states.py b/kadi/commands/states.py index 631280a4..a4a49f95 100644 --- a/kadi/commands/states.py +++ b/kadi/commands/states.py @@ -924,7 +924,7 @@ def decode_power(mnem): Decode number of chips and feps from a ACIS power command Return a dictionary with the number of chips and their identifiers - Example:: + Example: >>> decode_power("WSPOW08F3E") {'ccd_count': 5, From dff88fd8cf1be0bdc1c03d8c24b312f5748689c3 Mon Sep 17 00:00:00 2001 From: Javier Gonzalez Date: Tue, 29 Sep 2020 16:23:42 -0400 Subject: [PATCH 6/6] added workflow for docs --- .github/workflows/docs.yml | 49 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..0af50794 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,49 @@ +--- +name: Deploy Docs +on: + release: + types: + - created + repository_dispatch: + types: + - build-docs + +jobs: + build-linux: + runs-on: head + name: Deploy Docs + steps: + - name: Fetch gh-pages + uses: actions/checkout@v2 + with: + path: gh-pages + ref: gh-pages + - name: Fetch source + uses: actions/checkout@v2 + with: + path: source + - name: clear + run: rm -fr gh-pages/docs/* + - name: build + run: | + eval "$(/export/jgonzale/github-workflows/miniconda3-shiny/bin/conda shell.bash hook)" + conda activate ska3-masters + mkdir -p _static + make html + working-directory: source/docs + env: + PYTHONPATH: ${{ github.workspace }}/source + GITHUB_API_TOKEN: ${{ secrets.CHANDRA_XRAY_TOKEN }} + - name: copy + run: cp -fr source/docs/_build/html/* gh-pages/docs + - name: Commit changes + uses: EndBug/add-and-commit@v4 + with: + ref: "gh-pages" + cwd: "gh-pages" + author_name: Javier Gonzalez + author_email: javierggt@yahoo.com + message: "Deploy docs" + add: "docs" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}