Skip to content

Commit

Permalink
fix: GitHub License Detection (#1657)
Browse files Browse the repository at this point in the history
GitHub fails to detect the license of GT4Py correctly (thus we get the
ugly banner
![license](https://img.shields.io/github/license/GridTools/gt4py)).
GitHub uses [licensee](https://github.com/licensee/licensee/) to detect
the license as documented
[here](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository#detecting-a-license).
This PR fixes license detection using licensee, which previously was
broken due to an additional line above the typical BSD-3 copyright
notice and the file `LICENSE_HEADER.txt` which confused licensee, too.
  • Loading branch information
fthaler authored Sep 24, 2024
1 parent b1dc8c4 commit e9e1fa3
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ repos:
- id: insert-license
exclude: ^\..*$
types: [python]
args: [--comment-style, "|#|", --license-filepath, ./LICENSE_HEADER.txt, --fuzzy-match-generates-todo]
args: [--comment-style, "|#|", --license-filepath, ./HEADER.txt, --fuzzy-match-generates-todo]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
Expand Down
2 changes: 1 addition & 1 deletion CODING_GUIDELINES.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ We highly encourage the [doctest][doctest] format for code examples in docstring
In general, you should structure new Python modules in the following way:

1. _shebang_ line: `#! /usr/bin/env python3` (only for **executable scripts**!).
2. License header (see `LICENSE_HEADER.txt`).
2. License header (see `HEADER.txt`).
3. Module docstring.
4. Imports, alphabetically ordered within each block (fixed automatically by `ruff-formatter`):
1. Block of imports from the standard library.
Expand Down
File renamed without changes.
2 changes: 0 additions & 2 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
GT4Py - GridTools Framework

Copyright (c) 2014-2024, ETH Zurich
All rights reserved.

Expand Down

0 comments on commit e9e1fa3

Please sign in to comment.