PyNerva 0.0.7__tar.gz → 0.0.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pynerva-0.0.7 → pynerva-0.0.9}/.gitea/workflows/code-quality.yml +32 -16
- {pynerva-0.0.7 → pynerva-0.0.9}/.github/workflows/code-quality.yml +21 -10
- pynerva-0.0.9/.github/workflows/publish.yml +36 -0
- pynerva-0.0.9/CHANGELOG.md +41 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/PKG-INFO +2 -2
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/arm/__init__.py +1 -1
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/arm/function.py +117 -59
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/arm/generic.py +41 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/writer.py +100 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/x86_64/__main__.py +3 -1
- {pynerva-0.0.7 → pynerva-0.0.9}/pyproject.toml +10 -1
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/arm/test_armv8m.py +173 -0
- pynerva-0.0.9/tests/arm/test_uxth.py +43 -0
- pynerva-0.0.9/tests/test_arm_writer.py +243 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/uv.lock +8 -8
- pynerva-0.0.7/.gitea/workflows/release.yml +0 -72
- pynerva-0.0.7/.github/workflows/publish.yml +0 -24
- pynerva-0.0.7/.github/workflows/release.yml +0 -72
- {pynerva-0.0.7 → pynerva-0.0.9}/.gitea/WORKFLOWS.md +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/.gitea/workflows/test.yml +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/.github/WORKFLOWS.md +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/.github/workflows/test.yml +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/.gitignore +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/.travis.yml +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/LICENSE.rst +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/NervaPy.egg-info/PKG-INFO +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/NervaPy.egg-info/SOURCES.txt +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/NervaPy.egg-info/dependency_links.txt +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/NervaPy.egg-info/requires.txt +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/NervaPy.egg-info/top_level.txt +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/README.md +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/README.rst +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/STRD_IMPLEMENTATION.md +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/appveyor.yml +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/codegen/__init__.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/codegen/code.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/codegen/x86_64.json +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/codegen/x86_64.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/codegen/x86_64_nacl_test.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/codegen/x86_64_test_encoding.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/docs/ARM_BRANCH_INSTRUCTIONS.md +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/docs/ARM_IMPORT_EXTERNAL_FUNCTIONS.md +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/docs/ARM_SHIFTED_REGISTER_ADDRESSING.md +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/docs/ARMv7M_SUPPORT.md +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/docs/armv7m_register_strategies.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/examples/arm_branch_instructions.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/examples/arm_cortex_m_example.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/examples/arm_import_external_functions.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/examples/arm_ldr_shifted_register.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/examples/arm_rust_integration.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/examples/final_high_register_demo.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/examples/final_implementation_summary.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/examples/go-generate/dot_product.go +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/examples/go-generate/dot_product.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/examples/go-generate/dot_product_test.go +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/examples/go-generate/main.go +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/examples/kernels.rs +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/examples/make/Makefile +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/examples/make/matmul-opt.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/examples/make/matmul-ref.c +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/examples/make/test.c +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/examples/nmake/Makefile +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/examples/nmake/test.cpp +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/examples/nmake/transpose4x4-opt.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/examples/nmake/transpose4x4-ref.cpp +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/examples/test_high_register_strategies.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/examples/test_register_constraints.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/examples/test_simple_strategies.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/logo/college-of-computing.gif +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/logo/hpcgarage.png +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/logo/peachpy.png +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/__init__.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/abi.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/arm/__main__.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/arm/abi.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/arm/formats.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/arm/instructions.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/arm/isa.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/arm/literal_pool.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/arm/microarchitecture.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/arm/pseudo.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/arm/registers.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/arm/vfpneon.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/arm.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/c/__init__.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/c/types.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/codegen.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/common/__init__.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/common/function.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/common/regalloc.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/constant_data.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/encoder.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/formats/__init__.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/formats/elf/__init__.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/formats/elf/file.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/formats/elf/image.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/formats/elf/section.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/formats/elf/symbol.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/formats/macho/__init__.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/formats/macho/file.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/formats/macho/image.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/formats/macho/section.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/formats/macho/symbol.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/formats/mscoff/__init__.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/formats/mscoff/image.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/formats/mscoff/section.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/formats/mscoff/symbol.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/function.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/literal.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/loader.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/name.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/parse.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/stream.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/util.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/x86_64/__init__.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/x86_64/abi.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/x86_64/amd.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/x86_64/avx.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/x86_64/crypto.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/x86_64/encoding.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/x86_64/fma.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/x86_64/function.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/x86_64/generic.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/x86_64/instructions.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/x86_64/isa.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/x86_64/lower.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/x86_64/mask.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/x86_64/meta.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/x86_64/mmxsse.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/x86_64/nacl.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/x86_64/operand.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/x86_64/options.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/x86_64/pseudo.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/x86_64/registers.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/x86_64/types.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/nervapy/x86_64/uarch.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/pytest.ini +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/requirements.txt +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/sphinx/conf.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/sphinx/index.rst +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/sphinx/nervapy.rst +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/__init__.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/arm/test_and_w_eor_w.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/arm/test_arm.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/arm/test_armv7m.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/arm/test_armv7m_registers.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/arm/test_barrel_shifter.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/arm/test_cortex_m33_fpu.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/arm/test_dead_register_allocation.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/arm/test_helium_phase1.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/arm/test_live_registers.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/arm/test_mov_w_32bit.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/arm/test_movw_32bit.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/arm/test_multiply_instructions.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/arm/test_preserve8.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/arm/test_register_count.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/arm/test_register_overflow.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/arm/test_stack_alignment.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/requirements.txt +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/test_elf.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/test_literal.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/x86_64/__init__.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/x86_64/encoding/__init__.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/x86_64/encoding/test_amd.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/x86_64/encoding/test_avx.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/x86_64/encoding/test_crypto.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/x86_64/encoding/test_fma.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/x86_64/encoding/test_generic.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/x86_64/encoding/test_imm.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/x86_64/encoding/test_mask.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/x86_64/encoding/test_mmxsse.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/x86_64/test_analysis.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/x86_64/test_function.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/x86_64/test_golang.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/x86_64/test_labels.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/x86_64/test_load.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/x86_64/test_register_allocation.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/x86_64/test_register_constraints.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/x86_64/test_relocation.py +0 -0
- {pynerva-0.0.7 → pynerva-0.0.9}/tests/x86_64/test_return.py +0 -0
|
@@ -2,9 +2,9 @@ name: Code Quality
|
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
|
-
branches: [
|
|
5
|
+
branches: [main, master, develop]
|
|
6
6
|
pull_request:
|
|
7
|
-
branches: [
|
|
7
|
+
branches: [main, master, develop]
|
|
8
8
|
|
|
9
9
|
jobs:
|
|
10
10
|
security-scan:
|
|
@@ -13,29 +13,45 @@ jobs:
|
|
|
13
13
|
- uses: actions/checkout@v4
|
|
14
14
|
|
|
15
15
|
- name: Set up Python
|
|
16
|
-
uses: actions/setup-python@
|
|
16
|
+
uses: actions/setup-python@v5
|
|
17
17
|
with:
|
|
18
|
-
python-version:
|
|
18
|
+
python-version: "3.11"
|
|
19
19
|
|
|
20
20
|
- name: Install dependencies
|
|
21
21
|
run: |
|
|
22
22
|
python -m pip install --upgrade pip
|
|
23
|
-
|
|
23
|
+
# Pinned: bandit's [tool.bandit]/pyproject.toml support (used below)
|
|
24
|
+
# is version-dependent; verified working on 1.7.8 through 1.9.4 with
|
|
25
|
+
# Python 3.11, so pinning removes any ambiguity about what an
|
|
26
|
+
# unpinned future install would resolve to.
|
|
27
|
+
pip install bandit==1.9.4 pip-audit==2.10.1
|
|
24
28
|
pip install -r requirements.txt
|
|
25
|
-
|
|
29
|
+
pip install -r tests/requirements.txt
|
|
30
|
+
|
|
26
31
|
- name: Run security checks with bandit
|
|
27
|
-
|
|
32
|
+
# -c pyproject.toml picks up [tool.bandit] (B101 suppression); bandit
|
|
33
|
+
# does not read pyproject.toml automatically unless told to.
|
|
34
|
+
run: bandit -r nervapy/ -c pyproject.toml -f json -o bandit-report.json
|
|
28
35
|
|
|
29
|
-
- name: Run
|
|
30
|
-
|
|
36
|
+
- name: Run dependency vulnerability checks with pip-audit
|
|
37
|
+
# pip-audit (PyPA's own tool, backed by OSV.dev) replaces safety here:
|
|
38
|
+
# no account/API key needed, unlike safety's "scan" command, and no
|
|
39
|
+
# deprecation warnings like safety's "check" command. tests/requirements.txt
|
|
40
|
+
# is installed above so this audits what CI actually resolved, not just
|
|
41
|
+
# what the unpinned ranges in the requirements files could resolve to.
|
|
42
|
+
run: pip-audit -r requirements.txt -r tests/requirements.txt -f json -o pip-audit-report.json
|
|
31
43
|
|
|
32
44
|
- name: Upload security reports
|
|
45
|
+
if: success() || failure()
|
|
46
|
+
# v3, not v4+: this self-hosted Gitea runner reports as GHES-compatible,
|
|
47
|
+
# and GHES does not support the @actions/artifact v2 protocol that
|
|
48
|
+
# upload-artifact@v4+ requires (confirmed via a real CI failure here).
|
|
33
49
|
uses: actions/upload-artifact@v3
|
|
34
50
|
with:
|
|
35
51
|
name: security-reports
|
|
36
52
|
path: |
|
|
37
53
|
bandit-report.json
|
|
38
|
-
|
|
54
|
+
pip-audit-report.json
|
|
39
55
|
|
|
40
56
|
type-checking:
|
|
41
57
|
runs-on: ubuntu-latest-small
|
|
@@ -45,7 +61,7 @@ jobs:
|
|
|
45
61
|
- name: Set up Python
|
|
46
62
|
uses: actions/setup-python@v4
|
|
47
63
|
with:
|
|
48
|
-
python-version:
|
|
64
|
+
python-version: "3.11"
|
|
49
65
|
|
|
50
66
|
- name: Install dependencies
|
|
51
67
|
run: |
|
|
@@ -53,7 +69,7 @@ jobs:
|
|
|
53
69
|
pip install mypy types-six
|
|
54
70
|
pip install -r requirements.txt
|
|
55
71
|
pip install -e .
|
|
56
|
-
|
|
72
|
+
|
|
57
73
|
- name: Run type checking
|
|
58
74
|
run: mypy nervapy/ --ignore-missing-imports --no-strict-optional
|
|
59
75
|
|
|
@@ -65,13 +81,13 @@ jobs:
|
|
|
65
81
|
- name: Set up Python
|
|
66
82
|
uses: actions/setup-python@v4
|
|
67
83
|
with:
|
|
68
|
-
python-version:
|
|
84
|
+
python-version: "3.11"
|
|
69
85
|
|
|
70
86
|
- name: Install dependencies
|
|
71
87
|
run: |
|
|
72
88
|
python -m pip install --upgrade pip
|
|
73
89
|
pip install isort
|
|
74
|
-
|
|
90
|
+
|
|
75
91
|
- name: Check import sorting with isort
|
|
76
92
|
run: isort --check-only --diff nervapy/
|
|
77
93
|
|
|
@@ -83,13 +99,13 @@ jobs:
|
|
|
83
99
|
- name: Set up Python
|
|
84
100
|
uses: actions/setup-python@v4
|
|
85
101
|
with:
|
|
86
|
-
python-version:
|
|
102
|
+
python-version: "3.11"
|
|
87
103
|
|
|
88
104
|
- name: Install dependencies
|
|
89
105
|
run: |
|
|
90
106
|
python -m pip install --upgrade pip
|
|
91
107
|
pip install radon xenon
|
|
92
|
-
|
|
108
|
+
|
|
93
109
|
- name: Analyze code complexity
|
|
94
110
|
run: |
|
|
95
111
|
echo "=== Cyclomatic Complexity ==="
|
|
@@ -13,31 +13,42 @@ jobs:
|
|
|
13
13
|
- uses: actions/checkout@v4
|
|
14
14
|
|
|
15
15
|
- name: Set up Python
|
|
16
|
-
uses: actions/setup-python@
|
|
16
|
+
uses: actions/setup-python@v5
|
|
17
17
|
with:
|
|
18
18
|
python-version: '3.11'
|
|
19
19
|
|
|
20
20
|
- name: Install dependencies
|
|
21
21
|
run: |
|
|
22
22
|
python -m pip install --upgrade pip
|
|
23
|
-
|
|
23
|
+
# Pinned: bandit's [tool.bandit]/pyproject.toml support (used below)
|
|
24
|
+
# is version-dependent; verified working on 1.7.8 through 1.9.4 with
|
|
25
|
+
# Python 3.11, so pinning removes any ambiguity about what an
|
|
26
|
+
# unpinned future install would resolve to.
|
|
27
|
+
pip install bandit==1.9.4 pip-audit==2.10.1
|
|
24
28
|
pip install -r requirements.txt
|
|
25
|
-
|
|
26
|
-
- name: Run security checks with bandit
|
|
27
|
-
run: bandit -r nervapy/ -f json -o bandit-report.json || true
|
|
28
|
-
continue-on-error: true
|
|
29
|
+
pip install -r tests/requirements.txt
|
|
29
30
|
|
|
30
|
-
- name: Run
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
- name: Run security checks with bandit
|
|
32
|
+
# -c pyproject.toml picks up [tool.bandit] (B101 suppression); bandit
|
|
33
|
+
# does not read pyproject.toml automatically unless told to.
|
|
34
|
+
run: bandit -r nervapy/ -c pyproject.toml -f json -o bandit-report.json
|
|
35
|
+
|
|
36
|
+
- name: Run dependency vulnerability checks with pip-audit
|
|
37
|
+
# pip-audit (PyPA's own tool, backed by OSV.dev) replaces safety here:
|
|
38
|
+
# no account/API key needed, unlike safety's "scan" command, and no
|
|
39
|
+
# deprecation warnings like safety's "check" command. tests/requirements.txt
|
|
40
|
+
# is installed above so this audits what CI actually resolved, not just
|
|
41
|
+
# what the unpinned ranges in the requirements files could resolve to.
|
|
42
|
+
run: pip-audit -r requirements.txt -r tests/requirements.txt -f json -o pip-audit-report.json
|
|
33
43
|
|
|
34
44
|
- name: Upload security reports
|
|
45
|
+
if: success() || failure()
|
|
35
46
|
uses: actions/upload-artifact@v4
|
|
36
47
|
with:
|
|
37
48
|
name: security-reports
|
|
38
49
|
path: |
|
|
39
50
|
bandit-report.json
|
|
40
|
-
|
|
51
|
+
pip-audit-report.json
|
|
41
52
|
|
|
42
53
|
type-checking:
|
|
43
54
|
runs-on: ubuntu-latest
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [ published ]
|
|
6
|
+
workflow_dispatch: {}
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
publish:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
# workflow_dispatch (manual "test release") goes to TestPyPI under its
|
|
12
|
+
# own environment, so it can never pick up the real PyPI trusted
|
|
13
|
+
# publisher that's bound to the "release" environment.
|
|
14
|
+
environment: ${{ github.event_name == 'workflow_dispatch' && 'testpypi' || 'release' }}
|
|
15
|
+
permissions:
|
|
16
|
+
id-token: write # required for trusted publishing
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- name: Install uv
|
|
22
|
+
uses: astral-sh/setup-uv@v5
|
|
23
|
+
|
|
24
|
+
- name: Build package
|
|
25
|
+
run: uv build
|
|
26
|
+
|
|
27
|
+
- name: Publish to TestPyPI (manual test run)
|
|
28
|
+
if: github.event_name == 'workflow_dispatch'
|
|
29
|
+
# --check-url lets the same version be re-tested repeatedly
|
|
30
|
+
# without bumping it, by skipping a re-upload of a file already
|
|
31
|
+
# on TestPyPI instead of failing.
|
|
32
|
+
run: uv publish --publish-url https://test.pypi.org/legacy/ --check-url https://test.pypi.org/simple/
|
|
33
|
+
|
|
34
|
+
- name: Publish to PyPI
|
|
35
|
+
if: github.event_name == 'release'
|
|
36
|
+
run: uv publish
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
6
|
+
|
|
7
|
+
## [0.0.9] - 2026-11-08
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- ARM: support packing multiple functions into one shared assembly file via `ArmAssemblyWriter`
|
|
12
|
+
- ARM: add `Function.prelude_asm` for injecting raw assembly text
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- ARM: fix pre-existing bug in constants array handling
|
|
17
|
+
- ARM writer: feature-mismatch validation across packed functions, alignment aggregation, ARMCC epilogue handling, and a bug where packing functions with constants/literal pools could leave executable code placed in a data section
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- CI: harden security-scan workflow — bandit + pip-audit (replacing deprecated `safety`), pinned tool versions, upload reports on failure too
|
|
22
|
+
- CI: remove duplicate PyPI publish path; add a safe `workflow_dispatch` TestPyPI dry-run path for testing the release pipeline without touching production PyPI
|
|
23
|
+
- Bump `urllib3` 2.7.0 -> 2.8.0
|
|
24
|
+
- Bump `certifi` 2026.4.22 -> 2026.10.18
|
|
25
|
+
|
|
26
|
+
### Tests
|
|
27
|
+
|
|
28
|
+
- ARM: add tests for UXTH
|
|
29
|
+
|
|
30
|
+
## [0.0.8] - 2026-07-19
|
|
31
|
+
|
|
32
|
+
### Added
|
|
33
|
+
|
|
34
|
+
- [arm-m] Adds UXTH instruction
|
|
35
|
+
|
|
36
|
+
## [0.0.7] - 2026-06-16
|
|
37
|
+
|
|
38
|
+
### Added
|
|
39
|
+
|
|
40
|
+
- Adds support for generating assembly kernels that can be included to Rust projects.
|
|
41
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: PyNerva
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.9
|
|
4
4
|
Summary: Framework for exploring advanced program synthesis and transformation techniques
|
|
5
5
|
Project-URL: Homepage, https://github.com/kriskwiatkowski/NervaPy.git
|
|
6
6
|
Author-email: Kris Kwiatkowski <kris@amongbytes.com>
|
|
@@ -93,7 +93,7 @@ from nervapy.arm.generic import (ADC, ADCCC, ADCCS, ADCEQ, ADCGE, ADCGT, ADCHI,
|
|
|
93
93
|
TSTCS, TSTEQ, TSTGE, TSTGT, TSTHI, TSTHS,
|
|
94
94
|
TSTLE, TSTLO, TSTLS, TSTLT, TSTMI, TSTNE,
|
|
95
95
|
TSTPL, TSTVC, TSTVS, TT, TTA, TTAT, TTT,
|
|
96
|
-
UMAAL, UMAALGE, UMLAL, UMULL, B)
|
|
96
|
+
UMAAL, UMAALGE, UMLAL, UMULL, UXTH, B)
|
|
97
97
|
from nervapy.arm.literal_pool import LDR_LITERAL, LDRL
|
|
98
98
|
from nervapy.arm.microarchitecture import Microarchitecture
|
|
99
99
|
from nervapy.arm.pseudo import (ALIGN, ASSUME, IMPORT, INIT, LABEL, LOAD,
|