Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs #61

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/Docs4NIST.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: "Build Documentation"

on: [push, pull_request, delete]

jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: usnistgov/[email protected]
with:
docs-folder: docs/
formats: |-
epub
pdf
pre-build-command: 'pip install -e .'
pip-requirements: 'requirements-all.txt'
3 changes: 2 additions & 1 deletion AFL/automation/instrument/CDSAXSLabview.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ def measureTransmission(self,exp=5,fn='trans',set_empty_transmission=False,retur



'''with (LabviewConnection() if lv is None else lv) as lv:
'''
with (LabviewConnection() if lv is None else lv) as lv:
self.status_txt = 'Moving beamstop out for transmission...'
self.moveAxis(self.config['nmc_beamstop_out'],block=True,lv=lv)
self.moveAxis(self.config['nmc_sample_out'],block=True,lv=lv)
Expand Down
2 changes: 1 addition & 1 deletion AFL/automation/instrument/PySpecClient.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import numpy as np
import numpy as np
from pyspec.client.SpecConnection import SpecConnection
from pyspec.client.SpecCounter import SpecCounter
from pyspec.client.SpecConnectionsManager import SpecConnectionsManager
Expand Down
7 changes: 0 additions & 7 deletions AFL/automation/instrument/deprecated/CHESSFMBInstrument.py

This file was deleted.

8 changes: 0 additions & 8 deletions AFL/automation/instrument/deprecated/EPICSDevice.py

This file was deleted.

9 changes: 0 additions & 9 deletions AFL/automation/instrument/deprecated/RSpecSocketDevice.py

This file was deleted.

2 changes: 1 addition & 1 deletion dev
Submodule dev updated from 6c2960 to 51659c
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
6 changes: 6 additions & 0 deletions docs/source/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
API
===

.. autosummary::
:toctree: generated
:recursive:
39 changes: 39 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

import os
import sys
sys.path.insert(0, os.path.abspath('../..')) # Source code dir relative to this file


project = 'AFL-automation'
copyright = 'Contribution of the US Government. Not subject to copyright in the United States.'
author = 'NIST AFL Team'



# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
'sphinx.ext.duration',
'sphinx.ext.doctest',
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
]

templates_path = ['_templates']
exclude_patterns = []



# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'alabaster'
html_static_path = ['_static']
31 changes: 31 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.. AFL-automation documentation master file, created by
sphinx-quickstart on Tue May 28 13:58:39 2024.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

Welcome to AFL-automation's documentation!
==========================================

AFL-automation is a framework for instrument control. It powers the NIST AFL, but is more useful than that. It enables the easy conversion of Python classes - drivers - into robust HTTP microservices with authentication, task queueing, UI generation, data management, and more.



.. toctree::
:maxdepth: 2
:caption: Contents:



.. autosummary::
:toctree: _autosummary
:template: custom-module-template.rst
:recursive:

AFL.automation

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
42 changes: 42 additions & 0 deletions requirements-all.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
alphashape==1.3.1
bokeh==3.5.1
fabio==2024.4.0
Flask==2.2.5
Flask_Cors==4.0.1
Flask_JWT_Extended==4.6.0
gpflow==2.9.2
h5py==3.11.0
ipython==8.26.0
ipywidgets==8.1.3
matplotlib==3.9.1.post1
nice==1.1
numpy<2
opentrons==7.5.0
pandas==2.2.2
paramiko==3.4.0
periodictable==1.7.1
Pillow==10.4.0
Pint==0.24.3
plotly==5.23.0
pyFAI==2024.5.0
pyparsing==3.1.2
pyserial==3.5
certif-pyspec<1.4
pytest
Requests==2.32.3
sans==1.2.3
sasdata
sasmodels
scikit_learn==1.5.1
scipy==1.14.0
seabreeze==2.9.2
setuptools==72.1.0
Shapely==2.0.5
six==1.16.0
scikit-image
tensorflow==2.17.0
tiled==0.1.0b6
tqdm==4.66.5
Werkzeug==3.0.3
xarray==2024.7.0
zeroconf==0.132.2
Loading