Skip to content

Commit 2b049cb

Browse files
committed
link updates and workflows
1 parent a90d854 commit 2b049cb

File tree

8 files changed

+112
-3
lines changed

8 files changed

+112
-3
lines changed

.github/CODEOWNERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
2+
3+
# GLOBAL CODEOWNERS ---
4+
# These owners will be the default owners for everything in
5+
# the repo. Unless a later match takes precedence,
6+
# they will be requested for review when someone opens a pull request.
7+
* @pylhc/approved-reviewers

.github/workflows/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Continous Integration Workflows
2+
3+
This package implements different workflows for CI, based on our organisation's common workflows.
4+
They are organised as follows.
5+
6+
### Documentation
7+
8+
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).
9+
10+
### Testing Suite
11+
12+
Tests are ensured in the `tests` workflow, which triggers on all pushes.
13+
It runs on a matrix of all supported operating systems for all supported Python versions.
14+
15+
### Test Coverage
16+
17+
Test coverage is calculated in the `coverage` wokflow, which triggers on pushes to `master` and any push to a `pull request`.
18+
It reports the coverage results of the test suite to `CodeClimate`.
19+
20+
### Regular Testing
21+
22+
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.
23+
It also runs on `Python 3.x` so that newly released Python versions that would break tests are automatically included.
24+
25+
### Publishing
26+
27+
Publishing to `PyPI` is done through the `publish` workflow, which triggers anytime a `release` is made of the GitHub repository.
28+
It builds a `wheel`, checks it, and pushes to `PyPI` if checks are successful.

.github/workflows/coverage.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Runs all tests and pushes coverage report to codeclimate
2+
name: Coverage
3+
4+
on: # Runs on all push events to master branch and any push related to a pull request
5+
push:
6+
branches:
7+
- master
8+
pull_request: # so that codeclimate gets coverage and reports on the diff
9+
10+
jobs:
11+
coverage:
12+
uses: pylhc/.github/.github/workflows/coverage.yml@master
13+
with:
14+
src-dir: pylhc_submitter
15+
secrets: inherit

.github/workflows/cron.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Runs all tests on master on Mondays at 3 am (UTC time)
2+
name: Cron Testing
3+
4+
5+
on:
6+
schedule:
7+
- cron: '* 3 * * mon'
8+
9+
jobs:
10+
tests:
11+
uses: pylhc/.github/.github/workflows/cron.yml@master
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Build documentation
2+
# The build is uploaded as artifact if the triggering event is a push for a pull request
3+
# The build is published to github pages if the triggering event is a push to the master branch (PR merge)
4+
name: Build and upload documentation
5+
6+
on: # Runs on any push event in a PR or any push event to master
7+
pull_request:
8+
push:
9+
branches:
10+
- 'master'
11+
12+
jobs:
13+
documentation:
14+
uses: pylhc/.github/.github/workflows/documentation.yml@master

.github/workflows/publish.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Publishes to PyPI upon creation of a release
2+
name: Upload Package to PyPI
3+
4+
on: # Runs everytime a release is added to the repository
5+
release:
6+
types: [created]
7+
8+
jobs:
9+
deploy:
10+
uses: pylhc/.github/.github/workflows/publish.yml@master
11+
secrets: inherit

.github/workflows/tests.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Runs all tests
2+
name: All Tests
3+
4+
defaults:
5+
run:
6+
shell: bash
7+
8+
on: # Runs on any push event to any branch except master (the coverage workflow takes care of that)
9+
push:
10+
branches-ignore:
11+
- 'master'
12+
13+
jobs:
14+
tests:
15+
uses: pylhc/.github/.github/workflows/tests.yml@master
16+
with:
17+
pytest-options: -m "not example"
18+
19+
examples:
20+
needs: tests
21+
uses: pylhc/.github/.github/workflows/tests.yml@master
22+
with:
23+
pytest-options: -m "example"

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,15 @@ A lot of details about the individual steps can be found in the examples.
8282
### 2022 Commissioning Example
8383

8484
An example for the 2022 commissioning measurements can be found in
85-
[`examples/2022_commissioning.py`](https://github.com/pylhc/ir_amplitude_detuning/blob/master/examples/commissioning_2022.py).
85+
[`examples/commissioning_2022.py`](https://github.com/pylhc/ir_amplitude_detuning/blob/master/examples/commissioning_2022.py).
8686
This example is the most basic one and implements only a single `Target`:
8787

8888
- Target 1: Correcting the detuning change between full crossing scheme enabled and flat orbit (a single `TargetData`).
8989

9090
### 2018 MD3311 Example
9191

9292
A slightly more complex example for the 2018 MD3311 measurements can be found in
93-
[`examples/2018_md3311.py`](https://github.com/pylhc/ir_amplitude_detuning/blob/master/examples/md3311_2018.py).
93+
[`examples/md3311.py`](https://github.com/pylhc/ir_amplitude_detuning/blob/master/examples/md3311.py).
9494
Here, three different TArgets are defined:
9595

9696
- Target 1: Correcting the detuning change between full crossing scheme enabled and flat orbit.
@@ -99,7 +99,7 @@ Here, three different TArgets are defined:
9999

100100
### 2022 MD6863 Example
101101

102-
In the example [`examples/2022_md6863.py`](https://github.com/pylhc/ir_amplitude_detuning/blob/master/examples/md6863_2022.py),
102+
In the example [`examples/md6863.py`](https://github.com/pylhc/ir_amplitude_detuning/blob/master/examples/md6863.py),
103103
the measurements from MD6863 in 2022 are directly loaded from the analysed detuning output files from `omc3`,
104104
which makes already the first step more complex in code and requires a well defined naming scheme for the files.
105105

0 commit comments

Comments
 (0)