From e5cdbc1c5976ba21537de4aec6dbbba581cebdd5 Mon Sep 17 00:00:00 2001 From: Roy Jacobson Date: Mon, 28 Jul 2025 13:45:19 +0300 Subject: [PATCH 1/5] [*] Support specifying python executable and conda environments. [*] Remove need for a separate python package install step. --- .github/workflows/nextflow-plugin.yml | 18 +++-- .github/workflows/pypi-release.yml | 72 ------------------- .gitignore | 2 + README.md | 28 ++++++-- plugins/nf-python/build.gradle | 20 ++++++ .../nextflow/python/PythonExtension.groovy | 64 +++++++++++++++-- .../main/nextflow/python/PythonPlugin.groovy | 1 + .../src/resources/META-INF/MANIFEST.MF | 4 +- py/nf_python/nextflow.py | 6 -- py/pyproject.toml | 2 +- 10 files changed, 118 insertions(+), 99 deletions(-) delete mode 100644 .github/workflows/pypi-release.yml diff --git a/.github/workflows/nextflow-plugin.yml b/.github/workflows/nextflow-plugin.yml index 49fd297..a568f9f 100644 --- a/.github/workflows/nextflow-plugin.yml +++ b/.github/workflows/nextflow-plugin.yml @@ -10,7 +10,6 @@ jobs: build: runs-on: ubuntu-latest env: - NF_PYTHON_VERSION: '0.1.2' NXF_OFFLINE: 'true' steps: - uses: actions/checkout@v4 @@ -28,17 +27,24 @@ jobs: wget -qO- https://get.nextflow.io | bash sudo mv nextflow /usr/local/bin/ nextflow -version - - name: Build Python package + - name: Test versions run: | - pip install --upgrade pip - pip install ./py + # Get plugin version from plugins/nf-python/src/resources/META-INF/MANIFEST.MF + PLUGIN_VERSION=$(grep 'Plugin-Version' plugins/nf-python/src/resources/META-INF/MANIFEST.MF | cut -d' ' -f2) + # Get python package version from py/pyproject.toml + PYTHON_VERSION=$(grep 'version =' py/pyproject.toml | cut -d'=' -f2 | tr -d ' "') + if [ "$PLUGIN_VERSION" != "$PYTHON_VERSION" ]; then + echo "Plugin version mismatch: $PYTHON_VERSION, $PLUGIN_VERSION" + exit 1 + fi + echo "PLUGIN_VERSION=$PLUGIN_VERSION" >> $GITHUB_ENV - name: Build Nextflow plugin run: make buildPlugins - name: Move plugin to ~/.nextflow/plugins run: | mkdir -p ~/.nextflow/plugins - cp -r build/plugins/nf-python-${{ env.NF_PYTHON_VERSION }} ~/.nextflow/plugins/ + cp -r build/plugins/nf-python-${{ env.PLUGIN_VERSION }} ~/.nextflow/plugins/ - name: Run Nextflow workflow test run: | cd test - nextflow run test_flow.nf -plugins "nf-python@${{ env.NF_PYTHON_VERSION }}" + nextflow run test_flow.nf -plugins "nf-python@${{ env.PLUGIN_VERSION }}" diff --git a/.github/workflows/pypi-release.yml b/.github/workflows/pypi-release.yml deleted file mode 100644 index 055c451..0000000 --- a/.github/workflows/pypi-release.yml +++ /dev/null @@ -1,72 +0,0 @@ -# CI pipeline for nf-python - -name: nf-python Release - -on: - push: - tags: - - 'v*' - -jobs: - validate-version: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Extract version from pyproject.toml - id: pyproject - run: | - version=$(grep '^version' py/pyproject.toml | head -1 | cut -d '"' -f2) - echo "version=$version" >> $GITHUB_OUTPUT - - name: Extract version from git tag - id: tag - run: | - tag_version=${GITHUB_REF##*/} - tag_version=${tag_version#v} - echo "version=$tag_version" >> $GITHUB_OUTPUT - - name: Check versions match - run: | - if [ "${{ steps.pyproject.outputs.version }}" != "${{ steps.tag.outputs.version }}" ]; then - echo "pyproject.toml ${{ steps.pyproject.outputs.version }} and git tag ${{ steps.tag.outputs.version }} do not match!" - exit 1 - fi - echo "All versions match: ${{ steps.pyproject.outputs.version }}" - - build-pypi: - needs: validate-version - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - persist-credentials: false - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.x" - - name: Build Python package - run: | - cd py - pip install build - python -m build - - name: Archive Python dist - uses: actions/upload-artifact@v4 - with: - name: python-package-distributions - path: py/dist/* - - publish-pypi: - needs: build-pypi - runs-on: ubuntu-latest - environment: - name: pypi-publish - url: https://pypi.org/p/nf-python-plugin/ - permissions: - id-token: write - - steps: - - name: Download all the dists - uses: actions/download-artifact@v4 - with: - name: python-package-distributions - path: dist/ - - name: Publish distribution 📦 to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.gitignore b/.gitignore index 50590ca..cc76fdf 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,5 @@ work out py/*.egg-info/ + +plugins/nf-python/bin diff --git a/README.md b/README.md index 32bae7c..8510c89 100644 --- a/README.md +++ b/README.md @@ -3,13 +3,28 @@ nf-python is a Nextflow plugin enabling seamless integration between Nextflow and Python scripts. Python scripts can be invoked as part of your Nextflow workflow, and arguments and outputs will be serialized back-and-forth automatically, making them available as native pythonic objects. ## Installation -`nf-python` does not handle python environment setup itself. `python` needs to be in the system path and have the pypi package `nf-python-plugin` installed: -```bash -pip install nf-python-plugin +To use the plugin in your Nextflow data pipelines, simply include it by writing `include { pyFunction } from 'plugin/nf-python'` and it will be downloaded and installed. For all setup options, please refer to the [Nextflow plugins documentation](https://www.nextflow.io/docs/latest/plugins.html). + +`nf-python` requires a working python installation in the execution environment. By default, the `python` in path will be used. +It is also possible to specify a path to a specific python executable or a conda environment. Either in the configuration file: +``` +nf_python { + // Option 1 + executable = '/usr/bin/python' + // Option 2 + conda_env = '' +} ``` -🚨 Please note: installing `nf-python-plugin` through the built-in conda support is not working yet. +The supported values for the `conda_env` option are the same ones supported by [Nextflow's native conda](https://www.nextflow.io/docs/latest/conda.html) support, and is using the same configuration options. Here are a few options: +1. A list of required packages (e.g. `conda_env = 'numpy biopython'`) +2. A conda configuration file (e.g. `conda_env = '/opt/task-env.yml'`) +3. A path to an existing conda environment (e.g. `conda_env = '/home/user/.conda/envs/my-env'`) -Then, to use the plugin in your Nextflow data pipelines, simply include it by writing `include { pyFunction } from 'plugin/nf-python'` and it will be downloaded and installed. For all setup options, please refer to the [Nextflow plugins documentation](https://www.nextflow.io/docs/latest/plugins.html). +It is also possible to specify different environments on a per-function basis: +``` +pyFunction(script: "", x: 1, y: 2, _executable: "/usr/bin/python") +pyFunction(script: "", x: 1, y: 2, _conda_env: "matplotlib") +``` ## Example Usage To use a python script as part of your Nextflow pipeline, import `pyFunction` from the `nf-python` plugin: @@ -65,9 +80,8 @@ If you want to build and run this plugin from source, you can use this method: ```bash git clone git@github.com:royjacobson/nf-python.git && cd nf-python -pip install py/ # Install in the appropriate python environment make buildPlugins -export VER="0.1.2" # Change appropriately +export VER="0.1.3" # Change appropriately cp -r build/plugins/nf-python-${VER} ~/.nextflow/plugins/ export NXF_OFFLINE=true diff --git a/plugins/nf-python/build.gradle b/plugins/nf-python/build.gradle index 2f4cf2d..4afb868 100644 --- a/plugins/nf-python/build.gradle +++ b/plugins/nf-python/build.gradle @@ -81,3 +81,23 @@ test { useJUnitPlatform() } +task buildPython(type: Exec) { + workingDir '../../py' + commandLine 'python', '-m', 'build', '--wheel', '--outdir', "${buildDir}" +} + +task packagePython(type: Copy) { + dependsOn buildPython + def manifestFile = file('src/resources/META-INF/MANIFEST.MF') + def props = new Properties() + manifestFile.withInputStream { props.load(it) } + def pluginVersion = props['Plugin-Version'] + + from(zipTree("${buildDir}/nf_python_plugin-${pluginVersion}-py3-none-any.whl")) + into("${buildDir}/python-pkg") +} + +tasks.named('makeZip', Jar) { + dependsOn packagePython + from("${buildDir}/python-pkg") +} diff --git a/plugins/nf-python/src/main/nextflow/python/PythonExtension.groovy b/plugins/nf-python/src/main/nextflow/python/PythonExtension.groovy index 5480694..079a4fb 100644 --- a/plugins/nf-python/src/main/nextflow/python/PythonExtension.groovy +++ b/plugins/nf-python/src/main/nextflow/python/PythonExtension.groovy @@ -9,6 +9,9 @@ import nextflow.Session import nextflow.util.MemoryUnit import nextflow.util.VersionNumber import nextflow.util.Duration +import java.nio.file.Path +import nextflow.conda.CondaCache +import nextflow.conda.CondaConfig @CompileStatic class PythonExtension extends PluginExtensionPoint { @@ -18,10 +21,51 @@ from nf_python import nf ''' private Session session + private String executable + + private static Path pluginDir + + static void setPluginDir(Path path) { + pluginDir = path + } + + private String getPythonExecutable(String condaEnv) { + CondaCache cache = new CondaCache(session.getCondaConfig()) + java.nio.file.Path condaPath = cache.getCachePathFor(condaEnv) + + Process proc = new ProcessBuilder('conda', 'run', '-p', condaPath.toString(), 'which', 'python') + .redirectErrorStream(true) + .start() + def output = proc.inputStream.text.trim() + if (proc.waitFor() == 0 && output) { + return output + } else { + throw new IllegalStateException("Failed to find Python executable in conda environment: $condaEnv\n Output: ${output}") + } + } @Override void init(Session session) { this.session = session + this.executable = getExecutableFromConfigVals( + session.config.navigate('nf_python.executable') ?: '', + session.config.navigate('nf_python.conda_env') ?: '' + ) + } + + String getExecutableFromConfigVals(_executable, _condaEnv) { + String executable = cString(_executable) + String condaEnv = cString(_condaEnv) + if (executable && condaEnv) { + throw new IllegalArgumentException("The 'executable' and 'conda_env' options cannot be used together") + } + if (executable) { + return executable + } + if (condaEnv) { + return getPythonExecutable(condaEnv) + } + return 'python' } @Function @@ -76,32 +120,42 @@ from nf_python import nf return argsWithScript } - private static Object runPythonScript(Map args) { + private Object runPythonScript(Map args) { def script = args.script if (!script) { throw new IllegalArgumentException('Missing script argument') } - Map forwardedArgs = args.findAll { k, v -> k != 'script' } + def excludedKeys = ['script', '_executable', '_conda_env'] + Map forwardedArgs = args.findAll { k, v -> !(k in excludedKeys) } + + executable = this.executable + if (args.containsKey('_executable') || args.containsKey('_conda_env')) { + executable = getExecutableFromConfigVals(args._executable, args._conda_env) + } + File infile = File.createTempFile('nfpy_in', '.json') infile.deleteOnExit() infile.text = JsonOutput.toJson(packGroovy(forwardedArgs)) File outfile = File.createTempFile('nfpy_out', '.json') outfile.deleteOnExit() - String[] proc = ['python', script] as String[] + String[] proc = [executable, script] as String[] Map env = [ 'NEXTFLOW_INFILE': infile.absolutePath, 'NEXTFLOW_OUTFILE': outfile.absolutePath, - 'NEXTFLOW_PYTHON_COMPAT_VER': '1', + 'PYTHONPATH': System.getenv('PYTHONPATH') ? + System.getenv('PYTHONPATH') + File.pathSeparator + pluginDir.toString() : + pluginDir.toString() ] ProcessBuilder pb = new ProcessBuilder(proc) + pb.environment().putAll(env) pb.redirectErrorStream(true) Process process = pb.start() process.inputStream.eachLine { line -> println "[python] $line" } int rc = process.waitFor() if (rc != 0) { - throw new nextflow.exception.ProcessException("Python script failed with exit code $rc: $script") + throw new nextflow.exception.ProcessEvalException("Python script evaluation failed", proc.join(' '), '', rc) } Object result = new JsonSlurper().parse(outfile) diff --git a/plugins/nf-python/src/main/nextflow/python/PythonPlugin.groovy b/plugins/nf-python/src/main/nextflow/python/PythonPlugin.groovy index 9601540..ed2e47c 100644 --- a/plugins/nf-python/src/main/nextflow/python/PythonPlugin.groovy +++ b/plugins/nf-python/src/main/nextflow/python/PythonPlugin.groovy @@ -10,5 +10,6 @@ class PythonPlugin extends BasePlugin { PythonPlugin(PluginWrapper wrapper) { super(wrapper) + PythonExtension.setPluginDir(getWrapper().getPluginPath()) } } diff --git a/plugins/nf-python/src/resources/META-INF/MANIFEST.MF b/plugins/nf-python/src/resources/META-INF/MANIFEST.MF index e08c86d..16fb44a 100644 --- a/plugins/nf-python/src/resources/META-INF/MANIFEST.MF +++ b/plugins/nf-python/src/resources/META-INF/MANIFEST.MF @@ -1,6 +1,6 @@ Manifest-Version: 1.0 Plugin-Id: nf-python -Plugin-Version: 0.1.2 +Plugin-Version: 0.1.3 Plugin-Class: nextflow.python.PythonPlugin Plugin-Provider: nextflow -Plugin-Requires: >=22.04.0 +Plugin-Requires: >=23.04.0 diff --git a/py/nf_python/nextflow.py b/py/nf_python/nextflow.py index 6a6c402..5199729 100644 --- a/py/nf_python/nextflow.py +++ b/py/nf_python/nextflow.py @@ -46,7 +46,6 @@ def matches(self): raise NotImplementedError() -NEXTFLOW_PYTHON_COMPAT_VER = "1" VALID_FLOAT_TEXTS = ("nan", "inf", "-inf") @@ -142,11 +141,6 @@ def pack_python(python_object): class Nextflow: def __init__(self): self._written_output = False - if os.environ.get("NEXTFLOW_PYTHON_COMPAT_VER") != NEXTFLOW_PYTHON_COMPAT_VER: - raise RuntimeError( - "Incompatible NEXTFLOW_PYTHON_COMPAT_VER. Expected '1', got " - f"{os.environ.get('NEXTFLOW_PYTHON_COMPAT_VER')}" - ) self._infile = os.environ.get("NEXTFLOW_INFILE") self._outfile = os.environ.get("NEXTFLOW_OUTFILE") if not self._infile or not self._outfile: diff --git a/py/pyproject.toml b/py/pyproject.toml index 544d18f..a5ffc21 100644 --- a/py/pyproject.toml +++ b/py/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "nf-python-plugin" -version = "0.1.2" +version = "0.1.3" authors = [ { name="Roy Jacobson", email="roy.jacobson@weizmann.ac.il" }, ] From b7c2fec4de584bd5e264ff7701fc6514b48a0eda Mon Sep 17 00:00:00 2001 From: Roy Jacobson Date: Mon, 28 Jul 2025 14:39:51 +0300 Subject: [PATCH 2/5] [*] Fix a bug with inline configuration of executables. [*] Add tests for new features. --- .github/workflows/nextflow-plugin.yml | 18 +++++++++++++++++- .../nextflow/python/PythonExtension.groovy | 2 +- test/nextflow.config | 3 --- test/test-conda/conda.config | 7 +++++++ test/test-conda/test_conda_config.nf | 13 +++++++++++++ test/test-conda/test_conda_inline.nf | 14 ++++++++++++++ test/{ => test-datatypes}/echo_kwargs.py | 0 test/{ => test-datatypes}/test_flow.nf | 0 test/test-executable/executable.config | 7 +++++++ test/test-executable/test_executable_config.nf | 15 +++++++++++++++ test/test-executable/test_executable_inline.nf | 15 +++++++++++++++ 11 files changed, 89 insertions(+), 5 deletions(-) delete mode 100644 test/nextflow.config create mode 100644 test/test-conda/conda.config create mode 100644 test/test-conda/test_conda_config.nf create mode 100644 test/test-conda/test_conda_inline.nf rename test/{ => test-datatypes}/echo_kwargs.py (100%) rename test/{ => test-datatypes}/test_flow.nf (100%) create mode 100644 test/test-executable/executable.config create mode 100644 test/test-executable/test_executable_config.nf create mode 100644 test/test-executable/test_executable_inline.nf diff --git a/.github/workflows/nextflow-plugin.yml b/.github/workflows/nextflow-plugin.yml index a568f9f..f88aca6 100644 --- a/.github/workflows/nextflow-plugin.yml +++ b/.github/workflows/nextflow-plugin.yml @@ -22,6 +22,9 @@ jobs: uses: actions/setup-python@v5 with: python-version: '3.10' + - uses: conda-incubator/setup-miniconda@v2 + with: + miniconda-version: latest - name: Install Nextflow run: | wget -qO- https://get.nextflow.io | bash @@ -46,5 +49,18 @@ jobs: cp -r build/plugins/nf-python-${{ env.PLUGIN_VERSION }} ~/.nextflow/plugins/ - name: Run Nextflow workflow test run: | - cd test + source $CONDA/etc/profile.d/conda.sh + + pushd test/test-datatypes nextflow run test_flow.nf -plugins "nf-python@${{ env.PLUGIN_VERSION }}" + popd + + pushd test/test-conda + nextflow run test_conda_config.nf -plugins "nf-python@${{ env.PLUGIN_VERSION }}" -config conda.config + nextflow run test_conda_inline.nf -plugins "nf-python@${{ env.PLUGIN_VERSION }}" + popd + + pushd test/test-executable + nextflow run test_executable_config.nf -plugins "nf-python@${{ env.PLUGIN_VERSION }}" -config executable.config + nextflow run test_executable_inline.nf -plugins "nf-python@${{ env.PLUGIN_VERSION }}" + popd diff --git a/plugins/nf-python/src/main/nextflow/python/PythonExtension.groovy b/plugins/nf-python/src/main/nextflow/python/PythonExtension.groovy index 079a4fb..9d52722 100644 --- a/plugins/nf-python/src/main/nextflow/python/PythonExtension.groovy +++ b/plugins/nf-python/src/main/nextflow/python/PythonExtension.groovy @@ -130,7 +130,7 @@ from nf_python import nf executable = this.executable if (args.containsKey('_executable') || args.containsKey('_conda_env')) { - executable = getExecutableFromConfigVals(args._executable, args._conda_env) + executable = getExecutableFromConfigVals(args._executable ?: '', args._conda_env ?: '') } File infile = File.createTempFile('nfpy_in', '.json') diff --git a/test/nextflow.config b/test/nextflow.config deleted file mode 100644 index dfcf539..0000000 --- a/test/nextflow.config +++ /dev/null @@ -1,3 +0,0 @@ -plugins { - id 'nf-python' -} \ No newline at end of file diff --git a/test/test-conda/conda.config b/test/test-conda/conda.config new file mode 100644 index 0000000..5f132aa --- /dev/null +++ b/test/test-conda/conda.config @@ -0,0 +1,7 @@ +plugins { + id 'nf-python' +} + +nf_python { + conda_env='six' +} \ No newline at end of file diff --git a/test/test-conda/test_conda_config.nf b/test/test-conda/test_conda_config.nf new file mode 100644 index 0000000..6976080 --- /dev/null +++ b/test/test-conda/test_conda_config.nf @@ -0,0 +1,13 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { pyFunction } from 'plugin/nf-python' + +workflow { + assert pyFunction(''' + import six + print("Package 'six' available!") + nf.output(True) +''') == [true] +} diff --git a/test/test-conda/test_conda_inline.nf b/test/test-conda/test_conda_inline.nf new file mode 100644 index 0000000..aad9bd0 --- /dev/null +++ b/test/test-conda/test_conda_inline.nf @@ -0,0 +1,14 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { pyFunction } from 'plugin/nf-python' + +workflow { + assert pyFunction(''' + import six + print("Package 'six' available!") + nf.output(True) +''', _conda_env: 'six') == [true] + +} diff --git a/test/echo_kwargs.py b/test/test-datatypes/echo_kwargs.py similarity index 100% rename from test/echo_kwargs.py rename to test/test-datatypes/echo_kwargs.py diff --git a/test/test_flow.nf b/test/test-datatypes/test_flow.nf similarity index 100% rename from test/test_flow.nf rename to test/test-datatypes/test_flow.nf diff --git a/test/test-executable/executable.config b/test/test-executable/executable.config new file mode 100644 index 0000000..b456498 --- /dev/null +++ b/test/test-executable/executable.config @@ -0,0 +1,7 @@ +plugins { + id 'nf-python' +} + +nf_python { + executable='doesntexist' +} diff --git a/test/test-executable/test_executable_config.nf b/test/test-executable/test_executable_config.nf new file mode 100644 index 0000000..22d729a --- /dev/null +++ b/test/test-executable/test_executable_config.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { pyFunction } from 'plugin/nf-python' + +workflow { + try { + pyFunction('test') + assert false, "Should always throw" + } catch (java.lang.reflect.InvocationTargetException e) { + def cause = e.getCause() + assert cause.message.startsWith('Cannot run program "doesntexist"') + } +} diff --git a/test/test-executable/test_executable_inline.nf b/test/test-executable/test_executable_inline.nf new file mode 100644 index 0000000..a883185 --- /dev/null +++ b/test/test-executable/test_executable_inline.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { pyFunction } from 'plugin/nf-python' + +workflow { + try { + pyFunction('test', _executable: 'doesntexist') + assert false, "Should always throw" + } catch (java.lang.reflect.InvocationTargetException e) { + def cause = e.getCause() + assert cause.message.startsWith('Cannot run program "doesntexist"') + } +} From ff24fd3636715c17e201812ca0478b89ecbeb07f Mon Sep 17 00:00:00 2001 From: Roy Jacobson Date: Mon, 28 Jul 2025 14:56:21 +0300 Subject: [PATCH 3/5] Try to add metadata json to releases --- .github/workflows/plugin-release.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/plugin-release.yml b/.github/workflows/plugin-release.yml index 19e0672..38077a3 100644 --- a/.github/workflows/plugin-release.yml +++ b/.github/workflows/plugin-release.yml @@ -85,6 +85,11 @@ jobs: filename=$(basename $file) echo "file=$file" >> $GITHUB_OUTPUT echo "filename=$filename" >> $GITHUB_OUTPUT + + metafile=$(ls build/libs/nf-python-*-meta.json | head -n1) + metafilename=$(basename $metafile) + echo "metafile=$metafile" >> $GITHUB_OUTPUT + echo "metafilename=$metafilename" >> $GITHUB_OUTPUT - name: Upload plugin zip to release uses: actions/upload-release-asset@v1 env: @@ -94,3 +99,12 @@ jobs: asset_path: ${{ steps.find_zip.outputs.file }} asset_name: ${{ steps.find_zip.outputs.filename }} asset_content_type: application/zip + - name: Upload plugin zip to release + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.get_release.outputs.upload_url }} + asset_path: ${{ steps.find_zip.outputs.metafile }} + asset_name: ${{ steps.find_zip.outputs.metafilename }} + asset_content_type: application/json From 42c8bc8c5d5c5eb8d1d0a324047b49e496920f2c Mon Sep 17 00:00:00 2001 From: Roy Jacobson Date: Mon, 28 Jul 2025 14:58:01 +0300 Subject: [PATCH 4/5] Update doc --- doc/protocol.md | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/protocol.md b/doc/protocol.md index 2ba412d..c6e3994 100644 --- a/doc/protocol.md +++ b/doc/protocol.md @@ -8,7 +8,6 @@ The protocol is described here: - `NEXTFLOW_INFILE`: Path to a temporary JSON file containing serialized input arguments - `NEXTFLOW_OUTFILE`: Path to a temporary JSON file where serialized output are written by the Python code -- `NEXTFLOW_PYTHON_COMPAT_VER`: Protocol compatibility version (currently "1") ## JSON Type System From dd31404097e098edf149a6e34f62ccfb5aa3e8e8 Mon Sep 17 00:00:00 2001 From: Roy Jacobson Date: Mon, 28 Jul 2025 15:03:26 +0300 Subject: [PATCH 5/5] Try to fix CI --- .github/workflows/nextflow-plugin.yml | 4 ++++ .github/workflows/plugin-release.yml | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/.github/workflows/nextflow-plugin.yml b/.github/workflows/nextflow-plugin.yml index f88aca6..ea421ad 100644 --- a/.github/workflows/nextflow-plugin.yml +++ b/.github/workflows/nextflow-plugin.yml @@ -30,6 +30,10 @@ jobs: wget -qO- https://get.nextflow.io | bash sudo mv nextflow /usr/local/bin/ nextflow -version + - name: Install Python build dependencies + run: | + python -m pip install --upgrade pip + pip install build - name: Test versions run: | # Get plugin version from plugins/nf-python/src/resources/META-INF/MANIFEST.MF diff --git a/.github/workflows/plugin-release.yml b/.github/workflows/plugin-release.yml index 38077a3..7fc1a9d 100644 --- a/.github/workflows/plugin-release.yml +++ b/.github/workflows/plugin-release.yml @@ -41,6 +41,14 @@ jobs: with: distribution: 'temurin' java-version: '17' + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + - name: Install Python build dependencies + run: | + python -m pip install --upgrade pip + pip install build - name: Build Nextflow plugin run: | make buildPlugins