Skip to content

Commit bc9024f

Browse files
tdobrowolski1claude
andcommitted
fix(release): suppress NU5104 + portable Python version verify
Two failures from v0.1.0 release run: 1. C# pack failed NU5104 — stable 0.1.0 with FlashAlpha.Historical 0.4.0-rc.10 pre-release dependency. The pin is intentional (rc.10 is the first publish carrying the GexResponse/StrikeRow types); Python side already accepts >=0.4.0rc1. Added NoWarn=NU5104 with a comment explaining the choice. 2. release-python.yml version verify used grep -oPm1 with a lookbehind that not all runner greps support. Swapped to python -c "tomllib.load(...)" — tomllib is stdlib on the runner's Python 3.12, no flag-portability risk. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 72d8e4d commit bc9024f

2 files changed

Lines changed: 12 additions & 7 deletions

File tree

.github/workflows/release-python.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,10 @@ jobs:
1717

1818
- name: Verify tag matches pyproject version
1919
run: |
20-
TAG_VERSION=${GITHUB_REF_NAME#v}
21-
# Strip any pre-release dot from PEP 440 (e.g. 0.2.0rc1 → 0.2.0rc1; tag would be 0.2.0-rc.1)
22-
# Tags use SemVer (v0.2.0-rc.1) and PyPI uses PEP 440 (0.2.0rc1) — normalize for comparison.
23-
TAG_NORMALIZED=$(echo "$TAG_VERSION" | tr -d '-' | tr -d '.' | sed 's/rc/.rc./' || true)
24-
PYPROJ_VERSION=$(grep -oPm1 '(?<=^version = ")[^"]+' src/python/pyproject.toml)
25-
# Simple equality after stripping
26-
A=$(echo "$TAG_VERSION" | tr -d 'v-.')
20+
TAG_VERSION="${GITHUB_REF_NAME#v}"
21+
PYPROJ_VERSION=$(python -c "import tomllib; print(tomllib.load(open('src/python/pyproject.toml','rb'))['project']['version'])")
22+
# Normalize SemVer pre-release (0.2.0-rc.1) ↔ PEP 440 (0.2.0rc1) for comparison
23+
A=$(echo "$TAG_VERSION" | tr -d '-.')
2724
B=$(echo "$PYPROJ_VERSION" | tr -d '-.')
2825
if [ "$A" != "$B" ]; then
2926
echo "Tag $TAG_VERSION does not match pyproject version $PYPROJ_VERSION"

src/csharp/FlashAlpha.QuantConnect/FlashAlpha.QuantConnect.csproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@
1313
<RepositoryUrl>https://github.com/FlashAlpha-lab/flashalpha-quantconnect</RepositoryUrl>
1414
<RepositoryType>git</RepositoryType>
1515
<PackageReadmeFile>README.md</PackageReadmeFile>
16+
<!--
17+
Intentionally pinned to FlashAlpha.Historical 0.4.0-rc.10 — that is the
18+
first published version carrying the GexResponse / GexStrikeRow / etc.
19+
types this bridge wraps. The Python side accepts >=0.4.0rc1 in the
20+
stable release per PEP 440. Suppress NU5104 so a stable 0.1.0 with a
21+
pre-release dep is allowed; the dep version is documented + intentional.
22+
-->
23+
<NoWarn>$(NoWarn);NU5104</NoWarn>
1624
</PropertyGroup>
1725

1826
<ItemGroup>

0 commit comments

Comments
 (0)