diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 000000000..6c5e48d31 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,17 @@ +# Start from the base image +FROM mcr.microsoft.com/devcontainers/python + +# Install packages +RUN pipx install ruff + +# Copy the project's source code +COPY . /workspace + +# Set the working directory +WORKDIR /workspace + +# Install the project's dependencies +RUN pip install -e ".[other,notebook,testing,dev]" + +# Install pre-commit hooks +RUN pre-commit install diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..d3f6aa996 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,24 @@ +{ + "name": "Adaptive", + "build": { + "dockerfile": "Dockerfile", + "context": ".." + }, + "features": { + "ghcr.io/devcontainers/features/common-utils:2": { + "configureZshAsDefaultShell": "true", + "username": "vscode" + } + }, + "customizations": { + "vscode": { + "extensions": [ + "ms-python.python", + "ms-python.vscode-pylance", + "ms-toolsai.jupyter", + "charliermarsh.ruff", + "oderwat.indent-rainbow" + ] + } + } +} diff --git a/environment.yml b/environment.yml index 3ae91c491..32eddab7b 100644 --- a/environment.yml +++ b/environment.yml @@ -4,7 +4,7 @@ channels: - conda-forge dependencies: - - python=3.9 + - python=3.11 - sortedcontainers - sortedcollections - scipy @@ -17,5 +17,5 @@ dependencies: - jupyter_client>=5.2.2 - ipywidgets - scikit-optimize>=0.8.1 - - scikit-learn<=0.24.2 # https://github.com/scikit-optimize/scikit-optimize/issues/1059 + - scikit-learn - plotly diff --git a/pyproject.toml b/pyproject.toml index f0ea8eddf..260f97d66 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,6 +57,10 @@ testing = [ "pre_commit", "typeguard", ] +dev = [ + "ruff", + "pre-commit", +] [project.urls] homepage = "https://adaptive.readthedocs.io/"