-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bc8ecde
commit e6172e4
Showing
186 changed files
with
1,151 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# .github/workflows/release.yaml | ||
|
||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
id-token: write | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install Poetry and Packages | ||
run: | | ||
curl -sSL https://install.python-poetry.org | python3 - | ||
poetry install | ||
- name: Determine Version Change | ||
id: version_check | ||
run: | | ||
VERSION="v$(poetry version -s)" | ||
echo "Current version: $VERSION" | ||
LATEST_RELEASE=$(curl -s -H "Authorization: token ${{ github.token }}" \ | ||
https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r '.tag_name') | ||
echo "Latest release version: $LATEST_RELEASE" | ||
if [ "$VERSION" != "$LATEST_RELEASE" ]; then | ||
echo "Version has changed." | ||
echo "version_changed=true" >> $GITHUB_OUTPUT | ||
echo "new_version=$VERSION" >> $GITHUB_OUTPUT | ||
else | ||
echo "No version change detected." | ||
echo "version_changed=false" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Create Release | ||
if: steps.version_check.outputs.version_changed == 'true' | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
tag_name: ${{ steps.version_check.outputs.new_version }} | ||
generate_release_notes: True | ||
|
||
- name: mint API token | ||
if: steps.version_check.outputs.version_changed == 'true' | ||
id: mint-token | ||
run: | | ||
# retrieve the ambient OIDC token | ||
resp=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \ | ||
"$ACTIONS_ID_TOKEN_REQUEST_URL&audience=pypi") | ||
oidc_token=$(jq -r '.value' <<< "${resp}") | ||
# exchange the OIDC token for an API token | ||
resp=$(curl -X POST https://pypi.org/_/oidc/mint-token -d "{\"token\": \"${oidc_token}\"}") | ||
api_token=$(jq -r '.token' <<< "${resp}") | ||
# mask the newly minted API token, so that we don't accidentally leak it | ||
echo "::add-mask::${api_token}" | ||
# see the next step in the workflow for an example of using this step output | ||
echo "api-token=${api_token}" >> "${GITHUB_OUTPUT}" | ||
- name: Build and publish to PyPI | ||
if: steps.version_check.outputs.version_changed == 'true' | ||
run: | | ||
poetry build | ||
poetry publish -u __token__ -p ${{ steps.mint-token.outputs.api-token }} |
Binary file not shown.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
1 change: 1 addition & 0 deletions
1
kspec_gfa_controller/save/2024-08-20 09:53:51_grab_cam_40074358.fits
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
kspec_gfa_controller/save/2024-08-20 09:53:51_grab_cam_40103667.fits
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
kspec_gfa_controller/save/2024-08-20 09:53:52_grab_cam_40103663.fits
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
kspec_gfa_controller/save/2024-08-20 09:53:53_grab_cam_40103831.fits
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
kspec_gfa_controller/save/2024-08-20 09:53:53_grab_cam_40103833.fits
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
File renamed without changes.
File renamed without changes.
187 changes: 187 additions & 0 deletions
187
controller/src/log/gfa_actions.log → kspec_gfa_controller/src/log/gfa_actions.log
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[tool.poetry] | ||
name = "kspec-gfa-controller" | ||
version = "0.6.0" | ||
description = "The Controller software for KSPEC-GFA Camera" | ||
authors = ["Mingyeong Yang <[email protected]>"] | ||
readme = "README.md" | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.10" | ||
logging = "^0.4.9.6" | ||
astropy = "^6.1.2" | ||
datetime = "^5.5" | ||
asyncio = "^3.4.3" | ||
pypylon = "^4.0.0" | ||
|
||
|
||
[tool.poetry.group.dev.dependencies] | ||
matplotlib = "^3.9.2" | ||
ruff = "^0.6.2" | ||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" |