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

Rename tool everywhere #7

Merged
merged 12 commits into from
Dec 2, 2024
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,14 @@ jobs:
channels: conda-forge,defaults
use-mamba: true
environment-file: environment.yml
activate-environment: hyspecplanningtools_dev
- name: build conda package
run: |
# set up environment
cd conda.recipe
echo "versioningit $(versioningit ../)"
# build the package
VERSION=$(versioningit ../) conda mambabuild --channel conda-forge --output-folder . .
conda verify noarch/hyspecplanningtools*.tar.bz2
conda verify noarch/hyspecppt*.tar.bz2
- name: upload conda package to anaconda
shell: bash -l {0}
if: startsWith(github.ref, 'refs/tags/v')
Expand All @@ -41,7 +40,7 @@ jobs:
CONDA_LABEL="main"
if [ "${IS_RC}" = "true" ]; then CONDA_LABEL="rc"; fi
echo pushing ${{ github.ref }} with label $CONDA_LABEL
anaconda upload --label $CONDA_LABEL conda.recipe/noarch/hyspecplanningtools*.tar.bz2
anaconda upload --label $CONDA_LABEL conda.recipe/noarch/hyspecppt*.tar.bz2

pypi-publish:
name: upload release to PyPI
Expand All @@ -60,7 +59,6 @@ jobs:
channels: conda-forge,defaults
use-mamba: true
environment-file: environment.yml
activate-environment: hyspecplanningtools_dev
- name: build pypi package
run: |
# build the package
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
run: |
# test that the python wheel builds
VERSION=$(versioningit .) python -m build --wheel --no-isolation
twine check dist/hyspecplanningtools-*.whl
twine check dist/hyspecppt-*.whl
- name: build conda package
run: |
# test that the conda package builds
Expand All @@ -52,4 +52,4 @@ jobs:
# below to build the conda package in your local machine
CHANNELS="--channel conda-forge"
VERSION=$(versioningit ../) conda mambabuild $CHANNELS --output-folder . .
conda verify noarch/hyspecplanningtools*.tar.bz2
conda verify noarch/hyspecppt*.tar.bz2
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ share/python-wheels/
*.egg
MANIFEST
_version.py

conda.recipe/
!conda.recipe/meta.yaml
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
Expand Down
7 changes: 6 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@ build:
tools:
python: "mambaforge-22.9"

python:
install:
- method: pip
path: .

sphinx:
builder: html
configuration: docs/conf.py
configuration: docs/source/conf.py
fail_on_warning: true

conda:
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

HyspecPlanningTools
=====================
Hyspecppt
==========

Polarization tool for Single Crystal and Powder
Tool that enables users to analyze polarized neutron experiments on powder and single crystal samples using the HYSPEC instrument.

## Installation Process

Expand All @@ -12,16 +12,16 @@ Create the development conda environment

Activate the environment

`conda activate hyspecplanningtools_dev`
`conda activate hyspecppt_dev`

Install the application in editable mode

`pip install -e .`

Start the tool

`hyspecplanningtools`
`hyspecppt`


[![CI](https://github.com/neutrons/HyspecPlanningTools/actions/workflows/unittest.yml/badge.svg?branch=next)](https://github.com/neutrons/HyspecPlanningTools/actions/workflows/unittest.yml)
[![codecov](https://codecov.io/gh/neutrons/HyspecPlanningTools/graph/badge.svg?token=GAQE3SS0HJ)](https://codecov.io/gh/neutrons/HyspecPlanningTools)
[![CI](https://github.com/neutrons/hyspecppt/actions/workflows/unittest.yml/badge.svg?branch=next)](https://github.com/neutrons/hyspecppt/actions/workflows/unittest.yml)
[![codecov](https://codecov.io/gh/neutrons/hyspecppt/graph/badge.svg?token=GAQE3SS0HJ)](https://codecov.io/gh/neutrons/hyspecppt)
2 changes: 1 addition & 1 deletion conda.recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
{% set build_number = 0 %}

package:
name: hyspecplanningtools
name: hyspecppt
version: {{ version_number }}

source:
Expand Down
70 changes: 0 additions & 70 deletions docs/conf.py

This file was deleted.

2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "Hyspecplanningtools"
project = "Hyspecppt"
copyright = "2024, ORNL" # noqa A001
author = "ORNL"
# version = versioningit.get_version("../../")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
.. _polmodel:
.. _hyspecpptclasses:

Design
=======
Model-View-Presenter
=====================



PPT Model
-------------------
HyspecPPT Model
----------------

.. mermaid::

classDiagram
PPTModel <|-- SingleCrystalModel
PPTModel <|-- PowderModel
HyspecPPTModel <|-- SingleCrystalModel
HyspecPPTModel <|-- PowderModel


class PPTModel{
class HyspecPPTModel{
<<Abstract>>
+Double incident_energy_e
+Double detector_tank_angle_s
Expand All @@ -24,6 +24,8 @@ PPT Model
+Double mod_q
+Option graph_type
+calculate_graph_data()
+get_model_data()
+store_data()

}

Expand All @@ -38,6 +40,7 @@ PPT Model
+String single_crystal_k
+String single_crystal_l
+calculate_qmod()
+get_single_crystal_data()
}

class PowderModel{
Expand All @@ -46,15 +49,15 @@ PPT Model



PPT View
-------------------
HyspecPPT View
---------------

.. mermaid::

classDiagram
PPTWindow "1" -->"1" SingleCrystalParameters
HyspecPPTView "1" -->"1" SingleCrystalParameters

class PPTWindow{
class HyspecPPTView{
-Signal~str~:error_message_signal
-Signal~str~:update

Expand All @@ -78,7 +81,8 @@ PPT View
+send_error_message()
-show_error_message()
//+QStatusBar:status_bar
+update_plot()
+get_stored_data()
+store_data_and_update_plot()
+show_hide_cystal_parameters()
+validate_delta_ei()
}
Expand Down Expand Up @@ -109,26 +113,26 @@ PPT View
}


PPT Presenter
-----------------------
HyspecPPT Presenter
--------------------

.. mermaid::

classDiagram
PPTPresenter "1" -->"1" PPTModel
PPTPresenter "1" -->"1" PPTWindow
HyspecPPTPresenter "1" -->"1" HyspecPPTModel
HyspecPPTPresenter "1" -->"1" HyspecPPTView

class PPTPresenter{
-PPTModel:model
-PPTWindow:view
class HyspecPPTPresenter{
-HyspecPPTModel:model
-HyspecPPTView:view
+update_plot()
+update_qmod()
}

class PPTModel{
<from above>
class HyspecPPTModel{
#from above
}

class PPTWindow{
<from above>
class HyspecPPTView{
#from above
}
Loading