Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trusted publish with PyPI #37

Merged
merged 2 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ jobs:

runs-on: ubuntu-latest

# Specifying a GitHub environment is optional, but strongly encouraged
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write

steps:
- uses: actions/checkout@v3
- name: Set up Python
Expand All @@ -36,7 +42,7 @@ jobs:
run: python -m build

- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
password: ${{ secrets.PYPI_API_TOKEN }}
3 changes: 1 addition & 2 deletions src/caf/distribute/iterative_proportional_fitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,7 @@ def default_convergence(
max_conv = 0
for target, ach in zip(targets, achieved):
conv = np.max(abs((ach / target) - 1))
if conv > max_conv:
max_conv = conv
max_conv = max(max_conv, conv)

return max_conv

Expand Down
Loading