Skip to content

Commit 1acaa2f

Browse files
[MERGE] Merge multiple PRs into master
* this merge includes previous work related to GHI #265 & GHI #271 * this merge includes other misc. work unrelated to any GHI * this merge includes breaking changes for CI/CD * includes and superceeds PR #381 * includes and superceeds PR #382 * includes and superceeds PR #383 * includes and superceeds PR #384 * includes and superceeds PR #385 Additions with file .github/actions/checkout-and-rebuild/action.yml: * new action for checkout and fetching build artifacts from GHI #265 Additions with file .github/tools/cioutput.py: * new tool for CI output from GHI #265 Changes in file .ast-grep/rules/multicast-rule-simplify-imports.yml: * related work Changes in file .coveragerc: * related work Changes in file .github/workflows/CI-BUILD.yml: * related work Changes in file .github/workflows/CI-DOCS.yml: * related work Changes in file .github/workflows/CI-MATs.yml: * refactored to use new action, laying ground work for GHI #338 Changes in file .github/workflows/Tests.yml: * related work Changes in file .github/workflows/codeql-analysis.yml: * related work Changes in file .github/workflows/scorecard.yml: * related work Changes in file Makefile: * minor tweaks * related work Changes in file docs/Exception_Guide.md: * related updates from code changes Changes in file docs/FAQ.md: * related updates Changes in file docs/USAGE.md: * related updates Changes in file docs/conf.py: * minor style changes Changes in file multicast/__init__.py: * added overlooked export for exceptions * related work Changes in file multicast/__main__.py: * related work Changes in file multicast/env.py: * related work Changes in file multicast/exceptions.py: * related work Changes in file multicast/hear.py: * related work Changes in file multicast/recv.py: * related work Changes in file multicast/skt.py: * minor tweaks for error logic for GHI #271 * related work Changes in file pytest.ini: * related work Changes in file setup.py: * unrelated changes Changes in file tests/MulticastUDPClient.py: * unrelated changes Changes in file tests/__init__.py: * related work Changes in file tests/check_cc_lines: * related work Changes in file tests/check_pip: * related work Changes in file tests/check_spelling: * related work Changes in file tests/context.py: * related work Changes in file tests/profiling.py: * related work Changes in file tests/run_selective.py: * unrelated work Changes in file tests/test_basic.py: * related work Changes in file tests/test_build.py: * related work Changes in file tests/test_deps.py: * related work Changes in file tests/test_exceptions.py: * related work Changes in file tests/test_extra.py: * related work Changes in file tests/test_fuzz.py: * related work Changes in file tests/test_hear_cleanup.py: * related work Changes in file tests/test_hear_data_processing.py: * related work Changes in file tests/test_hear_keyboard_interrupt.py: * related work Changes in file tests/test_hear_server.py: * related work Changes in file tests/test_hear_server_activate.py: * related work Changes in file tests/test_install_requires.py: * related work Changes in file tests/test_manifest.py: * related work Changes in file tests/test_recv.py: * related work Changes in file tests/test_usage.py: * related work Changes in file tox.ini: * related work
6 parents 7f26f1f + 6505460 + 371fb62 + 446232b + 0f77208 + 8ecbfd8 commit 1acaa2f

Some content is hidden

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

53 files changed

+1635
-780
lines changed

.ast-grep/rules/multicast-rule-simplify-imports.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,5 @@ examples:
4747
code: |
4848
try:
4949
import os
50-
except ImportError as err: # pragma: no branch
50+
except ImportError as _cause: # pragma: no branch
5151
raise ModuleNotFoundError("[CWE-440] OS Failed to import.") from err

