Skip to content

Commit ad7861e

Browse files
authored
Workflows and doc fixes (#417)
1 parent 0bc5d41 commit ad7861e

21 files changed

+132
-58
lines changed

.github/workflows/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# Continous Integration Workflows
1+
# Continuous Integration Workflows
22

33
This package implements different workflows for CI.
4-
They are organised as follows.
4+
They are organized as follows.
55

66
### Documentation
77

@@ -12,12 +12,12 @@ It runs on `ubuntu-latest` and one of our supported version, currently `Python 3
1212

1313
Tests are ensured in the `tests` workflow, in two stages.
1414
The first stage runs our simple tests on all push events (except to `master`), and the second one runs the rest of the testing suite (the `extended` tests).
15-
Tests run on a matrix of all supported operating systems (ubuntu-20.04, ubuntu-22.04,windows-latest and macos-latest) for all supported Python versions (currently `3.8`, `3.9`, `3.10` and `3.11`).
15+
Tests run on a matrix of all supported operating systems (`ubuntu-20.04`, `ubuntu-22.04`, `windows-latest` and `macos-latest`) for all supported Python versions (currently `3.8` to `3.11`).
1616

1717
### Test Coverage
1818

19-
Test coverage is calculated in the `coverage` wokflow, which triggers on pushes to `master` and any push to a `pull request`.
20-
It runs on `ubuntu-latest` and one of our supported version, currently `Python 3.9`, and reports the coverage results of the test suite to `CodeClimate`.
19+
Test coverage is calculated in the `coverage` workflow, which triggers on pushes to `master` and any push to a `pull request`.
20+
It runs on `ubuntu-latest` and `Python 3.9`, and reports the coverage results of the test suite to `CodeClimate`.
2121

2222
### Regular Testing
2323

@@ -26,5 +26,5 @@ It also runs on `Python 3.x` so that newly released Python versions that would b
2626

2727
### Publishing
2828

29-
Publishing to `PyPI` is done through the `publish` workflow, which triggers anytime a `release` is made of the Github repository.
29+
Publishing to `PyPI` is done through the `publish` workflow, which triggers anytime a `release` is made of the GitHub repository.
3030
It builds a `wheel`, checks it, and pushes to `PyPI` if checks are successful.

.github/workflows/coverage.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ jobs:
3030
cache: 'pip'
3131
cache-dependency-path: '**/setup.py'
3232

33-
- name: Get full Python version
34-
id: full-python-version
35-
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
36-
3733
- name: Upgrade pip, setuptools and wheel
3834
run: python -m pip install --upgrade pip setuptools wheel
3935

.github/workflows/cron.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ jobs:
2929
cache: 'pip'
3030
cache-dependency-path: '**/setup.py'
3131

32-
- name: Get full Python version
33-
id: full-python-version
34-
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
35-
3632
- name: Upgrade pip, setuptools and wheel
3733
run: python -m pip install --upgrade pip setuptools wheel
3834

.github/workflows/documentation.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ jobs:
3232
cache: 'pip'
3333
cache-dependency-path: '**/setup.py'
3434

35-
- name: Get full Python version
36-
id: full-python-version
37-
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
38-
3935
- name: Upgrade pip, setuptools and wheel
4036
run: python -m pip install --upgrade pip setuptools wheel
4137

.github/workflows/publish.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ jobs:
2929
cache: 'pip'
3030
cache-dependency-path: '**/setup.py'
3131

32-
- name: Get full Python version
33-
id: full-python-version
34-
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
35-
3632
- name: Upgrade pip, setuptools, wheel, build and twine
3733
run: python -m pip install --upgrade pip setuptools wheel build twine
3834

.github/workflows/tests.yml

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -22,38 +22,20 @@ jobs:
2222
python-version: [3.8, 3.9, "3.10", "3.11"]
2323

2424
steps:
25-
- uses: actions/checkout@v2
25+
- uses: actions/checkout@v3
2626

2727
- name: Set up Python ${{ matrix.python-version }}
28-
uses: actions/setup-python@v2
28+
uses: actions/setup-python@v4
2929
with:
3030
python-version: ${{ matrix.python-version }}
31-
32-
- name: Get full Python version
33-
id: full-python-version
34-
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
35-
36-
- name: Get pip cache dir # requires pip >= 20.1
37-
id: pip-cache
38-
run: |
39-
echo "::set-output name=dir::$(pip cache dir)"
40-
41-
- name: Set up cache
42-
uses: actions/cache@v2
43-
id: cache
44-
with:
45-
path: ${{ steps.pip-cache.outputs.dir }}
46-
key: ${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-pip-${{ hashFiles('**/setup.py') }}
47-
restore-keys: |
48-
${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-pip-
31+
cache: 'pip'
32+
cache-dependency-path: '**/setup.py'
4933

5034
- name: Upgrade pip, setuptools and wheel
51-
run: |
52-
python -m pip install --upgrade pip
53-
pip install setuptools wheel
35+
run: python -m pip install --upgrade pip setuptools wheel
5436

5537
- name: Install package
56-
run: pip install '.[test]'
38+
run: python -m pip install '.[test]'
5739

5840
- name: Run Basic Tests
5941
run: python -m pytest -m "not extended and not cern_network"
@@ -78,10 +60,6 @@ jobs:
7860
cache: 'pip'
7961
cache-dependency-path: '**/setup.py'
8062

81-
- name: Get full Python version
82-
id: full-python-version
83-
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
84-
8563
- name: Upgrade pip, setuptools and wheel
8664
run: python -m pip install --upgrade pip setuptools wheel
8765

doc/entrypoints/analysis.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@ Analysis
33

44
.. automodule:: omc3.hole_in_one
55
:members:
6+
:noindex:
7+
68

79
.. automodule:: omc3.amplitude_detuning_analysis
810
:members:
11+
:noindex:
12+
913

1014
.. automodule:: omc3.run_kmod
1115
:members:
16+
:noindex:
17+

doc/entrypoints/correction.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@ Correction
33

44
.. automodule:: omc3.global_correction
55
:members:
6+
:noindex:
7+
68

79
.. automodule:: omc3.response_creator
810
:members:
11+
:noindex:
12+
913

1014
.. automodule:: omc3.check_corrections
1115
:members:
16+
:noindex:
17+

doc/entrypoints/other.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,20 @@ Other
33

44
.. automodule:: omc3.tbt_converter
55
:members:
6+
:noindex:
7+
68

79
.. automodule:: omc3.model_creator
810
:members:
11+
:noindex:
12+
913

1014
.. automodule:: omc3.knob_extractor
1115
:members:
16+
:noindex:
17+
1218

1319
.. automodule:: omc3.madx_wrapper
1420
:members:
21+
:noindex:
22+

doc/entrypoints/plotting.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,30 @@ Plotting
33

44
.. automodule:: omc3.plotting.plot_optics_measurements
55
:members:
6+
:noindex:
7+
68

79
.. automodule:: omc3.plotting.plot_tfs
810
:members:
11+
:noindex:
12+
913

1014
.. automodule:: omc3.plotting.plot_spectrum
1115
:members:
16+
:noindex:
17+
1218

1319
.. automodule:: omc3.plotting.plot_checked_corrections
1420
:members:
21+
:noindex:
22+
1523

1624
.. automodule:: omc3.plotting.plot_amplitude_detuning
1725
:members:
26+
:noindex:
27+
1828

1929
.. automodule:: omc3.plotting.plot_bbq
2030
:members:
31+
:noindex:
32+

0 commit comments

Comments
 (0)