Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ac1775ddf3 | |||
| fdc46a82c0 | |||
| 145f698784 | |||
| 6a06e7afe7 | |||
| 2b32788bda | |||
| a27aeb47ca | |||
| 4e8f42da0a | |||
| 53ae715e04 | |||
| 16e729ff13 | |||
| 5cbb2481b2 |
104
.github/workflows/release.yml
vendored
104
.github/workflows/release.yml
vendored
@@ -27,7 +27,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ['3.8', '3.9', '3.10', '3.12']
|
||||
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
|
||||
fail-fast: false
|
||||
|
||||
steps:
|
||||
@@ -46,6 +46,7 @@ jobs:
|
||||
|
||||
- name: Test with pytest
|
||||
run: |
|
||||
export PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
|
||||
python -m pytest tests
|
||||
|
||||
|
||||
@@ -69,63 +70,66 @@ jobs:
|
||||
- name: Build PyPI package
|
||||
run: |
|
||||
python3 -m build
|
||||
# - name: Archive distribution
|
||||
# uses: actions/upload-artifact@v3
|
||||
# with:
|
||||
# name: linux-dist
|
||||
# path: |
|
||||
# dist/*.tar.gz
|
||||
- name: Upload to PyPI
|
||||
run: |
|
||||
twine upload dist/* -u __token__ -p ${{ secrets.PYPI_TOKEN }} --skip-existing
|
||||
|
||||
build-windows:
|
||||
needs: [test]
|
||||
runs-on: windows-latest
|
||||
if: ${{ (github.event_name != 'workflow_dispatch') || (contains(fromJson('["all", "windows", "all_incl_release"]'), github.event.inputs.build-items)) }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
this_tag=$(python -c "import eos;print('v'+eos.__version__)")
|
||||
echo "RELEASE_TAG=$this_tag" >> $GITHUB_ENV
|
||||
- name: Update Release
|
||||
if: ${{ (github.event_name != 'workflow_dispatch') || (contains(fromJson('["all_incl_release"]'), github.event.inputs.build-items)) }}
|
||||
uses: actions/gitea-release-action@v1
|
||||
with:
|
||||
python-version: 3.12
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
C:\Miniconda\condabin\conda.bat env update --file conda_windows.yml --name base
|
||||
C:\Miniconda\condabin\conda.bat init powershell
|
||||
- name: Build with pyinstaller
|
||||
run: |
|
||||
pyinstaller windows_build.spec
|
||||
cd dist\eos
|
||||
Compress-Archive -Path .\* -Destination ..\..\eos.zip
|
||||
- name: Archive distribution
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: windows-dist
|
||||
path: |
|
||||
eos.zip
|
||||
name: "Amor-Eos ${{ env.RELEASE_TAG }}"
|
||||
tag_name: ${{ env.RELEASE_TAG }}
|
||||
files: |-
|
||||
dist/amor*.tar.gz
|
||||
|
||||
# build-windows:
|
||||
# needs: [test]
|
||||
# runs-on: windows-latest
|
||||
# if: ${{ (github.event_name != 'workflow_dispatch') || (contains(fromJson('["all", "windows", "all_incl_release"]'), github.event.inputs.build-items)) }}
|
||||
#
|
||||
# steps:
|
||||
# - uses: actions/checkout@v4
|
||||
# - name: Set up Python
|
||||
# uses: actions/setup-python@v5
|
||||
# with:
|
||||
# python-version: 3.12
|
||||
# - name: Install dependencies
|
||||
# run: |
|
||||
# C:\Miniconda\condabin\conda.bat env update --file conda_windows.yml --name base
|
||||
# C:\Miniconda\condabin\conda.bat init powershell
|
||||
# - name: Build with pyinstaller
|
||||
# run: |
|
||||
# pyinstaller windows_build.spec
|
||||
# cd dist\eos
|
||||
# Compress-Archive -Path .\* -Destination ..\..\eos.zip
|
||||
# - name: Update Release
|
||||
# if: ${{ (github.event_name != 'workflow_dispatch') || (contains(fromJson('["all_incl_release"]'), github.event.inputs.build-items)) }}
|
||||
# uses: actions/gitea-release-action@v1
|
||||
# with:
|
||||
# files: |-
|
||||
# eos.zip
|
||||
|
||||
release:
|
||||
if: ${{ (github.event_name != 'workflow_dispatch') || (contains(fromJson('["all_incl_release"]'), github.event.inputs.build-items)) }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build-ubuntu-latest, build-windows]
|
||||
needs: [test]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: get latest version tag and release note
|
||||
run: |
|
||||
git fetch --depth=500
|
||||
this_tag=$(python -c "import eos;print('v'+eos.__version__)")
|
||||
prev_tag=$(git describe --abbrev=0 --tags `git rev-list --tags --skip=1 --max-count=1`)
|
||||
echo "Relese tag $this_tag with changes since $prev_tag"
|
||||
commit_messages=$(git log $prev_tag..HEAD --pretty=format:"* %s")
|
||||
echo "Commit messages: $commit_messages"
|
||||
echo "RELEASE_TAG=$this_tag" >> $GITHUB_ENV
|
||||
echo "RELEASE_NOTE=$commit_messages" >> $GITHUB_ENV
|
||||
- name: Create Release
|
||||
uses: actions/gitea-release-action@v1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: linux-dist
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: windows-dist
|
||||
- name: get latest version tag
|
||||
run: echo "RELEASE_TAG=$(git describe --abbrev=0 --tags)" >> $GITHUB_ENV
|
||||
- uses: ncipollo/release-action@v1
|
||||
with:
|
||||
artifacts: "amor*.tar.gz,*.zip"
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
allowUpdates: true
|
||||
tag: ${{ env.RELEASE_TAG }}
|
||||
name: "Amor-Eos ${{ env.RELEASE_TAG }}"
|
||||
tag_name: ${{ env.RELEASE_TAG }}
|
||||
body: ${{ env.RELEASE_NOTE }}
|
||||
|
||||
3
.github/workflows/unit_tests.yml
vendored
3
.github/workflows/unit_tests.yml
vendored
@@ -15,7 +15,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ['3.8', '3.9', '3.10', '3.12']
|
||||
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
|
||||
fail-fast: false
|
||||
|
||||
steps:
|
||||
@@ -35,4 +35,5 @@ jobs:
|
||||
|
||||
- name: Test with pytest
|
||||
run: |
|
||||
export PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
|
||||
python -m pytest tests
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
Package to handle data redction at AMOR instrument to be used by __main__.py script.
|
||||
"""
|
||||
|
||||
__version__ = '3.2.2'
|
||||
__version__ = '3.2.3'
|
||||
__date__ = '2026-02-27'
|
||||
|
||||
31
update.md
31
update.md
@@ -1,16 +1,15 @@
|
||||
Make new release
|
||||
================
|
||||
|
||||
- Update revision in `eos/__init__.py`
|
||||
- Commit changes `git commit -a -m "your message here"`
|
||||
- Tag version `git tag v3.x.y`
|
||||
- Push changes `git push` and `git push --tags`
|
||||
- This should trigger the **Release** action on GitHub that builds a new version and uploads it to PyPI.
|
||||
|
||||
|
||||
Update on AMOR
|
||||
==============
|
||||
|
||||
- Login via SSH using the **amor** user.
|
||||
- Activate eos virtual environment `source /home/software/virtualenv/eosenv/bin/activate`
|
||||
- Update eos packge `pip install --upgrade amor-eos`
|
||||
Make new release
|
||||
================
|
||||
|
||||
- Update revision in `eos/__init__.py`
|
||||
- Commit changes `git commit -a -m "your message here"`
|
||||
- Push changes `git push` and `git push --tags`
|
||||
- Use the **Release** action on Gitea with option "all_incl_release", that builds a new version and uploads it to PyPI.
|
||||
|
||||
|
||||
Update on AMOR-DR
|
||||
=================
|
||||
|
||||
- Login via SSH using the **amor-dr** user.
|
||||
- Activate eos virtual environment `source /home/software/virtualenv/eosenv/bin/activate`
|
||||
- Update eos packge `pip install --upgrade amor-eos`
|
||||
|
||||
Reference in New Issue
Block a user