Skip to content

Commit cc0a9f9

Browse files
committed
ci(markdownlint): add Markdown linting checks (#254)
1 parent 4ef0d79 commit cc0a9f9

File tree

6 files changed

+103
-79
lines changed

6 files changed

+103
-79
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,20 @@ jobs:
119119
pip install flake8
120120
./run-tests.sh --lint-flake8
121121
122+
lint-markdownlint:
123+
runs-on: ubuntu-24.04
124+
steps:
125+
- name: Checkout
126+
uses: actions/checkout@v4
127+
128+
- name: Setup Node
129+
uses: actions/setup-node@v4
130+
131+
- name: Lint Markdown files
132+
run: |
133+
npm install markdownlint-cli2 --global
134+
./run-tests.sh --lint-markdownlint
135+
122136
lint-manifest:
123137
runs-on: ubuntu-24.04
124138
steps:

.markdownlint.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Allow prompt dollar sign in console examples without showing output
2+
MD014: false

CHANGELOG.md

Lines changed: 74 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,29 @@
1+
<!-- markdownlint-disable MD013 -->
2+
<!-- markdownlint-disable MD024 -->
3+
14
# Changelog
25

36
## [0.9.5](https://github.com/reanahub/reana-db/compare/0.9.4...0.9.5) (2024-11-26)
47

5-
68
### Features
79

810
* **cli:** add new `migrate-secret-key` command ([#240](https://github.com/reanahub/reana-db/issues/240)) ([efcbe72](https://github.com/reanahub/reana-db/commit/efcbe724a2797edf94a531a2fd49ae0dc25d29f7))
911

10-
1112
### Continuous integration
1213

1314
* **actions:** pin setuptools 70 ([#239](https://github.com/reanahub/reana-db/issues/239)) ([3202759](https://github.com/reanahub/reana-db/commit/320275969c64513f695ce59a145088f6222aa594))
1415
* **python:** test more Python versions ([#239](https://github.com/reanahub/reana-db/issues/239)) ([e0cba7f](https://github.com/reanahub/reana-db/commit/e0cba7faa97cbf2919c4008ec884ea46ec817cd5))
1516

1617
## [0.9.4](https://github.com/reanahub/reana-db/compare/0.9.3...0.9.4) (2024-03-01)
1718

18-
1919
### Code refactoring
2020

2121
* **docs:** move from reST to Markdown ([#225](https://github.com/reanahub/reana-db/issues/225)) ([b48eb55](https://github.com/reanahub/reana-db/commit/b48eb55f7a1b1bbdde0e0a458852349a439a511e))
2222

23-
2423
### Code style
2524

2625
* **black:** format with black v24 ([#224](https://github.com/reanahub/reana-db/issues/224)) ([cc60522](https://github.com/reanahub/reana-db/commit/cc6052242fd14cf3413b793d0aa32a24871fe1b1))
2726

28-
2927
### Continuous integration
3028

3129
* **commitlint:** addition of commit message linter ([#218](https://github.com/reanahub/reana-db/issues/218)) ([ee0f7e5](https://github.com/reanahub/reana-db/commit/ee0f7e5e106e0be619779bfa2133415feecc323b))
@@ -35,133 +33,132 @@
3533
* **release-please:** initial configuration ([#218](https://github.com/reanahub/reana-db/issues/218)) ([7c616d6](https://github.com/reanahub/reana-db/commit/7c616d67fac642656f56d37422ba69c4a8d4fa20))
3634
* **shellcheck:** fix exit code propagation ([#223](https://github.com/reanahub/reana-db/issues/223)) ([b62ee1e](https://github.com/reanahub/reana-db/commit/b62ee1e3be44628265bf5ada7e0b7eb88e283c00))
3735

38-
3936
### Documentation
4037

4138
* **authors:** complete list of contributors ([#227](https://github.com/reanahub/reana-db/issues/227)) ([3fbcf65](https://github.com/reanahub/reana-db/commit/3fbcf65db735146d54078cae4c5b9c8968ead055))
4239

4340
## 0.9.3 (2023-12-01)
4441

45-
- Changes the `Workflow` table to replace the `run_number` column with two new columns `run_number_major` and `run_number_minor` in order to allow for more than nine restarts of user workflows.
46-
- Changes the names of database table, column, index and key constraints in order to follow the SQLAlchemy upstream naming conventions everywhere.
47-
- Changes several database index definitions in order to improve performance of most common database queries.
42+
* Changes the `Workflow` table to replace the `run_number` column with two new columns `run_number_major` and `run_number_minor` in order to allow for more than nine restarts of user workflows.
43+
* Changes the names of database table, column, index and key constraints in order to follow the SQLAlchemy upstream naming conventions everywhere.
44+
* Changes several database index definitions in order to improve performance of most common database queries.
4845

4946
## 0.9.2 (2023-09-26)
5047

51-
- Adds progress meter to the logs of the periodic quota updater.
52-
- Changes CPU and disk quota calculations to improve the performance of periodic quota updater.
53-
- Fixes the workflow priority calculation to avoid workflows stuck in the `queued` status when the number of allowed concurrent workflow is set to zero.
48+
* Adds progress meter to the logs of the periodic quota updater.
49+
* Changes CPU and disk quota calculations to improve the performance of periodic quota updater.
50+
* Fixes the workflow priority calculation to avoid workflows stuck in the `queued` status when the number of allowed concurrent workflow is set to zero.
5451

5552
## 0.9.1 (2023-01-18)
5653

57-
- Changes to PostgreSQL 12.13.
58-
- Fixes conversion of possibly-negative resource usage values to human-readable formats.
59-
- Fixes disk quota updater to prevent setting negative disk quota usage values.
60-
- Fixes quota updater to reduce memory usage.
54+
* Changes to PostgreSQL 12.13.
55+
* Fixes conversion of possibly-negative resource usage values to human-readable formats.
56+
* Fixes disk quota updater to prevent setting negative disk quota usage values.
57+
* Fixes quota updater to reduce memory usage.
6158

6259
## 0.9.0 (2022-12-13)
6360

64-
- Adds new `launcher_url` column to the `Workflow` table to store the remote origin of workflows submitted via the Launch-on-REANA functionality.
65-
- Adds the possibility to force resource quota updates irrespective of globally-configured quota update policy.
66-
- Adds new `WorkspaceRetentionRule` table to store workspace file retention rules.
67-
- Adds new `WorkspaceRetentionAuditLog` table to store the audit log of workspace file retention rule updates.
68-
- Changes percentage ranges used to calculate the health status of user resource quota usage.
69-
- Changes to PostgreSQL 12.10.
70-
- Fixes wrong numbering of restarted workflows by limiting the number of times a workflow can be restarted to nine.
71-
- Fixes `Workflow.get_workspace_disk_usage` to always calculate disk usage rather than relying on the quota usage values from the database, since these may not be up-to-date depending on the global quota update policy.
72-
- Fixes helper function that retrieves workflows by UUID to also additionally check that the provided user is the owner of the workflow.
61+
* Adds new `launcher_url` column to the `Workflow` table to store the remote origin of workflows submitted via the Launch-on-REANA functionality.
62+
* Adds the possibility to force resource quota updates irrespective of globally-configured quota update policy.
63+
* Adds new `WorkspaceRetentionRule` table to store workspace file retention rules.
64+
* Adds new `WorkspaceRetentionAuditLog` table to store the audit log of workspace file retention rule updates.
65+
* Changes percentage ranges used to calculate the health status of user resource quota usage.
66+
* Changes to PostgreSQL 12.10.
67+
* Fixes wrong numbering of restarted workflows by limiting the number of times a workflow can be restarted to nine.
68+
* Fixes `Workflow.get_workspace_disk_usage` to always calculate disk usage rather than relying on the quota usage values from the database, since these may not be up-to-date depending on the global quota update policy.
69+
* Fixes helper function that retrieves workflows by UUID to also additionally check that the provided user is the owner of the workflow.
7370

7471
## 0.8.2 (2022-02-23)
7572

76-
- Adds transition for workflow from queued to failed status.
73+
* Adds transition for workflow from queued to failed status.
7774

7875
## 0.8.1 (2022-02-01)
7976

80-
- Adds an option to periodically calculate CPU quota usage.
81-
- Changes CLI quota command from `disk-usage-update` to `resource-usage-update` since it can also perform CPU quota calculation.
82-
- Fixes quota update functions to handle exceptional situation as continuable errors.
83-
- Removes extra `QuotaResourceType` enum in favor of `ResourceType.name`.
77+
* Adds an option to periodically calculate CPU quota usage.
78+
* Changes CLI quota command from `disk-usage-update` to `resource-usage-update` since it can also perform CPU quota calculation.
79+
* Fixes quota update functions to handle exceptional situation as continuable errors.
80+
* Removes extra `QuotaResourceType` enum in favor of `ResourceType.name`.
8481

8582
## 0.8.0 (2021-11-22)
8683

87-
- Adds new disk usage retrieval methods using canonical (bytes) and human-readable (KiB) units. (`User`, `Workflow`)
88-
- Adds Quota models which calculates CPU and disk usage.
89-
- Adds `InteractiveSession` model.
90-
- Adds new properties `started_at` and `finished_at` to the `Job` model, updated on status change.
91-
- Adds `get_priority` workflow method, that combines both complexity and concurrency, to pass to the scheduler.
92-
- Adds a possibility to configure database connection pool parameters via environment variables.
93-
- Adds new `pending` state to `RunStatus` table.
94-
- Adds workflow complexity property in `Workflow` table.
95-
- Adds environment variable to configure which quotas to update.
96-
- Changes `WorkflowStatus` table to `RunStatus`.
97-
- Changes disk quota calculation functions to allow passing raw bytes to increase the used quota.
98-
- Changes to PostgreSQL 12.8.
99-
- Removes support for Python 2.
84+
* Adds new disk usage retrieval methods using canonical (bytes) and human-readable (KiB) units. (`User`, `Workflow`)
85+
* Adds Quota models which calculates CPU and disk usage.
86+
* Adds `InteractiveSession` model.
87+
* Adds new properties `started_at` and `finished_at` to the `Job` model, updated on status change.
88+
* Adds `get_priority` workflow method, that combines both complexity and concurrency, to pass to the scheduler.
89+
* Adds a possibility to configure database connection pool parameters via environment variables.
90+
* Adds new `pending` state to `RunStatus` table.
91+
* Adds workflow complexity property in `Workflow` table.
92+
* Adds environment variable to configure which quotas to update.
93+
* Changes `WorkflowStatus` table to `RunStatus`.
94+
* Changes disk quota calculation functions to allow passing raw bytes to increase the used quota.
95+
* Changes to PostgreSQL 12.8.
96+
* Removes support for Python 2.
10097

10198
## 0.7.3 (2021-03-17)
10299

103-
- Fixes REANA installation by pinning SQLAlchemy version less than 1.4.0 due to <https://github.com/kvesteri/sqlalchemy-utils/issues/505>.
100+
* Fixes REANA installation by pinning SQLAlchemy version less than 1.4.0 due to <https://github.com/kvesteri/sqlalchemy-utils/issues/505>.
104101

105102
## 0.7.2 (2021-02-22)
106103

107-
- Adds utility to status enums to decide whether to clean workflows and jobs depending on their status.
104+
* Adds utility to status enums to decide whether to clean workflows and jobs depending on their status.
108105

109106
## 0.7.1 (2021-02-02)
110107

111-
- Adds support for Python 3.9.
112-
- Fixes minor code warnings.
113-
- Changes CI system to include Python flake8 checker.
108+
* Adds support for Python 3.9.
109+
* Fixes minor code warnings.
110+
* Changes CI system to include Python flake8 checker.
114111

115112
## 0.7.0 (2020-10-20)
116113

117-
- Adds initial central workflow status transition logic handler.
118-
- Adds new audit table and logic to register actions. (`AuditLog`, `AuditLogAction`)
119-
- Adds fixtures for better testing of database models.
120-
- Changes user token storage to move tokens from `User` table to `UserToken` table and to encrypt them.
121-
- Changes `Workflow` table to add a new `workspace_path` column.
122-
- Changes default database service to use centrally configured one from REANA-Commons. (`REANA_INFRASTRUCTURE_COMPONENTS_HOSTNAMES`)
123-
- Changes code formatting to respect `black` coding style.
124-
- Changes documentation to single-page layout.
114+
* Adds initial central workflow status transition logic handler.
115+
* Adds new audit table and logic to register actions. (`AuditLog`, `AuditLogAction`)
116+
* Adds fixtures for better testing of database models.
117+
* Changes user token storage to move tokens from `User` table to `UserToken` table and to encrypt them.
118+
* Changes `Workflow` table to add a new `workspace_path` column.
119+
* Changes default database service to use centrally configured one from REANA-Commons. (`REANA_INFRASTRUCTURE_COMPONENTS_HOSTNAMES`)
120+
* Changes code formatting to respect `black` coding style.
121+
* Changes documentation to single-page layout.
125122

126123
## 0.6.0 (2019-12-19)
127124

128-
- Adds new method which returns full workflow name.
129-
- Adds more granular DB configuration.
130-
- Adds Git repository information to the workflow model.
125+
* Adds new method which returns full workflow name.
126+
* Adds more granular DB configuration.
127+
* Adds Git repository information to the workflow model.
131128
(`Workflow.git_repo`, `Workflow.git_provider`)
132-
- Adds user name information to the user model.
129+
* Adds user name information to the user model.
133130
(`User.full_name`, `User.username`)
134-
- Removes restart count information from the job model.
131+
* Removes restart count information from the job model.
135132
(`Job.restart_count`, `Job.max_restart_count`)
136-
- Adds support for Python 3.8.
133+
* Adds support for Python 3.8.
137134

138135
## 0.5.0 (2019-04-16)
139136

140-
- Introduces new workflow statuses: `deleted`, `stopped`, `queued`.
141-
- Adds new field to store workflow stopping time. (`Workflow.run_stopped_at`)
142-
- Moves workflow input parameters to its own column to separate them from
137+
* Introduces new workflow statuses: `deleted`, `stopped`, `queued`.
138+
* Adds new field to store workflow stopping time. (`Workflow.run_stopped_at`)
139+
* Moves workflow input parameters to its own column to separate them from
143140
operational options. Adapts getters accordingly.
144141
(`Workflow.input_parameters`)
145-
- Adds new method to retrieve the workflow owner's token.
142+
* Adds new method to retrieve the workflow owner's token.
146143
(`Workflow.get_owner_access_token`)
147-
- Introduces new utility function to retrieve workflows by `uuid` or name.
144+
* Introduces new utility function to retrieve workflows by `uuid` or name.
148145
(`_get_workflow_with_uuid_or_name`)
149-
- Introduces new fields for interactive sessions: `interactive_session`,
146+
* Introduces new fields for interactive sessions: `interactive_session`,
150147
`interactive_session_name` and `interactive_session_type`. Note that with
151148
current design only one interactive session per workflow is supported.
152-
- Adds a new enumeration for possible job statuses. (`JobStatus`)
153-
- Adds new field to identify jobs in the underlying compute backend.
149+
* Adds a new enumeration for possible job statuses. (`JobStatus`)
150+
* Adds new field to identify jobs in the underlying compute backend.
154151
(`Job.backend_job_id`)
155152

156153
## 0.4.0 (2018-11-06)
157154

158-
- Stores `reana.yaml` in database models.
159-
- Adds Workflow specification and parameter getters.
160-
- Adds support for Python 3.7.
161-
- Changes license to MIT.
155+
* Stores `reana.yaml` in database models.
156+
* Adds Workflow specification and parameter getters.
157+
* Adds support for Python 3.7.
158+
* Changes license to MIT.
162159

163160
## 0.3.0 (2018-08-10)
164161

165-
- This package is a result of refactoring [reana-commons](https://reana-commons.readthedocs.io/).
166-
- Provides common REANA models.
167-
- Provides database connection logic.
162+
* This package is a result of refactoring [reana-commons](https://reana-commons.readthedocs.io/).
163+
* Provides common REANA models.
164+
* Provides database connection logic.

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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.
4+
If you find a demonstrable problem that is caused by the REANA code, please:
55

66
1. Search for [already reported problems](https://github.com/reanahub/reana-db/issues).
77
2. Check if the issue has been fixed or is still reproducible on the

docs/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
<!-- markdownlint-disable MD041 -->
2+
<!-- markdownlint-disable MD033 -->
3+
14
% The title is set to `REANA-DB docs` instead of `REANA-DB` as this is a
25
% workaround to avoid having multiple HTML objects with the same id/anchor,
36
% as the tile clashes with the CLI API documentation generated by sphinx_click
7+
48
# REANA-DB docs
59

610
```{include} ../README.md

run-tests.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ lint_manifest() {
109109
check-manifest
110110
}
111111

112+
lint_markdownlint() {
113+
markdownlint-cli2 "**/*.md"
114+
}
115+
112116
lint_pydocstyle() {
113117
pydocstyle reana_db
114118
}
@@ -137,6 +141,7 @@ all() {
137141
lint_flake8
138142
lint_jsonlint
139143
lint_manifest
144+
lint_markdownlint
140145
lint_pydocstyle
141146
lint_shellcheck
142147
lint_yamllint
@@ -155,6 +160,7 @@ help() {
155160
echo " --lint-flake8 Check linting of Python code"
156161
echo " --lint-jsonlint Check linting of JSON files"
157162
echo " --lint-manifest Check linting of Python manifest"
163+
echo " --lint-markdownlint Check linting of Markdown files"
158164
echo " --lint-pydocstyle Check linting of Python docstrings"
159165
echo " --lint-shellcheck Check linting of shell scripts"
160166
echo " --lint-yamllint Check linting of YAML files"
@@ -177,6 +183,7 @@ case $arg in
177183
--lint-flake8) lint_flake8 ;;
178184
--lint-jsonlint) lint_jsonlint ;;
179185
--lint-manifest) lint_manifest ;;
186+
--lint-markdownlint) lint_markdownlint ;;
180187
--lint-pydocstyle) lint_pydocstyle ;;
181188
--lint-shellcheck) lint_shellcheck ;;
182189
--lint-yamllint) lint_yamllint ;;

0 commit comments

Comments
 (0)