From 01c488aeba1bd58ed158d41901e778607bb5deb7 Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Fri, 25 Oct 2024 15:44:15 +0200 Subject: [PATCH 01/38] ci: using uv to setup python and install dependencies --- .github/workflows/tests.yaml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 0ec1b3ed..d2b105e1 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -25,12 +25,14 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - run: pipx install poetry - - uses: actions/setup-python@v5 + - name: install the latest version uv + uses: astral-sh/setup-uv@v3 with: - python-version: ${{ matrix.python-version }} - cache: 'poetry' - cache-dependency-path: '**/pyproject.toml' - - run: poetry install - - run: poetry run pytest -m "" # Run all markers + version: latest + - name: create virtual environment + run: uv venv --python ${{ matrix.python-version }} + - name: Install + run: uv pip install ".[dev]" + - name: Run tests + run: uv run pytest -m "" # Run all markers From 9ef38d1f1b005907a284f5ec1feb8ce2ccb7c9a4 Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Fri, 25 Oct 2024 15:48:17 +0200 Subject: [PATCH 02/38] ci: using uv to setup python and install dependencies --- .github/workflows/tests.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index d2b105e1..0480f96c 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -33,6 +33,8 @@ jobs: run: uv venv --python ${{ matrix.python-version }} - name: Install run: uv pip install ".[dev]" + - name: Activate venv + run: source .venv/bin/activate - name: Run tests - run: uv run pytest -m "" # Run all markers + run: python -m pytest -m "" # Run all markers From de2cd3bf6696345163a1b7195188e02edf11b246 Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Fri, 25 Oct 2024 15:54:14 +0200 Subject: [PATCH 03/38] ci: using uv to setup python and install dependencies --- .github/workflows/tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 0480f96c..4c3b1c18 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -36,5 +36,5 @@ jobs: - name: Activate venv run: source .venv/bin/activate - name: Run tests - run: python -m pytest -m "" # Run all markers + run: uv run python -m pytest -m "" # Run all markers From 3523fc2ca9ea29b44c7abc20f8be278bdc3f4dd4 Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Fri, 25 Oct 2024 16:52:45 +0200 Subject: [PATCH 04/38] chore: moving from poetry-based pyproject.toml to PEP508-style --- .gitignore | 5 +- pyproject.toml | 129 +++++++++++++++++++++++++++---------------------- 2 files changed, 76 insertions(+), 58 deletions(-) diff --git a/.gitignore b/.gitignore index 81642d3e..a6151f89 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ -#False Python +# build files +*.egg-info + +# False Python __pycache__ dist diff --git a/pyproject.toml b/pyproject.toml index d86c9cf5..5f1fc0ab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,27 +1,24 @@ -[tool.poetry] +[project] name = "neural-pipeline-search" version = "v0.12.2" description = "Neural Pipeline Search helps deep learning experts find the best neural pipeline." authors = [ - "Danny Stoll ", - "Neeratyoy Mallik ", - "Simon Schrodi", - "Eddie Bergman", - "Maciej Janowski", - "Samir Garibov", - "Tarek Abou Chakra", - "Daniel Rogalla", - "Carl Hvarfner", - "Binxin Ru", - "Nils Kober", - "Théophane Vallaeys", - "Frank Hutter", + { name = "Danny Stoll", email = "stolld@cs.uni-freiburg.de" }, + { name = "Neeratyoy Mallik", email = "mallik@cs.uni-freiburg.de" }, + { name = "Simon Schrodi" }, + { name = "Eddie Bergman" }, + { name = "Maciej Janowski" }, + { name = "Samir Garibov" }, + { name = "Tarek Abou Chakra" }, + { name = "Daniel Rogalla" }, + { name = "Carl Hvarfner" }, + { name = "Binxin Ru" }, + { name = "Nils Kober" }, + { name = "Théophane Vallaeys" }, + { name = "Frank Hutter" }, ] readme = "README.md" -license = "Apache-2.0" -homepage = "https://github.com/automl/neps" -repository = "https://github.com/automl/neps" -documentation = "https://automl.github.io/neps/" +license = { file = "LICENSE" } keywords = [ "Neural Pipeline Search", "Neural Architecture Search", @@ -31,7 +28,7 @@ keywords = [ classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", - "Intended Audience :: Science/Research", + "Intended Audience :: Science/Research", "Natural Language :: English", "License :: OSI Approved :: Apache Software License", "Operating System :: POSIX :: Linux", @@ -42,49 +39,67 @@ classifiers = [ "Topic :: Scientific/Engineering :: Artificial Intelligence", "Topic :: System :: Distributed Computing", ] -packages = [{ include = "neps" }, { include = "neps_examples" }] +requires-python = ">=3.10,<3.12" +dependencies = [ + "ConfigSpace>=0.7,<1.0", + "grakel>=0.1,<0.2", + "numpy>=1.0,<2.0", + "pandas>=2.0,<3.0", + "networkx>=2.6.3,<3.0", + "nltk>=3.6.4,<4.0", + "scipy>=1.13.1", + "torch>=2.0.1", + "matplotlib>=3.0,<4.0", + "more-itertools", + "portalocker>=2.0,<3.0", + "seaborn>=0.13,<0.14", + "pyyaml>=6.0,<7.0", + "tensorboard>=2.0,<3.0", + "typing-extensions", + "torchvision>=0.8.0", + "ifbo>=0.3.10", + "botorch>=0.12", + "gpytorch==1.13.0", +] -[tool.poetry.dependencies] -python = ">=3.10,<3.12" -ConfigSpace = "^0.7" -grakel = "^0.1" -numpy = "^1" -pandas = "^2" -networkx = "^2.6.3" -nltk = "^3.6.4" -scipy = ">=1.13.1" -torch = ">=2.0.1" -matplotlib = "^3" -more-itertools = "*" -portalocker = "^2" -seaborn = "^0.13" -pyyaml = "^6" -tensorboard = "^2" -typing-extensions = "*" -torchvision = ">=0.8.0" -ifbo = ">=0.3.10" -botorch = ">=0.12" -gpytorch = "1.13.0" +[project.urls] +homepage = "https://github.com/automl/neps" +repository = "https://github.com/automl/neps" +documentation = "https://automl.github.io/neps/" -[tool.poetry.group.dev.dependencies] -ruff = "*" -pre-commit = "^3" -mypy = "^1" -pytest = "^7" -pytest-cases = "^3" -types-PyYAML = "^6" -mkdocs-material = "*" -mkdocs-autorefs = "*" -mkdocs-gen-files = "*" -mkdocstrings = { extras = ["python"], version = "*" } -mkdocs-literate-nav = "*" -mike = "*" -black = "*" # This allows mkdocstrings to format signatures in the docs +[project.optional-dependencies] +dev = [ + "ruff", + "pre-commit>=3,<4", + "mypy>=1,<2", + "pytest>=7,<8", + "pytest-cases>=3,<4", + "types-PyYAML>=6,<7", + "mkdocs-material", + "mkdocs-autorefs", + "mkdocs-gen-files", + "mkdocstrings[python]", + "mkdocs-literate-nav", + "mike", + "black", # This allows mkdocstrings to format signatures in the docs +] + +[tool.setuptools.packages.find] +include = [ + "neps", + "neps.*", + "neps_examples", +] +exclude = [] [build-system] -requires = ["poetry-core>=1.1.0"] -build-backend = "poetry.core.masonry.api" +requires = [ + "setuptools>=68.2.2", + "wheel>=0.41.2", +] + +build-backend = "setuptools.build_meta" # TODO(eddiebergman): Include more of these as we go on in migration # "tests", From 10ebbb17bbd1d5a88a4727df1a0439d8ec8452f3 Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Fri, 25 Oct 2024 16:56:49 +0200 Subject: [PATCH 05/38] ci: using uv to setup python and install dependencies --- .github/workflows/tests.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 4c3b1c18..d2b105e1 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -33,8 +33,6 @@ jobs: run: uv venv --python ${{ matrix.python-version }} - name: Install run: uv pip install ".[dev]" - - name: Activate venv - run: source .venv/bin/activate - name: Run tests - run: uv run python -m pytest -m "" # Run all markers + run: uv run pytest -m "" # Run all markers From 960ea4cf34ec5bd2825c8e5562f62a6c9291270c Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Fri, 25 Oct 2024 17:02:39 +0200 Subject: [PATCH 06/38] ci: using uv in pre-commit.yaml workflow --- .github/workflows/pre-commit.yaml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml index a7bd4690..33b2e805 100644 --- a/.github/workflows/pre-commit.yaml +++ b/.github/workflows/pre-commit.yaml @@ -25,9 +25,15 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - name: install the latest version uv + uses: astral-sh/setup-uv@v3 with: - python-version: '3.10' - - run: pip install pre-commit - - run: pre-commit install - - run: pre-commit run --all-files + version: latest + - name: create virtual environment + run: uv venv --python '3.10' + - name: install pre-commit + run: uv pip install pre-commit + - name: install pre-commit hooks + run: uv run pre-commit install + - name: Run pre-commit hooks + run: uv run pre-commit run --all-files From 11be7cd3d7df4ffe60fe7ec428166528d3607d8a Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Mon, 25 Nov 2024 09:56:08 +0100 Subject: [PATCH 07/38] ci(.gitignore): removing poetry references --- .gitignore | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitignore b/.gitignore index a6151f89..767f5b14 100644 --- a/.gitignore +++ b/.gitignore @@ -22,9 +22,6 @@ site/* .vscode/ .idea/ -# Poetry -poetry.lock - # Misc *.sh *.model From f93eb6b88653f1018ec7936e2f24139623a4c066 Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Mon, 25 Nov 2024 09:56:37 +0100 Subject: [PATCH 08/38] ci: removing poetry references and switching to uv --- CONTRIBUTING.md | 60 ++++++++++++++++--------------------------------- pyproject.toml | 3 --- 2 files changed, 19 insertions(+), 44 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 176869af..df683aba 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,50 +16,29 @@ Automatic checks are run on every pull request and on every commit to `master`. There are three required steps and one optional: -1. Optional: Install miniconda and create an environment -1. Install poetry -1. Install the neps package using poetry +1. Install uv +1. Install the neps package using uv 1. Activate pre-commit for the repository For instructions see below. -## 1. Optional: Install miniconda and create a virtual environment +## 1. Install uv -To manage python versions install e.g., miniconda with - -```bash -wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O install_miniconda.sh -bash install_miniconda.sh -b -p $HOME/.conda # Change to place of preference -rm install_miniconda.sh -``` - -Consider running `~/.conda/bin/conda init` or `~/.conda/bin/conda init zsh` . - -Then finally create the environment and activate it - -```bash -conda create -n neps python=3.10 -conda activate neps -``` - -## 2. Install poetry - -First, install poetry, e.g., via +First, install uv, e.g., via ```bash curl -sSL https://install.python-poetry.org | python3 - # or directly into your virtual env using `pip install poetry` ``` -Then consider appending +## 2. Create a virtual environment ```bash -export PATH="$HOME/.local/bin:$PATH" +uv venv --python 3.11 +source .venv/bin/activate ``` -to your `.zshrc` / `.bashrc` or alternatively simply running the export manually. - -## 3. Install the neps Package Using poetry +## 3. Install the neps Package Using uv Clone the repository, e.g., @@ -71,7 +50,7 @@ cd neps Then, inside the main directory of neps run ```bash -poetry install +uv pip install -e ".[dev]" ``` This will installthe neps package but also additional dev dependencies. @@ -108,7 +87,7 @@ The tests correspond directly to examples in [neps_examples](https://github.com/ For linting we use `ruff` for checking code quality. You can install it locally and use it as so: ```bash -pip install ruff +uv pip install ruff ruff check --fix neps # the --fix flag will try to fix issues it can automatically ``` @@ -131,7 +110,7 @@ There you can find the documentation for all of the rules employed. For type checking we use `mypy`. You can install it locally and use it as so: ```bash -pip install mypy +uv pip install mypy mypy neps ``` @@ -212,7 +191,7 @@ In the case of regression test failure, try running it again first, if the probl You can also run tests locally by running: ``` -poetry run pytest -m regression_all +uv run pytest -m regression_all ``` ## Disabling and Skipping Checks etc. @@ -233,27 +212,26 @@ There are two options: ## Managing Dependencies -To manage dependencies and for package distribution we use [poetry](https://python-poetry.org/docs/) (replaces pip). +To manage dependencies we use [uv](https://docs.astral.sh/uv/getting-started/) (replaces pip). ## Add dependencies To install a dependency use ```bash -poetry add dependency +uv add dependency ``` and commit the updated `pyproject.toml` to git. -For more advanced dependency management see examples in `pyproject.toml` or have a look at the [poetry documentation](https://python-poetry.org/). +For more advanced dependency management see examples in `pyproject.toml` or have a look at the [uv documentation](https://docs.astral.sh/uv/getting-started/). ## Install dependencies added by others When other contributors added dependencies to `pyproject.toml`, you can install them via ```bash -poetry lock -poetry install +uv pip install -e ".[dev]" ``` # Documentation @@ -295,7 +273,7 @@ We follow the [semantic versioning](https://semver.org) scheme. ## 1. Update the Package Version and CITATION.cff ```bash -poetry version v0.9.0 +uv bump 0.9.0 ``` and manually change the version specified in `CITATION.cff`. @@ -307,7 +285,7 @@ First commit and test ```bash git add pyproject.toml git commit -m "Bump version from v0.8.4 to v0.9.0" -pytest +uv run pytest ``` Then tag and push @@ -344,7 +322,7 @@ To publish to PyPI: 3. Run ```bash -poetry publish --build +poetry publish ``` This will ask for your PyPI credentials. diff --git a/pyproject.toml b/pyproject.toml index 5f1fc0ab..f0998731 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -334,6 +334,3 @@ module = [ "requests.*", ] ignore_errors = true - -[tool.poetry.scripts] -neps = "neps.utils.cli:main" From c7f3ae0ad5b51c25d603c437ff507af8c5ca5b0a Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Mon, 25 Nov 2024 09:59:33 +0100 Subject: [PATCH 09/38] ci(pyproject.toml): adding bumpversion config --- pyproject.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index f0998731..5c3c4262 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -334,3 +334,9 @@ module = [ "requests.*", ] ignore_errors = true + +[tool.bumpversion] +current_version = "0.12.2" + +[[tool.bumpversion.files]] +filename = "pyproject.toml" From b36b9df25879ec9e25a6443c7860a8c6a2ad324e Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Mon, 25 Nov 2024 10:04:05 +0100 Subject: [PATCH 10/38] ci(pyproject.toml): trying to fix bump my version --- pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 5c3c4262..1d54df33 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -337,6 +337,5 @@ ignore_errors = true [tool.bumpversion] current_version = "0.12.2" +version_files = ["pyproject.toml:^version"] -[[tool.bumpversion.files]] -filename = "pyproject.toml" From 68ffc5062dfcaca4ef93ae436f8e65396ad49b12 Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Mon, 25 Nov 2024 10:04:40 +0100 Subject: [PATCH 11/38] ci(pyproject.toml): trying to fix bump my version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1d54df33..5b7400c7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "neural-pipeline-search" -version = "v0.12.2" +version = "0.12.2" description = "Neural Pipeline Search helps deep learning experts find the best neural pipeline." authors = [ { name = "Danny Stoll", email = "stolld@cs.uni-freiburg.de" }, From 7ed32a4380054f773d962aad0cc2f4b349b2ff8c Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Mon, 25 Nov 2024 10:06:16 +0100 Subject: [PATCH 12/38] ci(pyproject.toml): trying to fix bump my version --- pyproject.toml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5b7400c7..1a839a61 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -337,5 +337,9 @@ ignore_errors = true [tool.bumpversion] current_version = "0.12.2" -version_files = ["pyproject.toml:^version"] +version_files = [ + "pyproject.toml:^version", + "pyproject.toml:[project]\nversion", + "CITATION.cff:^version" + ] From 99211d61ef4df513c23cb85064fa2fba1a21ac04 Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Mon, 25 Nov 2024 10:08:32 +0100 Subject: [PATCH 13/38] ci(pyproject.toml): trying to fix bump my version --- pyproject.toml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1a839a61..ba1885f9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -337,9 +337,10 @@ ignore_errors = true [tool.bumpversion] current_version = "0.12.2" -version_files = [ - "pyproject.toml:^version", - "pyproject.toml:[project]\nversion", - "CITATION.cff:^version" - ] +[[tool.bumpversion.files]] +filename = "pyproject.toml" +parse = "(?P\\d+\\.\\d+\\.\\d+)" +serialize = "{version}" +search = "version = \"{current_version}\"" +replace = "version = \"{new_version}\"" From 08cad16f4d00a6d109873e4b4755363313ea796e Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Mon, 25 Nov 2024 10:08:57 +0100 Subject: [PATCH 14/38] ci(pyproject.toml): trying to fix bump my version --- pyproject.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index ba1885f9..d2ab0c48 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -340,7 +340,5 @@ current_version = "0.12.2" [[tool.bumpversion.files]] filename = "pyproject.toml" -parse = "(?P\\d+\\.\\d+\\.\\d+)" -serialize = "{version}" search = "version = \"{current_version}\"" replace = "version = \"{new_version}\"" From ea7d9fe99dd2b84b9e3dc96daa00913cdc4d3d3f Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Mon, 25 Nov 2024 10:09:24 +0100 Subject: [PATCH 15/38] ci(pyproject.toml): trying to fix bump my version --- pyproject.toml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d2ab0c48..015ca8b3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "neural-pipeline-search" -version = "0.12.2" +version = "0.13.0" description = "Neural Pipeline Search helps deep learning experts find the best neural pipeline." authors = [ { name = "Danny Stoll", email = "stolld@cs.uni-freiburg.de" }, @@ -336,9 +336,14 @@ module = [ ignore_errors = true [tool.bumpversion] -current_version = "0.12.2" +current_version = "0.13.0" [[tool.bumpversion.files]] filename = "pyproject.toml" search = "version = \"{current_version}\"" replace = "version = \"{new_version}\"" + +[[tool.bumpversion.files]] +filename = "CITATION.cff" +search = "version = \"{current_version}\"" +replace = "version = \"{new_version}\"" From 31a7fea508da8c38e144367b23c697e6501f32bf Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Mon, 25 Nov 2024 10:09:42 +0100 Subject: [PATCH 16/38] ci(pyproject.toml): trying to fix bump my version --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 015ca8b3..b81ad6ce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "neural-pipeline-search" -version = "0.13.0" +version = "0.12.2" description = "Neural Pipeline Search helps deep learning experts find the best neural pipeline." authors = [ { name = "Danny Stoll", email = "stolld@cs.uni-freiburg.de" }, @@ -336,7 +336,7 @@ module = [ ignore_errors = true [tool.bumpversion] -current_version = "0.13.0" +current_version = "0.12.2" [[tool.bumpversion.files]] filename = "pyproject.toml" From ff97e1af4ed2c82c575ac6a901b7e567fb4b74a6 Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Mon, 25 Nov 2024 10:10:19 +0100 Subject: [PATCH 17/38] ci(pyproject.toml): trying to fix bump my version --- CITATION.cff | 2 +- pyproject.toml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CITATION.cff b/CITATION.cff index f62a3157..7a35898f 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -28,6 +28,6 @@ authors: - family-names: Hutter given-names: Frank title: "Neural Pipeline Search (NePS)" -version: 0.12.1 +version: 0.12.2 date-released: 2024-07-03 url: "https://github.com/automl/neps" diff --git a/pyproject.toml b/pyproject.toml index b81ad6ce..9ec994c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -345,5 +345,5 @@ replace = "version = \"{new_version}\"" [[tool.bumpversion.files]] filename = "CITATION.cff" -search = "version = \"{current_version}\"" -replace = "version = \"{new_version}\"" +search = "version: \"{current_version}\"" +replace = "version: \"{new_version}\"" From 6e16956621aca23350fe95e98b56cfd5dd70ffd7 Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Mon, 25 Nov 2024 10:11:08 +0100 Subject: [PATCH 18/38] ci(pyproject.toml): trying to fix bump my version --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9ec994c3..ead218e8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -345,5 +345,5 @@ replace = "version = \"{new_version}\"" [[tool.bumpversion.files]] filename = "CITATION.cff" -search = "version: \"{current_version}\"" -replace = "version: \"{new_version}\"" +search = "version: {current_version}" +replace = "version: {new_version}" From d8e7568424f2ea687c4b749acb1d90ed17b3dc82 Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Mon, 25 Nov 2024 10:11:37 +0100 Subject: [PATCH 19/38] ci(pyproject.toml): trying to fix bump my version --- CITATION.cff | 2 +- pyproject.toml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CITATION.cff b/CITATION.cff index 7a35898f..07d5b492 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -28,6 +28,6 @@ authors: - family-names: Hutter given-names: Frank title: "Neural Pipeline Search (NePS)" -version: 0.12.2 +version: 0.13.0 date-released: 2024-07-03 url: "https://github.com/automl/neps" diff --git a/pyproject.toml b/pyproject.toml index ead218e8..1a0d4a8d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "neural-pipeline-search" -version = "0.12.2" +version = "v0.12.2" description = "Neural Pipeline Search helps deep learning experts find the best neural pipeline." authors = [ { name = "Danny Stoll", email = "stolld@cs.uni-freiburg.de" }, @@ -340,8 +340,8 @@ current_version = "0.12.2" [[tool.bumpversion.files]] filename = "pyproject.toml" -search = "version = \"{current_version}\"" -replace = "version = \"{new_version}\"" +search = "version = \"v{current_version}\"" +replace = "version = \"v{new_version}\"" [[tool.bumpversion.files]] filename = "CITATION.cff" From a10c86edb864a0cd6e1cd7251acd2b9a0446accb Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Mon, 25 Nov 2024 10:11:45 +0100 Subject: [PATCH 20/38] ci(pyproject.toml): trying to fix bump my version --- CITATION.cff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CITATION.cff b/CITATION.cff index 07d5b492..84b25114 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -28,6 +28,6 @@ authors: - family-names: Hutter given-names: Frank title: "Neural Pipeline Search (NePS)" -version: 0.13.0 +version: v0.12.2 date-released: 2024-07-03 url: "https://github.com/automl/neps" From 8f75dfb4e49b0db8120426d16467736fd622889e Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Mon, 25 Nov 2024 10:12:38 +0100 Subject: [PATCH 21/38] ci(pyproject.toml): trying to fix bump my version --- CITATION.cff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CITATION.cff b/CITATION.cff index 84b25114..7a35898f 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -28,6 +28,6 @@ authors: - family-names: Hutter given-names: Frank title: "Neural Pipeline Search (NePS)" -version: v0.12.2 +version: 0.12.2 date-released: 2024-07-03 url: "https://github.com/automl/neps" From 4f3d8c21153334a514f73bdff349617235e859cc Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Mon, 25 Nov 2024 10:15:56 +0100 Subject: [PATCH 22/38] ci(pyproject.toml): trying to fix bump my version --- CONTRIBUTING.md | 4 +--- pyproject.toml | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index df683aba..f7a8ec36 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -273,11 +273,9 @@ We follow the [semantic versioning](https://semver.org) scheme. ## 1. Update the Package Version and CITATION.cff ```bash -uv bump 0.9.0 +bump-my-version bump ``` -and manually change the version specified in `CITATION.cff`. - ## 2. Commit with a Version Tag First commit and test diff --git a/pyproject.toml b/pyproject.toml index 1a0d4a8d..80ca4434 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -337,6 +337,7 @@ ignore_errors = true [tool.bumpversion] current_version = "0.12.2" +commit = true [[tool.bumpversion.files]] filename = "pyproject.toml" From 1982ce1a68b60dd27951c6e5b0faf67b662a7a7c Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Mon, 25 Nov 2024 10:22:07 +0100 Subject: [PATCH 23/38] ci(pyproject.toml): trying to fix bump my version --- CONTRIBUTING.md | 8 +++++++- pyproject.toml | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f7a8ec36..ccc720d2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -270,7 +270,13 @@ There are four steps to releasing a new version of neps: We follow the [semantic versioning](https://semver.org) scheme. -## 1. Update the Package Version and CITATION.cff +## 1. Run tests + +```bash +uv run pytest +``` + +## 2. Update the Package Version and CITATION.cff ```bash bump-my-version bump diff --git a/pyproject.toml b/pyproject.toml index 80ca4434..11e60621 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -338,6 +338,7 @@ ignore_errors = true [tool.bumpversion] current_version = "0.12.2" commit = true +tag = true [[tool.bumpversion.files]] filename = "pyproject.toml" From ec338d337c7a689f219b253dacbc4c1b027f4f6d Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Mon, 25 Nov 2024 10:37:26 +0100 Subject: [PATCH 24/38] ci(pyproject.toml): trying to fix bump my version --- CONTRIBUTING.md | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ccc720d2..dc832cbf 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -27,18 +27,17 @@ For instructions see below. First, install uv, e.g., via ```bash -curl -sSL https://install.python-poetry.org | python3 - -# or directly into your virtual env using `pip install poetry` +# On macOS and Linux. +curl -LsSf https://astral.sh/uv/install.sh | sh ``` -## 2. Create a virtual environment - ```bash -uv venv --python 3.11 -source .venv/bin/activate +# On Windows. +powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" ``` -## 3. Install the neps Package Using uv + +## 2. Install the neps Package Using uv Clone the repository, e.g., @@ -47,6 +46,13 @@ git clone https://github.com/automl/neps.git cd neps ``` +## 3. Create a virtual environment + +```bash +uv venv --python 3.11 +source .venv/bin/activate +``` + Then, inside the main directory of neps run ```bash @@ -326,7 +332,7 @@ To publish to PyPI: 3. Run ```bash -poetry publish +uv publish ``` This will ask for your PyPI credentials. From 252fcfe8db257e80015e5ef5ed49838e9f918be6 Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Mon, 25 Nov 2024 10:39:22 +0100 Subject: [PATCH 25/38] ci(pyproject.toml): trying to fix bump my version --- CONTRIBUTING.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dc832cbf..03d5b29c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -37,16 +37,14 @@ powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | ie ``` -## 2. Install the neps Package Using uv - -Clone the repository, e.g., +## 2. Clone the neps repository ```bash git clone https://github.com/automl/neps.git cd neps ``` -## 3. Create a virtual environment +## 3. Create a virtual environment and install the neps package ```bash uv venv --python 3.11 From 3a2d3e22695f539481bd9b889ac1f6ef63193acf Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Mon, 25 Nov 2024 13:55:29 +0100 Subject: [PATCH 26/38] ci(test.yaml): re-ordering steps when installing and testing --- .github/workflows/tests.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index d2b105e1..337d643f 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -29,10 +29,12 @@ jobs: uses: astral-sh/setup-uv@v3 with: version: latest - - name: create virtual environment + - name: create venv run: uv venv --python ${{ matrix.python-version }} + - name: Activate venv + run: source .venv/bin/activate - name: Install run: uv pip install ".[dev]" - name: Run tests - run: uv run pytest -m "" # Run all markers + run: pytest -m "" # Run all markers From 5a9c75a5f9d2357c8736d1ba33beeb071e91a814 Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Mon, 25 Nov 2024 14:00:38 +0100 Subject: [PATCH 27/38] ci(test.yaml): re-ordering steps when installing and testing --- .github/workflows/tests.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index b163053a..dea5abbf 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -32,7 +32,10 @@ jobs: - name: create venv run: uv venv --python ${{ matrix.python-version }} - name: Activate venv - run: source .venv/bin/activate + run: | + source .venv/bin/activate + echo "Python version: $(python --version)" + echo "which python: $(which python)" - name: Install run: uv pip install ".[dev]" - name: Run tests From 4d1dcbe01e7e51c80cfe224c10fad3a30c400cd2 Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Mon, 25 Nov 2024 14:04:03 +0100 Subject: [PATCH 28/38] ci(test.yaml): re-ordering steps when installing and testing --- .github/workflows/tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index dea5abbf..fc94c87d 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -39,5 +39,5 @@ jobs: - name: Install run: uv pip install ".[dev]" - name: Run tests - run: pytest -m "" # Run all markers + run: python -m pytest -m "" # Run all markers From df454dd27ad8371d19d3690132a4d82e63012694 Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Mon, 25 Nov 2024 14:06:44 +0100 Subject: [PATCH 29/38] ci(test.yaml): re-ordering steps when installing and testing --- .github/workflows/tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index fc94c87d..8b746ec4 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -39,5 +39,5 @@ jobs: - name: Install run: uv pip install ".[dev]" - name: Run tests - run: python -m pytest -m "" # Run all markers + run: uv run pytest -m "" # Run all markers From dd25576caeca1b46065b62b42ff5344a7b600cb6 Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Mon, 25 Nov 2024 14:12:09 +0100 Subject: [PATCH 30/38] ci(test.yaml): re-ordering steps when installing and testing --- .github/workflows/tests.yaml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 8b746ec4..6851d966 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -28,14 +28,10 @@ jobs: - name: install the latest version uv uses: astral-sh/setup-uv@v3 with: + enable-cache: true version: latest - name: create venv run: uv venv --python ${{ matrix.python-version }} - - name: Activate venv - run: | - source .venv/bin/activate - echo "Python version: $(python --version)" - echo "which python: $(which python)" - name: Install run: uv pip install ".[dev]" - name: Run tests From 82a4396ffde85f99ab87b37e179dc31276cdb8a9 Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Mon, 25 Nov 2024 14:13:25 +0100 Subject: [PATCH 31/38] ci(test.yaml): re-ordering steps when installing and testing --- .github/workflows/tests.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 6851d966..3219f2dd 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -29,6 +29,7 @@ jobs: uses: astral-sh/setup-uv@v3 with: enable-cache: true + ignore-nothing-to-cache: true version: latest - name: create venv run: uv venv --python ${{ matrix.python-version }} From 5eb6984267ceb4b763aa811fc2ae7b962d1e6c31 Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Mon, 25 Nov 2024 14:14:02 +0100 Subject: [PATCH 32/38] ci(test.yaml): re-ordering steps when installing and testing --- .github/workflows/tests.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 3219f2dd..3ac2dda3 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -28,8 +28,6 @@ jobs: - name: install the latest version uv uses: astral-sh/setup-uv@v3 with: - enable-cache: true - ignore-nothing-to-cache: true version: latest - name: create venv run: uv venv --python ${{ matrix.python-version }} From c1be2f1193d4aa1b25e8cf4069d967b9dbf5450f Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Mon, 25 Nov 2024 14:17:23 +0100 Subject: [PATCH 33/38] ci(test.yaml): re-ordering steps when installing and testing --- .github/workflows/tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 3ac2dda3..932f85aa 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -34,5 +34,5 @@ jobs: - name: Install run: uv pip install ".[dev]" - name: Run tests - run: uv run pytest -m "" # Run all markers + run: .venv/bin/python -m pytest -m "" # Run all markers From 2287b4504b6291871b32af510b6eccf3c0b3305f Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Mon, 25 Nov 2024 14:20:39 +0100 Subject: [PATCH 34/38] ci(test.yaml): re-ordering steps when installing and testing --- .github/workflows/tests.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 932f85aa..d35f13cc 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -29,10 +29,10 @@ jobs: uses: astral-sh/setup-uv@v3 with: version: latest - - name: create venv - run: uv venv --python ${{ matrix.python-version }} - - name: Install - run: uv pip install ".[dev]" - - name: Run tests - run: .venv/bin/python -m pytest -m "" # Run all markers - + - name: run tests + run: | + uv venv --python ${{ matrix.python-version }} + source .venv/bin/activate + uv pip install -e ".[dev]" + uv run pytest -m "" # Run all markers + From 0cfcfa12e7f57c8f8bd3f5013d6e2acd3ab73e88 Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Mon, 25 Nov 2024 14:22:24 +0100 Subject: [PATCH 35/38] ci(test.yaml): re-ordering steps when installing and testing --- .github/workflows/tests.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index d35f13cc..5c24f1c8 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -32,7 +32,6 @@ jobs: - name: run tests run: | uv venv --python ${{ matrix.python-version }} - source .venv/bin/activate uv pip install -e ".[dev]" uv run pytest -m "" # Run all markers From e57421ec775af79995d4cfd2289833d5f79c3ef5 Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Mon, 25 Nov 2024 14:30:11 +0100 Subject: [PATCH 36/38] chore: fix incorrect python versions --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d37aac69..b0556963 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,7 +40,7 @@ classifiers = [ "Topic :: Scientific/Engineering :: Artificial Intelligence", "Topic :: System :: Distributed Computing", ] -requires-python = ">=3.10,<3.12" +requires-python = ">=3.10,<3.13" dependencies = [ "ConfigSpace>=0.7,<1.0", From 439a52c8e350c181d91134fa137d5bf8ec19183a Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Mon, 25 Nov 2024 14:34:36 +0100 Subject: [PATCH 37/38] chore: reordering test steps --- .github/workflows/tests.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 5c24f1c8..a7b88cb2 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -29,9 +29,10 @@ jobs: uses: astral-sh/setup-uv@v3 with: version: latest + - name: create venv + run: uv venv --python ${{ matrix.python-version }} + - name: install dependencies + run: uv pip install -e ".[dev]" - name: run tests - run: | - uv venv --python ${{ matrix.python-version }} - uv pip install -e ".[dev]" - uv run pytest -m "" # Run all markers + run: uv run pytest -m "" # Run all markers From 136f78e1a8e0cfa734817300a54b79d4bfae6239 Mon Sep 17 00:00:00 2001 From: "Timur M. Carstensen" Date: Mon, 25 Nov 2024 22:05:35 +0100 Subject: [PATCH 38/38] chore: updating pypi publishing doc --- CONTRIBUTING.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 48d5221c..8c3d08ce 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -285,6 +285,8 @@ uv run pytest bump-my-version bump ``` +This will automatically update the version in `pyproject.toml` and `CITATION.cff`, tag the commit and push it to the remote repository. + ### 3. Update Documentation First check if the documentation has any issues via @@ -311,6 +313,7 @@ To publish to PyPI: 3. Run ```bash +uv build uv publish ```