Skip to content

Publish cuthbertlib independently#183

Open
AdrienCorenflos wants to merge 2 commits intomainfrom
pypi-cuthbertlib
Open

Publish cuthbertlib independently#183
AdrienCorenflos wants to merge 2 commits intomainfrom
pypi-cuthbertlib

Conversation

@AdrienCorenflos
Copy link
Contributor

No description provided.

@AdrienCorenflos
Copy link
Contributor Author

Error above:
cuthbertlib was not found in the package registry and your project depends on cuthbertlib==0.0.3, etc.
Essentially we should ignore: the whole point is to publish it to the registry

Copy link
Contributor

@SamDuffield SamDuffield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also be clear how a developer can install both or either package locally. I'm not quite sure how to do that with this structure

Comment on lines +26 to +33
[tool.ruff]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401", "F821", "E402", "D104"]
"cuthbertlib/resampling/**/*.py" = ["D103"]
[tool.ruff.lint]
select = ["D"]
[tool.ruff.lint.pydocstyle]
convention = "google" No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need ruff here? As this file is only used by pypi.yaml not pre-commit


[project]
name = "cuthbertlib"
version = "0.0.3"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can have dynamic = ["version"] and then a [tool.setuptools.dynamic] field below which loads the version from an external file to avoid duplication. Perhaps we can do this with the other shared fields too.

@@ -18,47 +18,38 @@ authors = [
dependencies = [
"jax>=0.4.35",
"numba>=0.60.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can delete numba here as its only a dependency for cuthbert via cuthbertlib

# effectively disabling it for all normal platforms
override-dependencies = [
"tensorflow-probability ; sys_platform == 'undefined'",
"cuthbertlib==0.0.3", # Direct dependency on the library
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be great if we could grab the version here from a shared file too, not sure if possible though

Comment on lines +29 to +32
"chex",
"pre-commit", "ruff", "pyright",
"pytest", "pytest-xdist",
"entangled-cli; python_version >= '3.12'",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove the comments? I think they add

Comment on lines +43 to +44
"tests/**/*.py" = ["D"]
"cuthbertlib/resampling/**/*.py" = ["D103"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments not useless

Comment on lines +81 to +90
- name: Test cuthbertlib install
run: |
pip install "cuthbertlib==${GITHUB_REF_NAME#v}"
python -c "import cuthbertlib; import cuthbertlib.discrete"

- name: Test cuthbertlib and cuthbert install
run: |
pip install "cuthbertlib==${GITHUB_REF_NAME#v}"
python -c "import cuthbertlib; import cuthbertlib.discrete"
pip uninstall cuthbertlib
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are both "Test cuthbertlib install" and "Test cuthbertlib and cuthbert install" needed?

run: python3 -m build

# 2. Build cuthbertlib (swaps config, builds, then swaps back)
- name: Build cuthbertlib
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy to trust that this works lol, I guess we'll find out on merge+release

@@ -0,0 +1,33 @@
[build-system]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be less ambiguous to name this pyproject.cuthbertlib.toml

@Sahel13
Copy link
Collaborator

Sahel13 commented Feb 11, 2026

We should also be clear how a developer can install both or either package locally. I'm not quite sure how to do that with this structure

I don't think this will work. I found another way with Codex, see #187. Not sure how to test the pypi.yaml file, but at least local editable installs work with that setup.

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.

3 participants