diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 09a47a8e..3e6b4342 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -5,7 +5,12 @@ on: pull_request: push: branches: [next] - tags: ['v*'] + tags: ["v*"] + +# cancel previous job if new commit is pushed +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true env: PKG_NAME: shiver @@ -18,24 +23,22 @@ jobs: run: shell: bash -l {0} steps: - - name: Checkout - uses: actions/checkout@v6 + - name: Checkout + uses: actions/checkout@v6 - - name: Setup Pixi - uses: prefix-dev/setup-pixi@v0.9.3 - with: - pixi-version: v0.48.2 + - name: Setup Pixi + uses: prefix-dev/setup-pixi@v0.9.3 - - name: Install shiver - run: pixi run python -m pip install -e . + - name: Install shiver + run: pixi run python -m pip install -e . - - name: Run tests - run: pixi run xvfb-run --server-args="-screen 0 1920x1080x24" -a python -m pytest --cov=src --cov-report=xml --cov-report=term + - name: Run tests + run: pixi run xvfb-run --server-args="-screen 0 1920x1080x24" -a python -m pytest --cov=src --cov-report=xml --cov-report=term - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v5 - with: - token: ${{ secrets.CODECOV_TOKEN }} + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} build: name: Conda build with Pixi @@ -50,8 +53,6 @@ jobs: - name: Setup Pixi uses: prefix-dev/setup-pixi@v0.9.3 - with: - pixi-version: v0.48.2 - name: Build Conda package run: pixi run conda-build @@ -127,8 +128,6 @@ jobs: - name: Setup Pixi uses: prefix-dev/setup-pixi@v0.9.3 - with: - pixi-version: v0.48.2 - name: Download previous conda package artifact uses: actions/download-artifact@v7 @@ -154,32 +153,30 @@ jobs: echo pushing ${{ github.ref }} with label $CONDA_LABEL pixi run anaconda upload --label $CONDA_LABEL --user neutrons ${{ env.PKG_NAME }}-*.conda - # trigger-deploy: - # runs-on: ubuntu-22.04 - # needs: [tests, conda-build] - # # only trigger deploys from protected branches and tags - # if: ${{ github.ref_protected || github.ref_type == 'tag' }} - # steps: - # - name: Determine Environment - # uses: neutrons/branch-mapper@v2 - # id: conda_env_name - # with: - # prefix: shiver - - # - name: Trigger deploy - # id: trigger - # uses: eic/trigger-gitlab-ci@v2 - # with: - # url: https://code.ornl.gov - # token: ${{ secrets.GITLAB_TRIGGER_TOKEN }} - # project_id: 7835 - # ref_name: main - # variables: | - # PLAY="update" - # CONDA_ENV="${{ steps.conda_env_name.outputs.name }}" - - # - name: Annotate commit - # uses: peter-evans/commit-comment@v2 - # with: - # body: | - # GitLab pipeline for ${{ steps.conda_env_name.outputs.name }} has been submitted for this commit: ${{ steps.trigger.outputs.web_url }} + # Trigger GitLab dev deploy pipeline + deploy-dev: + runs-on: ubuntu-latest + needs: build + if: github.ref == 'refs/heads/next' + steps: + - name: Get Environment Name + uses: neutrons/branch-mapper@main + id: env_name + with: + prefix: ${{ env.PKG_NAME }} + + - name: Trigger Dev Deploy + # use https://github.com/eic/trigger-gitlab-ci/pull/14 until merged + uses: eic/trigger-gitlab-ci@d984d8d53d871d2fdc1325639d94322da6e8747f + id: trigger + with: + url: https://code.ornl.gov + project_id: 18992 + ref_name: main + token: ${{ secrets.GITLAB_DEPLOY_TOKEN }} + + - name: Annotate commit + uses: peter-evans/commit-comment@v4 + with: + body: | + GitLab pipeline for ${{ steps.env_name.outputs.name }} has been submitted for this commit: ${{ steps.trigger.outputs.web_url }} diff --git a/pixi.lock b/pixi.lock index dd064f0c..53359c4f 100644 --- a/pixi.lock +++ b/pixi.lock @@ -12,6 +12,8 @@ environments: - url: https://prefix.dev/pixi-build-backends/ indexes: - https://pypi.org/simple + options: + pypi-prerelease-mode: if-necessary-or-explicit packages: linux-64: - conda: https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2 @@ -439,9 +441,9 @@ environments: - conda: https://conda.anaconda.org/conda-forge/linux-64/zstandard-0.25.0-py311haee01d2_1.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/zstd-1.5.7-hb78ec9c_6.conda - pypi: https://files.pythonhosted.org/packages/31/b4/b9b800c45527aadd64d5b442f9b932b00648617eb5d63d2c7a6587b7cafc/jmespath-1.0.1-py3-none-any.whl - - pypi: https://files.pythonhosted.org/packages/61/22/b8cb00df7d2b5e0875f60628594d44dba283e951b1ae17c12f99e332cc0a/regex-2025.11.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl + - pypi: https://files.pythonhosted.org/packages/a4/3c/87ca0a02736d16b6262921425e84b48984e77d8e4e572c9072ce96e66c30/regex-2026.1.15-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl - pypi: https://files.pythonhosted.org/packages/d2/b8/f0b9b880c03a3db8eaff63d76ca751ac7d8e45483fb7a0bb9f8e5c6ce433/toml_cli-0.8.2-py3-none-any.whl - - pypi: https://files.pythonhosted.org/packages/bd/75/8539d011f6be8e29f339c42e633aae3cb73bffa95dd0f9adec09b9c58e85/tomlkit-0.13.3-py3-none-any.whl + - pypi: https://files.pythonhosted.org/packages/b5/11/87d6d29fb5d237229d67973a6c9e06e048f01cf4994dee194ab0ea841814/tomlkit-0.14.0-py3-none-any.whl - pypi: ./ packages: - conda: https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2 @@ -5212,10 +5214,10 @@ packages: - pkg:pypi/referencing?source=hash-mapping size: 51788 timestamp: 1760379115194 -- pypi: https://files.pythonhosted.org/packages/61/22/b8cb00df7d2b5e0875f60628594d44dba283e951b1ae17c12f99e332cc0a/regex-2025.11.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl +- pypi: https://files.pythonhosted.org/packages/a4/3c/87ca0a02736d16b6262921425e84b48984e77d8e4e572c9072ce96e66c30/regex-2026.1.15-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl name: regex - version: 2025.11.3 - sha256: 10483eefbfb0adb18ee9474498c9a32fcf4e594fbca0543bb94c48bac6183e2e + version: 2026.1.15 + sha256: d9ea2604370efc9a174c1b5dcc81784fb040044232150f7f33756049edfc9026 requires_python: '>=3.9' - conda: https://conda.anaconda.org/conda-forge/noarch/requests-2.32.5-pyhcf101f3_1.conda sha256: 7813c38b79ae549504b2c57b3f33394cea4f2ad083f0994d2045c2e24cb538c5 @@ -5382,10 +5384,9 @@ packages: timestamp: 1762858315311 - pypi: ./ name: shiver - version: 1.8.2 - sha256: da06966d0a66b13508b743ef1ce7af29705dc9dc913143e01a3c0ee87d7d751d + version: 1.9.0.dev9 + sha256: 4fbc94f69443f87a1890c8aaed82df75ff6e89a394097cf84294e4cb2080f233 requires_python: '>=3.10' - editable: true - conda: https://conda.anaconda.org/conda-forge/linux-64/sip-6.7.12-py311hb755f60_0.conda sha256: 71a0ee22522b232bf50d4d03d012e53cd5d1251d09dffc1c72d7c33a1086fe6f md5: 02336abab4cb5dd794010ef53c54bd09 @@ -5720,11 +5721,11 @@ packages: - pkg:pypi/tomli-w?source=hash-mapping size: 12680 timestamp: 1736962345843 -- pypi: https://files.pythonhosted.org/packages/bd/75/8539d011f6be8e29f339c42e633aae3cb73bffa95dd0f9adec09b9c58e85/tomlkit-0.13.3-py3-none-any.whl +- pypi: https://files.pythonhosted.org/packages/b5/11/87d6d29fb5d237229d67973a6c9e06e048f01cf4994dee194ab0ea841814/tomlkit-0.14.0-py3-none-any.whl name: tomlkit - version: 0.13.3 - sha256: c89c649d79ee40629a9fda55f8ace8c6a1b42deb912b2a8fd8d942ddadb606b0 - requires_python: '>=3.8' + version: 0.14.0 + sha256: 592064ed85b40fa213469f81ac584f67a4f2992509a7c3ea2d632208623a3680 + requires_python: '>=3.9' - conda: https://conda.anaconda.org/conda-forge/noarch/toolz-1.1.0-pyhd8ed1ab_1.conda sha256: 4e379e1c18befb134247f56021fdf18e112fb35e64dd1691858b0a0f3bea9a45 md5: c07a6153f8306e45794774cf9b13bd32 diff --git a/pyproject.toml b/pyproject.toml index e3c53359..478304ab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,10 +16,7 @@ documentation = "https://neutrons.github.io/Shiver/" shiver = "shiver.shiver:gui" [build-system] -requires = [ - "hatchling", - "versioningit" -] +requires = ["hatchling", "versioningit"] build-backend = "hatchling.build" [tool.hatch.version] @@ -58,8 +55,8 @@ line-length = 120 select = ["E", "W", "F", "I"] # Ignore rules that correspond to pylint's disabled checks ignore = [ - "E501", # Line too long (handled by formatter) - "E721", # Type comparison - existing code pattern with QString + "E501", # Line too long (handled by formatter) + "E721", # Type comparison - existing code pattern with QString ] [tool.ruff.lint.per-file-ignores] @@ -74,14 +71,14 @@ ignore = [ preview = ["pixi-build"] # Need this to access pixi-build feature platforms = ["linux-64"] channels = [ - "conda-forge", - "mantid-ornl", - "mantid-ornl/label/rc", - "mantid", - "oncat", - "neutrons", - "neutrons/label/rc", - "https://prefix.dev/pixi-build-backends" + "conda-forge", + "mantid-ornl", + "mantid-ornl/label/rc", + "mantid", + "oncat", + "neutrons", + "neutrons/label/rc", + "https://prefix.dev/pixi-build-backends", ] [tool.pixi.package] @@ -89,7 +86,7 @@ name = "shiver" version = "0.0.0" # placeholder, can be updated by task sync-version [tool.pixi.package.build] -backend = { name = "pixi-build-python", version = "0.1.*" } +backend = { name = "pixi-build-python", version = "0.4.*" } [tool.pixi.package.host-dependencies] hatchling = "*" @@ -98,13 +95,13 @@ versioningit = "*" [tool.pixi.package.run-dependencies] #dependencies for the conda package - for shiver to run mantidworkbench = "==6.14.0.2" -pyoncatqt =">=1.2.1" +pyoncatqt = ">=1.2.1" configupdater = "*" [tool.pixi.dependencies] # Conda package dependencies for the local environment though pixi mantidworkbench = "==6.14.0.2" -pyoncatqt =">=1.2.1" +pyoncatqt = ">=1.2.1" configupdater = "*" [tool.pixi.pypi-dependencies] @@ -114,7 +111,12 @@ shiver = { path = ".", editable = true } [tool.pixi.environments] #environment definitions with feature dependencies -default = { features = ["package", "developer","docs","test",], solve-group = "default" } +default = { features = [ + "package", + "developer", + "docs", + "test", +], solve-group = "default" } [tool.pixi.feature.package.dependencies] #conda package