Skip to content

Commit c3d1b05

Browse files
ci(linting): add remaining linting and formatting checks (#301)
1 parent 381bdc7 commit c3d1b05

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+293
-151
lines changed

.editorconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_style = space
7+
insert_final_newline = true
8+
trim_trailing_whitespace=true
9+
10+
[*.{css,html,js,json,scss,yaml,yml}]
11+
indent_size = 2
12+
13+
[*.{py,sh}]
14+
indent_size = 4
15+
16+
[*.go]
17+
indent_style = tab

.github/workflows/ci.yml

Lines changed: 72 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,77 @@ jobs:
114114
pip install check-manifest
115115
./run-tests.sh --check-manifest
116116
117+
lint-jsonlint:
118+
runs-on: ubuntu-24.04
119+
steps:
120+
- name: Checkout
121+
uses: actions/checkout@v4
122+
123+
- name: Setup Node
124+
uses: actions/setup-node@v4
125+
126+
- name: Lint JSON files
127+
run: |
128+
npm install jsonlint --global
129+
./run-tests.sh --check-jsonlint
130+
131+
lint-markdownlint:
132+
runs-on: ubuntu-24.04
133+
steps:
134+
- name: Checkout
135+
uses: actions/checkout@v4
136+
137+
- name: Setup Node
138+
uses: actions/setup-node@v4
139+
140+
- name: Lint Markdown files
141+
run: |
142+
npm install markdownlint-cli2 --global
143+
./run-tests.sh --check-markdownlint
144+
145+
format-shfmt:
146+
runs-on: ubuntu-24.04
147+
steps:
148+
- name: Checkout
149+
uses: actions/checkout@v4
150+
151+
- name: Check shell script code formatting
152+
run: |
153+
sudo apt-get install shfmt
154+
./run-tests.sh --check-shfmt
155+
156+
format-prettier:
157+
runs-on: ubuntu-24.04
158+
steps:
159+
- name: Checkout
160+
uses: actions/checkout@v4
161+
162+
- name: Setup Node
163+
uses: actions/setup-node@v4
164+
165+
- name: Check Prettier code fomatting
166+
run: |
167+
npm install prettier --global
168+
./run-tests.sh --check-prettier
169+
170+
lint-yamllint:
171+
runs-on: ubuntu-24.04
172+
steps:
173+
- name: Checkout
174+
uses: actions/checkout@v4
175+
with:
176+
fetch-depth: 0
177+
178+
- name: Setup Python
179+
uses: actions/setup-python@v5
180+
with:
181+
python-version: "3.12"
182+
183+
- name: Lint YAML files
184+
run: |
185+
pip install yamllint
186+
./run-tests.sh --check-yamllint
187+
117188
docs-sphinx:
118189
runs-on: ubuntu-24.04
119190
steps:
@@ -186,8 +257,7 @@ jobs:
186257
release-docker:
187258
runs-on: ubuntu-24.04
188259
if: >
189-
vars.RELEASE_DOCKER == 'true' &&
190-
github.event_name == 'push' &&
260+
vars.RELEASE_DOCKER == 'true' && github.event_name == 'push' &&
191261
startsWith(github.ref, 'refs/tags/')
192262
needs:
193263
- docs-sphinx

.markdownlint.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Allow prompt dollar sign in console examples without showing output
2+
MD014: false
3+
# Allow multiple headings with same content (for different releases)
4+
MD024: false

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.pytest_cache
2+
CHANGELOG.md
3+
docs/openapi.json

.prettierrc.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
printWidth: 80
2+
proseWrap: always

.release-please-config.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@
55
".": {
66
"changelog-sections": [
77
{ "type": "build", "section": "Build", "hidden": false },
8-
{ "type": "feat", "section": "Features", "hidden": false },
8+
{ "type": "feat", "section": "Features", "hidden": false },
99
{ "type": "fix", "section": "Bug fixes", "hidden": false },
10-
{ "type": "perf", "section": "Performance improvements", "hidden": false },
10+
{
11+
"type": "perf",
12+
"section": "Performance improvements",
13+
"hidden": false
14+
},
1115
{ "type": "refactor", "section": "Code refactoring", "hidden": false },
1216
{ "type": "style", "section": "Code style", "hidden": false },
1317
{ "type": "test", "section": "Test suite", "hidden": false },

.yamllint.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
extends: default
2+
3+
rules:
4+
comments:
5+
min-spaces-from-content: 1
6+
document-start: disable
7+
line-length: disable
8+
truthy: disable

CHANGELOG.md

Lines changed: 48 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,35 @@
1+
<!-- markdownlint-disable MD013 -->
2+
13
# Changelog
24

35
## [0.9.4](https://github.com/reanahub/reana-workflow-engine-cwl/compare/0.9.3...0.9.4) (2024-11-29)
46

5-
67
### Build
78

89
* **docker:** pin setuptools 70 ([#287](https://github.com/reanahub/reana-workflow-engine-cwl/issues/287)) ([3c2cd8a](https://github.com/reanahub/reana-workflow-engine-cwl/commit/3c2cd8a474d167574bf8746b6430f4ae13a83e61))
910
* **python:** bump shared REANA packages as of 2024-11-28 ([#289](https://github.com/reanahub/reana-workflow-engine-cwl/issues/289)) ([f9d3688](https://github.com/reanahub/reana-workflow-engine-cwl/commit/f9d3688858e6f1ff52fa58fecd9ce233dd97b0e1))
1011

11-
1212
### Features
1313

1414
* **task:** allow Compute4PUNCH backend options ([#277](https://github.com/reanahub/reana-workflow-engine-cwl/issues/277)) ([9b2a3d0](https://github.com/reanahub/reana-workflow-engine-cwl/commit/9b2a3d0872329e79d0b2d9a0972b0c09f08ff694))
1515

1616
## [0.9.3](https://github.com/reanahub/reana-workflow-engine-cwl/compare/0.9.2...0.9.3) (2024-03-04)
1717

18-
1918
### Build
2019

2120
* **docker:** install correct extras of reana-commons submodule ([#261](https://github.com/reanahub/reana-workflow-engine-cwl/issues/261)) ([21957fe](https://github.com/reanahub/reana-workflow-engine-cwl/commit/21957fe41921d9c557067b2773205af6385f755b))
2221
* **docker:** non-editable submodules in "latest" mode ([#255](https://github.com/reanahub/reana-workflow-engine-cwl/issues/255)) ([a6acc88](https://github.com/reanahub/reana-workflow-engine-cwl/commit/a6acc888a36694e3306993cfc3108752b60bd1f3))
2322
* **python:** bump all required packages as of 2024-03-04 ([#267](https://github.com/reanahub/reana-workflow-engine-cwl/issues/267)) ([ed6a846](https://github.com/reanahub/reana-workflow-engine-cwl/commit/ed6a846eb1d8a0bf92f77906749b5853e5794114))
2423
* **python:** bump shared REANA packages as of 2024-03-04 ([#267](https://github.com/reanahub/reana-workflow-engine-cwl/issues/267)) ([47155ef](https://github.com/reanahub/reana-workflow-engine-cwl/commit/47155ef95c4eb19642dd54a732402b2551973658))
2524

26-
2725
### Bug fixes
2826

2927
* **progress:** handle stopped jobs ([#260](https://github.com/reanahub/reana-workflow-engine-cwl/issues/260)) ([bc36cb7](https://github.com/reanahub/reana-workflow-engine-cwl/commit/bc36cb7813a20fde685a40694af0732ded483d3a))
3028

31-
3229
### Code refactoring
3330

3431
* **docs:** move from reST to Markdown ([#263](https://github.com/reanahub/reana-workflow-engine-cwl/issues/263)) ([3cf272f](https://github.com/reanahub/reana-workflow-engine-cwl/commit/3cf272f657cc3e0b329c6d159f5e476f06000f93))
3532

36-
3733
### Continuous integration
3834

3935
* **commitlint:** addition of commit message linter ([#256](https://github.com/reanahub/reana-workflow-engine-cwl/issues/256)) ([021854e](https://github.com/reanahub/reana-workflow-engine-cwl/commit/021854e309999938cf01c31bda5ab095679e03b0))
@@ -43,119 +39,118 @@
4339
* **release-please:** update version in Dockerfile ([#259](https://github.com/reanahub/reana-workflow-engine-cwl/issues/259)) ([0961257](https://github.com/reanahub/reana-workflow-engine-cwl/commit/096125709172e6bea1510a9fd2fdcb90299fac8b))
4440
* **shellcheck:** fix exit code propagation ([#262](https://github.com/reanahub/reana-workflow-engine-cwl/issues/262)) ([6568b9b](https://github.com/reanahub/reana-workflow-engine-cwl/commit/6568b9b229141dd8dd2a261a833057358143590f))
4541

46-
4742
### Documentation
4843

4944
* **authors:** complete list of contributors ([#266](https://github.com/reanahub/reana-workflow-engine-cwl/issues/266)) ([2960cd9](https://github.com/reanahub/reana-workflow-engine-cwl/commit/2960cd9c06a8e12283822ec9fbf87aba7b9b9fb5))
5045
* **conformance-tests:** update CWL conformance test badges ([#264](https://github.com/reanahub/reana-workflow-engine-cwl/issues/264)) ([45afa2e](https://github.com/reanahub/reana-workflow-engine-cwl/commit/45afa2efd984fd84bbae48fde6ca663f70dd86dc))
5146

5247
## 0.9.2 (2023-12-12)
5348

54-
- Adds automated multi-platform container image building for amd64 and arm64 architectures.
55-
- Adds metadata labels to Dockerfile.
56-
- Fixes container image building on the arm64 architecture.
49+
* Adds automated multi-platform container image building for amd64 and arm64 architectures.
50+
* Adds metadata labels to Dockerfile.
51+
* Fixes container image building on the arm64 architecture.
5752

5853
## 0.9.1 (2023-09-27)
5954

60-
- Fixes container image names to be Podman-compatible.
55+
* Fixes container image names to be Podman-compatible.
6156

6257
## 0.9.0 (2023-01-19)
6358

64-
- Adds support for specifying `slurm_partition` and `slurm_time` for Slurm compute backend jobs.
65-
- Adds support for Kerberos authentication for workflow orchestration.
66-
- Adds support for Rucio authentication for workflow jobs.
67-
- Changes the base image of the component to Ubuntu 20.04 LTS and reduces final Docker image size by removing build-time dependencies.
68-
- Fixes status reporting for failed jobs that were incorrectly considered successful.
59+
* Adds support for specifying `slurm_partition` and `slurm_time` for Slurm compute backend jobs.
60+
* Adds support for Kerberos authentication for workflow orchestration.
61+
* Adds support for Rucio authentication for workflow jobs.
62+
* Changes the base image of the component to Ubuntu 20.04 LTS and reduces final Docker image size by removing build-time dependencies.
63+
* Fixes status reporting for failed jobs that were incorrectly considered successful.
6964

7065
## 0.8.1 (2022-02-07)
7166

72-
- Adds support for specifying `kubernetes_job_timeout` for Kubernetes compute backend jobs.
67+
* Adds support for specifying `kubernetes_job_timeout` for Kubernetes compute backend jobs.
7368

7469
## 0.8.0 (2021-11-22)
7570

76-
- Adds support for custom workspace paths.
77-
- Adds supoort for `cwltool` version `3.1.20210628163208`
71+
* Adds support for custom workspace paths.
72+
* Adds supoort for `cwltool` version `3.1.20210628163208`
7873

7974
## 0.7.6 (2021-07-05)
8075

81-
- Changes internal dependencies to remove click.
76+
* Changes internal dependencies to remove click.
8277

8378
## 0.7.5 (2021-04-28)
8479

85-
- Adds support for specifying `kubernetes_memory_limit` for Kubernetes compute backend jobs.
80+
* Adds support for specifying `kubernetes_memory_limit` for Kubernetes compute backend jobs.
8681

8782
## 0.7.4 (2021-03-23)
8883

89-
- Changes job command serialisation using central REANA-Commons job command serialiser.
84+
* Changes job command serialisation using central REANA-Commons job command serialiser.
9085

9186
## 0.7.3 (2021-03-17)
9287

93-
- Changes workflow engine instantiation to use central REANA-Commons factory.
94-
- Changes status `succeeded` to `finished` to use central REANA nomenclature.
88+
* Changes workflow engine instantiation to use central REANA-Commons factory.
89+
* Changes status `succeeded` to `finished` to use central REANA nomenclature.
9590

9691
## 0.7.2 (2021-02-03)
9792

98-
- Fixes minor code warnings.
99-
- Changes CI system to include Python flake8 and Dockerfile hadolint checkers.
93+
* Fixes minor code warnings.
94+
* Changes CI system to include Python flake8 and Dockerfile hadolint checkers.
10095

10196
## 0.7.1 (2020-11-10)
10297

103-
- Adds support for specifying `htcondor_max_runtime` and `htcondor_accounting_group` for HTCondor compute backend jobs.
104-
- Fixes restarting of CWL workflows.
98+
* Adds support for specifying `htcondor_max_runtime` and `htcondor_accounting_group` for HTCondor compute backend jobs.
99+
* Fixes restarting of CWL workflows.
105100

106101
## 0.7.0 (2020-10-20)
107102

108-
- Adds pinning of all Python dependencies allowing to easily rebuild component images at later times.
109-
- Adds option to specify unpacked Docker images as workflow step requirement.
110-
- Adds support for handling new workflow operational options.
111-
- Adds support for VOMS proxy as a new authentication method.
112-
- Changes base image to use Python 3.8.
113-
- Changes code formatting to respect `black` coding style.
114-
- Changes documentation to single-page layout.
103+
* Adds pinning of all Python dependencies allowing to easily rebuild component images at later times.
104+
* Adds option to specify unpacked Docker images as workflow step requirement.
105+
* Adds support for handling new workflow operational options.
106+
* Adds support for VOMS proxy as a new authentication method.
107+
* Changes base image to use Python 3.8.
108+
* Changes code formatting to respect `black` coding style.
109+
* Changes documentation to single-page layout.
115110

116111
## 0.6.1 (2020-05-25)
117112

118-
- Upgrades REANA-Commons package using latest Kubernetes Python client version.
113+
* Upgrades REANA-Commons package using latest Kubernetes Python client version.
119114

120115
## 0.6.0 (2019-12-20)
121116

122-
- Allows to specify compute backend (HTCondor, Kubernetes or Slurm) and
117+
* Allows to specify compute backend (HTCondor, Kubernetes or Slurm) and
123118
Kerberos authentication requirement for CWL workflow jobs.
124-
- Upgrades cwltool to 1.0.20191022103248.
125-
- Moves workflow engine to the same Kubernetes pod with the REANA-Job-Controller
119+
* Upgrades cwltool to 1.0.20191022103248.
120+
* Moves workflow engine to the same Kubernetes pod with the REANA-Job-Controller
126121
(sidecar pattern).
127122

128123
## 0.5.0 (2019-04-23)
129124

130-
- Makes workflow engine independent of Celery so that independent workflow
125+
* Makes workflow engine independent of Celery so that independent workflow
131126
instances are created on demand for each user.
132-
- Replaces `api_client` module with centralised one from REANA-Commons.
133-
- Introduces CVMFS mounts in job specifications.
134-
- Sets default file mode creation mask to 002 so that workflows are able to
127+
* Replaces `api_client` module with centralised one from REANA-Commons.
128+
* Introduces CVMFS mounts in job specifications.
129+
* Sets default file mode creation mask to 002 so that workflows are able to
135130
write to shared directories for any user identity under which the workflow
136131
processes may be running.
137-
- Makes docker image slimmer by using `python:2.7-slim`.
138-
- Centralises log level and log format configuration.
139-
- Upgrades cwltool to 1.0.20181118133959.
132+
* Makes docker image slimmer by using `python:2.7-slim`.
133+
* Centralises log level and log format configuration.
134+
* Upgrades cwltool to 1.0.20181118133959.
140135

141136
## 0.4.0 (2018-11-06)
142137

143-
- Improves AMQP re-connection handling. Switches from `pika` to `kombu`.
144-
- Utilises common openapi client for communication with REANA-Job-Controller.
145-
- Changes license to MIT.
138+
* Improves AMQP re-connection handling. Switches from `pika` to `kombu`.
139+
* Utilises common openapi client for communication with REANA-Job-Controller.
140+
* Changes license to MIT.
146141

147142
## 0.3.2 (2018-09-25)
148143

149-
- Upgrades to latest `cwltool` (`1.0.20180912090223`).
144+
* Upgrades to latest `cwltool` (`1.0.20180912090223`).
150145

151146
## 0.3.1 (2018-09-07)
152147

153-
- Pins REANA-Commons dependency.
148+
* Pins REANA-Commons dependency.
154149

155150
## 0.3.0 (2018-08-10)
156151

157-
- Tracks progress of workflow runs.
152+
* Tracks progress of workflow runs.
158153

159154
## 0.2.0 (2018-04-19)
160155

161-
- Initial public release.
156+
* Initial public release.

CONTRIBUTING.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# Contributing
22

3-
Bug reports, issues, feature requests, and other contributions are welcome. If you find
4-
a demonstrable problem that is caused by the REANA code, please:
3+
Bug reports, issues, feature requests, and other contributions are welcome. If
4+
you find a demonstrable problem that is caused by the REANA code, please:
55

6-
1. Search for [already reported problems](https://github.com/reanahub/reana-workflow-engine-cwl/issues).
7-
2. Check if the issue has been fixed or is still reproducible on the
8-
latest `master` branch.
6+
1. Search for
7+
[already reported problems](https://github.com/reanahub/reana-workflow-engine-cwl/issues).
8+
2. Check if the issue has been fixed or is still reproducible on the latest
9+
`master` branch.
910
3. Create an issue, ideally with **a test case**.
1011

1112
If you create a pull request fixing a bug or implementing a feature, you can run

MANIFEST.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ include docs/requirements.txt
1818
include pytest.ini
1919
include scripts/*.py
2020
exclude .readthedocs.yaml
21+
exclude .editorconfig
22+
exclude .prettierrc.yaml
23+
exclude .prettierignore
2124
prune docs/_build
2225
recursive-include badges *.json
2326
recursive-include docs *.py

0 commit comments

Comments
 (0)