Skip to content

Commit 12d4d62

Browse files
committed
#30 Update to template
1 parent 7220cf3 commit 12d4d62

Some content is hidden

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

43 files changed

+955
-1595
lines changed

.github/dependabot.yml

+10-6
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@
33

44
version: 2
55
updates:
6-
- package-ecosystem: "github-actions"
7-
directory: "/"
6+
- package-ecosystem: github-actions
7+
directory: /
88
schedule:
9-
interval: "daily"
10-
- package-ecosystem: "pip"
11-
directory: "/"
9+
interval: daily
10+
- package-ecosystem: docker
11+
directory: /
1212
schedule:
13-
interval: "daily"
13+
interval: daily
14+
- package-ecosystem: pip
15+
directory: /
16+
schedule:
17+
interval: daily

.github/linters/.checkov.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
quiet: true
2+
skip-check:
3+
- CKV_DOCKER_7

.github/linters/.jscpd.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
{
2-
"threshold": 3
3-
}
1+
{}

.github/linters/README.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Linters
2+
3+
## .jscpd.json
4+
5+
- [.jscpd.json]
6+
- Used by [lint-workflows.yaml]
7+
- [jscpd]
8+
- [jscpd configuration]
9+
- Example:
10+
11+
```json
12+
{
13+
"ignore": [
14+
"**/*.go,**/go-test*.yaml"
15+
],
16+
"threshold": 10
17+
}
18+
```
19+
20+
## .yaml-lint.yml
21+
22+
- [.yaml-lint.yml]
23+
- Used by [lint-workflows.yaml]
24+
- [yaml-lint]
25+
- [yaml-lint configuration]
26+
27+
[.jscpd.json]: .jscpd.json
28+
[.yaml-lint.yml]: .yaml-lint.yml
29+
[jscpd configuration]: https://github.com/kucherenko/jscpd/tree/master/apps/jscpd#options
30+
[jscpd]: https://github.com/kucherenko/jscpd
31+
[lint-workflows.yaml]: ../workflows/README.md#lint-workflowsyaml
32+
[yaml-lint configuration]: https://yamllint.readthedocs.io/en/stable/configuration.html
33+
[yaml-lint]: https://github.com/adrienverge/yamllint

.github/workflows/README.md

