From c63ff9469253549ebcd285cb59b150bc9168f45a Mon Sep 17 00:00:00 2001 From: Josh Mitchell Date: Sat, 25 Jan 2025 10:47:30 +1100 Subject: [PATCH 01/32] Set up pixi --- .gitignore | 4 +++ pyproject.toml | 92 +++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 84 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index df7a46f..79577a4 100644 --- a/.gitignore +++ b/.gitignore @@ -116,4 +116,8 @@ poetry.lock # zed .zed/ +# pixi +.pixi +pixi.lock + .ccd_cache diff --git a/pyproject.toml b/pyproject.toml index 878f132..d217016 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,19 +27,87 @@ dynamic = [ "version", ] -[project.optional-dependencies] -test = [ - "pytest>=6.0", - "pytest-xdist>=2.5", - "pytest-cov>=3.0", -] -doc = [ - "sphinx", -] +[project.urls] +source = "https://github.com/openforcefield/openff-pablo" +documentation = "https://openff-pablo.readthedocs.io" + +[tool.pixi.project] +channels = ["conda-forge"] +platforms = ["linux-64", "osx-arm64", "osx-64"] + +[tool.pixi.dependencies] +openff-toolkit-base = ">=0.14.7" +rdkit = "*" +openmm = "*" +numpy = "*" + +[tool.pixi.pypi-dependencies] +openff-pablo = { path = ".", editable = true } +# openff-toolkit = { git = "https://github.com/openforcefield/openff-toolkit.git", rev = "better_typing" } +# openff-units = { git = "https://github.com/openforcefield/openff-units.git", rev = "better_typing" } + +[tool.pixi.feature.test.dependencies] +pytest = "*" +pytest-xdist = "*" +# pytest-cov = "*" +# codecov = "*" + +[tool.pixi.feature.test.tasks.test] +cmd = "pytest -n auto -m 'not slow'" +cwd = "." + +[tool.pixi.feature.test.tasks.slowtest] +cmd = "pytest -n auto" +cwd = "." + +[tool.pixi.feature.test.tasks.doctest] +cmd = "pytest -n auto --doctest-glob 'docs/*.md' --doctest-glob 'docs/*.rst' --doctest-modules --ignore openff/pdbscan/tests/ --ignore openff/pdbscan/_tests/ --ignore-glob docs/*.py openff/ docs/" +cwd = "." + +[tool.pixi.feature.doc.dependencies] +myst-parser = "*" +sphinx = "==6.1.2" +sphinx-notfound-page = "*" +autodoc-pydantic = "*" +sphinx-click = "*" + +[tool.pixi.feature.doc.pypi-dependencies] +openff-sphinx-theme = { git = "https://github.com/openforcefield/openff-sphinx-theme.git", rev = "main" } + +[tool.pixi.feature.doc.tasks.doc] +cmd = "sphinx-build -j auto docs docs/_build/html" +cwd = "." + +[tool.pixi.feature.doc.tasks.watchdoc] +cmd = "watchexec --on-busy-update restart -w openff -w docs --print-events 'sphinx-build -j auto docs docs/_build/html'" +cwd = "." + +[tool.pixi.feature.example.dependencies] +jupyterlab = ">=4" +ipywidgets = ">=8" +jupyterlab_execute_time = "*" +jupyterlab-lsp = "*" +jupyterlab_rise = "*" +jedi-language-server = "*" +jupyterlab_code_formatter = "*" +black = "*" +isort = "*" +snakeviz = "*" +nglview = ">=3.0.6,<3.1.0" + +[tool.pixi.feature.example.tasks.lab] +cmd = "jupyter lab" +cwd = "examples" + +[tool.pixi.feature.lint.dependencies] +basedpyright = "*" +ruff = "*" -# [project.urls] -# source = "https://github.com/openforcefield/openff-pablo" -# documentation = "https://openff-pablo.readthedocs.io" +[tool.pixi.environments] +test = { features = ["test"], solve-group = "default" } +doc = { features = ["doc"], solve-group = "default" } +example = { features = ["example"], solve-group = "default" } +lint = { features = ["lint"], no-default-feature = true } [tool.versioningit] default-version = "v0.0.0.dev0+VERSIONMISSING" From c036d8562384703de2f388657e27eeeb68dae0b3 Mon Sep 17 00:00:00 2001 From: Josh Mitchell Date: Sat, 25 Jan 2025 21:46:18 +1100 Subject: [PATCH 02/32] Set up pixi for CI --- .codecov.yml | 3 +- .github/dependabot.yml | 11 +++++ .github/workflows/lint.yaml | 45 ++++++++++++++++++++ .github/workflows/{gh-ci.yaml => tests.yaml} | 30 +++---------- pyproject.toml | 16 ++++--- 5 files changed, 74 insertions(+), 31 deletions(-) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/lint.yaml rename .github/workflows/{gh-ci.yaml => tests.yaml} (68%) diff --git a/.codecov.yml b/.codecov.yml index d61d211..ba90ed6 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -13,4 +13,5 @@ comment: flags: [] paths: [] ignore: - - "openff/pablo/_version.py" + - "examples/" + - "docs/" diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..e5f2055 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: monthly + + groups: + dependencies: + patterns: + - "*" diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 0000000..e3d2d0b --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,45 @@ +name: GH Actions CI +on: + push: + branches: + - main + pull_request: + branches: + - main + +concurrency: + # Specific group naming so CI is only cancelled + # within same PR or on merge to main + group: ${{ github.ref }}-${{ github.head_ref }}-${{ github.workflow }} + cancel-in-progress: true + +defaults: + run: + shell: bash -l {0} + +jobs: + main-tests: + if: "github.repository == 'openforcefield/openff-pablo'" + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest] + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Build information + run: | + uname -a + df -h + ulimit -a + + - uses: prefix-dev/setup-pixi@v0.8.0 + with: + pixi-version: v0.40.3 + environments: lint + + - run: pixi run lint diff --git a/.github/workflows/gh-ci.yaml b/.github/workflows/tests.yaml similarity index 68% rename from .github/workflows/gh-ci.yaml rename to .github/workflows/tests.yaml index 95483e9..cf7018a 100644 --- a/.github/workflows/gh-ci.yaml +++ b/.github/workflows/tests.yaml @@ -30,7 +30,6 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest] - python-version: ["3.11"] steps: - uses: actions/checkout@v4 @@ -43,34 +42,19 @@ jobs: df -h ulimit -a - - name: Install environment - uses: mamba-org/setup-micromamba@v2 + - uses: prefix-dev/setup-pixi@v0.8.0 with: - environment-file: devtools/conda-envs/test_env.yaml - create-args: >- - python=${{ matrix.python-version }} - - - name: Install package - run: | - python --version - python -m pip install . - - - name: Python information - run: | - which python - which pip - pip list - micromamba info - micromamba list + pixi-version: v0.40.3 + environments: test - name: Type check if: runner.os == 'Linux' run: | - basedpyright openff + pixi run typecheck - - name: Run tests - run: | - pytest -n auto -v --color=yes + - run: pixi run test -v --color=yes --cov=openff/pablo --cov-append --cov-report=xml + + - run: pixi run doctest -v --color=yes # - name: codecov # uses: codecov/codecov-action@v3 diff --git a/pyproject.toml b/pyproject.toml index d217016..78cc9b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,21 +43,19 @@ numpy = "*" [tool.pixi.pypi-dependencies] openff-pablo = { path = ".", editable = true } -# openff-toolkit = { git = "https://github.com/openforcefield/openff-toolkit.git", rev = "better_typing" } -# openff-units = { git = "https://github.com/openforcefield/openff-units.git", rev = "better_typing" } [tool.pixi.feature.test.dependencies] pytest = "*" pytest-xdist = "*" -# pytest-cov = "*" -# codecov = "*" +pytest-cov = "*" +codecov = "*" [tool.pixi.feature.test.tasks.test] -cmd = "pytest -n auto -m 'not slow'" +cmd = "pytest -n auto" cwd = "." -[tool.pixi.feature.test.tasks.slowtest] -cmd = "pytest -n auto" +[tool.pixi.feature.test.tasks.fasttest] +cmd = "pytest -n auto -m 'not slow'" cwd = "." [tool.pixi.feature.test.tasks.doctest] @@ -103,6 +101,10 @@ cwd = "examples" basedpyright = "*" ruff = "*" +[tool.pixi.feature.lint.tasks.typecheck] +cmd = "basedpyright openff" +cwd = "." + [tool.pixi.environments] test = { features = ["test"], solve-group = "default" } doc = { features = ["doc"], solve-group = "default" } From a5ba3b7f38dde8e7f5d59276ca98e8cbe401f872 Mon Sep 17 00:00:00 2001 From: Josh Mitchell Date: Sat, 25 Jan 2025 21:58:41 +1100 Subject: [PATCH 03/32] Fix doctests and be ok with codecov failing --- .github/workflows/lint.yaml | 2 +- .github/workflows/tests.yaml | 14 +++++++------- pyproject.toml | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index e3d2d0b..a38166b 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -1,4 +1,4 @@ -name: GH Actions CI +name: GH Actions Lints on: push: branches: diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index cf7018a..1e51e00 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -1,4 +1,4 @@ -name: GH Actions CI +name: GH Actions Tests on: push: branches: @@ -56,9 +56,9 @@ jobs: - run: pixi run doctest -v --color=yes - # - name: codecov - # uses: codecov/codecov-action@v3 - # with: - # file: coverage.xml - # name: codecov-${{ matrix.os }}-py${{ matrix.python-version }} - # verbose: True + - name: Codecov + uses: codecov/codecov-action@v5 + with: + files: ./coverage.xml + disable_search: true + fail_ci_if_error: false diff --git a/pyproject.toml b/pyproject.toml index 78cc9b0..ac3357b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,7 +59,7 @@ cmd = "pytest -n auto -m 'not slow'" cwd = "." [tool.pixi.feature.test.tasks.doctest] -cmd = "pytest -n auto --doctest-glob 'docs/*.md' --doctest-glob 'docs/*.rst' --doctest-modules --ignore openff/pdbscan/tests/ --ignore openff/pdbscan/_tests/ --ignore-glob docs/*.py openff/ docs/" +cmd = "pytest -n auto --doctest-glob 'docs/*.md' --doctest-glob 'docs/*.rst' --doctest-modules --ignore openff/pablo/_tests/ --ignore-glob docs/*.py openff/ docs/" cwd = "." [tool.pixi.feature.doc.dependencies] From ef005b6b7d401e93cd0805b386f5e4bae89851d5 Mon Sep 17 00:00:00 2001 From: Josh Mitchell Date: Sat, 25 Jan 2025 22:00:58 +1100 Subject: [PATCH 04/32] Fix lints --- .github/workflows/lint.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index a38166b..0b194be 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -15,7 +15,7 @@ concurrency: defaults: run: - shell: bash -l {0} + shell: pixi run bash -l {0} jobs: main-tests: @@ -42,4 +42,6 @@ jobs: pixi-version: v0.40.3 environments: lint - - run: pixi run lint + - run: pyright + + - run: ruff From 85a3e16d37b5fb1cfdb04a513da3a537132555ae Mon Sep 17 00:00:00 2001 From: Josh Mitchell Date: Sat, 25 Jan 2025 22:02:12 +1100 Subject: [PATCH 05/32] Fix lints pt2 --- .github/workflows/lint.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 0b194be..5062b2e 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -36,6 +36,7 @@ jobs: uname -a df -h ulimit -a + shell: bash -l {0} - uses: prefix-dev/setup-pixi@v0.8.0 with: From f483cf18f809d6f1bbb709f77074966ee6f0fd8f Mon Sep 17 00:00:00 2001 From: Josh Mitchell Date: Sat, 25 Jan 2025 22:10:30 +1100 Subject: [PATCH 06/32] Add all environment --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ac3357b..aa05288 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -109,7 +109,8 @@ cwd = "." test = { features = ["test"], solve-group = "default" } doc = { features = ["doc"], solve-group = "default" } example = { features = ["example"], solve-group = "default" } -lint = { features = ["lint"], no-default-feature = true } +lint = { features = ["lint"], no-default-feature = true, solve-group = "default" } +all = { features = ["test", "doc", "example", "lint"], solve-group = "default" } [tool.versioningit] default-version = "v0.0.0.dev0+VERSIONMISSING" From 5292d540e472b35ee55c1b61676dd30e4a6c2829 Mon Sep 17 00:00:00 2001 From: Josh Mitchell Date: Sat, 25 Jan 2025 22:10:38 +1100 Subject: [PATCH 07/32] Fix lints pt3 --- .github/workflows/lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 5062b2e..673665a 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -15,7 +15,7 @@ concurrency: defaults: run: - shell: pixi run bash -l {0} + shell: pixi run bash -e {0} jobs: main-tests: From 8b637af0bb71f7738e457df890e43e397c621303 Mon Sep 17 00:00:00 2001 From: Josh Mitchell Date: Sat, 25 Jan 2025 22:14:34 +1100 Subject: [PATCH 08/32] Fix lints pt4 --- .github/workflows/lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 673665a..8a41593 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -43,6 +43,6 @@ jobs: pixi-version: v0.40.3 environments: lint - - run: pyright + - run: basedpyright - run: ruff From 73d745eb7786403f359d2dffdd6ec5ff7db3952d Mon Sep 17 00:00:00 2001 From: Josh Mitchell Date: Sat, 25 Jan 2025 22:16:09 +1100 Subject: [PATCH 09/32] Revert "Add all environment" This reverts commit b8c0a2ead06f44e3072acefb525ac650e0715c24. --- pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index aa05288..ac3357b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -109,8 +109,7 @@ cwd = "." test = { features = ["test"], solve-group = "default" } doc = { features = ["doc"], solve-group = "default" } example = { features = ["example"], solve-group = "default" } -lint = { features = ["lint"], no-default-feature = true, solve-group = "default" } -all = { features = ["test", "doc", "example", "lint"], solve-group = "default" } +lint = { features = ["lint"], no-default-feature = true } [tool.versioningit] default-version = "v0.0.0.dev0+VERSIONMISSING" From 5bef7d0f6c0969760f1c3d71bbe92601a4566dc1 Mon Sep 17 00:00:00 2001 From: Josh Mitchell Date: Sat, 25 Jan 2025 22:17:30 +1100 Subject: [PATCH 10/32] Fix lints pt5 --- .github/workflows/lint.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 8a41593..c8be7e3 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -15,7 +15,7 @@ concurrency: defaults: run: - shell: pixi run bash -e {0} + shell: bash -l {0} jobs: main-tests: @@ -36,12 +36,11 @@ jobs: uname -a df -h ulimit -a - shell: bash -l {0} - uses: prefix-dev/setup-pixi@v0.8.0 with: pixi-version: v0.40.3 - environments: lint + activate-environment: lint - run: basedpyright From 26e23c854aa7a96e37e9acea2b06df835809f27c Mon Sep 17 00:00:00 2001 From: Josh Mitchell Date: Sat, 25 Jan 2025 22:18:18 +1100 Subject: [PATCH 11/32] Rename CI jobs --- .github/workflows/lint.yaml | 2 +- .github/workflows/tests.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index c8be7e3..9bdbccc 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -18,7 +18,7 @@ defaults: shell: bash -l {0} jobs: - main-tests: + tests: if: "github.repository == 'openforcefield/openff-pablo'" runs-on: ${{ matrix.os }} strategy: diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 1e51e00..15fbe57 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -23,7 +23,7 @@ defaults: shell: bash -l {0} jobs: - main-tests: + lints: if: "github.repository == 'openforcefield/openff-pablo'" runs-on: ${{ matrix.os }} strategy: From 6b8633207a95259bf3bb352c8b7a954547af9f57 Mon Sep 17 00:00:00 2001 From: Josh Mitchell Date: Sat, 25 Jan 2025 22:29:27 +1100 Subject: [PATCH 12/32] Fix lints pt6 --- .github/workflows/lint.yaml | 2 -- .github/workflows/tests.yaml | 2 ++ pyproject.toml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 9bdbccc..3980566 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -42,6 +42,4 @@ jobs: pixi-version: v0.40.3 activate-environment: lint - - run: basedpyright - - run: ruff diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 15fbe57..b6b2ada 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -56,6 +56,8 @@ jobs: - run: pixi run doctest -v --color=yes + - run: pixi run basedpyright + - name: Codecov uses: codecov/codecov-action@v5 with: diff --git a/pyproject.toml b/pyproject.toml index ac3357b..af74565 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -106,10 +106,10 @@ cmd = "basedpyright openff" cwd = "." [tool.pixi.environments] -test = { features = ["test"], solve-group = "default" } +test = { features = ["lint", "test"], solve-group = "default" } doc = { features = ["doc"], solve-group = "default" } example = { features = ["example"], solve-group = "default" } -lint = { features = ["lint"], no-default-feature = true } +lint = { features = ["lint"], no-default-feature = true, solve-group = "default" } [tool.versioningit] default-version = "v0.0.0.dev0+VERSIONMISSING" From f643b428fdced0741581cada7bde133fb2763c27 Mon Sep 17 00:00:00 2001 From: Josh Mitchell Date: Sat, 25 Jan 2025 22:35:59 +1100 Subject: [PATCH 13/32] add doctest to codebase --- openff/pablo/residue.py | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/openff/pablo/residue.py b/openff/pablo/residue.py index 51cc4c8..975a77e 100644 --- a/openff/pablo/residue.py +++ b/openff/pablo/residue.py @@ -542,6 +542,41 @@ def from_smiles( virtual_sites Virtual sites expected by the residue. See :py:data:`openff.pablo.ResidueDefinition.virtual_sites` + + Examples + -------- + + To create a ``ResidueDefinition`` for a neutral cysteine residue: + + >>> from openff.pablo.residue import ResidueDefinition + >>> from openff.pablo.chem import DISULFIDE_BOND, PEPTIDE_BOND + >>> + >>> ResidueDefinition.from_smiles( + ... residue_name="CYS", + ... mapped_smiles=r"[N:1]([C@@:2]([C:5]([S:6][H:13])([H:11])[H:12])([C:3]([O:7][H:14])=[O:4])[H:10])([H:8])[H:9]", + ... atom_names={ + ... 1: "N", + ... 2: "CA", + ... 3: "C", + ... 4: "O", + ... 5: "CB", + ... 6: "SG", + ... 7: "OXT", + ... 8: "H", + ... 9: "H2", + ... 10: "HA", + ... 11: "HB2", + ... 12: "HB3", + ... 13: "HG", + ... 14: "HXT", + ... }, + ... leaving_atoms={7, 14, 13, 9}, + ... crosslink=DISULFIDE_BOND, + ... linking_bond=PEPTIDE_BOND, + ... description="CYSTEINE", + ... ) + ResidueDefinition(...) + """ molecule = Molecule.from_mapped_smiles( mapped_smiles, From b9b0af4b843ae8e9b42c10aae35d29c077c877a0 Mon Sep 17 00:00:00 2001 From: Josh Mitchell Date: Sat, 25 Jan 2025 22:42:13 +1100 Subject: [PATCH 14/32] Fix lints pt7 --- .github/workflows/lint.yaml | 2 +- .github/workflows/tests.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 3980566..b2716db 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -42,4 +42,4 @@ jobs: pixi-version: v0.40.3 activate-environment: lint - - run: ruff + - run: ruff check openff diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index b6b2ada..cb0dbe0 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -56,7 +56,7 @@ jobs: - run: pixi run doctest -v --color=yes - - run: pixi run basedpyright + - run: pixi run -e test basedpyright - name: Codecov uses: codecov/codecov-action@v5 From 392038420b2c89c83bd322a7dd7d31c4792edad3 Mon Sep 17 00:00:00 2001 From: Josh Mitchell Date: Sat, 25 Jan 2025 22:46:29 +1100 Subject: [PATCH 15/32] Add commented better_typing branches for units and toolkit --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index af74565..687488f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,6 +43,8 @@ numpy = "*" [tool.pixi.pypi-dependencies] openff-pablo = { path = ".", editable = true } +# openff-toolkit = { git = "https://github.com/openforcefield/openff-toolkit.git", rev = "better_typing" } +# openff-units = { git = "https://github.com/openforcefield/openff-units.git", rev = "better_typing" } [tool.pixi.feature.test.dependencies] pytest = "*" From e48e9e7ed051b112dc9b73856622f36cdb582914 Mon Sep 17 00:00:00 2001 From: Josh Mitchell Date: Sat, 25 Jan 2025 22:49:15 +1100 Subject: [PATCH 16/32] Uncomment custom branch deps --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 687488f..2a7525c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,8 +43,8 @@ numpy = "*" [tool.pixi.pypi-dependencies] openff-pablo = { path = ".", editable = true } -# openff-toolkit = { git = "https://github.com/openforcefield/openff-toolkit.git", rev = "better_typing" } -# openff-units = { git = "https://github.com/openforcefield/openff-units.git", rev = "better_typing" } +openff-toolkit = { git = "https://github.com/openforcefield/openff-toolkit.git", rev = "better_typing" } +openff-units = { git = "https://github.com/openforcefield/openff-units.git", rev = "better_typing" } [tool.pixi.feature.test.dependencies] pytest = "*" From db13b3452725e3ae6d71a124e9e5fffdeb0a42dc Mon Sep 17 00:00:00 2001 From: Josh Mitchell Date: Sat, 25 Jan 2025 22:50:32 +1100 Subject: [PATCH 17/32] Revert "Uncomment custom branch deps" This reverts commit 896faad171a1f55ff037a69cf08f6e543e026f14. --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 2a7525c..687488f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,8 +43,8 @@ numpy = "*" [tool.pixi.pypi-dependencies] openff-pablo = { path = ".", editable = true } -openff-toolkit = { git = "https://github.com/openforcefield/openff-toolkit.git", rev = "better_typing" } -openff-units = { git = "https://github.com/openforcefield/openff-units.git", rev = "better_typing" } +# openff-toolkit = { git = "https://github.com/openforcefield/openff-toolkit.git", rev = "better_typing" } +# openff-units = { git = "https://github.com/openforcefield/openff-units.git", rev = "better_typing" } [tool.pixi.feature.test.dependencies] pytest = "*" From 567d0be02e9069d7f31808991df260ac4ee6377e Mon Sep 17 00:00:00 2001 From: Josh Mitchell Date: Sat, 25 Jan 2025 22:50:52 +1100 Subject: [PATCH 18/32] Clarify CI naming --- .github/workflows/lint.yaml | 2 +- .github/workflows/tests.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index b2716db..6fed7f1 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -1,4 +1,4 @@ -name: GH Actions Lints +name: GH Actions CI on: push: branches: diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index cb0dbe0..2a8fc7c 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -1,4 +1,4 @@ -name: GH Actions Tests +name: GH Actions CI on: push: branches: From 221f3891c42e21688e7d30964708636b9c6d4f0b Mon Sep 17 00:00:00 2001 From: Josh Mitchell Date: Sat, 25 Jan 2025 22:53:23 +1100 Subject: [PATCH 19/32] fix workflow naming --- .github/workflows/lint.yaml | 4 ++-- .github/workflows/tests.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 6fed7f1..49a3565 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -1,4 +1,4 @@ -name: GH Actions CI +name: GH Actions Lints on: push: branches: @@ -18,7 +18,7 @@ defaults: shell: bash -l {0} jobs: - tests: + lints: if: "github.repository == 'openforcefield/openff-pablo'" runs-on: ${{ matrix.os }} strategy: diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 2a8fc7c..038f5d6 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -1,4 +1,4 @@ -name: GH Actions CI +name: GH Actions Tests on: push: branches: @@ -23,7 +23,7 @@ defaults: shell: bash -l {0} jobs: - lints: + tests: if: "github.repository == 'openforcefield/openff-pablo'" runs-on: ${{ matrix.os }} strategy: From fc97d902f168295151d8b104e4309d2c5db8ac3e Mon Sep 17 00:00:00 2001 From: Josh Mitchell Date: Fri, 15 Aug 2025 10:13:40 +1000 Subject: [PATCH 20/32] Require future version of OFFTK --- openff/pablo/_utils.py | 4 +- pyproject.toml | 86 +++++++++++++++++++++--------------------- 2 files changed, 45 insertions(+), 45 deletions(-) diff --git a/openff/pablo/_utils.py b/openff/pablo/_utils.py index e30f539..429fb76 100644 --- a/openff/pablo/_utils.py +++ b/openff/pablo/_utils.py @@ -18,7 +18,6 @@ import rdkit.Chem.Draw import rdkit.Chem.rdDepictor import rdkit.Geometry -from IPython.display import SVG from openff.toolkit import Molecule from openff.toolkit.topology._mm_molecule import _SimpleMolecule from openff.toolkit.topology.molecule import MoleculeLike @@ -348,7 +347,7 @@ def draw_molecule( emphasize_atoms: list[int] | None = None, explicit_hydrogens: bool | None = None, color_by_element: bool | None = None, -) -> SVG: +): """Draw a molecule Parameters @@ -392,6 +391,7 @@ def draw_molecule( When an atom or bond in highlight_atoms or highlight_bonds is missing from the image, including when it is present in the molecule but hidden. """ + from IPython.display import SVG # We're working in RDKit try: diff --git a/pyproject.toml b/pyproject.toml index 687488f..1724681 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,38 +31,18 @@ dynamic = [ source = "https://github.com/openforcefield/openff-pablo" documentation = "https://openff-pablo.readthedocs.io" -[tool.pixi.project] +[tool.pixi.workspace] channels = ["conda-forge"] platforms = ["linux-64", "osx-arm64", "osx-64"] [tool.pixi.dependencies] -openff-toolkit-base = ">=0.14.7" +openff-toolkit-base = ">=0.16.11" rdkit = "*" openmm = "*" numpy = "*" [tool.pixi.pypi-dependencies] openff-pablo = { path = ".", editable = true } -# openff-toolkit = { git = "https://github.com/openforcefield/openff-toolkit.git", rev = "better_typing" } -# openff-units = { git = "https://github.com/openforcefield/openff-units.git", rev = "better_typing" } - -[tool.pixi.feature.test.dependencies] -pytest = "*" -pytest-xdist = "*" -pytest-cov = "*" -codecov = "*" - -[tool.pixi.feature.test.tasks.test] -cmd = "pytest -n auto" -cwd = "." - -[tool.pixi.feature.test.tasks.fasttest] -cmd = "pytest -n auto -m 'not slow'" -cwd = "." - -[tool.pixi.feature.test.tasks.doctest] -cmd = "pytest -n auto --doctest-glob 'docs/*.md' --doctest-glob 'docs/*.rst' --doctest-modules --ignore openff/pablo/_tests/ --ignore-glob docs/*.py openff/ docs/" -cwd = "." [tool.pixi.feature.doc.dependencies] myst-parser = "*" @@ -74,13 +54,11 @@ sphinx-click = "*" [tool.pixi.feature.doc.pypi-dependencies] openff-sphinx-theme = { git = "https://github.com/openforcefield/openff-sphinx-theme.git", rev = "main" } -[tool.pixi.feature.doc.tasks.doc] -cmd = "sphinx-build -j auto docs docs/_build/html" -cwd = "." - -[tool.pixi.feature.doc.tasks.watchdoc] -cmd = "watchexec --on-busy-update restart -w openff -w docs --print-events 'sphinx-build -j auto docs docs/_build/html'" -cwd = "." +[tool.pixi.feature.test.dependencies] +pytest = "*" +pytest-xdist = "*" +pytest-cov = "*" +codecov = "*" [tool.pixi.feature.example.dependencies] jupyterlab = ">=4" @@ -95,23 +73,42 @@ isort = "*" snakeviz = "*" nglview = ">=3.0.6,<3.1.0" -[tool.pixi.feature.example.tasks.lab] -cmd = "jupyter lab" -cwd = "examples" - [tool.pixi.feature.lint.dependencies] basedpyright = "*" ruff = "*" -[tool.pixi.feature.lint.tasks.typecheck] -cmd = "basedpyright openff" -cwd = "." - [tool.pixi.environments] test = { features = ["lint", "test"], solve-group = "default" } doc = { features = ["doc"], solve-group = "default" } example = { features = ["example"], solve-group = "default" } -lint = { features = ["lint"], no-default-feature = true, solve-group = "default" } +lint = { features = ["lint", "test", "doc", "example"], solve-group = "default" } + +[tool.pixi.feature.test.tasks.test] +cmd = "pytest -n auto" +cwd = "." + +[tool.pixi.feature.test.tasks.fasttest] +cmd = "pytest -n auto -m 'not slow'" +cwd = "." + +[tool.pixi.feature.test.tasks.doctest] +cmd = "pytest -n auto --doctest-glob 'docs/*.md' --doctest-glob 'docs/*.rst' --doctest-modules --ignore openff/pablo/_tests/ --ignore-glob docs/*.py openff/ docs/" +cwd = "." +[tool.pixi.feature.doc.tasks.doc] +cmd = "sphinx-build -j auto docs docs/_build/html" +cwd = "." + +[tool.pixi.feature.doc.tasks.watchdoc] +cmd = "watchexec --on-busy-update restart -w openff -w docs --print-events 'sphinx-build -j auto docs docs/_build/html'" +cwd = "." + +[tool.pixi.feature.example.tasks.lab] +cmd = "jupyter lab" +cwd = "examples" + +[tool.pixi.feature.test.tasks.typecheck] +cmd = "basedpyright openff" +cwd = "." [tool.versioningit] default-version = "v0.0.0.dev0+VERSIONMISSING" @@ -132,12 +129,8 @@ include = ["openff.*"] include = ["openff"] exclude = [ ".soap", - "docs", - "examples", - "**/_tests/data", "**/node_modules", "**/__pycache__", - "**/.*", ] "ignore" = [ ".soap", @@ -148,6 +141,8 @@ exclude = [ "**/__pycache__", "**/.*", ] +"venvPath" = ".pixi/envs" +"venv" = "lint" typeCheckingMode = "strict" @@ -173,5 +168,10 @@ namespace-packages = ["openff/pablo/"] ignore = ["E731"] [tool.ruff.lint.isort] -known-third-party = ["openff.toolkit", "openff.utilities", "openff.units"] +known-third-party = [ + "openff.toolkit", + "openff.utilities", + "openff.units", + "openff.utilities", +] known-first-party = ["openff.pablo"] From cffa0056b9392876c3df9eb7e00035036854e332 Mon Sep 17 00:00:00 2001 From: Josh Mitchell Date: Tue, 26 Aug 2025 11:38:32 +1000 Subject: [PATCH 21/32] Update deps --- pyproject.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1724681..e6c54ad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,10 +36,13 @@ channels = ["conda-forge"] platforms = ["linux-64", "osx-arm64", "osx-64"] [tool.pixi.dependencies] -openff-toolkit-base = ">=0.16.11" +openff-toolkit-base = ">=0.17.0" rdkit = "*" openmm = "*" numpy = "*" +rustworkx = "*" +pyxdg = "*" +gemmi = "*" [tool.pixi.pypi-dependencies] openff-pablo = { path = ".", editable = true } From 20ac0b41223ac7c60e076c71e0a24fdaf7eb6269 Mon Sep 17 00:00:00 2001 From: Josh Mitchell Date: Tue, 26 Aug 2025 11:56:17 +1000 Subject: [PATCH 22/32] Attempt to configure RTD to use pixi --- devtools/conda-envs/docs_env.yaml | 33 --------------------- devtools/conda-envs/test_env.yaml | 49 ------------------------------- readthedocs.yaml | 22 +++++++++++++- 3 files changed, 21 insertions(+), 83 deletions(-) delete mode 100644 devtools/conda-envs/docs_env.yaml delete mode 100644 devtools/conda-envs/test_env.yaml diff --git a/devtools/conda-envs/docs_env.yaml b/devtools/conda-envs/docs_env.yaml deleted file mode 100644 index bcf459b..0000000 --- a/devtools/conda-envs/docs_env.yaml +++ /dev/null @@ -1,33 +0,0 @@ -name: pablo-docs -channels: - - conda-forge -dependencies: - # Base depends - - python>=3.11,<3.13 - - pip - - # Documentation - - myst-parser - - sphinx==6.1.2 - - sphinx-notfound-page - - autodoc-pydantic - - sphinx-click - - # Imports - - openff-units - - openff-toolkit>=0.17.0 - - polars - - openmm - - mdtraj - - numpy - - nglview - - typer>=0.14 - - mdanalysis - - rdkit - - pyxdg - - rustworkx - - gemmi - - # Pip-only installs - - pip: - - git+https://github.com/openforcefield/openff-sphinx-theme.git@main diff --git a/devtools/conda-envs/test_env.yaml b/devtools/conda-envs/test_env.yaml deleted file mode 100644 index 534d55e..0000000 --- a/devtools/conda-envs/test_env.yaml +++ /dev/null @@ -1,49 +0,0 @@ -name: pablo-test -channels: - - conda-forge -dependencies: - # Base depends (runtime and imports) - - pip - - python>=3.11 - - openff-toolkit-base>=0.17.0 - - rdkit - - openmm - - pyxdg - - rustworkx - - gemmi - - # Lints - - basedpyright - - ruff - - # Testing - - pytest - - pytest-xdist - - pytest-socket - # - pytest-cov - # - codecov - - # Examples - - jupyterlab>=4 - - ipywidgets>=8 - - jupyterlab_execute_time - - jupyterlab-lsp - - jupyterlab_rise - - jedi-language-server - - jupyterlab_code_formatter - - black - - isort - - snakeviz - - nglview>=3.0.6,<3.1.0 - - pdbfixer - - mdanalysis - - openff-interchange - - ambertools - - numpy - - pymol-open-source - - openff-nagl-base >= 0.5.2 - - openff-nagl-models - - pytorch-cpu >= 2.6 - - - pip: - - git+https://github.com/openforcefield/openff-toolkit.git@main diff --git a/readthedocs.yaml b/readthedocs.yaml index c9ba525..8c9c9c5 100644 --- a/readthedocs.yaml +++ b/readthedocs.yaml @@ -5,7 +5,27 @@ version: 2 build: os: ubuntu-22.04 tools: - python: "mambaforge-4.10" + python: "3.12" + jobs: + create_environment: + - asdf plugin add pixi + - asdf install pixi latest + - asdf global pixi latest + pre_install: + # https://docs.readthedocs.com/platform/stable/build-customization.html#avoid-having-a-dirty-git-index + - git update-index --assume-unchanged environment.yml docs/conf.py + install: + - pixi install -e doc + post_install: + # Use pixi to run sphinx-build or mkdocs + - echo $PATH + - echo '#! /bin/bash\npixi run -e doc sphinx-build "$@"' > /bin/sphinx-build + - echo '#! /bin/bash\npixi run -e doc mkdocs "$@"' > /bin/mkdocs + - chmod +x /bin/sphinx-build /bin/mkdocs + + # build: + # html: + # - pixi run -e doc sphinx-build -W -T -b html docs $READTHEDOCS_OUTPUT/html python: install: From 339e9e3cf2fa9b8e30681df9c750ac46132dda41 Mon Sep 17 00:00:00 2001 From: Josh Mitchell Date: Tue, 26 Aug 2025 11:57:41 +1000 Subject: [PATCH 23/32] Fix RTD config git command --- readthedocs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readthedocs.yaml b/readthedocs.yaml index 8c9c9c5..50ef015 100644 --- a/readthedocs.yaml +++ b/readthedocs.yaml @@ -13,7 +13,7 @@ build: - asdf global pixi latest pre_install: # https://docs.readthedocs.com/platform/stable/build-customization.html#avoid-having-a-dirty-git-index - - git update-index --assume-unchanged environment.yml docs/conf.py + - git update-index --assume-unchanged pyproject.toml docs/conf.py install: - pixi install -e doc post_install: From abe5448062ad1c1a5684eb003250ca328ca023cd Mon Sep 17 00:00:00 2001 From: Josh Mitchell Date: Tue, 26 Aug 2025 12:11:08 +1000 Subject: [PATCH 24/32] Try configuring pixi env with symlink --- readthedocs.yaml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/readthedocs.yaml b/readthedocs.yaml index 50ef015..b9214fc 100644 --- a/readthedocs.yaml +++ b/readthedocs.yaml @@ -16,12 +16,8 @@ build: - git update-index --assume-unchanged pyproject.toml docs/conf.py install: - pixi install -e doc - post_install: - # Use pixi to run sphinx-build or mkdocs - - echo $PATH - - echo '#! /bin/bash\npixi run -e doc sphinx-build "$@"' > /bin/sphinx-build - - echo '#! /bin/bash\npixi run -e doc mkdocs "$@"' > /bin/mkdocs - - chmod +x /bin/sphinx-build /bin/mkdocs + - rm -r ${READTHEDOCS_VIRTUALENV_PATH} + - ln -s .pixi/envs/doc ${READTHEDOCS_VIRTUALENV_PATH} # build: # html: From 0a6a8c3c813cf589ab4316a44e4d8e8f4343b14d Mon Sep 17 00:00:00 2001 From: Josh Mitchell Date: Tue, 26 Aug 2025 12:30:57 +1000 Subject: [PATCH 25/32] Fix GHA --- .github/workflows/lint.yaml | 6 ++++-- .github/workflows/tests.yaml | 10 ++++------ pyproject.toml | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 49a3565..75db4ad 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -24,7 +24,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest] steps: - uses: actions/checkout@v4 @@ -39,7 +39,9 @@ jobs: - uses: prefix-dev/setup-pixi@v0.8.0 with: - pixi-version: v0.40.3 + pixi-version: v0.50.0 activate-environment: lint - run: ruff check openff + + - run: pixi r typecheck diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 038f5d6..ff3829b 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -44,19 +44,17 @@ jobs: - uses: prefix-dev/setup-pixi@v0.8.0 with: - pixi-version: v0.40.3 + pixi-version: v0.52.0 environments: test - name: Type check if: runner.os == 'Linux' run: | - pixi run typecheck + pixi r typecheck - - run: pixi run test -v --color=yes --cov=openff/pablo --cov-append --cov-report=xml + - run: pixi r slowtest -v --color=yes --cov=openff/pablo --cov-append --cov-report=xml - - run: pixi run doctest -v --color=yes - - - run: pixi run -e test basedpyright + - run: pixi r doctest -v --color=yes - name: Codecov uses: codecov/codecov-action@v5 diff --git a/pyproject.toml b/pyproject.toml index e6c54ad..be1a3fb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -81,20 +81,20 @@ basedpyright = "*" ruff = "*" [tool.pixi.environments] -test = { features = ["lint", "test"], solve-group = "default" } +test = { features = ["test", "test-tasks"], solve-group = "default" } doc = { features = ["doc"], solve-group = "default" } example = { features = ["example"], solve-group = "default" } lint = { features = ["lint", "test", "doc", "example"], solve-group = "default" } -[tool.pixi.feature.test.tasks.test] +[tool.pixi.feature.test-tasks.tasks.slowtest] cmd = "pytest -n auto" cwd = "." -[tool.pixi.feature.test.tasks.fasttest] +[tool.pixi.feature.test-tasks.tasks.test] cmd = "pytest -n auto -m 'not slow'" cwd = "." -[tool.pixi.feature.test.tasks.doctest] +[tool.pixi.feature.test-tasks.tasks.doctest] cmd = "pytest -n auto --doctest-glob 'docs/*.md' --doctest-glob 'docs/*.rst' --doctest-modules --ignore openff/pablo/_tests/ --ignore-glob docs/*.py openff/ docs/" cwd = "." [tool.pixi.feature.doc.tasks.doc] From 5f9b080e390e9074cfb267266e2f6c0e633a8132 Mon Sep 17 00:00:00 2001 From: Josh Mitchell Date: Tue, 26 Aug 2025 12:32:41 +1000 Subject: [PATCH 26/32] Remove unhelpful RTD config --- readthedocs.yaml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/readthedocs.yaml b/readthedocs.yaml index b9214fc..e04f248 100644 --- a/readthedocs.yaml +++ b/readthedocs.yaml @@ -23,14 +23,6 @@ build: # html: # - pixi run -e doc sphinx-build -W -T -b html docs $READTHEDOCS_OUTPUT/html -python: - install: - - method: pip - path: . - sphinx: configuration: docs/conf.py fail_on_warning: true - -conda: - environment: devtools/conda-envs/docs_env.yaml From 56d41a5c23ac250d42db4a75a5218aa471f86e5f Mon Sep 17 00:00:00 2001 From: Josh Mitchell Date: Tue, 26 Aug 2025 12:35:17 +1000 Subject: [PATCH 27/32] Fix typechecks --- .github/workflows/tests.yaml | 5 ----- pyproject.toml | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index ff3829b..5d20ff4 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -47,11 +47,6 @@ jobs: pixi-version: v0.52.0 environments: test - - name: Type check - if: runner.os == 'Linux' - run: | - pixi r typecheck - - run: pixi r slowtest -v --color=yes --cov=openff/pablo --cov-append --cov-report=xml - run: pixi r doctest -v --color=yes diff --git a/pyproject.toml b/pyproject.toml index be1a3fb..53ab150 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -109,7 +109,7 @@ cwd = "." cmd = "jupyter lab" cwd = "examples" -[tool.pixi.feature.test.tasks.typecheck] +[tool.pixi.feature.lint.tasks.typecheck] cmd = "basedpyright openff" cwd = "." From 38b2ffc4e7465eab8c9fc0e3b48389d1a86df04b Mon Sep 17 00:00:00 2001 From: Josh Mitchell Date: Tue, 26 Aug 2025 12:35:52 +1000 Subject: [PATCH 28/32] remove unnecessary rm in rtd config --- readthedocs.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/readthedocs.yaml b/readthedocs.yaml index e04f248..6183ed5 100644 --- a/readthedocs.yaml +++ b/readthedocs.yaml @@ -16,7 +16,6 @@ build: - git update-index --assume-unchanged pyproject.toml docs/conf.py install: - pixi install -e doc - - rm -r ${READTHEDOCS_VIRTUALENV_PATH} - ln -s .pixi/envs/doc ${READTHEDOCS_VIRTUALENV_PATH} # build: From 14aecc365a574971b1e63a77ce123f8c3de07874 Mon Sep 17 00:00:00 2001 From: Josh Mitchell Date: Tue, 26 Aug 2025 12:40:55 +1000 Subject: [PATCH 29/32] Create venv parent directory before symlinking --- readthedocs.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/readthedocs.yaml b/readthedocs.yaml index 6183ed5..8a2df13 100644 --- a/readthedocs.yaml +++ b/readthedocs.yaml @@ -16,7 +16,8 @@ build: - git update-index --assume-unchanged pyproject.toml docs/conf.py install: - pixi install -e doc - - ln -s .pixi/envs/doc ${READTHEDOCS_VIRTUALENV_PATH} + - mkdir -p ${READTHEDOCS_VIRTUALENV_PATH}/.. + - ln -s -T .pixi/envs/doc ${READTHEDOCS_VIRTUALENV_PATH} # build: # html: From 40afc4478e8237ef4ea8da6b95a46f19db72a424 Mon Sep 17 00:00:00 2001 From: Josh Mitchell Date: Tue, 26 Aug 2025 12:48:20 +1000 Subject: [PATCH 30/32] Create only venv parent dirs --- readthedocs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readthedocs.yaml b/readthedocs.yaml index 8a2df13..b8a60fa 100644 --- a/readthedocs.yaml +++ b/readthedocs.yaml @@ -16,7 +16,7 @@ build: - git update-index --assume-unchanged pyproject.toml docs/conf.py install: - pixi install -e doc - - mkdir -p ${READTHEDOCS_VIRTUALENV_PATH}/.. + - mkdir -p ${READTHEDOCS_VIRTUALENV_PATH}/.. && rmdir ${READTHEDOCS_VIRTUALENV_PATH} - ln -s -T .pixi/envs/doc ${READTHEDOCS_VIRTUALENV_PATH} # build: From 0121da69f354094afb452f1a9bd3826a3de5533c Mon Sep 17 00:00:00 2001 From: Josh Mitchell Date: Tue, 26 Aug 2025 12:55:59 +1000 Subject: [PATCH 31/32] ls --- readthedocs.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/readthedocs.yaml b/readthedocs.yaml index b8a60fa..10bc9d4 100644 --- a/readthedocs.yaml +++ b/readthedocs.yaml @@ -18,6 +18,8 @@ build: - pixi install -e doc - mkdir -p ${READTHEDOCS_VIRTUALENV_PATH}/.. && rmdir ${READTHEDOCS_VIRTUALENV_PATH} - ln -s -T .pixi/envs/doc ${READTHEDOCS_VIRTUALENV_PATH} + - ls ${READTHEDOCS_VIRTUALENV_PATH} + - ls ${READTHEDOCS_VIRTUALENV_PATH}/bin # build: # html: From 8f309d48cbaa474740e6e343bfe27c7ee0209825 Mon Sep 17 00:00:00 2001 From: Josh Mitchell Date: Tue, 26 Aug 2025 13:07:43 +1000 Subject: [PATCH 32/32] Give up and just override build command --- pyproject.toml | 10 +++++----- readthedocs.yaml | 15 +++------------ 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 53ab150..3b8fb9c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,8 +82,8 @@ ruff = "*" [tool.pixi.environments] test = { features = ["test", "test-tasks"], solve-group = "default" } -doc = { features = ["doc"], solve-group = "default" } -example = { features = ["example"], solve-group = "default" } +doc = { features = ["doc", "doc-tasks"], solve-group = "default" } +example = { features = ["example", "example-tasks"], solve-group = "default" } lint = { features = ["lint", "test", "doc", "example"], solve-group = "default" } [tool.pixi.feature.test-tasks.tasks.slowtest] @@ -97,15 +97,15 @@ cwd = "." [tool.pixi.feature.test-tasks.tasks.doctest] cmd = "pytest -n auto --doctest-glob 'docs/*.md' --doctest-glob 'docs/*.rst' --doctest-modules --ignore openff/pablo/_tests/ --ignore-glob docs/*.py openff/ docs/" cwd = "." -[tool.pixi.feature.doc.tasks.doc] +[tool.pixi.feature.doc-tasks.tasks.doc] cmd = "sphinx-build -j auto docs docs/_build/html" cwd = "." -[tool.pixi.feature.doc.tasks.watchdoc] +[tool.pixi.feature.doc-tasks.tasks.watchdoc] cmd = "watchexec --on-busy-update restart -w openff -w docs --print-events 'sphinx-build -j auto docs docs/_build/html'" cwd = "." -[tool.pixi.feature.example.tasks.lab] +[tool.pixi.feature.example-tasks.tasks.lab] cmd = "jupyter lab" cwd = "examples" diff --git a/readthedocs.yaml b/readthedocs.yaml index 10bc9d4..4e3bde5 100644 --- a/readthedocs.yaml +++ b/readthedocs.yaml @@ -16,15 +16,6 @@ build: - git update-index --assume-unchanged pyproject.toml docs/conf.py install: - pixi install -e doc - - mkdir -p ${READTHEDOCS_VIRTUALENV_PATH}/.. && rmdir ${READTHEDOCS_VIRTUALENV_PATH} - - ln -s -T .pixi/envs/doc ${READTHEDOCS_VIRTUALENV_PATH} - - ls ${READTHEDOCS_VIRTUALENV_PATH} - - ls ${READTHEDOCS_VIRTUALENV_PATH}/bin - - # build: - # html: - # - pixi run -e doc sphinx-build -W -T -b html docs $READTHEDOCS_OUTPUT/html - -sphinx: - configuration: docs/conf.py - fail_on_warning: true + build: + html: + - pixi run -e doc sphinx-build -W -T -b html docs $READTHEDOCS_OUTPUT/html