Skip to content

Commit 04c6fd7

Browse files
committed
Make project REUSE compliant.
1 parent 8830aff commit 04c6fd7

Some content is hidden

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

73 files changed

+579
-709
lines changed

.github/workflows/pytorch.yml

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,6 @@
1-
# *******************************************************************************
2-
# Copyright 2025 Arm Limited and affiliates.
3-
# SPDX-License-Identifier: Apache-2.0
4-
#
5-
# Licensed under the Apache License, Version 2.0 (the "License");
6-
# you may not use this file except in compliance with the License.
7-
# You may obtain a copy of the License at
1+
# SPDX-FileCopyrightText: Copyright 2025 Arm Limited and affiliates.
82
#
9-
# http://www.apache.org/licenses/LICENSE-2.0
10-
#
11-
# Unless required by applicable law or agreed to in writing, software
12-
# distributed under the License is distributed on an "AS IS" BASIS,
13-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
# See the License for the specific language governing permissions and
15-
# limitations under the License.
16-
# *******************************************************************************
3+
# SPDX-License-Identifier: Apache-2.0
174

185
name: "Build and test PyTorch"
196

.github/workflows/tensorflow.yml

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,6 @@
1-
# *******************************************************************************
2-
# Copyright 2025 Arm Limited and affiliates.
3-
# SPDX-License-Identifier: Apache-2.0
4-
#
5-
# Licensed under the Apache License, Version 2.0 (the "License");
6-
# you may not use this file except in compliance with the License.
7-
# You may obtain a copy of the License at
1+
# SPDX-FileCopyrightText: Copyright 2025 Arm Limited and affiliates.
82
#
9-
# http://www.apache.org/licenses/LICENSE-2.0
10-
#
11-
# Unless required by applicable law or agreed to in writing, software
12-
# distributed under the License is distributed on an "AS IS" BASIS,
13-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
# See the License for the specific language governing permissions and
15-
# limitations under the License.
16-
# *******************************************************************************
3+
# SPDX-License-Identifier: Apache-2.0
174

185
name: "Build and test Tensorflow"
196

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: Copyright 2025 Arm Limited and affiliates.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
15
ao/
26
venv*/
37
__pycache__/

.pre-commit-config.yaml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# SPDX-FileCopyrightText: Copyright 2025 Arm Limited and affiliates.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
fail_fast: false
6+
7+
repos:
8+
- repo: local
9+
hooks:
10+
# Python/YAML/shell: use hash comments (no --multi-line)
11+
- id: reuse-annotate-current-year-python-yaml-shell-files
12+
name: REUSE Annotate (Python add current year, merge)
13+
language: python
14+
additional_dependencies: [reuse==6.2.0]
15+
entry: reuse annotate
16+
args:
17+
- --merge-copyrights
18+
- --license
19+
- Apache-2.0
20+
- --copyright
21+
- Arm Limited and affiliates.
22+
- --copyright-prefix
23+
- spdx-string
24+
- --style
25+
- python
26+
pass_filenames: true
27+
files: '(\.gitignore|\.dockerignore|requirements\.txt|\.(py|yml|yaml|sh|bash))$'
28+
stages: [ pre-commit ]
29+
30+
# JSON/Markdown/welcome.txt: use sidecar .license files
31+
- id: reuse-annotate-current-year-json-and-md
32+
name: REUSE Annotate (JSON/Markdown/welcome.txt sidecar fallback add current year, merge)
33+
language: python
34+
additional_dependencies: [reuse==6.2.0]
35+
entry: reuse annotate
36+
args:
37+
- --merge-copyrights
38+
- --license
39+
- Apache-2.0
40+
- --copyright
41+
- Arm Limited and affiliates.
42+
- --copyright-prefix
43+
- spdx-string
44+
- --fallback-dot-license
45+
pass_filenames: true
46+
files: '(welcome\.txt|\.(json|md))$'
47+
stages: [ pre-commit ]
48+
49+
- repo: https://github.com/fsfe/reuse-tool
50+
rev: v6.2.0
51+
hooks:
52+
- id: reuse-lint-file
53+
stages: [ pre-commit ]
54+
name: "REUSE Compliant Copyright and License"
55+
56+
- repo: https://github.com/pre-commit/pre-commit-hooks
57+
rev: v6.0.0
58+
hooks:
59+
- id: trailing-whitespace
60+
stages: [ pre-commit ]