+217
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
# Workflows
2+
3+
## add-labels-standardized.yaml
4+
5+
When issues are opened,
6+
this action adds appropriate labels to the issue.
7+
(e.g. "triage", "customer-submission")
8+
9+
- [Add Labels Standardized GitHub action]
10+
- Uses: [senzing-factory/build-resources/.../add-labels-to-issue.yaml]
11+
12+
## add-to-project-garage-dependabot.yaml
13+
14+
When a Dependabot Pull Request (PR) is made against `main` branch,
15+
this action adds the PR to the "Garage" project board as "In Progress".
16+
17+
- [Add to Project Garage Dependabot GitHub action]
18+
- Uses: [senzing-factory/build-resources/.../add-to-project-dependabot.yaml]
19+
20+
## add-to-project-garage.yaml
21+
22+
When an issue is created,
23+
this action adds the issue to the "Garage" board as "Backlog".
24+
25+
- [Add to Project Garage GitHub action]
26+
- Uses: [senzing-factory/build-resources/.../add-to-project.yaml]
27+
28+
## bandit.yaml
29+
30+
When a Pull Request (PR) is made against `main` branch,
31+
this action runs [Bandit] to detect security issues.
32+
33+
- [bandit.yaml]
34+
- Uses: [lukehinds/bandit-action]
35+
36+
## black.yaml
37+
38+
When a change is committed to GitHub or a Pull Request is made against the `main` branch,
39+
this action runs the [Black] code formatter.
40+
41+
- [black.yaml]
42+
43+
## dependabot-approve-and-merge.yaml
44+
45+
When a Dependabot Pull Request (PR) is made against the `main` branch,
46+
this action determines if it should be automatically approved and merged into the `main` branch.
47+
Once this action occurs [move-pr-to-done-dependabot.yaml] moves the PR on the "Garage" project board to "Done".
48+
49+
- [Dependabot Approve and Merge GitHub action]
50+
- Uses: [senzing-factory/build-resources/.../dependabot-approve-and-merge.yaml]
51+
52+
## dependency-scan.yaml
53+
54+
When a Pull Request is made against the `main` branch,
55+
this action runs [Fast Python Vulnerability Scanner] and [pip-audit].
56+
57+
- [dependency-scan.yaml]
58+
- Uses:
59+
- [Fast Python Vulnerability Scanner]
60+
- [pypa/gh-action-pip-audit]
61+
62+
## docker-build-container.yaml
63+
64+
When a Pull Request is made against the `main` branch,
65+
this action verifies that the `Dockerfile` can be successfully built.
66+
67+
*Note:* The Docker image is **not** pushed to [DockerHub].
68+
69+
- [Docker Build Container GitHub action]
70+
- Uses: [senzing-factory/github-action-docker-buildx-build]
71+
72+
## docker-push-containers-to-dockerhub.yaml
73+
74+
After a [Semantic Version] release is created,
75+
this action builds Docker images on multiple architectures and pushes the Docker images to [DockerHub].
76+
77+
- [Docker Push Containers to DockerHub GitHub action]
78+
- Uses: [senzing-factory/github-action-docker-buildx-build]
79+
80+
## flake8.yaml
81+
82+
When a change is committed to GitHub or a Pull Request is made against the `main` branch,
83+
this action runs [flake8] for Python style enforcement.
84+
85+
- [flake8.yaml]
86+
- Uses: [py-actions/flake8]
87+
88+
## isort.yaml
89+
90+
When a change is committed to GitHub or a Pull Request is made against the `main` branch,
91+
this action runs [isort] to sort the Python import statements
92+
93+
- [isort.yaml]
94+
- Uses: [isort/isort-action]
95+
96+
## lint-workflows.yaml
97+
98+
When a change is committed to GitHub or a Pull Request is made against the `main` branch,
99+
this action runs [super-linter] to run multiple linters against the code.
100+
101+
- [Lint Workflows GitHub action]
102+
- Configuration:
103+
- [.checkov.yaml]
104+
- [.jscpd.json]
105+
- [.yaml-lint.yml]
106+
- Uses: [senzing-factory/build-resources/.../lint-workflows.yaml]
107+
108+
## move-pr-to-done-dependabot.yaml
109+
110+
When a Pull Request is merged into the `main` branch,
111+
this action moves the PR on the "Garage" project board to "Done".
112+
113+
- [Move PR to Done Dependabot GitHub action]
114+
- Uses: [senzing-factory/build-resources/.../move-pr-to-done-dependabot.yaml]
115+
116+
## mypy.yaml
117+
118+
When a change is committed to GitHub or a Pull Request is made against the `main` branch,
119+
this action runs [mypy] to perform static type checking.
120+
121+
- [mypy.yaml]
122+
123+
## pylint.yaml
124+
125+
When a change is committed to GitHub,
126+
this action runs [pylint] to perform static code analysis.
127+
128+
- [pylint.yaml]
129+
130+
## pytest-darwin.yaml
131+
132+
When a Pull Request is merged into the `main` branch,
133+
this action runs [pytest] on the Darwin/macOS platform to perform unit tests and code coverage.
134+
135+
- [pytest-darwin.yaml]
136+
- Uses:
137+
- [actions/checkout]
138+
- [actions/setup-python]
139+
- [senzing-factory/github-action-install-senzing-api]
140+
- [pytest]
141+
- [actions/upload-artifact]
142+
143+
## pytest-linux.yaml
144+
145+
When a change is committed to GitHub or a Pull Request is made against the `main` branch,
146+
this action runs [pytest] on the Linux platform to perform unit tests and code coverage.
147+
148+
- [pytest-linux.yaml]
149+
- Uses:
150+
- [actions/checkout]
151+
- [actions/setup-python]
152+
- [senzing-factory/github-action-install-senzing-api]
153+
- [pytest]
154+
- [actions/upload-artifact]
155+
156+
## pytest-windows.yaml
157+
158+
When a Pull Request is merged into the `main` branch,
159+
this action runs [pytest] on the Windows platform to perform unit tests and code coverage.
160+
161+
- [pytest-windows.yaml]
162+
- Uses:
163+
- [actions/checkout]
164+
- [actions/setup-python]
165+
- [senzing-factory/github-action-install-senzing-api]
166+
- [pytest]
167+
- [actions/upload-artifact]
168+
169+
[.checkov.yaml]: ../linters/README.md#checkovyaml
170+
[.jscpd.json]: ../linters/README.md#jscpdjson
171+
[.yaml-lint.yml]: ../linters/README.md#yaml-lintyml
172+
[actions/checkout]: https://github.com/actions/checkout
173+
[actions/setup-python]: https://github.com/actions/setup-python
174+
[actions/upload-artifact]: https://github.com/actions/upload-artifact
175+
[Add Labels Standardized GitHub action]: add-labels-standardized.yaml
176+
[Add to Project Garage Dependabot GitHub action]: add-to-project-garage-dependabot.yaml
177+
[Add to Project Garage GitHub action]: add-to-project-garage.yaml
178+
[bandit.yaml]: bandit.yaml
179+
[Bandit]: https://bandit.readthedocs.io/en/latest/
180+
[black.yaml]: black.yaml
181+
[Black]: https://github.com/psf/black
182+
[Dependabot Approve and Merge GitHub action]: dependabot-approve-and-merge.yaml
183+
[dependency-scan.yaml]: dependency-scan.yaml
184+
[Docker Build Container GitHub action]: docker-build-container.yaml
185+
[Docker Push Containers to DockerHub GitHub action]: docker-push-containers-to-dockerhub.yaml
186+
[DockerHub]: <https://hub.docker.com/>
187+
[Fast Python Vulnerability Scanner]: https://github.com/vanschelven/fpvs/
188+
[flake8.yaml]: flake8.yaml
189+
[flake8]: https://flake8.pycqa.org/en/latest/
190+
[isort.yaml]: isort.yaml
191+
[isort]: https://pycqa.github.io/isort/
192+
[isort/isort-action]: https://github.com/isort/isort-action
193+
[Lint Workflows GitHub action]: lint-workflows.yaml
194+
[lukehinds/bandit-action]: https://github.com/lukehinds/bandit-action
195+
[Move PR to Done Dependabot GitHub action]: move-pr-to-done-dependabot.yaml
196+
[move-pr-to-done-dependabot.yaml]: move-pr-to-done-dependabotyaml
197+
[mypy.yaml]: mypy.yaml
198+
[mypy]: https://mypy-lang.org/
199+
[pip-audit]: https://github.com/pypa/pip-audit
200+
[py-actions/flake8]: https://github.com/py-actions/flake8
201+
[pylint.yaml]: pylint.yaml
202+
[pylint]: https://pypi.org/project/pylint/
203+
[pypa/gh-action-pip-audit]: https://github.com/pypa/gh-action-pip-audit
204+
[pytest-darwin.yaml]: pytest-darwin.yaml
205+
[pytest-linux.yaml]: pytest-linux.yaml
206+
[pytest-windows.yaml]: pytest-windows.yaml
207+
[pytest]: https://docs.pytest.org/en/stable/
208+
[Semantic Version]: https://semver.org/
209+
[senzing-factory/build-resources/.../add-labels-to-issue.yaml]: https://github.com/senzing-factory/build-resources/blob/main/.github/workflows/add-labels-to-issue.yaml
210+
[senzing-factory/build-resources/.../add-to-project-dependabot.yaml]: https://github.com/senzing-factory/build-resources/blob/main/.github/workflows/add-to-project-dependabot.yaml
211+
[senzing-factory/build-resources/.../add-to-project.yaml]: https://github.com/senzing-factory/build-resources/blob/main/.github/workflows/add-to-project.yaml
212+
[senzing-factory/build-resources/.../dependabot-approve-and-merge.yaml]: https://github.com/senzing-factory/build-resources/blob/main/.github/workflows/dependabot-approve-and-merge.yaml
213+
[senzing-factory/build-resources/.../lint-workflows.yaml]: https://github.com/senzing-factory/build-resources/blob/main/.github/workflows/lint-workflows.yaml
214+
[senzing-factory/build-resources/.../move-pr-to-done-dependabot.yaml]: https://github.com/senzing-factory/build-resources/blob/main/.github/workflows/move-pr-to-done-dependabot.yaml
215+
[senzing-factory/github-action-docker-buildx-build]: https://github.com/senzing-factory/github-action-docker-buildx-build
216+
[senzing-factory/github-action-install-senzing-api]: https://github.com/senzing-factory/github-action-install-senzing-api
217+
[super-linter]: https://github.com/super-linter/super-linter

