Skip to content
Merged
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
8 changes: 8 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners

# GLOBAL CODEOWNERS ---
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# they will be requested for review when someone opens a pull request.
* @pylhc/approved-reviewers
* @Mael-Le-Garrec
28 changes: 28 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Continous Integration Workflows

This package implements different workflows for CI.
They are organised as follows.

### Documentation

The `documentation` workflow triggers on any push to master, builds the documentation and pushes it to the `gh-pages` branch (if the build is successful).

### Testing Suite

Tests are ensured in the `tests` workflow, which triggers on all pushes.
It runs on a matrix of all supported operating systems for all supported Python versions.

### Test Coverage

Test coverage is calculated in the `coverage` wokflow, which triggers on pushes to `master` and any push to a `pull request`.
It reports the coverage results of the test suite to `CodeClimate`.

### Regular Testing

A `cron` workflow triggers every Monday at 3am (UTC time) and runs the full testing suite, on all available operating systems and supported Python versions.
It also runs on `Python 3.x` so that newly released Python versions that would break tests are automatically included.

### Publishing

Publishing to `PyPI` is done through the `publish` workflow, which triggers anytime a `release` is made of the Github repository.
It builds a `wheel`, checks it, and pushes to `PyPI` if checks are successful.
16 changes: 16 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Runs all tests and pushes coverage report to codeclimate
name: Coverage

on: # Runs on all push events to master branch and any push related to a pull request
push:
branches:
- master
pull_request: # so that codeclimate gets coverage and reports on the diff

jobs:
coverage:
if: false # disabled for now
uses: pylhc/.github/.github/workflows/coverage.yml@master
with:
src-dir: omc3_gui
secrets: inherit
12 changes: 12 additions & 0 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Runs all tests on master on Mondays at 3 am (UTC time)
name: Cron Testing


on:
schedule:
- cron: '* 3 * * mon'

jobs:
tests:
if: false # disabled for now
uses: pylhc/.github/.github/workflows/cron.yml@master
14 changes: 14 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Build documentation
# The build is uploaded as artifact if the triggering event is a push for a pull request
# The build is published to github pages if the triggering event is a push to the master branch (PR merge)
name: Build and upload documentation

on: # Runs on any push event in a PR or any push event to master
pull_request:
push:
branches:
- 'master'

jobs:
documentation:
uses: pylhc/.github/.github/workflows/documentation.yml@master
11 changes: 11 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Publishes to PyPI upon creation of a release
name: Upload Package to PyPI

on: # Runs everytime a release is added to the repository
release:
types: [created]

jobs:
deploy:
uses: pylhc/.github/.github/workflows/publish.yml@master
secrets: inherit
16 changes: 16 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Runs all tests
name: All Tests

defaults:
run:
shell: bash

on: # Runs on any push event to any branch except master (the coverage workflow takes care of that)
push:
branches-ignore:
- 'master'

jobs:
tests:
if: false # disabled for now
uses: pylhc/.github/.github/workflows/tests.yml@master
210 changes: 210 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
# Originally created by .ignore support plugin (hsz.mobi)

### Python template
# Byte-compiled / optimized / DLL files
__pycache__/
*pycache*
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# 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.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx build directory and sphinx-gallery generated documents
docs/_build/
doc/_build/
doc_build/
.doc_build
.doc_build/
.docs/gallery
.docs/gallery/
.docs/gen_modules
.docs/gen_modules/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints/

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version


# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
site/

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff

# *.iml
# *.ipr

# CMake
cmake-build-*/

# File-based project format
*.iws

# IntelliJ
.idea/
out/
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

### macOS template
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### JupyterNotebooks template
# gitignore template for Jupyter Notebooks
# website: http://jupyter.org/

.ipynb_checkpoints
*/.ipynb_checkpoints/*

# Remove previous ipynb_checkpoints
# git rm -r .ipynb_checkpoints/
#

# VSCode
.vscode
.vscode/

# Neovim
.nvimlog
*.swap

### OMC Users
# files for testing things (jdilly convention)
tst_*
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ variables:
# The PY_VERSION and ACC_PY_BASE_IMAGE_TAG variables control the default Python and Acc-Py versions used by Acc-Py jobs.
# It is recommended to keep the two values consistent.
# More details https://acc-py.web.cern.ch/gitlab-mono/acc-co/devops/python/acc-py-gitlab-ci-templates/docs/templates/master/generated/v2.html#global-variables.
PY_VERSION: '3.7'
ACC_PY_BASE_IMAGE_TAG: '2020.11'
PY_VERSION: '3.11'
ACC_PY_BASE_IMAGE_TAG: '2023.06'


# Build a source distribution for chroma-gui.
Expand Down
15 changes: 15 additions & 0 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"creators": [
{
"name": "OMC-Team",
"affiliation": "CERN"
},
{
"name": "Maël Le Garrec",
"affiliation": "CERN",
"orcid": "0000-0002-8146-2340"
}
],
"title": "Chroma-GUI",
"description": "A GUI to compute and display chromaticity measurements"
}
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
# Non-Linear Chromaticity GUI

The Chromaticity GUI is a tool to compute non-linear chromaticity via
measurements done in the CCC.
The Chromaticity GUI is a tool to compute non-linear chromaticity via measurements done in the CCC.

# Running

## Running via acc-py environment

* [Create a virtual environment via `acc-py`](https://pylhc.github.io/packages/development/howto_venv.html) if you do not have one already.
* Install the package via `pip install chroma-gui[cern]` or `pip install chroma-gui[all]`
* Run the GUI via `python -m chroma_gui`

## Running via acc-py apps

Be sure to have the `/acc` directory mounted, which can be done via:

Expand All @@ -18,10 +24,11 @@ source /acc/local/share/python/acc-py/base/pro/setup.sh
acc-py app run chroma-gui
```
# Deployment
### Deployment via acc-py
* Change the version in [__init__.py](./chroma_gui/__init__.py)
* Update the [CHANGELOG](./CHANGELOG.md)
* Commit changes to gitlab repository (wait for CI to finish)
```bash
alias acc-py="/acc/local/share/python/acc-py/apps/acc-py-cli/pro/bin/acc-py"
Expand Down
Loading