Skip to content

Commit

Permalink
inital setup
Browse files Browse the repository at this point in the history
  • Loading branch information
JoschD committed Jun 20, 2023
1 parent f71b334 commit ba0b946
Show file tree
Hide file tree
Showing 23 changed files with 1,619 additions and 2 deletions.
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.
15 changes: 15 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# 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:
uses: pylhc/.github/.github/workflows/coverage.yml@master
with:
src-dir: omc3_gui
secrets: inherit
11 changes: 11 additions & 0 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Runs all tests on master on Mondays at 3 am (UTC time)
name: Cron Testing


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

jobs:
tests:
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
15 changes: 15 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# 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:
uses: pylhc/.github/.github/workflows/tests.yml@master
250 changes: 250 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,250 @@
# Created by .ignore support plugin (hsz.mobi)
### Python template
# Byte-compiled / optimized / DLL files
__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 documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints/

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# 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
.idea/*
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# File-based project format
*.iws

# 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/

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

# VSCode
.vscode
.vscode/

# Neovim
.nvimlog

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

doc_build/
pyproject.toml*~
*.eps
*.ps
*.log
*.pyc
*.gz
*.swp
*.tmp
*.bak
*.orig
\#*\#
.hypothesis*
.pydevproject
.vscode
.idea/
.project
.cache
/doc/_build/*
*pycache*
43 changes: 43 additions & 0 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"creators": [
{
"name": "OMC-Team",
"affiliation": "CERN"
},
{
"name": "Joschua Dilly",
"affiliation": "CERN",
"orcid": "0000-0001-7864-5448"
},
{
"name": "Felix Soubelet",
"affiliation": "University of Liverpool & CERN",
"orcid": "0000-0001-8012-1440"
},
{
"name": "Andreas Wegscheider",
"affiliation": "CERN"
},
{
"name": "Jaime Maria Coello De Portugal - Martinez Vazquez",
"affiliation": "CERN",
"orcid": "0000-0002-6899-3809"
},
{
"name": "Maël Le Garrec",
"affiliation": "CERN",
"orcid": "0000-0002-8146-2340"
},
{
"name": "Tobias Persson",
"affiliation": "CERN"
},
{
"name": "Rogelio Tomas Garcia",
"affiliation": "CERN",
"orcid": "0000-0002-9857-1703"
}
],
"title": "OMC3-GUI",
"description": "Python 3 GUI wrapper for the ``omc3`` package. It allows to perform beam optics measurements and corrections in circular particle accelerators."
}
Loading

0 comments on commit ba0b946

Please sign in to comment.