https://github.com/frgfm/validate-python-headers
An action to validate the headers of your Python files
https://github.com/frgfm/validate-python-headers
copyright headers license python3
Last synced: 5 months ago
JSON representation
An action to validate the headers of your Python files
- Host: GitHub
- URL: https://github.com/frgfm/validate-python-headers
- Owner: frgfm
- License: apache-2.0
- Created: 2022-06-26T21:25:14.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-04T05:52:08.000Z (6 months ago)
- Last Synced: 2024-11-20T03:52:22.354Z (5 months ago)
- Topics: copyright, headers, license, python3
- Language: Python
- Homepage:
- Size: 104 KB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Header validator for your Python files
![]()
![]()
This action checks the copyright and license notices in the headers of your Python files.
## Inputs
### `owner`
**Required** The copyright owner.
### `starting-year`
**Required** The starting year of your project.
### `license`
Identifier of the license for your project (cf. [SPDX identifiers](https://spdx.org/licenses/)). Default `null`.
### `folders`
The folders to inspect, separated by a comma. Default `"."`.
### `ignore-files`
The files to ignore, separated by a comma. Default `"__init__.py"`.
### `ignore-folders`
The folders to ignore, separated by a comma. Default `".github/"`.
### `license-notice`
The path to a license notice text. If license is `null`, the header will be expected to have this text as a license notice. Default `null`.
## Outputs
The list of files with header issues and the suggested format (cf. example below):
```
Your header should look like:# Copyright (C) , Pyronear.
# This program is licensed under the Apache License 2.0.
```## Example usages
Using an Open-source license:
```
uses: frgfm/validate-python-headers@main
with:
license: 'Apache-2.0'
owner: 'François-Guillaume Fernandez'
starting-year: 2022
ignore-files: 'version.py,__init__.py'
ignore-folders: '.github/'
```On closed source code:
```
uses: frgfm/validate-python-headers@main
with:
license-notice: '.github/license-notice.txt'
owner: 'François-Guillaume Fernandez'
starting-year: 2022
ignore-files: 'version.py,__init__.py'
ignore-folders: '.github/'
```## Contributing
Any sort of contribution is greatly appreciated!
You can find a short guide in [`CONTRIBUTING`](CONTRIBUTING.md) to help grow this project!
## License
Distributed under the Apache 2.0 License. See [`LICENSE`](LICENSE) for more information.