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

Release v0.6.0 #19

Merged
merged 39 commits into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
db26c67
Split easyApp content to Gui and Logic
AndrewSazonov May 14, 2021
555fec9
Add rich text to table header
AndrewSazonov May 17, 2021
fd0f454
Change check for updates button text
AndrewSazonov May 17, 2021
b4d7890
Add new release date property
AndrewSazonov May 17, 2021
8b3a3e1
Fix disabled combo box color
AndrewSazonov May 17, 2021
dc9c1f0
Update preferences dialog style
AndrewSazonov May 17, 2021
d2cfa77
Fix preferences dialog height
AndrewSazonov May 17, 2021
2aee597
Fix path to MaintenanceTool for Linux and Windows
AndrewSazonov May 19, 2021
f83b97c
Bump version to 0.1.0
AndrewSazonov May 19, 2021
51bdeb9
Minor refactoring
AndrewSazonov May 19, 2021
5127191
Fix changelog path
AndrewSazonov May 19, 2021
48dc9d3
Fix check on app start label
AndrewSazonov May 28, 2021
74efdb1
Add nunito font
AndrewSazonov Jun 4, 2021
6751f2a
Store app preferences tabs as global vars
AndrewSazonov Jun 4, 2021
2291067
Fixed dependencies after refactoring
rozyczko Jun 16, 2021
7d705b5
Add support for iconified names in fitting constraints
AndrewSazonov Jun 28, 2021
7e8bcaa
Fix ComboBox Label padding
AndrewSazonov Jun 28, 2021
e49751d
Merge branch 'develop' into subproxies
rozyczko Jul 1, 2021
9f7e00d
Remove vertical insets for ComboBox
AndrewSazonov Aug 17, 2021
98ea7b4
Merge pull request #2 from easyScience/subproxies
rozyczko Aug 17, 2021
3fdf942
Set elide middle to be default for the TableViewLabel
AndrewSazonov Aug 25, 2021
40c71a3
Fix vertical spacing on the preferences window
AndrewSazonov Sep 14, 2021
4fc05ba
Define 3rd line for Bokeh charts, showing current phase profile
rozyczko Nov 19, 2021
9bf9704
Add multiple phases support to the analysis chart
AndrewSazonov Dec 7, 2021
a7841dc
Add support for the multiple HKL sets
AndrewSazonov Dec 8, 2021
7e2c94d
Replaced GNU license with BSD-3.
rozyczko Feb 2, 2022
bbb4bc0
Update license description
rozyczko Feb 2, 2022
d432f71
update license copyright year
rozyczko Feb 3, 2022
695bfbc
Expand python versions and add RichText (#4)
arm61 May 31, 2022
edfbcab
Fixing a typo (#5)
arm61 Jun 1, 2022
39e5ec4
Merge branch 'master' into develop
rozyczko Jul 28, 2022
8647def
dicttoxml -> XMLSerializer
rozyczko Nov 23, 2022
327dea3
Plotly (#9)
AndrewSazonov Dec 8, 2022
f50891f
Add another Plotly example: 2D Heatmap
Dec 8, 2022
e047727
Merge pull request #11 from easyScience/io_serialize
rozyczko Mar 28, 2023
3363aeb
Update pyproject.toml
AndrewSazonov Jul 17, 2024
deaae0c
New interface (#18)
AndrewSazonov Sep 2, 2024
8986fae
Update release info
AndrewSazonov Sep 2, 2024
2de487e
Merge branch 'master' into develop
AndrewSazonov Sep 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
106 changes: 106 additions & 0 deletions .github/workflows/wasm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: wasm

on:
push:
#schedule:
# - cron: '*/120 8-18 * * *' # every 2 hours from 8:00 to 18:00 every day

jobs:
wasm-build: # the first job
# current job matrix. if modified, remember to UPDATE the strategy in the next job
strategy:
fail-fast: false
matrix:
os: [macos-14]

runs-on: ${{ matrix.os }}

timeout-minutes: 30

steps: # job steps
- name: Check-out repository
uses: actions/checkout@v4

- name: Cache emsdk
id: cache-emsdk
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/emsdk
key: ${{ runner.os }}-emsdk

- name: Install emsdk
if: steps.cache-emsdk.outputs.cache-hit != 'true'
shell: bash
run: |
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
git pull
./emsdk install 3.1.50 # this version is needed for Qt 6.7
./emsdk activate 3.1.50
- name: Cache Qt
id: cache-qt
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/Qt
key: ${{ runner.os }}-qt

- name: Install Qt for WebAssembly
if: steps.cache-qt.outputs.cache-hit != 'true'
shell: bash
run: |
curl -L -O https://download.qt.io/official_releases/online_installers/qt-unified-mac-x64-online.dmg
chmod u+x qt-unified-mac-x64-online.dmg
hdiutil attach qt-unified-mac-x64-online.dmg
/Volumes/qt-online-installer-macOS-x64-4.8.0/qt-online-installer-macOS-x64-4.8.0.app/Contents/MacOS/qt-online-installer-macOS-x64-4.8.0 \
--email ${{ secrets.QT_ACCOUNT_EMAIL }} \
--pw ${{ secrets.QT_ACCOUNT_PASSWORD }} \
--root ${{ github.workspace }}/Qt \
--accept-licenses \
--accept-obligations \
--default-answer \
--confirm-command \
install qt.qt6.672.wasm_singlethread qt.qt6.672.qt5compat
hdiutil detach /Volumes/qt-online-installer-macOS-x64-4.8.0
- name: Print some debug info
shell: bash
run: |
source ${{ github.workspace }}/emsdk/emsdk_env.sh
em++ --version
export PATH=$PATH:${{ github.workspace }}/Qt/6.7.2/wasm_singlethread/bin
qmake -v
- name: Build WASM from BasicC++ example
shell: bash
run: |
source ${{ github.workspace }}/emsdk/emsdk_env.sh
export PATH=$PATH:${{ github.workspace }}/Qt/6.7.2/wasm_singlethread/bin
cd examples/BasicC++/src
qmake BasicC++.pro -spec wasm-emscripten
make -j
- name: Copy the built WASM to the build/wasm folder
shell: bash
run: |
mkdir -p build/wasm
cp examples/BasicC++/src/*.wasm build/wasm
cp examples/BasicC++/src/*.html build/wasm
cp examples/BasicC++/src/*.js build/wasm
cp examples/BasicC++/src/*.svg build/wasm
- name: Upload the zipped wasm folder
uses: actions/upload-artifact@v4
with:
name: wasm # name of the zip file to be created and uploaded
path: build/wasm # directory whose content is to be zipped
compression-level: 0 # no compression
if-no-files-found: error

- name: Push the built wasm to the webapp branch
uses: s0/git-publish-subdir-action@develop
env:
GITHUB_TOKEN: ${{ secrets.GH_API_PERSONAL_ACESS_TOKEN }}
REPO: self
BRANCH: webapp
FOLDER: build/wasm # directory whose content is to be pushed
20 changes: 15 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
# QtCreator
# Qt Creator
*.autosave

# QtCreator Qml
# Qt Creator Qml
*.qmlproject.user
*.qmlproject.user.*

# QtCreator Python
# Qt Creator Python
*.pyproject.user
*.pyproject.user.*

# QtCreator CMake
# Qt Creator C++
*.pro.user
*.pro.user.*

# Qt Creator CMake
CMakeLists.txt.user*

# VS Code
.vscode/

# PyCharm
.idea/

# Fortran
fort.1

Expand Down Expand Up @@ -41,6 +51,6 @@ build
..*
*.log
*.zip
settings.ini*
temp.cif
.ci/
.idea/
39 changes: 39 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python Debugger: Current File",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"env": {
"PYTHONPATH": "${cwd}/src"
}
},
{
"name": "Python Debugger: BasicPy",
"type": "debugpy",
"request": "launch",
"program": "${cwd}/examples/BasicPy/src/BasicPy/main.py",
"console": "integratedTerminal",
},
{
"name": "Python Debugger: IntermediatePy",
"type": "debugpy",
"request": "launch",
"program": "${cwd}/examples/IntermediatePy/src/IntermediatePy/main.py",
"console": "integratedTerminal",
},
{
"name": "Python Debugger: AdvancedPy",
"type": "debugpy",
"request": "launch",
"program": "${cwd}/examples/AdvancedPy/src/AdvancedPy/main.py",
"console": "integratedTerminal",
}
]
}
1 change: 0 additions & 1 deletion CHANGELOG.md

This file was deleted.

1 change: 0 additions & 1 deletion CONTRIBUTING.md

This file was deleted.

139 changes: 139 additions & 0 deletions EXAMPLES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
## Types of examples

Different types of examples are given here. All examples have a graphical frontend implemented in QML, but differ in the way the backend logic is implemented and the runtime used to run them. These examples can be categorised as shown in the following table:

| Example | Type | Frontend | Backend | Runtime |
| -------------- | ---- | -------- | -------- | -------------------- |
| BasicQml | I | QML | Mock QML | `qml` tool |
| BasicPy | II | QML | Mock QML | `python` interpreter |
| IntermediatePy | III | QML | Python | `python` interpreter |
| AdvancedPy | III | QML | Python | `python` interpreter |
| BasicC++ | IV | QML | Mock QML | need to be compiled |

## Setting up Python and IDE

### Python environment

* Create and activate a python environment (_optional_)

***macOS and Linux***

```
python3.11 -m venv .venv
source .venv/bin/activate
```

***Windows***

```
python3.11 -m venv .venv
.venv\Scripts\activate
```

* Upgrade PIP, the package installer for Python (_optional_)

```
pip install --upgrade pip
```

* Install the Qt for Python `PySide6` package using PIP

```
pip install --force-reinstall "PySide6>=6.6,<6.7"
```

### Integrated development environment (IDE)

#### Qt Creator

Qt Creator is a prefered IDE for developing the GUI in QML. It allows to run QML code in debug mode with breakpoints, preview changes to QML code in live mode, has build in documentation for QML modules, has QML code auto-completion, and more unique feature related to the QML code.

* Download Qt Online Installer from [qt.io](https://www.qt.io/download-qt-installer-oss). More info at [doc.qt.io](https://doc.qt.io/qt-6/qt-online-installation.html).
* Install Qt for desktop development using a custom installation that includes the following components:
* Qt
* [ ] Qt 6.7.z
* [x] Desktop (***macOS***) or MSVC 2019 64-bit (***Windows***)
* [x] Qt 5 Compatibility Module
* [x] Qt Shader Tools
* [ ] Additional Libraries
* [x] Qt Charts
* [ ] Developer and Designer Tools
* [x] Qt Creator x.y.z

#### VS Code (_alternative to Qt Creator_)

VS Code is an alternative IDE to Qt Creator. It has a syntax highlighting plugin for QML code, but lacks some of the unique features of Qt Creator mentioned above to make QML development easier.

* Download an install VS Code
* Add the python extension
* The initial launch configuration is in the `.vscode/launch.json` file, which should be automatically read by VS Code
* Select any python file in the repo and choose the desired python environment

## How to run

### Type I Examples: BasicQml (QML runtime with QML backend)

This example is located in `examples/BasicQml` and the source code is in the subfolder `src/BasicQml`. The example consists of a graphical QML frontend (`Gui/Application.qml`) and a QML backend (`Logic/Mock/BackendProxy.qml`). It is considered a mock backend as it only returns hardcoded values rather than providing the required functionality. The entry point for Qt is `main.qml`, which can be displayed using Qt `qml` viewer.

#### Run using the QML Runtime

##### Run via the Qt Creator IDE

* Run Qt Creator
* Open the qml project file from the example folder `examples/BasicQml/src/BasicQml.qmlproject`
* Click Run (Green play button)

#### How to edit GUI elements in live mode

* In Qt Creator, select the `*.qml` file to be edited in live mode
* Click the `Design` button at the top of the left sidebar of `Qt Creator`
* _Note: If this button is disabled, find and click `About plugins...` in the `Qt Creator` menu, scroll down to the `Qt Quick` section and enable `QmlDesigner`._
* In the `Design` window, click the `Show Live Preview` button in the top panel of the application (small play button in a circle).
* _Note: Showing the entire `main.qml` application window in live mode works best when the open `main.qml` is moved to another monitor and does not overlap with the `Qt Creator` window_.
* When the desired GUI component appears, you can click the `Edit` button at the top of the left sidebar of `Qt Creator` to return to the source code of that qml component and still see it live in a separate window.

### Type II Examples: BasicPy (Python runtime with QML backend)

This example is in the `examples/BasicPy` folder, and the source code is in the `examples/BasicPy/src/BasicPy` folder. This example serves to demonstrate how an application with a QML frontend and QML backend (similar to the Type I example) can be run from Python. The entry point for the Python application is the `main.py` file. To run it, follow the steps below:

#### Run using the Python interpreter

##### Run from the terminal

* Go to the example folder, e.g.,

```sh
$ cd examples/BasicPy/src/BasicPy
```
* Run using Python (provided that the required python environment is activated as explained above)

```sh
$ python main.py
```

##### Run via the Qt Creator IDE (_alternative to run from the terminal_)

* Run Qt Creator
* Open the python project file from the example folder `examples/BasicPy/src/BasicPy.pyproject`
* Select the desired python environment with the Qt `PySide6` module installed
* Click Run (Green play button)

##### Run via the VS Code IDE (_alternative to run from the terminal or via the Qt Creator IDE_)

* Open the repo in VS Code
* Click on the debug extension and select which example to execute
![Debug dropdown window](resources/images/vscode_debug.jpg)

### Type III Examples: IntermediatePy and AdvancedPy (Python runtime with Python backend)

These examples demonstrate how to use the Python runtime to run the QML GUI binded with the Python backend located in `Backends/real_backend.py`. These examples can be run through Python in the same way as Type II described above. In these examples, the Python-based backend is registered in `main.py` and then imported into QML. The Qt QML GUI then accesses the backend by calling the properties and methods of the classes defined in the `Backends/real_py` folder.

#### Possible Issues

* If in Qt Creator some components are highlighted and marked as "Unknown component. (M300)", try resetting via "Tools > QML/JS > Reset Code Model".

### Type IV Examples: BasicC++ (QML backend)

This example can be run after compilation into an executable program. It only has a mock backend in QML (the C++ backend is not implemented). The minimum configuration requires a base `main.cpp` file and, if Qt Creator is used as the IDE, a `*.pro` file.

This example is currently used to create a WebAssembly application that can be run inside a web browser.
2 changes: 1 addition & 1 deletion LICENSE.md → LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2021-2022, European Spallation Source
Copyright (c) 2024, EasyApp contributors (https://github.com/easyscience/EasyApp).
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,23 @@
<img src="https://github.com/EasyScience/EasyApp/blob/examples/resources/images/ea_logo.svg?raw=true" height="65">

EasyApp is a collection of Qt QML graphical components which allows one to quickly create cross-platform applications with an eye-catching and intuitive graphical interface based on the [EasyScience](http://github.com/EasyScience) framework.

* Website: https://app.easyscience.software
* Source code: https://github.com/EasyScience/EasyApp
* Bug reports: https://github.com/EasyScience/EasyApp/issues

EasyApp is currently being used as the basis for the graphical interface in the following projects:

* [EasyDiffraction](http://github.com/EasyScience/EasyDiffraction)
* [EasyReflectometry](http://github.com/EasyScience/EasyReflectometry)
* [EasyTexture](http://github.com/EasyScience/EasyTextureApp)

More simple examples of how to use EasyApp are described in [EXAMPLES.md](https://github.com/EasyScience/EasyApp/blob/master/EXAMPLES.md) and presented in the project [examples](https://github.com/EasyScience/EasyApp/tree/master/examples) directory:

* [BasicQml](https://github.com/EasyScience/EasyApp/tree/master/examples/BasicQml)
* [BasicPy](https://github.com/EasyScience/EasyApp/tree/master/examples/BasicPy)
* [BasicC++](https://github.com/EasyScience/EasyApp/tree/master/examples/BasicC++)
* [IntermediatePy](https://github.com/EasyScience/EasyApp/tree/master/examples/IntermediatePy)
* [AdvancedPy](https://github.com/EasyScience/EasyApp/tree/master/examples/AdvancedPy)

If you want to see what EasyApp looks like, you can try the web demo based on the [BasicC++](https://github.com/EasyScience/EasyApp/tree/master/examples/BasicC++) example at https://easyscience.github.io/EasyApp/BasicC++.html.
Empty file removed docs/UserManual/description.txt
Empty file.
Loading
Loading