CONTRIBUTING.md

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
<!--
2+
SPDX-FileCopyrightText: Copyright 2025 Arm Limited and affiliates.
3+
4+
SPDX-License-Identifier: Apache-2.0
5+
-->
6+
7+
# CONTRIBUTING
8+
9+
Thank you for your interest in contributing to ML Tool Solutions.
10+
This document describes the recommended development workflow, coding standards, and how to use the repository's automated tooling, particularly the pre-commit hooks that enforce SPDX/REUSE compliance, formatting checks, and other quality gates.
11+
12+
We welcome contributions through GitHub Pull Requests.
13+
Please read this guide before submitting changes.
14+
15+
## Development Workflow
16+
17+
### Fork, Branch, and Submit a PR
18+
19+
1. Fork the repository.
20+
1. Create a feature branch:
21+
22+
```bash
23+
git checkout -b my-feature
24+
```
25+
26+
1. Make changes.
27+
1. Ensure all automated checks (pre-commit hooks) pass locally.
28+
1. Submit a pull request on GitHub.
29+
30+
All PRs must have:
31+
32+
- A clear description of the change.
33+
- Passing CI checks.
34+
- SPDX/REUSE-compliant licensing metadata (handled automatically by the hooks).
35+
- Clean commits or a tidy commit history.
36+
37+
## Pre-Commit Hooks (IMPORTANT)
38+
39+
This repository uses `pre-commit` to automatically enforce:
40+
41+
- SPDX/REUSE-compliant license and copyright notices
42+
- Correct SPDX headers and/or sidecar `.license` files
43+
- `reuse-lint` checks on modified files
44+
- Trailing whitespace cleanup
45+
46+
These hooks ensure all contributions meet licensing and formatting requirements before changes are committed.
47+
48+
### Install `pre-commit`
49+
50+
You only need to do this once per machine:
51+
52+
```bash
53+
pip install pre-commit
54+
pre-commit install
55+
```
56+
57+
This installs the git hooks so they run automatically before each commit.
58+
59+
Verify installation:
60+
61+
```bash
62+
pre-commit --version
63+
```
64+
65+
### Typical Contributor Workflow with Hooks
66+
67+
1. Modify files.
68+
1. Stage your changes:
69+
70+
```bash
71+
git add .
72+
```
73+
74+
1. Commit:
75+
76+
```bash
77+
git commit -m "..."
78+
```
79+
80+
1. The hooks run automatically. If they fail:
81+
- Inspect the changed files (`git diff`)
82+
- Apply fixes
83+
- Stage again
84+
- Re-run:
85+
86+
```bash
87+
pre-commit run --all-files
88+
```
89+
90+
1. Push once everything passes:
91+
92+
```bash
93+
git push
94+
```
95+
96+
## Licensing Requirements (SPDX/REUSE)
97+
98+
This project follows the [REUSE specification](https://reuse.software).
99+
100+
Every file must contain:
101+
102+
- An SPDX license identifier
103+
- `SPDX-FileCopyrightText` statements
104+
105+
For formats where inline headers are not appropriate (e.g., binaries, JSON), use sidecar .license files.
106+
The pre-commit hooks manage most of this automatically.
107+
108+
## Coding Conventions
109+
110+
- Keep scripts POSIX-compatible unless necessary.
111+
- Use SPDX headers based on examples already in the repository.
112+
113+
## Contact Us
114+
115+
If you have questions, comments, and/or suggestions? Please raise an [issue](https://github.com/ARM-software/Tool-Solutions/issues/new/choose).

0 commit comments

Comments
 (0)