.github/workflows/add-labels-standardized.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: add labels standardized
1+
name: Add labels standardized
22

33
on:
44
issues:

.github/workflows/add-to-project-garage-dependabot.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: add to project garage dependabot
1+
name: Add to project garage dependabot
22

33
on:
44
pull_request:

.github/workflows/add-to-project-garage.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: add to project garage
1+
name: Add to project garage
22

33
on:
44
issues:

.github/workflows/bandit.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@ jobs:
1717
python-version: ["3.11"]
1818

1919
steps:
20-
- uses: actions/checkout@v4
20+
- name: Checkout repository
21+
uses: actions/checkout@v4
22+
2123
- name: Run Bandit Scan
2224
uses: lukehinds/bandit-action@new-action
2325
env:
2426
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2527
with:
26-
path: "examples src"
28+
path: "src examples"
2729
recursive: "true"

.github/workflows/black.yaml

+9-8
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,20 @@ jobs:
1515
python-version: ["3.8", "3.9", "3.10", "3.11"]
1616

1717
steps:
18-
- uses: actions/checkout@v4
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
1920

20-
- uses: actions/setup-python@v5
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v5
2123
with:
2224
python-version: ${{ matrix.python-version }}
2325

24-
- name: update pip
25-
run: python3 -m pip install --upgrade pip
26-
27-
- name: pip install python packages for testing
28-
run: pip install black
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
python -m pip install black
2930
30-
- name: black testing
31+
- name: Run black testing
3132
run: |
3233
# shellcheck disable=SC2046
3334
black --diff --check $(git ls-files '*.py' ':!:docs/source/*')

.github/workflows/dependabot-approve-and-merge.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: dependabot approve and merge
1+
name: Dependabot approve and merge
22

33
on:
44
pull_request:

0 commit comments

Comments
 (0)