Skip to content

Commit 8cc8569

Browse files
authored
Merge branch 'main' into matplotlib_fix
2 parents 4ac1375 + 1914cb5 commit 8cc8569

File tree

12 files changed

+445
-45
lines changed

12 files changed

+445
-45
lines changed

.flake8

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[flake8]
2+
max-line-length = 200

.github/dependabot.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Dependabot version updates
2+
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates
3+
4+
version: 2
5+
registries:
6+
nuget-artifactory:
7+
type: nuget-feed
8+
url: https://artifactory.ccdc.cam.ac.uk/artifactory/api/npm/v3/ccdc-nuget
9+
username: ${{ secrets.ARTIFACTORY_GH_NUGET_READ_ONLY_USER }}
10+
password: ${{ secrets.ARTIFACTORY_GH_NUGET_READ_ONLY_API }}
11+
nuget-azure-devops:
12+
type: nuget-feed
13+
url: https://pkgs.dev.azure.com/ccdc/_packaging/ccdc/npm/v3/index.json
14+
username: ${{ secrets.AZURE_NUGET_ARTIFACTS_READ_ONLY_USER }}
15+
password: ${{ secrets.AZURE_NUGET_ARTIFACTS_READ_ONLY_TOKEN }}
16+
nuget-public:
17+
type: nuget-feed
18+
url: https://api.npm.org/v3/index.json
19+
20+
npm-artifactory:
21+
type: nuget-feed
22+
url: https://artifactory.ccdc.cam.ac.uk/artifactory/api/npm/ccdc-npm-mix/
23+
username: ${{ secrets.ARTIFACTORY_GH_NPM_READ_ONLY_USER }}
24+
password: ${{ secrets.ARTIFACTORY_GH_NPM_READ_ONLY_API }}
25+
npm-azure-devops:
26+
type: nuget-feed
27+
url: https://pkgs.dev.azure.com/ccdc/_packaging/ccdc/npm/registry/
28+
username: ${{ secrets.AZURE_NPM_ARTIFACTS_READ_ONLY_USER }}
29+
password: ${{ secrets.AZURE_NPM_ARTIFACTS_READ_ONLY_TOKEN }}
30+
npm-public:
31+
type: nuget-feed
32+
url: https://registry.npmjs.org
33+
34+
updates:
35+
# Enable version updates for NuGet
36+
- package-ecosystem: "nuget"
37+
registries: "*"
38+
# Look for `*.csproj` or `*.sln` files in the `root` directory
39+
directory: "/"
40+
# Check the NuGet registry for updates every day (weekdays)
41+
schedule:
42+
interval: "daily"
43+
time: "15:30"
44+
timezone: "Europe/London"
45+
commit-message:
46+
# Prefix all commit messages with "NO_JIRA"
47+
prefix: "NO_JIRA"
48+
49+
# Enable version updates for NPM
50+
- package-ecosystem: "npm"
51+
registries: "*"
52+
# Look for `package.json` or `package.lock` files in the `root` directory
53+
directory: "/"
54+
# Check the NPM registry for updates every day (weekdays)
55+
schedule:
56+
interval: "daily"
57+
time: "15:30"
58+
timezone: "Europe/London"
59+
commit-message:
60+
# Prefix all commit messages with "NO_JIRA"
61+
prefix: "NO_JIRA"
62+
63+
# Enable version update for GitHub Actions
64+
- package-ecosystem: "github-actions"
65+
directory: "/"
66+
# Check GitHub Actions for updates every day (weekdays)
67+
schedule:
68+
interval: "daily"
69+
time: "15:30"
70+
timezone: "Europe/London"
71+
commit-message:
72+
# Prefix all commit messages with "NO_JIRA"
73+
prefix: "NO_JIRA"

.github/workflows/common_ccdc_status_checks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ jobs:
1010
ccdc-commit-hooks-on-pull-request-check:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v3
1414
with:
1515
ref: ${{ github.head_ref }}
1616
fetch-depth: 0
17-
- uses: actions/setup-python@v2
17+
- uses: actions/setup-python@v4
1818
with:
1919
python-version: "3.7"
2020
- name: Get the commit message
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: Lint Dockerfiles
3+
on: # yamllint disable-line rule:truthy
4+
pull_request:
5+
paths:
6+
- '**/*Dockerfile*'
7+
8+
jobs:
9+
hadolint:
10+
runs-on: ubuntu-latest
11+
outputs:
12+
changed-files: ${{ steps.file-changes.outputs.changed-files }}
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Modified files
20+
id: file-changes
21+
run: |
22+
echo "changed-files=$(git diff --name-only -r origin/${GITHUB_BASE_REF} origin/${GITHUB_HEAD_REF} | grep 'Dockerfile' | tr '\n' ' ')" >> $GITHUB_OUTPUT
23+
24+
- name: Check GitHub event type to determine reporter type
25+
run: |
26+
if [ "${{ github.event_name }}" == "pull_request" ]; then
27+
echo "REVIEWDOG_REPORTER=github-pr-review" >> $GITHUB_ENV
28+
else
29+
echo "REVIEWDOG_REPORTER=github-check" >> $GITHUB_ENV
30+
fi
31+
32+
- name: Run hadolint
33+
uses: reviewdog/action-hadolint@v1
34+
with:
35+
fail_on_error: false
36+
filter_mode: diff_context
37+
hadolint_flags: ${{ steps.file-changes.outputs.changed-files }}
38+
level: error
39+
reporter: ${{ env.REVIEWDOG_REPORTER }}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: Lint Markdown
3+
on: # yamllint disable-line rule:truthy
4+
pull_request:
5+
paths:
6+
- '**/*.md'
7+
8+
jobs:
9+
markdownlint:
10+
runs-on: ubuntu-latest
11+
outputs:
12+
changed-files: ${{ steps.file-changes.outputs.changed-files }}
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Modified files
20+
id: file-changes
21+
run: |
22+
echo "changed-files=$(git diff --name-only -r origin/${GITHUB_BASE_REF} origin/${GITHUB_HEAD_REF} | grep '\.md' | tr '\n' ' ')" >> $GITHUB_OUTPUT
23+
24+
- name: Check GitHub event type to determine reporter type
25+
run: |
26+
if [ "${{ github.event_name }}" == "pull_request" ]; then
27+
echo "REVIEWDOG_REPORTER=github-pr-review" >> $GITHUB_ENV
28+
else
29+
echo "REVIEWDOG_REPORTER=github-check" >> $GITHUB_ENV
30+
fi
31+
32+
- name: Run markdownlint
33+
uses: reviewdog/action-markdownlint@v0
34+
with:
35+
fail_on_error: false
36+
filter_mode: diff_context
37+
level: error
38+
markdownlint_flags: ${{ steps.file-changes.outputs.changed-files }}
39+
reporter: ${{ env.REVIEWDOG_REPORTER }}

