broadinstitute / cromshell

CLI for interacting with Cromwell servers
BSD 3-Clause "New" or "Revised" License
53 stars 15 forks source link

Replacing Setup.py with Pyproject.py #279

Closed bshifaw closed 6 months ago

bshifaw commented 6 months ago

The python community is moving towards pyproject as the standard method of specifying a project metadata.

Starting with PEP 621, the Python community selected pyproject.toml as a standard way of specifying project metadata link

The Cromshell repo has been using a mix of pyproject.py and setup.py, this is currently causing issue during installation.

integration: packaging backend failed (code=1), with AttributeError: 'NoneType' object has no attribute 'split'
/home/runner/work/cromshell/cromshell/.tox/.pkg/lib/python3.8/site-packages/setuptools/config/_apply_pyprojecttoml.py:75: _MissingDynamic: `description` defined outside of `pyproject.toml` is ignored.
!!

        ********************************************************************************
        The following seems to be defined outside of `pyproject.toml`:

        `description = 'Command Line Interface (CLI) for Cromwell servers'`

        According to the spec (see the link below), however, setuptools CANNOT
        consider this value unless `description` is listed as `dynamic`.

        https://packaging.python.org/en/latest/specifications/declaring-project-metadata/

        To prevent this problem, you can list `description` under `dynamic` or alternatively
        remove the `[project]` table from your file and rely entirely on other means of
        configuration.
        ********************************************************************************

Changes in this repo replaceses setup.py completely with pyproject.toml, fixing the installation errors.

bshifaw commented 6 months ago

@bshifaw Looks fine to me, but I definitely don't understand the nuance here.

I think we should probably check with the people using it for the all of us workspaces to make sure they have 3.9 available.

This update was to help fix the installation on AOU workspaces. When running their cromshell tutorial, the installation included a cell that updated the cromshell version by pip - git (pip install git+https://github.com/broadinstitute/cromshell). This caused the installation error mentioned in the PR description. Their python version is 3.10.3.

Also, to confirm I just now installed cromshell in an AOU notebook using this specific branch; the instillation now completes successfully.