Conversation
…fig that lives outside toml?
|
Error above: |
SamDuffield
left a comment
There was a problem hiding this comment.
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
| [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 |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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", | |||
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Would be great if we could grab the version here from a shared file too, not sure if possible though
| "chex", | ||
| "pre-commit", "ruff", "pyright", | ||
| "pytest", "pytest-xdist", | ||
| "entangled-cli; python_version >= '3.12'", |
There was a problem hiding this comment.
Why remove the comments? I think they add
| "tests/**/*.py" = ["D"] | ||
| "cuthbertlib/resampling/**/*.py" = ["D103"] |
| - 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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
I'm happy to trust that this works lol, I guess we'll find out on merge+release
| @@ -0,0 +1,33 @@ | |||
| [build-system] | |||
There was a problem hiding this comment.
Might be less ambiguous to name this pyproject.cuthbertlib.toml
I don't think this will work. I found another way with Codex, see #187. Not sure how to test the |
No description provided.