Skip to content

Commit aeac5fd

Browse files
authored
Merge pull request #9 from aqlaboratory/feature/update-setup
Feature/update setup
2 parents 8e57cfb + a4bff3d commit aeac5fd

5 files changed

Lines changed: 26 additions & 5 deletions

File tree

docs/environment.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: openfold3-docs
2+
channels:
3+
- conda-forge
4+
dependencies:
5+
- sphinx
6+
- myst-parser
7+
- furo

docs/source/Installation.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ This script will:
8080
- Setup a directory for OpenFold3 model parameters [default: `~/.openfold3`]
8181
- Writes the path to `$OPENFOLD_CACHE/ckpt_path`
8282
- Download the model parameters, if the parameter file does not already exist
83-
- Runs an inference integration test on two samples, without MSA alignments (~5 min on A100)
83+
- Optionally runs an inference integration test on two samples, without MSA alignments (~5 min on A100)
84+
- N.B. To run the integration tests, `pytest` must be installed.
8485

8586

8687
### Downloading the model parameters manually

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# -- General configuration ---------------------------------------------------
1414
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
1515

16-
extensions = ["myst_parser", "sphinx.ext.autodoc", "sphinxcontrib.autodoc_pydantic"]
16+
extensions = ["myst_parser"]
1717

1818
templates_path = ["_templates"]
1919
exclude_patterns = []

openfold3/setup_openfold.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,13 @@
1818
Downloads model parameters and runs verification tests.
1919
"""
2020

21+
import importlib.util
2122
import logging
2223
import os
2324
import subprocess
2425
import sys
2526
from pathlib import Path
2627

27-
import pytest
28-
2928
logging.basicConfig(level=logging.INFO, format="%(message)s")
3029
logger = logging.getLogger(__name__)
3130

@@ -175,10 +174,23 @@ def download_parameters(param_dir) -> None:
175174

176175
def run_integration_tests() -> None:
177176
"""Run integration tests."""
177+
confirm = input("Run integration tests? (yes/no)")
178+
if confirm.lower() not in ["yes", "y"]:
179+
logger.info("Skipping integration tests, exiting setup.")
180+
return
181+
178182
logger.info("Running integration tests...")
183+
pytest_is_installed = importlib.util.find_spec("pytest")
184+
if not pytest_is_installed:
185+
logger.error("Pytest is required to run integration tests.")
186+
logger.error(
187+
"Please install pytest e.g. `pip install pytest` and rerun the script."
188+
)
189+
return
179190

180191
# Set environment variables for tests
181192
os.environ["OPENFOLD_SETUP_SCRIPT"] = "1"
193+
import pytest
182194

183195
exit_code = pytest.main(
184196
[

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
55

66
[project]
77
name = "openfold3"
8-
version = "0.3.0"
8+
version = "0.3.1"
99
dependencies = [
1010
"awscli",
1111
"torch",# ==2.5.1",
@@ -69,6 +69,7 @@ dev = [
6969
# used for documentation
7070
"sphinx",
7171
"myst-parser",
72+
"furo"
7273
]
7374
cuequivariance = [
7475
"cuequivariance>=0.6.1",

0 commit comments

Comments
 (0)