Skip to content

Fix proc_nlp.py mypy: use **kwargs for pipeline model arg #12

Fix proc_nlp.py mypy: use **kwargs for pipeline model arg

Fix proc_nlp.py mypy: use **kwargs for pipeline model arg #12

Workflow file for this run

name: Release
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
concurrency: release
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # required so semantic-release can see tags and history
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ".[dev]"
- name: Run tests (safety check before release)
run: |
ruff check stat_lang tests
mypy stat_lang tests
pytest
- name: Configure git identity for release
run: |
git config --global user.name "github-actions"
git config --global user.email "actions@github.com"
- name: Python Semantic Release (version bump, tag, PyPI, GitHub Release)
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
semantic-release publish
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install VS Code extension dependencies
working-directory: vscode-extension
run: |
npm ci
- name: Install vsce
run: |
npm install -g @vscode/vsce
- name: Publish VS Code extension
working-directory: vscode-extension
env:
VSCE_PAT: ${{ secrets.VSCE_TOKEN }}
run: |
set +e
vsce publish
status=$?
set -e
if [ $status -ne 0 ]; then
echo "vsce publish failed with status $status. Checking if version already exists..."
VERSION=$(node -p "require('./package.json').version")
# Check if extension@version already exists in VS Code Marketplace
if vsce show "RyanBlakeStory.statlang@$VERSION" > /dev/null 2>&1; then
echo "Extension version $VERSION already exists. Skipping publish."
else
echo "vsce publish failed for a reason other than duplicate version."
exit $status
fi
fi