Nexus: Installable as a Python package#5742
Conversation
… from `pyproject.toml`
|
Thanks Brock. Q. Are you done with updates including updating the readme and install instructions? If so, please add the [x] to the 3rd and 4th bullets in the PR description and I will take a look. |
|
I'm not quite done. After a chat with @jtkrogel yesterday I realized that perhaps there should be some additional clarification for users, and most likely a note about selecting a branch to install. The current default is Additionally, I still need to update the Nexus docs, since that will likely be where people go for install instructions, not the readme. |
|
I was wondering when the issue of Nexus versioning would arise in this effort, since package managers will rightly need to version the package. For git+python package manger installation, clearly most users should install the version corresponding to the version of QMCPACK they are using, or simply the last tagged version. Folks should only use develop if they know they need it (new feature, bug fix, adventurous spirit). Based on recent errors we clearly can not yet guarantee that develop will work. Imminent changes to the testing will get us to the point needed but we are not there yet. The instructions should have variants of |
|
Note that a key lesson from the QMCPACK documentation is to not put too much in the README.md and to direct users to specific parts of readthedocs documentation. This avoids the documentation becoming scattered, potentially duplicative, and/or potentially out of sync. A single source of truth is ideal. (The QMCPACK docs are still in the process of migrating all to readthedocs - the readme is too long and there are some remnant wiki entries to copy over.) |
…docs/readme to reflect this change.
… adding small framework for potential future script packaging
I'm not sure why the diff shows that I added that, those files have been in the Speaking of the Here's what it looks like for version 4.4.6 of PyCifRW (which happens to only be available on Linux): [[package]]
name = "pycifrw"
version = "4.4.6"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "numpy", version = "1.19.5", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.7'" },
{ name = "numpy", version = "1.21.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version == '3.7.*'" },
{ name = "numpy", version = "1.24.4", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version == '3.8.*'" },
{ name = "numpy", version = "2.0.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version == '3.9.*'" },
{ name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version == '3.10.*'" },
{ name = "numpy", version = "2.4.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },
{ name = "ply" },
]
sdist = { url = "https://files.pythonhosted.org/packages/57/08/e0811d3a6bd0895fef98a0341ba2bd4556c8bbc7287ea01f1a8db96214f6/PyCifRW-4.4.6.tar.gz", hash = "sha256:02bf5975e70ab71540bff62fbef3e8354ac707a0f0ab914a152047962891ef15", size = 1073183, upload-time = "2023-11-01T06:13:01.259Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/6e/b6/b429e4f48960b19480111ed3812e0cd53be810f190a1f8c652e99149d47a/PyCifRW-4.4.6-cp311-cp311-manylinux_2_5_x86_64.whl", hash = "sha256:a89844ed5811700f995d1913a248d29d5745078ffd0f957b7e0574d74a48d0df", size = 160036, upload-time = "2023-11-01T06:13:38.088Z" },
] |
|
Word wrap: unfortunately this is currently a no win situation, with both routes having advantages and disadvantages. E.g. until the GitHub website gains better wrapping support itself, there will always be a vote for shorter lines since diffs on long lines are impractical to read and review. |
|
Q. Is there anything in the installation part of the README.md that is not in the installation docs? To avoid duplication, I would like to just have a pointer to these docs there. |
|
I recommend I also think that while diff readability is important, code readability is more important. It's a matter of opinion, but naturally I'm biased and think my opinion is the correct one :) |
I don't think there is anything in the |
| .. caution:: | ||
| This method of installation is not recommended for those who wish to customize Nexus for a specific project, or need to keep different | ||
| versions of Nexus available, because all Nexus will potentially see this system-wide version. | ||
|
|
There was a problem hiding this comment.
Slightly hard to follow. better to have recommended one first
a) user level. recommended.
...
b) system level. not recommended.
...
Then common bits.
There was a problem hiding this comment.
To avoid conflict with your downstream changes, there is no need to address it in this PR. I just want to raise my concern.
There was a problem hiding this comment.
I have revised the order, putting the recommend routes first and making them clearer.
…it'll be a slam dunk PR soon
|
Updated. I believe all the requests for updates have been addressed. |
|
I deleted references to the |
|
Test this please |


Proposed changes
This PR is designed to make Nexus available to install via a package manager such as
piporuv.The general changes include:
pyproject.tomlfile with minimum supported versionsuvREADME(now in markdown, name changed toREADME.md)What type(s) of changes does this code introduce?
Does this introduce a breaking change?
What systems has this change been tested on?
Laptop running Fedora 43 with
uv0.9.24 and Python 3.14.2Docker container of Ubuntu 18.04 with
pip21.3.1 and Python 3.6Note: The default install of
pipon Ubuntu 18.04 ispip9.1, which does not work to install via GitHub links. The minimum version ofpipthat will do this is 10.0.0. I have tested and can confirm that runningpython3 -m pip install -U pipwith Python 3.6 will updatepipto version 21.3.1, which does work.Checklist