diff --git a/.github/workflows/documentation-build.yml b/.github/workflows/documentation-build.yml
new file mode 100644
index 00000000..34d0e5d7
--- /dev/null
+++ b/.github/workflows/documentation-build.yml
@@ -0,0 +1,51 @@
+# This pipeline
+# - builds developer documentation
+# - pushes documentation to gh-pages branch of the same repository
+#
+# Deployment is handled by pages-build-deployment bot
+#
+# For more information see: https://docs.github.com/en/pages/getting-started-with-github-pages
+
+name: Build Documentation and Push to gh-pages Branch
+
+# Controls when the workflow will run
+on:
+ # Triggers the workflow on tag creation
+ push:
+ tags:
+ - 'v*'
+
+ # Allows you to run this workflow manually from the Actions tab
+ workflow_dispatch:
+
+# A workflow run is made up of one or more jobs that can run sequentially or in parallel
+jobs:
+ # This workflow contains a single job called "build"
+ build_documentation:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@master
+ with:
+ fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
+ - name: Upgrade pip
+ run: |
+ python -m pip install --upgrade pip
+ - name: Set up Python
+ uses: actions/setup-python@v5
+ with:
+ python-version: 3.11
+ - name: Install Pandoc, repo and dependencies
+ run: |
+ sudo apt install pandoc
+ pip install . '.[docs]'
+ - name: Build and Commit
+ uses: sphinx-notes/pages@master
+ with:
+ install_requirements: true
+ documentation_path: docs/src
+ - name: Push changes
+ uses: ad-m/github-push-action@master
+ continue-on-error: true
+ with:
+ branch: gh-pages
diff --git a/.gitignore b/.gitignore
index 73ae4b5e..60af99fa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -46,7 +46,7 @@ settings.ini*
.ci/
.idea/
.vscode/
-ci/
+
#Snap
*.snap
diff --git a/docs/Makefile b/docs/Makefile
index 0766adbf..b7913396 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -5,7 +5,7 @@
SPHINXOPTS =
SPHINXBUILD = python -msphinx
SPHINXPROJ = EasyReflectometry
-SOURCEDIR = .
+SOURCEDIR = ./src
BUILDDIR = _build
# Put it first so that "make" without argument is like "make help".
diff --git a/docs/adrs.rst b/docs/adrs.rst
deleted file mode 100644
index 1f2264ad..00000000
--- a/docs/adrs.rst
+++ /dev/null
@@ -1,16 +0,0 @@
-.. highlight:: shell
-
-====
-ADRs
-====
-
-Throughout the development, there have been a couple of architectural decisions that we `record`_ here.
-This will likely grow in future and comments on these are welcome (via a `Github issue`_).
-
-.. toctree::
- :maxdepth: 1
-
- adrs/adr0001
-
-.. _record: https://adr.github.io
-.. _Github issue: https://github.com/easyScience/EasyReflectometryApp/issues/new
diff --git a/docs/make.bat b/docs/make.bat
index 6e253da8..85009c8b 100644
--- a/docs/make.bat
+++ b/docs/make.bat
@@ -7,7 +7,7 @@ REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=python -msphinx
)
-set SOURCEDIR=.
+set SOURCEDIR=./src
set BUILDDIR=_build
set SPHINXPROJ=orsopy
diff --git a/docs/_static/favicon.ico b/docs/src/_static/favicon.ico
similarity index 100%
rename from docs/_static/favicon.ico
rename to docs/src/_static/favicon.ico
diff --git a/docs/adrs.md b/docs/src/adrs.md
similarity index 100%
rename from docs/adrs.md
rename to docs/src/adrs.md
diff --git a/docs/adrs/adr0001.md b/docs/src/adrs/adr0001.md
similarity index 100%
rename from docs/adrs/adr0001.md
rename to docs/src/adrs/adr0001.md
diff --git a/docs/adrs/adr0001.rst b/docs/src/adrs/adr0001.rst
similarity index 100%
rename from docs/adrs/adr0001.rst
rename to docs/src/adrs/adr0001.rst
diff --git a/docs/adrs/adr0002.rst b/docs/src/adrs/adr0002.rst
similarity index 100%
rename from docs/adrs/adr0002.rst
rename to docs/src/adrs/adr0002.rst
diff --git a/docs/adrs/adr0003.rst b/docs/src/adrs/adr0003.rst
similarity index 100%
rename from docs/adrs/adr0003.rst
rename to docs/src/adrs/adr0003.rst
diff --git a/docs/build.md b/docs/src/build.md
similarity index 96%
rename from docs/build.md
rename to docs/src/build.md
index da34ee65..1dc340ac 100644
--- a/docs/build.md
+++ b/docs/src/build.md
@@ -18,13 +18,13 @@ $ cd ../
Then, to that you are working with your local version of `EasyReflectometryLib`, you want to change line 35 of the `EasyReflectometryApp` `pyproject.toml` file from
```toml
-'EasyReflectometryLib @ git+https://github.com/easyScience/EasyReflectometryLib.git@develop',
+'EasyReflectometryLib @ git+https://github.com/easyScience/EasyReflectometryLib.git@develop'
```
to use the directory where you have cloned `EasyReflectometryLib`, i.e.
```toml
-'EasyReflectometryLib @ file:///path/to/EasyReflectometryLib',
+'EasyReflectometryLib @ file:///path/to/EasyReflectometryLib'
```
With this modification in place, you should then be able to install `EasyReflectometryApp`
diff --git a/docs/ci.md b/docs/src/ci.md
similarity index 100%
rename from docs/ci.md
rename to docs/src/ci.md
diff --git a/docs/ci/build.md b/docs/src/ci/build.md
similarity index 90%
rename from docs/ci/build.md
rename to docs/src/ci/build.md
index c29f4aa7..a7a15536 100644
--- a/docs/ci/build.md
+++ b/docs/src/ci/build.md
@@ -4,7 +4,7 @@ The aim of building the application and library is to create an accessible, eith
## `EasyReflectometryLib`
-Based on [ADR0002](./adrs/adr0002), the only expected method of installation for the Python library is via PyPI (or some other `pip` compatible approach).
+Based on [ADR0002](./../adrs/adr0002.rst), the only expected method of installation for the Python library is via PyPI (or some other `pip` compatible approach).
Therefore, the building of `EasyReflectometryLib` is achieved through relatively standard Github actions for pushing built Python modules to PyPI.
This is achieved though common approaches, discussed in [this PyPA documentation](https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/), specifically the Github action defined in the [`python-publish.yml` workflow](https://github.com/easyScience/EasyReflectometryLib/blob/main/.github/workflows/python-publish.yml).
@@ -24,7 +24,7 @@ This action performs the following steps:
2. A series of environment variables are set, mostly related to the git state at the time. These are used in the built app to give extra information regarding provenence.
3. The application bundle is then created and the installers are produced using [PyInstaller](https://pyinstaller.org/en/stable/).
4. These are installed on the build machines and the application is launched (and then quit), to test if the build is at least in part successful.
-5. The installers are then made available for [testing](#testing) as Github artifacts of the action.
+5. The installers are then made available for :ref:`testing` as Github artifacts of the action.
6. If the build is happening on the `master` branch, the installer is also added to a release.
### Testing
diff --git a/docs/conf.py b/docs/src/conf.py
old mode 100755
new mode 100644
similarity index 99%
rename from docs/conf.py
rename to docs/src/conf.py
index 37f591ba..3c7f8b60
--- a/docs/conf.py
+++ b/docs/src/conf.py
@@ -53,9 +53,9 @@
# the built documents.
#
# The short X.Y version.
-version = '0.0.1'
+version = '1.0.0'
# The full version, including alpha/beta/rc tags.
-release = '0.0.1'
+release = '1.0.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
diff --git a/docs/index.md b/docs/src/index.md
similarity index 98%
rename from docs/index.md
rename to docs/src/index.md
index 3be29a38..7b1a708f 100644
--- a/docs/index.md
+++ b/docs/src/index.md
@@ -9,7 +9,7 @@ Therefore, this will be where information for developers will be found, such as
---
hidden: True
---
-
+tutorial
build
adrs
ci
diff --git a/docs/tutorials/getting-started.md b/docs/src/tutorial.md
similarity index 77%
rename from docs/tutorials/getting-started.md
rename to docs/src/tutorial.md
index 9b2af885..e0695e7c 100644
--- a/docs/tutorials/getting-started.md
+++ b/docs/src/tutorial.md
@@ -5,7 +5,7 @@ Version: 1.0.0
## Home page
When opening up the EasyRecletometryApp you are presented with the **Home** page.
-
+
- **A**: Starts your project.
- **B**: Pop-up window with source information.
@@ -15,7 +15,7 @@ When opening up the EasyRecletometryApp you are presented with the **Home** page
Pressing **A** will direct you to the **Project** page.
-
+
- **1**: Create a new project as a folder containing experiments and a JSON file for settings.
- New projects need a name, description and set the save location.
@@ -30,8 +30,20 @@ This project is used going forward to explain the app.
## Save and settings
When a project is started two further buttons is visualised, and settings is the opposite corner of those.
-
+
- **A**: Save project.
- **B**: Reset to start.
- **C**: Setting, is further explained in settings.
+
+```{toctree}
+---
+maxdepth: 1
+---
+
+tutorials/model_def.md
+tutorials/load_data.md
+tutorials/simple_fitting.md
+tutorials/settings.md
+
+```
\ No newline at end of file
diff --git a/docs/tutorials/_images/anal_adv.png b/docs/src/tutorials/_images/anal_adv.png
similarity index 100%
rename from docs/tutorials/_images/anal_adv.png
rename to docs/src/tutorials/_images/anal_adv.png
diff --git a/docs/tutorials/_images/anal_bsc.png b/docs/src/tutorials/_images/anal_bsc.png
similarity index 100%
rename from docs/tutorials/_images/anal_bsc.png
rename to docs/src/tutorials/_images/anal_bsc.png
diff --git a/docs/tutorials/_images/exp_data.png b/docs/src/tutorials/_images/exp_data.png
similarity index 100%
rename from docs/tutorials/_images/exp_data.png
rename to docs/src/tutorials/_images/exp_data.png
diff --git a/docs/tutorials/_images/exp_load.png b/docs/src/tutorials/_images/exp_load.png
similarity index 100%
rename from docs/tutorials/_images/exp_load.png
rename to docs/src/tutorials/_images/exp_load.png
diff --git a/docs/tutorials/_images/home.png b/docs/src/tutorials/_images/home.png
similarity index 100%
rename from docs/tutorials/_images/home.png
rename to docs/src/tutorials/_images/home.png
diff --git a/docs/tutorials/_images/polymer_film.png b/docs/src/tutorials/_images/polymer_film.png
similarity index 100%
rename from docs/tutorials/_images/polymer_film.png
rename to docs/src/tutorials/_images/polymer_film.png
diff --git a/docs/tutorials/_images/polymer_film.svg b/docs/src/tutorials/_images/polymer_film.svg
similarity index 100%
rename from docs/tutorials/_images/polymer_film.svg
rename to docs/src/tutorials/_images/polymer_film.svg
diff --git a/docs/tutorials/_images/project.png b/docs/src/tutorials/_images/project.png
similarity index 100%
rename from docs/tutorials/_images/project.png
rename to docs/src/tutorials/_images/project.png
diff --git a/docs/tutorials/_images/sample_adv.png b/docs/src/tutorials/_images/sample_adv.png
similarity index 100%
rename from docs/tutorials/_images/sample_adv.png
rename to docs/src/tutorials/_images/sample_adv.png
diff --git a/docs/tutorials/_images/sample_layer.png b/docs/src/tutorials/_images/sample_layer.png
similarity index 100%
rename from docs/tutorials/_images/sample_layer.png
rename to docs/src/tutorials/_images/sample_layer.png
diff --git a/docs/tutorials/_images/sample_material.png b/docs/src/tutorials/_images/sample_material.png
similarity index 100%
rename from docs/tutorials/_images/sample_material.png
rename to docs/src/tutorials/_images/sample_material.png
diff --git a/docs/tutorials/_images/sample_model.png b/docs/src/tutorials/_images/sample_model.png
similarity index 100%
rename from docs/tutorials/_images/sample_model.png
rename to docs/src/tutorials/_images/sample_model.png
diff --git a/docs/tutorials/_images/sample_overview.png b/docs/src/tutorials/_images/sample_overview.png
similarity index 100%
rename from docs/tutorials/_images/sample_overview.png
rename to docs/src/tutorials/_images/sample_overview.png
diff --git a/docs/tutorials/_images/save_setting.png b/docs/src/tutorials/_images/save_setting.png
similarity index 100%
rename from docs/tutorials/_images/save_setting.png
rename to docs/src/tutorials/_images/save_setting.png
diff --git a/docs/tutorials/_images/setting_overview.png b/docs/src/tutorials/_images/setting_overview.png
similarity index 100%
rename from docs/tutorials/_images/setting_overview.png
rename to docs/src/tutorials/_images/setting_overview.png
diff --git a/docs/tutorials/data/load_data.md b/docs/src/tutorials/load_data.md
similarity index 84%
rename from docs/tutorials/data/load_data.md
rename to docs/src/tutorials/load_data.md
index 53c908d1..dfef8b39 100644
--- a/docs/tutorials/data/load_data.md
+++ b/docs/src/tutorials/load_data.md
@@ -3,14 +3,14 @@
Experimental data must be **.dat**, **.txt**, or **.ort** to be loaded into the EasyReflectometryApp.
Data is loaded in the `Experimental` page, by pressing the `Import experimental data`.
-
+
- **A**: Open your file manager to load data in the mentioned format.
## Instrumental parameters
When data is loaded, it is possible to change instrumental parameters that affect the data.
-
+
- **A**: Scale the data by the given value.
- **B**: Set the level where data merges into the experimental background.
diff --git a/docs/tutorials/models/model-def.md b/docs/src/tutorials/model_def.md
similarity index 88%
rename from docs/tutorials/models/model-def.md
rename to docs/src/tutorials/model_def.md
index 8b700ff2..23c8effb 100644
--- a/docs/tutorials/models/model-def.md
+++ b/docs/src/tutorials/model_def.md
@@ -3,7 +3,7 @@ When a project is initialised it is then possible to define material and set the
Let us first look at the general layout of the `Model` page, which is split up into two parts, the main window showing the graphs and the sidebar being the control panel for variables and data.
-
+
- **A**: Graph change between the Reflectivity- and Scattering Length Density (SLD) curve.
- **B**: Graph control of ledger, visible coordinates on hower, zoom and pan control, and reset.
@@ -14,7 +14,7 @@ Let us first look at the general layout of the `Model` page, which is split up i
To construct a model in the app, first, you add the materials that will compose the layers in `Material Editor`.
The materials are added by the real and imaginary components of the scattering length density (in units of 10-6Å-2) and given a name for the material.
-
+
- **A**: For adding more material.
- **B**: Duplicating the last clicked material.
@@ -23,7 +23,7 @@ The materials are added by the real and imaginary components of the scattering l
### Model creation and editing
For creating new models, the `Models selector` tab is used, and then for setting the assemblies in the model the `Model editor` is used.
-
+
- **A**: Renaming model.
- **B**: Removing the specific model.
@@ -37,7 +37,7 @@ For creating new models, the `Models selector` tab is used, and then for setting
Then for editing the assemblies in the model, the `Layer editor` is used.
By clicking an assembly, the `Layer editor` is specified and changes can be made to that assembly.
-
+
- **A**: Pick the desired assembly to modify.
- **1**: Choose a material from materials in the `Material Editor`.
@@ -46,7 +46,7 @@ By clicking an assembly, the `Layer editor` is specified and changes can be made
## Advanced controls
In the advanced controls, it is possible to apply a specific Q-range of interest and sample constraints on the model.
-
+
- **A**: Setting min. Q value of interest.
- **B**: Setting max. Q value of interest.
diff --git a/docs/tutorials/settings/settings.md b/docs/src/tutorials/settings.md
similarity index 78%
rename from docs/tutorials/settings/settings.md
rename to docs/src/tutorials/settings.md
index d55639a8..7e8b9477 100644
--- a/docs/tutorials/settings/settings.md
+++ b/docs/src/tutorials/settings.md
@@ -1,20 +1,20 @@
# Settings
The settings can be reached from all tabs by pressing the cogs icon the the top right corner.
-
+
In the settings menu, there are five tabs:
-#### Prompts
+## Prompts
Used for enabling/disabling tooltips.
-#### Updates
+## Updates
Allowing the app to check for updates when starting and force-checking for updates.
-#### Appearance
+## Appearance
Change the theme of the app between: Light, Dark and system mode.
-#### Experimental
+## Experimental
Setting the overall zoom level of icons and buttons, and changing the language of the app (to be implemented).
-#### Develop
+## Develop
Is for setting how the app will log errors.
diff --git a/docs/tutorials/fitting/simple_fitting.md b/docs/src/tutorials/simple_fitting.md
similarity index 88%
rename from docs/tutorials/fitting/simple_fitting.md
rename to docs/src/tutorials/simple_fitting.md
index a1324b76..28de12c5 100644
--- a/docs/tutorials/fitting/simple_fitting.md
+++ b/docs/src/tutorials/simple_fitting.md
@@ -6,13 +6,7 @@ The super-phase (where the neutrons are incident first) is a silicon (Si) wafer
Then a polymer film is attached to the silicon dioxide by some chemical method and this polymer film is solvated in heavy water (D2O) which also makes up the sub-phase of the system.
This is shown pictorially below, as a slab model.
-
-
+
- **A**: Picking the desired variable to use the slider for fine-tuning it.
- **B**: Able to change the specific variable.
@@ -32,7 +26,7 @@ The basic controls is for fitting the variables.
## Advanced controls
The advanced control is then for changing the calculation engine and setting the minimisation method.
-
+
- **A**: Changing the calculation engine between `refnx` and `refl1d`.