.coveragerc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ partial_branches =
5858
# don't complain about sys.modules
5959
sys.modules
6060
not in sys.modules:
61-
if context.__name__ is None:
61+
if not hasattr(context, '__name__') or not context.__name__:
6262
if 'os' not in sys.modules:
6363
if 'os.path' not in sys.modules:
6464
if 'argparse' not in sys.modules:
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
---
2+
name: 'Checkout and use Build'
3+
description: 'checks-out the given commit and fetches the build artifact'
4+
author: 'Mr. Walls'
5+
branding:
6+
icon: 'chevron-down'
7+
color: 'blue'
8+
inputs:
9+
sha:
10+
description: |
11+
The commit to checkout and fetch build artifacts for. When running this action on github.com,
12+
the default value is sufficient.
13+
required: true
14+
default: ${{ github.server_url == 'https://github.com' && github.sha || 'HEAD' }}
15+
path:
16+
description: |
17+
Path to setup. When running this action on github.com, the default value
18+
is sufficient.
19+
required: true
20+
default: ${{ github.server_url == 'https://github.com' && github.workspace || '' }}
21+
token:
22+
description: |
23+
The token used to authenticate when fetching Python distributions from
24+
https://github.com/actions/python-versions. When running this action on github.com,
25+
the default value is sufficient. When running on GHES, you can pass a personal access
26+
token for github.com if you are experiencing rate limiting.
27+
default: ${{ github.server_url == 'https://github.com' && github.token || '' }}
28+
required: true
29+
python-version:
30+
description: |
31+
The python version to setup. The default is to use the value of the github
32+
variable 'PYTHON_DEFAULT'.
33+
default: ${{ github.server_url == 'https://github.com' && vars.PYTHON_DEFAULT || '3.12' }}
34+
required: true
35+
outputs:
36+
branch-name:
37+
description: "The name of the branch that was checked-out"
38+
type: string
39+
value: ${{ steps.output_branch_name.outputs.branch-name || '' }}
40+
sha:
41+
description: "The SHA of the commit checked-out"
42+
type: string
43+
value: ${{ steps.output_sha.outputs.sha || 'HEAD' }}
44+
python-version:
45+
description: "The python version that was used in the run."
46+
value: ${{ steps.cp313.outputs.python-version || '' }}
47+
artifact-name:
48+
description: "The downloaded artifact-name"
49+
type: string
50+
value: "multicast-build-${{ steps.output_sha.outputs.sha }}.zip"
51+
artifact-files:
52+
description: "The downloaded artifact-files"
53+
value: ${{ steps.output_artifact_files.outputs.files }}
54+
55+
runs:
56+
using: composite
57+
steps:
58+
- name: Checkout repository
59+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
60+
with:
61+
persist-credentials: false
62+
fetch-depth: 0
63+
path: ${{ inputs.path }}
64+
repository: reactive-firewall/multicast
65+
token: ${{ inputs.token }}
66+
- name: "Checkout Target Commit by SHA"
67+
shell: bash
68+
run: |
69+
printf "%s\n" "::group::target-commit"
70+
git checkout --force --detach ${{ inputs.sha }} --
71+
printf "%s\n" "::endgroup::"
72+
if: ${{ (github.sha != inputs.sha) && success() }}
73+
- id: output_branch_name
74+
if: ${{ !cancelled() }}
75+
shell: bash
76+
run: |
77+
printf "branch-name=%s\n" $(git name-rev --name-only HEAD | cut -d~ -f1-1) >> "$GITHUB_OUTPUT"
78+
- id: output_sha
79+
shell: bash
80+
run: printf "sha=%s\n" $(git rev-parse --verify HEAD) >> "$GITHUB_OUTPUT"
81+
- name: "Setup Python"
82+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
83+
id: cp313
84+
with:
85+
python-version: ${{ inputs.python-version }}
86+
cache: 'pip' # caching pip dependencies
87+
if: ${{ !cancelled() }}
88+
- name: "Install Test Dependencies"
89+
run: make -j1 -f Makefile test-reqs ;
90+
- id: output_artifact_name
91+
if: ${{ success() }}
92+
shell: bash
93+
run: printf "artifact-name=%s\n" multicast-build-${{ steps.output_sha.outputs.sha }}.zip >> "$GITHUB_OUTPUT"
94+
- name: "Fetch Build Files"
95+
if: ${{ success() }}
96+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
97+
with:
98+
path: ${{ inputs.path }}/dist
99+
pattern: multicast-build-${{ steps.output_sha.outputs.sha }}.zip
100+
merge-multiple: true
101+
repository: reactive-firewall/multicast
102+
github-token: ${{ inputs.token }}
103+
- name: "Enumerate Fetched Files"
104+
id: output_artifact_files
105+
env:
106+
BUILD_MATCH_PATTERN: "dist/multicast-*-*.whl dist/multicast-*.tar.gz"
107+
SCRIPT_NAME: ".github/actions/checkout-and-rebuild/action.yml"
108+
shell: bash
109+
run: |
110+
FILES=$(git ls-files -oi --exclude-standard -- ${{ env.BUILD_MATCH_PATTERN }} )
111+
if [ -z "$FILES" ]; then
112+
printf "::warning file=%s:: %s\n" "${SCRIPT_NAME}" "No Built files found."
113+
printf "%s\n" "files=" >> "$GITHUB_OUTPUT"
114+
else
115+
printf "%s\n" "Built files found:"
116+
printf "%s\n" "$FILES"
117+
# Replace line breaks with commas for GitHub Action Output
118+
FILES="${FILES//$'\n'/ }"
119+
printf "%s\n" "files=$FILES" >> "$GITHUB_OUTPUT"
120+
fi
121+
if: ${{ success() }}

.github/tool_checkmake.sh

Lines changed: 0 additions & 176 deletions
This file was deleted.

.github/tool_checkmake.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
./tools/checkmake.bash

0 commit comments

Comments
 (0)