.github/workflows/lint-python.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
name: Lint Python
3+
on: # yamllint disable-line rule:truthy
4+
pull_request:
5+
paths:
6+
- '**/*.py'
7+
8+
jobs:
9+
flake8:
10+
runs-on: ubuntu-latest
11+
outputs:
12+
changed-files: ${{ steps.file-changes.outputs.changed-files }}
13+
strategy:
14+
matrix:
15+
python_version: ["3.7", "3.9"]
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Modified files
23+
id: file-changes
24+
run: |
25+
echo "changed-files=$(git diff --name-only -r origin/${GITHUB_BASE_REF} origin/${GITHUB_HEAD_REF} | grep '\.py' | tr '\n' ' ')" >> $GITHUB_OUTPUT
26+
27+
- name: Check GitHub event type to determine reporter type
28+
run: |
29+
if [ "${{ github.event_name }}" == "pull_request" ]; then
30+
echo "REVIEWDOG_REPORTER=github-pr-review" >> $GITHUB_ENV
31+
else
32+
echo "REVIEWDOG_REPORTER=github-check" >> $GITHUB_ENV
33+
fi
34+
35+
- name: Set up Python environment
36+
uses: actions/setup-python@v2
37+
with:
38+
python-version: ${{ matrix.python_version }}
39+
40+
- name: Lint Python
41+
uses: reviewdog/action-flake8@v3
42+
with:
43+
fail_on_error: false
44+
filter_mode: diff_context
45+
level: error
46+
flake8_args: ${{ steps.file-changes.outputs.changed-files }}
47+
reporter: ${{ env.REVIEWDOG_REPORTER }}

.github/workflows/lint-yaml.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
name: Lint YAML
3+
on: # yamllint disable-line rule:truthy
4+
pull_request:
5+
paths:
6+
- '**/*.yml'
7+
- '**/*.yaml'
8+
9+
jobs:
10+
yamllint:
11+
runs-on: ubuntu-latest
12+
outputs:
13+
changed-files: ${{ steps.file-changes.outputs.changed-files }}
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Modified files
21+
id: file-changes
22+
run: |
23+
echo "changed-files=$(git diff --name-only -r origin/${GITHUB_BASE_REF} origin/${GITHUB_HEAD_REF} | grep -E "\.(yml|yaml)" | tr '\n' ' ')" >> $GITHUB_OUTPUT
24+
25+
- name: Check GitHub event type to determine reporter type
26+
run: |
27+
if [ "${{ github.event_name }}" == "pull_request" ]; then
28+
echo "REVIEWDOG_REPORTER=github-pr-review" >> $GITHUB_ENV
29+
else
30+
echo "REVIEWDOG_REPORTER=github-check" >> $GITHUB_ENV
31+
fi
32+
33+
- name: Run yamllint
34+
uses: reviewdog/action-yamllint@v1
35+
with:
36+
fail_on_error: false
37+
filter_mode: diff_context
38+
level: error
39+
yamllint_flags: ${{ steps.file-changes.outputs.changed-files }}
40+
reporter: ${{ env.REVIEWDOG_REPORTER }}

.markdownlint.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
MD013:
3+
# Number of characters
4+
line_length: 200

.yamllint.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# -*- mode: yaml -*-
2+
# vim:ts=2:sw=2:ai:si:syntax=yaml
3+
#
4+
# yamllint configuration directives
5+
# Project Homepage: https://github.com/adrienverge/yamllint
6+
#
7+
# Overriding rules in files:
8+
# http://yamllint.readthedocs.io/en/latest/disable_with_comments.html
9+
---
10+
extends: default
11+
12+
# Rules documentation: http://yamllint.readthedocs.io/en/latest/rules.html
13+
rules:
14+
document-start: disable
15+
line-length:
16+
max: 200
Binary file not shown.

0 commit comments

Comments
 (0)