From 78c6b99b3480ca9ec2fbd1f489a49d1ad51a0968 Mon Sep 17 00:00:00 2001 From: breakbotz <74530089+breakbotz@users.noreply.github.com> Date: Mon, 17 Jun 2024 10:42:05 -0700 Subject: [PATCH] Revert "Version 1.0rc2" --- ...se-pipeline.yaml => release-pipeline.yaml} | 36 ++++++++++--------- environment.yml | 2 +- make.py | 2 +- src/fluxus/__init__.py | 2 +- src/fluxus/lineage/_label.py | 1 + 5 files changed, 23 insertions(+), 20 deletions(-) rename .github/workflows/{fluxus-release-pipeline.yaml => release-pipeline.yaml} (90%) diff --git a/.github/workflows/fluxus-release-pipeline.yaml b/.github/workflows/release-pipeline.yaml similarity index 90% rename from .github/workflows/fluxus-release-pipeline.yaml rename to .github/workflows/release-pipeline.yaml index 2a8a822..282c153 100644 --- a/.github/workflows/fluxus-release-pipeline.yaml +++ b/.github/workflows/release-pipeline.yaml @@ -1,4 +1,4 @@ -name: Fluxus Release Pipeline +name: Release Pipeline on: push: @@ -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 @@ -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] @@ -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] @@ -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 @@ -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 @@ -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 }} @@ -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 diff --git a/environment.yml b/environment.yml index f55ed49..edc4c03 100644 --- a/environment.yml +++ b/environment.yml @@ -1,7 +1,7 @@ name: fluxus channels: - conda-forge - - bcgx + - bcg_gamma - defaults dependencies: # Python version diff --git a/make.py b/make.py index 1bcaeeb..1ae2851 100755 --- a/make.py +++ b/make.py @@ -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" diff --git a/src/fluxus/__init__.py b/src/fluxus/__init__.py index 2e8d99a..4554e31 100644 --- a/src/fluxus/__init__.py +++ b/src/fluxus/__init__.py @@ -47,4 +47,4 @@ from ._transformer import * from ._warning import * -__version__ = "1.0rc2" +__version__ = "1.0rc1" diff --git a/src/fluxus/lineage/_label.py b/src/fluxus/lineage/_label.py index fe148a2..1a2c8e7 100644 --- a/src/fluxus/lineage/_label.py +++ b/src/fluxus/lineage/_label.py @@ -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