From ece48b7fbaa0785e8a3b4f3599eff79f071bfb3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Gonz=C3=A1lez=20Duque?= Date: Mon, 28 Oct 2024 14:14:04 +0100 Subject: [PATCH] Release new version in `pypi` (#285) * Adds a more descriptive error for isolation * Updates version and requirements for pypi * Updates version and tests pypi deployment * Adds egg to gitignore, changes project name * Updates names of the actions to reflect which ones work on py vs conda * Updates the name of the project to poli-base for pypi * Updates the name of the project to poli-core --- .github/workflows/python-tox-testing-base.yml | 2 +- .../python-tox-testing-dockstring-env.yml | 2 +- .../python-tox-testing-lambo-env.yml | 2 +- .../python-tox-testing-protein-env.yml | 2 +- .../workflows/python-tox-testing-rmf-env.yml | 2 +- .../workflows/python-tox-testing-tdc-env.yml | 2 +- .gitignore | 2 +- CITATION.cff | 2 +- pyproject.toml | 12 ++-- setup.cfg | 17 ++++-- src/poli/__init__.py | 2 +- src/poli/core/util/isolation/instancing.py | 7 ++- tox.ini | 5 +- tox.master.ini | 59 ------------------- 14 files changed, 35 insertions(+), 83 deletions(-) delete mode 100644 tox.master.ini diff --git a/.github/workflows/python-tox-testing-base.yml b/.github/workflows/python-tox-testing-base.yml index 532fe3a7..27d30ce7 100644 --- a/.github/workflows/python-tox-testing-base.yml +++ b/.github/workflows/python-tox-testing-base.yml @@ -1,4 +1,4 @@ -name: poli base (conda, py3.10) +name: poli base (py3.10) on: push: diff --git a/.github/workflows/python-tox-testing-dockstring-env.yml b/.github/workflows/python-tox-testing-dockstring-env.yml index 209b948d..5587cee9 100644 --- a/.github/workflows/python-tox-testing-dockstring-env.yml +++ b/.github/workflows/python-tox-testing-dockstring-env.yml @@ -1,4 +1,4 @@ -name: poli dockstring (conda, py3.10) +name: poli dockstring (py3.10) on: push: diff --git a/.github/workflows/python-tox-testing-lambo-env.yml b/.github/workflows/python-tox-testing-lambo-env.yml index 1d335560..c521c28e 100644 --- a/.github/workflows/python-tox-testing-lambo-env.yml +++ b/.github/workflows/python-tox-testing-lambo-env.yml @@ -1,4 +1,4 @@ -name: poli lambo (conda, py3.10) +name: poli lambo (py3.10) on: push: diff --git a/.github/workflows/python-tox-testing-protein-env.yml b/.github/workflows/python-tox-testing-protein-env.yml index 259b4e0d..22639fda 100644 --- a/.github/workflows/python-tox-testing-protein-env.yml +++ b/.github/workflows/python-tox-testing-protein-env.yml @@ -1,4 +1,4 @@ -name: poli protein (conda, py3.10) +name: poli protein (py3.10) on: push: diff --git a/.github/workflows/python-tox-testing-rmf-env.yml b/.github/workflows/python-tox-testing-rmf-env.yml index a4ace284..6d6380b6 100644 --- a/.github/workflows/python-tox-testing-rmf-env.yml +++ b/.github/workflows/python-tox-testing-rmf-env.yml @@ -1,4 +1,4 @@ -name: poli rmf (conda, py3.10) +name: poli rmf (py3.10) on: push: diff --git a/.github/workflows/python-tox-testing-tdc-env.yml b/.github/workflows/python-tox-testing-tdc-env.yml index b78e594c..3b4aba98 100644 --- a/.github/workflows/python-tox-testing-tdc-env.yml +++ b/.github/workflows/python-tox-testing-tdc-env.yml @@ -1,4 +1,4 @@ -name: poli tdc (conda, py3.10) +name: poli tdc (py3.10) on: push: diff --git a/.gitignore b/.gitignore index b703cf7b..f07c9811 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,7 @@ __pycache__ .idea /src/poli/config.rc -src/poli.egg-info/ +*.egg-info/ temp build .tox diff --git a/CITATION.cff b/CITATION.cff index e27800f1..cbc5346a 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -8,6 +8,6 @@ authors: - family-names: "Michael" given-names: "Richard" title: "poli: a libary of discrete sequence objectives" -version: 1.0.0.dev13 +version: 1.0.1 date-released: 2024-01-23 url: "https://github.com/MachineLearningLifeScience/poli" \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 57770bac..31f8133c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,11 +3,11 @@ requires = ["setuptools<=68"] build-backend = "setuptools.build_meta" [project] -name = "poli" -version = "1.0.0.dev14" +name = "poli-core" +version = "1.0.1" description = "poli, a library of discrete objective functions" readme = "README.md" -authors = [{name="Miguel González-Duque", email="miguelgondu@gmail.com"}, {name="Simon Bartels"}] +authors = [{name="Miguel González-Duque", email="miguelgondu@gmail.com"}, {name="Simon Bartels", email="bartels@di.ku.dk"}] license = {file = "LICENSE"} classifiers = [ "License :: OSI Approved :: MIT License", @@ -19,6 +19,9 @@ classifiers = [ "Topic :: Scientific/Engineering :: Chemistry", "Topic :: Scientific/Engineering :: Mathematics", "Topic :: Scientific/Engineering :: Artificial Intelligence", + "Development Status :: 3 - Alpha", + "Operating System :: MacOS", + "Operating System :: Unix", ] keywords = ["optimization", "molecular", "discrete", "proteins"] dependencies = [ @@ -26,6 +29,7 @@ dependencies = [ "rdkit", "selfies" ] +requires-python = ">=3.9" [project.optional-dependencies] foldx = [ @@ -79,7 +83,7 @@ profile = "black" exclude = ["src/poli/core/util/proteins/rasp/inner_rasp", "src/poli/objective_repository/gfp_cbas"] [tool.bumpversion] -current_version = "1.0.0.dev13" +current_version = "1.0.1" parse = """(?x) (?P0|[1-9]\\d*)\\. (?P0|[1-9]\\d*)\\. diff --git a/setup.cfg b/setup.cfg index 65b58b4f..e9e31dc6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,15 +1,24 @@ [metadata] -name = poli -version = "1.0.0.dev13" +name = poli-core +version = "1.0.1" author = Miguel González-Duque author_email = miguel.gonzalez-duque@bio.ku.dk description = A library of discrete objective functions long_description = file: README.md long_description_content_type = text/markdown classifiers = - Programming Language :: Python :: 3 License :: OSI Approved :: MIT License - Operating System :: OS Independent + Programming Language :: Python + Programming Language :: Python :: 3 + Intended Audience :: Education + Intended Audience :: Science/Research + Topic :: Scientific/Engineering :: Bio-Informatics + Topic :: Scientific/Engineering :: Chemistry + Topic :: Scientific/Engineering :: Mathematics + Topic :: Scientific/Engineering :: Artificial Intelligence + Development Status :: 3 - Alpha + Operating System :: MacOS + Operating System :: Unix [options] package_dir = diff --git a/src/poli/__init__.py b/src/poli/__init__.py index d53f4999..09f400ed 100644 --- a/src/poli/__init__.py +++ b/src/poli/__init__.py @@ -1,6 +1,6 @@ """poli, a library for discrete black-box objective functions.""" -__version__ = "1.0.0.dev13" +__version__ = "1.0.1" from .core.util.isolation.instancing import instance_function_as_isolated_process # from .core import get_problems diff --git a/src/poli/core/util/isolation/instancing.py b/src/poli/core/util/isolation/instancing.py index 89015f04..83ba6cb8 100644 --- a/src/poli/core/util/isolation/instancing.py +++ b/src/poli/core/util/isolation/instancing.py @@ -311,11 +311,12 @@ def instance_function_as_isolated_process( # Check if the user has conda installed if shutil.which("conda") is None: raise RuntimeError( - "Conda is not installed. For poli's isolation mechanisms to work, " + "Conda is not installed/not in the PATH. For poli's isolation mechanisms to work, \n" "we need conda to be installed.\n" - "If you are not interested in using conda, you can install all the " + "If you are not interested in using conda, you can install all the \n" "relevant dependencies for black boxes using pip and optional arguments.\n" - "Check the documentation of the black box you are interested in for more information." + "Check the documentation of the black box you are interested in for more information.\n" + "https://machinelearninglifescience.github.io/poli-docs/." ) # Register the problem if it hasn't been registered. diff --git a/tox.ini b/tox.ini index 96210c58..e9697361 100644 --- a/tox.ini +++ b/tox.ini @@ -89,7 +89,7 @@ commands= pytest {tty:--color=yes} -v -m "not slow and poli__dockstring" {posargs} [testenv:poli-rasp-py310] -description = run the tests with pytest on the RaSP environment for poli +description = run the tests with pytest and conda on the RaSP environment for poli basepython = python3.10 wheel_build_env = .pkg deps= @@ -122,7 +122,4 @@ deps= -r requirements.txt -e.[ehrlich] commands= - sh -c 'if conda info --envs | grep -q poli__ehrlich_holo; then echo "poli__ehrlich_holo already exists"; else conda env create -f ./src/poli/objective_repository/ehrlich_holo/environment.yml; fi' - sh -c "conda run -n poli__ehrlich_holo python -m pip uninstall -y poli" - sh -c "conda run -n poli__ehrlich_holo python -m pip install -e ." pytest {tty:--color=yes} -v -m 'not slow and poli__ehrlich_holo' {posargs} \ No newline at end of file diff --git a/tox.master.ini b/tox.master.ini deleted file mode 100644 index aaf26e42..00000000 --- a/tox.master.ini +++ /dev/null @@ -1,59 +0,0 @@ -[tox] -env_list = - lint - poli-base-py39 -minversion = 4.10.0 - -[testenv] -description = run the tests with pytest -package = wheel -wheel_build_env = .pkg -allowlist_externals = - sh -deps = - pytest>=6 -commands = - sh -c "rm -rf ~/.poli_objectives/*.sh" - sh -c "rm -rf ~/.poli_objectives/config.rc" - sh -c 'if conda info --envs | grep -q poli__base; then echo "poli__base already exists"; else conda env create -f ./src/poli/objective_repository/aloha/environment.yml; fi' - sh -c "conda run -n poli__base python -m pip uninstall -y poli" - sh -c "conda run -n poli__base python -m pip install -e ." - sh -c 'if conda info --envs | grep -q poli__chem; then echo "poli__chem already exists"; else conda env create -f ./src/poli/objective_repository/rdkit_qed/environment.yml; fi' - sh -c "conda run -n poli__chem python -m pip uninstall -y poli" - sh -c "conda run -n poli__chem python -m pip install -e ." - sh -c 'if conda info --envs | grep -q poli__protein; then echo "poli__protein already exists"; else conda env create -f ./src/poli/objective_repository/foldx_stability/environment.yml; fi' - sh -c "conda run -n poli__protein python -m pip uninstall -y poli" - sh -c "conda run -n poli__protein python -m pip install -e ." - sh -c 'if conda info --envs | grep -q poli__protein_cbas; then echo "poli__protein_cbas already exists"; else conda env create -f ./src/poli/objective_repository/gfp_cbas/environment.yml; fi' - sh -c "conda run -n poli__protein_cbas python -m pip uninstall -y poli" - sh -c "conda run -n poli__protein_cbas python -m pip install -e ." - sh -c 'if conda info --envs | grep -q poli__dockstring; then echo "poli__dockstring already exists"; else conda env create -f ./src/poli/objective_repository/dockstring/environment.yml; fi' - sh -c "conda run -n poli__dockstring python -m pip uninstall -y poli" - sh -c "conda run -n poli__dockstring python -m pip install -e ." - sh -c 'if conda info --envs | grep -q poli__tdc; then echo "poli__tdc already exists"; else conda env create -f ./src/poli/objective_repository/sa_tdc/environment.yml; fi' - sh -c "conda run -n poli__tdc python -m pip uninstall -y poli" - sh -c "conda run -n poli__tdc python -m pip install -e ." - sh -c 'if conda info --envs | grep -q poli__rasp; then echo "poli__rasp already exists"; else conda env create -f ./src/poli/objective_repository/rasp/environment.yml; fi' - sh -c "conda run -n poli__rasp python -m pip uninstall -y poli" - sh -c "conda run -n poli__rasp python -m pip install -e ." - pytest {tty:--color=yes} -v {posargs} - sh -c "rm -rf ~/.poli_objectives/*.sh" - sh -c "rm -rf ~/.poli_objectives/config.rc" - -[testenv:lint] -description = check the code style with black -deps = - black -commands = - black --check --diff . - -[testenv:poli-base-py39] -description = run the tests with pytest on the base environment for poli -basepython = python3.9 -wheel_build_env = .pkg -deps= - {[testenv]deps} - numpy - -e. -commands= - {[testenv]commands}