Skip to content

update pyproject.toml, add a .gitignore file#1

Draft
s-sajid-ali wants to merge 5 commits into
coldfront:devfrom
NYU-RTS:fix_pyproject_toml
Draft

update pyproject.toml, add a .gitignore file#1
s-sajid-ali wants to merge 5 commits into
coldfront:devfrom
NYU-RTS:fix_pyproject_toml

Conversation

@s-sajid-ali
Copy link
Copy Markdown

@s-sajid-ali s-sajid-ali commented May 11, 2026

Motivation behind unifying everything in pyproject.toml

Adding this as a project via uv raises the following exception:

sh-5.1$ uv add git+https://github.com/coldfront/coldfront-slurm-plugin         
    Updated https://github.com/coldfront/coldfront-slurm-plugin (fb661fbf910bb18e00ef93571c6551585cd522a0)
error: `pyproject.toml` does not match the required schema. When the `[project]` table is present, `project.name` must be present and non-empty.
  Caused by: TOML parse error at line 4, column 5
  |
4 |     "git+https://github.com/coldfront/slurm-python-sdk.git",
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
URL requirement must be preceded by a package name. Add the name of the package before the URL (e.g., `package_name @ https://...`).
git+https://github.com/coldfront/slurm-python-sdk.git
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sh-5.1$ 

However, adding a skeleton project section is not enough as we then run into more issues as each missing field then raises a separate issue. Now that Coldfront itself uses uv, we should be able to safely drop support for legacy build tools and do away with setup.cfg. Since Coldfront uses, hatch as the build backend, re-use it here instead of adding a new one.

Additional changes:

Change the name of the dependency to slurmrest_python to address:

╰─▶ Package metadata name `slurmrest-python` does not match given name `slurm-python-sdk` 

Set the name of the project to the folder within src to prevent this issuer:

ValueError: Unable to determine which files to ship inside the wheel using the following heuristics:
https://hatch.pypa.io/latest/plugins/builder/wheel/#default-file-selection

Finally, also add a standard .gitignore file for Python from https://github.com/github/gitignore/blob/main/Python.gitignore

@s-sajid-ali s-sajid-ali force-pushed the fix_pyproject_toml branch from 7932fe4 to 26c0e4e Compare May 11, 2026 18:49
	modified:   pyproject.toml
@s-sajid-ali s-sajid-ali force-pushed the fix_pyproject_toml branch from 57cf10c to af11b26 Compare May 11, 2026 19:08
@s-sajid-ali s-sajid-ali changed the title update pyproject.toml update pyproject.toml, add a .gitignore file May 11, 2026
@s-sajid-ali s-sajid-ali force-pushed the fix_pyproject_toml branch from bf47ba6 to 322264a Compare May 11, 2026 19:10
@s-sajid-ali s-sajid-ali force-pushed the fix_pyproject_toml branch from b5f9911 to f334e20 Compare May 11, 2026 19:12
@s-sajid-ali s-sajid-ali marked this pull request as draft May 11, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant