diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml deleted file mode 100644 index c98f5b2..0000000 --- a/.forgejo/workflows/test.yml +++ /dev/null @@ -1,26 +0,0 @@ -# SPDX-License-Identifier: LGPL-3.0-or-later -# See Notices.txt for copyright information -on: [push, pull_request] - -jobs: - test: - runs-on: debian-12 - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - run: | - scripts/check-copyright.sh - - run: | - apt-get update -qq - apt-get install -qq python3-venv wget - # copy of https://files.openpower.foundation/s/9izgC5Rogi5Ywmm/download/OPF_PowerISA_v3.1C.pdf - wget -O OPF_PowerISA_v3.1C.pdf https://libre-chip.org/OPF_PowerISA_v3.1C.pdf - echo "56372d23ece7e9e2c1b381a639443982a3e16e38109df1c141d655b779b61fdb OPF_PowerISA_v3.1C.pdf" | sha256sum -c - python3 -m venv --upgrade-deps .venv - . .venv/bin/activate - pip install -e . - parse_powerisa_pdf OPF_PowerISA_v3.1C.pdf &> >(tee out.log | grep '^page ') || { tail -n1000 out.log; false; } - echo "expected output (not all instructions are decoded yet, change when the output is improved):" - echo "c0b4592cbd0a3e59b9b2931a6a75a3d87ebf23bf453e8587a1522dd157f15ee9 powerisa-instructions.xml" | sha256sum -c - diff --git a/.gitignore b/.gitignore index 37b3676..50e4eb1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,6 @@ -# SPDX-License-Identifier: LGPL-3.0-or-later -# See Notices.txt for copyright information /.venv /.vscode *.egg-info __pycache__ *.log -/powerisa-instructions.xml -/*.pdf +/powerisa-instructions.xml \ No newline at end of file diff --git a/README.md b/README.md index 7fd652f..f8fae5d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,3 @@ - parser for the OPF PowerISA 3.1C pdf to attempt to extract all instructions' pseudo-code including subscripts/superscripts and other formatting Usage: diff --git a/parse_powerisa_pdf/parse_powerisa_pdf.py b/parse_powerisa_pdf/parse_powerisa_pdf.py index a4afd09..c7187d1 100755 --- a/parse_powerisa_pdf/parse_powerisa_pdf.py +++ b/parse_powerisa_pdf/parse_powerisa_pdf.py @@ -1,5 +1,3 @@ -# SPDX-License-Identifier: LGPL-3.0-or-later -# See Notices.txt for copyright information from __future__ import annotations from collections import defaultdict from collections.abc import Generator, Iterable, Iterator, Callable diff --git a/parse_powerisa_pdf/quad_tree.py b/parse_powerisa_pdf/quad_tree.py index bee9d76..34343e8 100644 --- a/parse_powerisa_pdf/quad_tree.py +++ b/parse_powerisa_pdf/quad_tree.py @@ -1,5 +1,3 @@ -# SPDX-License-Identifier: LGPL-3.0-or-later -# See Notices.txt for copyright information from __future__ import annotations from typing import Callable, Generic, Iterable, Iterator, TypeVar from math import frexp, isfinite, isnan, ldexp diff --git a/parse_powerisa_pdf/set_by_id.py b/parse_powerisa_pdf/set_by_id.py index 969f8d7..444741b 100644 --- a/parse_powerisa_pdf/set_by_id.py +++ b/parse_powerisa_pdf/set_by_id.py @@ -1,5 +1,3 @@ -# SPDX-License-Identifier: LGPL-3.0-or-later -# See Notices.txt for copyright information from collections import abc from typing import Callable, Generic, Iterable, Iterator, Protocol, TypeAlias, TypeVar, overload diff --git a/pyproject.toml b/pyproject.toml index 68c4029..c2ec3e0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,3 @@ -# SPDX-License-Identifier: LGPL-3.0-or-later -# See Notices.txt for copyright information [build-system] requires = ["setuptools >= 61.0"] build-backend = "setuptools.build_meta" diff --git a/scripts/check-copyright.sh b/scripts/check-copyright.sh deleted file mode 100755 index 640fb4b..0000000 --- a/scripts/check-copyright.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: LGPL-3.0-or-later -# See Notices.txt for copyright information -set -e - -function fail() -{ - local error="$1" - echo "error: $error" >&2 - exit 1 -} - -function fail_file() -{ - local file="$1" line="$2" error="$3" - fail "$file:$((line + 1)): $error" -} - -function check_file() -{ - local file="$1" regexes=("${@:2}") - local lines - mapfile -t lines < "$file" - if (("${#lines[@]}" == 0)); then - return # empty file, no copyright needed - fi - local line - for line in "${!regexes[@]}"; do - eval '[[ "${lines[i]}" =~ '"${regexes[i]}"' ]]' || - fail_file "$file" "$line" "doesn't match regex: ${regexes[i]}" - done -} - -POUND_HEADER=('^"# SPDX-License-Identifier: LGPL-3.0-or-later"$' '^"# See Notices.txt for copyright information"$') -MD_HEADER=('^"