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

Revert "Version 1.0rc2" #6

Merged
merged 1 commit into from
Jun 17, 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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Fluxus Release Pipeline
name: Release Pipeline

on:
push:
Expand All @@ -10,7 +10,7 @@ on:
- 1.0.x
- release/*
schedule: # run tests and full conda/tox build matrix every night at 2am
- cron: "0 2 * * 1-5" # Every weekday at 2 AM
- cron: "0 2 * * 1-5" # Every weekday at 2 AM only if branch is "*.*.*" # Uncomment schedule once done testing

env:
project_name: fluxus
Expand Down Expand Up @@ -143,7 +143,7 @@ jobs:
conda_tox_essential:
runs-on: ubuntu-latest
needs: [detect_build_config_changes, code_quality_checks]
if: ${{ needs.detect_build_config_changes.outputs.conda_build_config_changed == '1' && github.event_name != 'schedule' && !startsWith(github.head_ref, 'dev/') && !startsWith(github.head_ref, 'release/') }}
if: ${{ needs.detect_build_config_changes.outputs.conda_build_config_changed == '1' && github.event_name != 'schedule' && !startsWith(github.ref, 'refs/heads/dev/') && (github.event_name=='pull_request' && !startsWith(github.base_ref, 'release/')) }}
strategy:
matrix:
python-version: [3.11]
Expand Down Expand Up @@ -207,7 +207,7 @@ jobs:
conda_tox_matrix:
runs-on: ubuntu-latest
needs: [detect_build_config_changes, code_quality_checks]
if: startsWith(github.head_ref, 'dev/') || startsWith(github.head_ref, 'release/') || github.event_name == 'schedule'
if: startsWith(github.ref, 'refs/heads/dev/') || (github.event_name=='pull_request' && startsWith(github.base_ref, 'release/')) || github.event_name == 'schedule'
strategy:
matrix:
python-version: [3.11]
Expand Down Expand Up @@ -299,7 +299,7 @@ jobs:
check_release:
runs-on: ubuntu-latest
needs: conda_tox_matrix
if: startsWith(github.head_ref, 'dev/') || startsWith(github.head_ref, 'release/')
if: startsWith(github.ref, 'refs/heads/dev/') || (github.event_name=='pull_request' && startsWith(github.base_ref, 'release/'))

steps:
- name: Checkout code
Expand Down Expand Up @@ -357,7 +357,7 @@ jobs:

release:
runs-on: ubuntu-latest
if: startsWith(github.head_ref, 'dev/') || startsWith(github.head_ref, 'release/')
if: startsWith(github.ref, 'refs/heads/dev/') || (github.event_name=='pull_request' && startsWith(github.base_ref, 'release/'))
needs: check_release
steps:
- name: Checkout code
Expand Down Expand Up @@ -403,39 +403,41 @@ jobs:
path: ${{ env.DIRNAME_WORKSPACE }}/dist

- name: Publish to PyPi (Tox)
if: startsWith(github.head_ref, 'release/')
if: startsWith(github.ref, 'refs/heads/dev/') || (github.event_name=='pull_request' && startsWith(github.base_ref, 'release/'))
env:
FLIT_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
FLIT_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
FLIT_USERNAME: __token__
run: |
set -eux
cd ${{ github.workspace }}/${{ env.project_name }}
pip install flit
flit install -s
flit publish
flit publish -r testpypi
echo "pypi_published=True" >> $GITHUB_ENV

- name: Publish to Anaconda (Conda)
if: startsWith(github.head_ref, 'release/')
if: startsWith(github.ref, 'refs/heads/dev/') || (github.event_name=='pull_request' && startsWith(github.base_ref, 'release/'))
env:
CONDA_TOKEN: ${{ secrets.CONDA_TOKEN }}
CONDA_PASSWORD: ${{ secrets.CONDA_PASSWORD }}
CONDA_USERNAME: ${{ secrets.CONDA_USERNAME }}
run: |
set -eux
cd ${{ env.DIRNAME_WORKSPACE }}
cd ${{ github.workspace }}
eval "$(conda shell.bash hook)"
conda install -y anaconda-client
anaconda -t ${CONDA_TOKEN} upload --user bcgx --force ${{ env.DIRNAME_WORKSPACE }}/dist/conda/noarch/${{ env.package_name }}-*.tar.bz2
anaconda login --username "${CONDA_USERNAME}" --password "${CONDA_PASSWORD}"
anaconda upload --user BCG_Gamma --force ${{ github.workspace }}/dist/conda_default/conda/noarch/${{ env.package_name }}-*.tar.bz2
anaconda logout
echo "conda_published=True" >> $GITHUB_ENV

- name: GitHub Release
if: startsWith(github.head_ref, 'release/')
if: startsWith(github.ref, 'refs/heads/dev/') || (github.event_name=='pull_request' && startsWith(github.base_ref, 'release/'))
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.current_version }}
files: |
${{ github.workspace }}/tox_default/tox/${{ env.package_name }}-*.tar.gz
${{ env.DIRNAME_WORKSPACE }}/dist/conda/noarch/${{ env.package_name }}-*.tar.bz2
${{ github.workspace }}/conda_default/conda/noarch/${{ env.package_name }}-*.tar.bz2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
Expand All @@ -449,13 +451,13 @@ jobs:

Your conda package can be upgraded by running

conda install -c conda-forge -c bcgx ${{ env.package_name }}
conda install -c conda-forge -c bcg_gamma ${{ env.package_name }}
draft: true
prerelease: ${{ env.is_prerelease }}

docs:
runs-on: ubuntu-latest
if: ${{ startsWith(github.head_ref, 'dev/') || startsWith(github.head_ref, 'release/') }} || github.event_name == 'workflow_dispatch'
if: ${{ startsWith(github.ref, 'refs/heads/dev/') || (github.event_name=='pull_request' && startsWith(github.base_ref, 'release/')) }}
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: fluxus
channels:
- conda-forge
- bcgx
- bcg_gamma
- defaults
dependencies:
# Python version
Expand Down
2 changes: 1 addition & 1 deletion make.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ def build(self, exposed_package_dependencies: Mapping[str, str]) -> None:
)

os.makedirs(build_path, exist_ok=True)
build_cmd = f"conda mambabuild -c conda-forge -c bcgx {recipe_path}"
build_cmd = f"conda mambabuild -c conda-forge -c bcg_gamma {recipe_path}"
log(
f"Building: {self.project}\n"
# f"Build path: {build_path}\n"
Expand Down
2 changes: 1 addition & 1 deletion src/fluxus/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@
from ._transformer import *
from ._warning import *

__version__ = "1.0rc2"
__version__ = "1.0rc1"
1 change: 1 addition & 0 deletions src/fluxus/lineage/_label.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
#


@inheritdoc(match="""[see superclass]""")
class _Labeler(SerialSource[T_Product_ret], Generic[T_Product_ret], metaclass=ABCMeta):
"""
A mixin class, adding the ``label`` method to a producer or transformer to allow
Expand Down