diff --git a/README.md b/README.md index 7ea4bb0..13f0875 100644 --- a/README.md +++ b/README.md @@ -352,7 +352,24 @@ credentials. ## Development -We use [Pixi](https://pixi.sh/) to manage development environments and dependencies. Each model has its own environment, e.g. `boltz-dev`, `protenix-dev`, `rf3-dev`. To install dev dependencies and run tests: +For lightweight source-checkout development, use [uv](https://docs.astral.sh/uv/): + +```bash +uv sync --group dev +uv run sampleworks-guidance --help +uv run pytest tests -m 'not slow' +``` + +Additional uv dependency groups are available for development and analysis: + +```bash +uv sync --group dev +uv sync --group analysis +uv sync --group test +``` + +The existing GPU model environments are split by model, e.g. `boltz-dev`, +`protenix-dev`, `rf3-dev`. To install dev dependencies and run tests there: ```bash pixi install -e [model]-dev # add pytest, ruff, ty @@ -373,19 +390,17 @@ See [`tests/README.md`](tests/README.md) for full testing instructions. ## macOS (experimental) -To develop on OS X, ensure you have [homebrew](https://brew.sh/) installed and run the following commands to install dependencies: +On macOS, use uv for source-checkout development and avoid Linux/CUDA-only model +extras unless you know they are supported on your machine: -1. Install hatch and uv - ```bash - brew install hatch uv - ``` -2. Move/copy `pyproject-hatch.toml` to `pyproject.toml` -3. Use `uvx hatch run ` to run commands. Note the use of `uvx` instead of `uv` -4. Use `uvx hatch run :` to run commands in a specific environment ``. +```bash +brew install uv +uv sync --group dev +uv run pytest tests -m 'not slow' +``` -There are different (and as yet untested) environments for `boltz`. `protenix` won't currently work on a Mac due to -the strict requirement of `triton` which requires an NVIDIA GPU. You may find similar issues with other environments. -Debug as needed. +`protenix` currently requires `triton`/NVIDIA GPU support and is not expected to +work on macOS. Some RF3/Boltz workflows may also require Linux/CUDA packages. ## Commit Messages diff --git a/pyproject-hatch.toml b/pyproject-hatch.toml deleted file mode 100644 index d8db0b6..0000000 --- a/pyproject-hatch.toml +++ /dev/null @@ -1,137 +0,0 @@ -[build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" - -[project] -name = "sampleworks" -version = "0.1.0" -description = "Add a short description here" -authors = [ - { name = "K. Chrispens", email = "karson.chrispens@ucsf.edu" } -] -requires-python = ">= 3.11" -readme = "README.md" -license = { file = "LICENSE" } -dependencies = [ - "atomworks[ml]", - "dotenv", - "einx", - "hydra-core", - "jax", - "jaxtyping", - "matplotlib>=3.10.0", - "numpy>=2.2.1", - "omegaconf", - "pandas>=2.2.3", - "seaborn>=0.13.2", - "torch>=2.5.1", - "tqdm>=4.67.1", - "gemmi>=0.6.7", - "reciprocalspaceship>=1.0.3", - "scipy>=1.15.1", - "loguru", -] - -[project.optional-dependencies] -dev = [ - "pytest>=7.0.0", - "pytest-cov>=4.0.0", - "ruff>=0.1.0", - "mypy>=1.0.0", -] -test = [ - "pytest>=7.0.0", - "pytest-cov>=4.0.0", -] - -[tool.hatch.version] -path = "src/sampleworks/__init__.py" - -[tool.hatch.build.targets.wheel] -packages = ["src/sampleworks"] - -[tool.hatch.build.targets.sdist] -include = [ - "/src", - "/tests", - "/README.md", - "/LICENSE", -] - -[tool.hatch.envs.default] -dependencies = [ - "pytest", - "pytest-cov", -] - -[tool.hatch.envs.default.scripts] -test = "pytest {args:tests}" -test-cov = "pytest --cov=sampleworks --cov-report=term-missing {args:tests}" -cov-report = [ - "pytest --cov=sampleworks --cov-report=html {args:tests}", - "python -m http.server 8000 --directory htmlcov", -] - -[tool.hatch.envs.lint] -detached = true -dependencies = [ - "ruff>=0.1.0", - "mypy>=1.0.0", -] - -[tool.hatch.envs.lint.scripts] -check = [ - "ruff check {args:.}", - "mypy {args:src/sampleworks}", -] -fmt = [ - "ruff format {args:.}", - "ruff check --fix {args:.}", -] - -[tool.hatch.envs.boltz] -description = "Environment for molecular modeling with Boltz and RDKit" -dependencies = [ - "boltz", - "cuequivariance-torch", - "cuequivariance-ops-torch-cu12", - "rdkit>=2025.3.6", -] - -[tool.hatch.envs.boltz.scripts] -# Add custom scripts for this environment if needed -check-imports = "python -c 'import boltz; import rdkit; from cuequivariance_torch import *; print(\"All imports successful\")'" - - -[tool.ruff] -line-length = 100 -target-version = "py311" - -[tool.ruff.lint] -select = [ - "E", # pycodestyle errors - "W", # pycodestyle warnings - "F", # pyflakes - "I", # isort - "B", # flake8-bugbear - "C4", # flake8-comprehensions - "UP", # pyupgrade -] -ignore = [] - -[tool.ruff.lint.per-file-ignores] -"__init__.py" = ["F401"] - -[tool.pytest.ini_options] -testpaths = ["tests"] -python_files = ["test_*.py"] -python_classes = ["Test*"] -python_functions = ["test_*"] -addopts = "-v" - -[tool.mypy] -python_version = "3.11" -warn_return_any = true -warn_unused_configs = true -disallow_untyped_defs = false -ignore_missing_imports = true diff --git a/pyproject.toml b/pyproject.toml index 695329b..67edbf2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] build-backend = "hatchling.build" -requires = ["hatchling"] +requires = ["hatchling>=1.27"] [dependency-groups] analysis = [ @@ -17,6 +17,7 @@ analysis = [ "seaborn" ] dev = ["pytest", "pytest-cov", "mypy", "prek", "ty", "ruff", "pytest-loguru", "python-semantic-release"] +test = ["pytest", "pytest-cov", "pytest-loguru"] [tool.pixi.feature.boltz] pypi-dependencies = {"boltz" = "*", "cuequivariance-torch" = "*", "cuequivariance-ops-torch-cu12" = "*", "rdkit" = ">=2025.3.6"} @@ -33,26 +34,66 @@ platforms = ["linux-64"] [project] authors = [{email = "karson.chrispens@ucsf.edu", name = "Karson Chrispens"}] +classifiers = [ + "Development Status :: 3 - Alpha", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: MIT License", + "Natural Language :: English", + "Operating System :: MacOS :: MacOS X", + "Operating System :: POSIX :: Linux", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Topic :: Scientific/Engineering :: Artificial Intelligence", + "Topic :: Scientific/Engineering :: Bio-Informatics", + "Topic :: Scientific/Engineering :: Chemistry" +] dependencies = [ "atomworks[ml]==2.1.1", - "python-dotenv", - "jaxtyping", - "jax", "einx<0.4", "hydra-core", + "jax", + "jaxtyping", "loguru", "omegaconf", + "python-dotenv", "sfcalculator-torch>=0.3.2" ] +description = "Experimentally guided biomolecular ensemble generation." +keywords = ["biomolecular-structure", "crystallography", "diffusion", "ensemble-generation", "protein-structure"] +license = {file = "LICENSE"} name = "sampleworks" +readme = "README.md" requires-python = ">= 3.11, <3.14" version = "0.10.0" +[project.urls] +Changelog = "https://github.com/diff-use/sampleworks/blob/main/CHANGELOG.md" +Homepage = "https://diffuse.science/posts/sampleworks/" +Issues = "https://github.com/diff-use/sampleworks/issues" +Repository = "https://github.com/diff-use/sampleworks" + [project.scripts] sampleworks-analysis = "sampleworks.runs.analysis_cli:main" sampleworks-guidance = "sampleworks.cli.guidance:main" sampleworks-runs = "sampleworks.runs.cli:main" +[tool.hatch.build.targets.sdist] +include = [ + "/analyses", + "/CHANGELOG.md", + "/experiments", + "/LICENSE", + "/pyproject.toml", + "/README.md", + "/src", + "/tests" +] + +[tool.hatch.build.targets.wheel] +packages = ["src/sampleworks"] + [tool.hatch.build.targets.wheel.force-include] "analyses" = "analyses" "experiments" = "experiments"