From 85f78bf52b3def76f7df14d4369a28e92a4c28bc Mon Sep 17 00:00:00 2001 From: njzjz-bot Date: Mon, 24 Aug 2026 04:40:55 +0800 Subject: [PATCH] Declare conda runtime dependencies Align the no-deps conda recipe with the package runtime requirements and supported Python version. Exercise TI and DAG imports in the recipe test and add repository regression coverage. Coding-Agent: Codex Codex-Version: codex-cli 0.149.0 Model: gpt-5.6-sol Reasoning-Effort: xhigh --- conda/dpti/meta.yaml | 18 ++++++++++++------ tests/test_conda_recipe.py | 27 +++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 tests/test_conda_recipe.py diff --git a/conda/dpti/meta.yaml b/conda/dpti/meta.yaml index a2486129..39d41b2f 100644 --- a/conda/dpti/meta.yaml +++ b/conda/dpti/meta.yaml @@ -17,22 +17,28 @@ requirements: build: - git host: - - python >=3.6 + - python >=3.10 - pip + - setuptools - setuptools_scm - - dargs - - dpdata - - dpdispatcher + - wheel run: - - python >=3.6 + - python >=3.10 + - apache-airflow >=2.0 + - scipy + - numpy + - pymbar - dargs - paramiko - - dpdispatcher + - dpdispatcher >=0.3 + - sqlalchemy >=1.4.28,<2.0 test: imports: - dpti + commands: + - python -c "import dpti.ti; import dpti.dags.dp_ti_gdi" about: home: https://github.com/deepmodeling/dpti diff --git a/tests/test_conda_recipe.py b/tests/test_conda_recipe.py new file mode 100644 index 00000000..f720b52a --- /dev/null +++ b/tests/test_conda_recipe.py @@ -0,0 +1,27 @@ +import os +import unittest + + +class TestCondaRecipe(unittest.TestCase): + def test_runtime_dependencies_match_packaged_modules(self): + """The no-deps conda install explicitly supplies runtime requirements.""" + recipe = os.path.join("..", "conda", "dpti", "meta.yaml") + with open(recipe) as fp: + content = fp.read() + + for dependency in ( + "apache-airflow >=2.0", + "scipy", + "numpy", + "pymbar", + "dargs", + "dpdispatcher >=0.3", + "sqlalchemy >=1.4.28,<2.0", + ): + with self.subTest(dependency=dependency): + self.assertIn(f"- {dependency}", content) + self.assertIn("import dpti.ti; import dpti.dags.dp_ti_gdi", content) + + +if __name__ == "__main__": + unittest.main()