Skip to content

Extraction of Python installer into a separate package #995

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

Open
wants to merge 47 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
3a9408e
Remove legacy code
MartinSalinas98 Feb 25, 2025
73e9dc0
Allow actions on demand
MartinSalinas98 Feb 25, 2025
2411150
Install/update installer. To be defined if that should be kept
MartinSalinas98 Feb 25, 2025
197ce82
First passthrough implementation
MartinSalinas98 Feb 26, 2025
c53d207
Add missing import
MartinSalinas98 Feb 26, 2025
d822df0
Temporarily clone from source
MartinSalinas98 Feb 26, 2025
8c9f5d0
Get branch
MartinSalinas98 Feb 26, 2025
4bbe080
Test retrieve branch
MartinSalinas98 Feb 26, 2025
0b583fc
Retry with correct branch name
MartinSalinas98 Feb 26, 2025
8a31073
Add versions file
MartinSalinas98 Feb 26, 2025
41d627c
Get proper retcode attribute
MartinSalinas98 Feb 26, 2025
4f9bf07
Flush prints
MartinSalinas98 Feb 26, 2025
36f16bb
TODO
MartinSalinas98 Feb 26, 2025
69386b9
Test modes
MartinSalinas98 Feb 26, 2025
c3ca097
Typo
MartinSalinas98 Feb 26, 2025
a811820
Send inputs
MartinSalinas98 Feb 26, 2025
39393d1
Simplified sources target tag json entry
MartinSalinas98 Feb 26, 2025
5b6e965
New getSources mode
MartinSalinas98 Feb 28, 2025
b6a9427
Mode girt
MartinSalinas98 Feb 28, 2025
7c66683
Test configBuild
MartinSalinas98 Mar 1, 2025
ed6d788
Add keep output flag
MartinSalinas98 Mar 1, 2025
f83432c
Add keep output for get sources
MartinSalinas98 Mar 1, 2025
9a83840
Test compileAndInstall
MartinSalinas98 Mar 6, 2025
2159881
Get sources
MartinSalinas98 Mar 6, 2025
3f0a76f
Full test
MartinSalinas98 Mar 7, 2025
71c604a
Extra test
MartinSalinas98 Mar 7, 2025
2d4bca6
Fix step name
MartinSalinas98 Mar 7, 2025
a5cce7b
Try with env variable
MartinSalinas98 Mar 7, 2025
d60a356
Workaround
MartinSalinas98 Mar 7, 2025
756fbb5
Rollback, worked before, should work now
MartinSalinas98 Mar 7, 2025
80c3960
Removed temporary testing steps
MartinSalinas98 Mar 7, 2025
d76657d
Final command look
MartinSalinas98 Mar 7, 2025
5da5b6d
Do not send statistics
MartinSalinas98 Mar 7, 2025
046e88c
Add auto update for latest major release tag
MartinSalinas98 Mar 12, 2025
3bc3ab5
Adapt release system to new installer
MartinSalinas98 Mar 12, 2025
afcc572
Use latest major tag
MartinSalinas98 Mar 12, 2025
3f86d66
Use latest major tag
MartinSalinas98 Mar 12, 2025
62b5142
Python setup not needed
MartinSalinas98 Mar 12, 2025
0f4ca8a
Better update commit message
MartinSalinas98 Mar 12, 2025
0397a85
Remove redundant workflow
MartinSalinas98 Mar 12, 2025
0e7dfdb
Merge branch 'devel' into ms_python_installer
MartinSalinas98 Mar 12, 2025
3212111
Remove installer from SonarCloud sources
MartinSalinas98 Mar 13, 2025
bded4f6
Do not autoinstall installer package
MartinSalinas98 Mar 20, 2025
42e314c
Add package installation in pipeline
MartinSalinas98 Mar 20, 2025
cbe03a7
New error message test
MartinSalinas98 Mar 20, 2025
c64df55
Reenable installation
MartinSalinas98 Mar 20, 2025
bf2753d
Removed unused code
MartinSalinas98 Mar 20, 2025
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
22 changes: 14 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ jobs:

runs-on: ${{ matrix.os }}
steps:
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch

- name: Install dependencies
run: |
sudo apt-get update
Expand All @@ -42,9 +47,11 @@ jobs:
- uses: actions/setup-python@main
with:
python-version: '3.9.15'
- run: |

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install numpy
python -m pip install numpy xmipp3_installer

- uses: Jimver/cuda-toolkit@master
if: matrix.cuda.version != 'None'
Expand All @@ -57,14 +64,13 @@ jobs:
- uses: actions/checkout@main
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
ref: ${{ steps.extract_branch.outputs.branch }}

- name: Compile Xmipp with all dependencies in branch ${{ github.head_ref }} (if such branch exists, default is devel)
# Variable in the name is only evaluated once the workflow reaches this step
- name: Compile Xmipp with all dependencies in branch ${{ steps.extract_branch.outputs.branch }} (if such branch exists, default is devel)
env:
BRANCH_NAME: ${{ github.head_ref }}
SEND_INSTALLATION_STATISTICS: 'OFF'
run: |
./xmipp all -b $BRANCH_NAME --keep-output || (cat compilation.log && false)
BRANCH_NAME: ${{ steps.extract_branch.outputs.branch }}
run: echo "SEND_INSTALLATION_STATISTICS=OFF" > xmipp.conf && ./xmipp all -b $BRANCH_NAME --keep-output || (cat compilation.log && false)

- name: Cat
run: cat xmipp.conf
20 changes: 18 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,21 @@ name: Release new version
on:
push:
branches: [ master ]
workflow_dispatch:

jobs:
generate-new-release:
runs-on: ubuntu-latest
steps:

- name: Checkout repository
uses: actions/checkout@main
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5

- name: Install installer package
run: pip install xmipp3_installer

- name: Retrieve tag name, release name & changelog
run: |
Expand All @@ -26,9 +33,18 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ steps.variables.outputs.TAG_NAME }}
tag_prefix: ''

- name: Update major version tag
run: |
VERSION=${{ steps.variables.outputs.TAG_NAME }}
MAJOR=${VERSION%%.*}
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
git tag -fa "${MAJOR}" -m 'Update major version tag with $VERSION'
git push origin "${MAJOR}" --force

- name: Create a GitHub release
uses: ncipollo/release-action@main
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: ${{ steps.variables.outputs.RELEASE_NAME }}
Expand Down
2 changes: 1 addition & 1 deletion .sonarcloud.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ sonar.organization=i2pc

# This is the name and version displayed in the SonarCloud UI.
sonar.projectVersion=3.0
sonar.sources=src/xmipp, scripts, installer
sonar.sources=src/xmipp, scripts
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.

# NOTE - be careful with excusion rules. If you include formerly excluded folder, all files that include
Expand Down
3 changes: 0 additions & 3 deletions installer/__init__.py

This file was deleted.

245 changes: 0 additions & 245 deletions installer/api.py

This file was deleted.

Loading