Skip to content

Releases: spietras/rules_conda

0.2.0

12 Nov 20:41
ed26e91
Compare
Choose a tag to compare

Changes

🚀 Features

🧽 Cleanup

WORKSPACE setup

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_conda",
    sha256 = "ee187c4902f5f8da85fcba9943064fd38b2a75f80ed0a2844b34cf9e27cb5990",
    url = "https://github.com/spietras/rules_conda/releases/download/0.2.0/rules_conda-0.2.0.zip"
)

load("@rules_conda//:defs.bzl", "conda_create", "load_conda", "register_toolchain")

load_conda(quiet = False)

conda_create(
    name = "py3_env",
    environment = "@//:environment.yml",
    quiet = False,
)

register_toolchain(py3_env = "py3_env")

0.1.0

02 Dec 21:09
bfee4f8
Compare
Choose a tag to compare

Changes

🚀 Features

WORKSPACE setup

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_conda",
    sha256 = "9793f86162ec5cfb32a1f1f13f5bf776e2c06b243c4f1ee314b9ec870144220d",
    url = "https://github.com/spietras/rules_conda/releases/download/0.1.0/rules_conda-0.1.0.zip"
)

load("@rules_conda//:defs.bzl", "conda_create", "load_conda", "register_toolchain")

load_conda(quiet = False)

conda_create(
    name = "py3_env",
    environment = "@//:environment.yml",
    quiet = False,
)

register_toolchain(py3_env = "py3_env")

0.0.6

16 Oct 01:16
5fbf322
Compare
Choose a tag to compare

Changes

WORKSPACE setup

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_conda",
    sha256 = "c5ad3a077bddff381790d64dd9cc1516b8133c1d695eb3eff4fed04a39dc4522",
    url = "https://github.com/spietras/rules_conda/releases/download/0.0.6/rules_conda-0.0.6.zip"
)

load("@rules_conda//:defs.bzl", "conda_create", "load_conda", "register_toolchain")

load_conda(
    quiet = False,  # use True to hide conda output
    version = "4.10.3",  # optional, defaults to 4.10.3
)

conda_create(
    name = "my_env",
    timeout = 600,  # each execute action can take up to 600 seconds
    clean = False,  # use True if you want to clean conda cache (less space taken, but slower subsequent builds)
    environment = "@//:environment.yml",  # label pointing to environment.yml file
    quiet = False,  # use True to hide conda output
)

register_toolchain(
    py3_env = "my_env",
)

0.0.5

11 Jan 21:11
Compare
Choose a tag to compare

Changes

  • Added flag for conda cache clean after an environment creation

WORKSPACE setup

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_conda",
    sha256 = "8298379474beb05f815afc33a42eb1732f8ebdab3aa639569473eae75e6e072b",
    url = "https://github.com/spietras/rules_conda/releases/download/0.0.5/rules_conda-0.0.5.zip"
)

load("@rules_conda//:defs.bzl", "load_conda", "conda_create", "register_toolchain")

# download and install conda
load_conda(
    version = "4.8.4",  # optional, defaults to 4.8.4
    quiet = False  # print output
)

# create environment with python2
conda_create(
    name = "py2_env",
    environment = "@//third_party/conda:py2_environment.yml",  # label pointing to environment.yml file
    quiet = False,
    clean = True,
    timeout = 600  # each execute action can take up to 600 seconds
)

# create environment with python3
conda_create(
    name = "py3_env",
    environment = "@//third_party/conda:py3_environment.yml",  # label pointing to environment.yml file
    quiet = False,
    clean = True,
    timeout = 600
)

# register pythons from environment as toolchain
register_toolchain(
    py2_env = "py2_env", # python2 is optional
    py3_env = "py3_env"
)

0.0.4

27 Nov 22:15
Compare
Choose a tag to compare

Changes

  • Added adjustable timeout option to load_conda and conda_create
  • Increased default timeout from 1800 seconds to 3600 seconds

WORKSPACE setup

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_conda",
    sha256 = "6c05d098ea82c172cd83d99c5fc892a488ffbf5f64ab3b2a32ab642c2a264e31",
    url = "https://github.com/spietras/rules_conda/releases/download/0.0.4/rules_conda-0.0.4.zip"
)

load("@rules_conda//:defs.bzl", "load_conda", "conda_create", "register_toolchain")

# download and install conda
load_conda(
    version = "4.8.4",  # optional, defaults to 4.8.4
    quiet = False  # print output
)

# create environment with python2
conda_create(
    name = "py2_env",
    environment = "@//third_party/conda:py2_environment.yml",  # label pointing to environment.yml file
    quiet = False,
    timeout = 600  # each execute action can take up to 600 seconds
)

# create environment with python3
conda_create(
    name = "py3_env",
    environment = "@//third_party/conda:py3_environment.yml",  # label pointing to environment.yml file
    quiet = False,
    timeout = 600
)

# register pythons from environment as toolchain
register_toolchain(
    py2_env = "py2_env", # python2 is optional
    py3_env = "py3_env"
)

0.0.3

22 Oct 20:03
Compare
Choose a tag to compare

Changes

  • Added invoking conda clean before and after creating a new environment to fix version conflicts and decrease used space size
  • Changed failure output formatting

WORKSPACE setup

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_conda",
    sha256 = "17cd7377a8af8e726e188f99c4a0c2fa9e8e29eabe50b0d447a3533a56ca3a6f",
    url = "https://github.com/spietras/rules_conda/releases/download/0.0.3/rules_conda-0.0.3.zip"
)

load("@rules_conda//:defs.bzl", "load_conda", "conda_create", "register_toolchain")

# download and install conda
load_conda(
    version="4.8.4" # optional, defaults to 4.8.4
)

# create environment with python2
conda_create(
    name = "py2_env",
    environment = "@//third_party/conda:py2_environment.yml" # label pointing to environment.yml file
)

# create environment with python3
conda_create(
    name = "py3_env",
    environment = "@//third_party/conda:py3_environment.yml" # label pointing to environment.yml file
)

# register pythons from environment as toolchain
register_toolchain(
    py2_env = "py2_env", # python2 is optional
    py3_env = "py3_env"
)

0.0.2

05 Sep 09:21
Compare
Choose a tag to compare

Changes

  • Increased execute commands timeout from 10 to 30 minutes

WORKSPACE setup

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_conda",
    sha256 = "3258a44335f10a8ecffd983a5caf5f5c37b92ea191bfe743bb85280ef864cfd9",
    url = "https://github.com/spietras/rules_conda/releases/download/0.0.2/rules_conda-0.0.2.zip"
)

load("@rules_conda//:defs.bzl", "load_conda", "conda_create", "register_toolchain")

# download and install conda
load_conda(
    version="4.8.4" # optional, defaults to 4.8.4
)

# create environment with python2
conda_create(
    name = "py2_env",
    environment = "@//third_party/conda:py2_environment.yml" # label pointing to environment.yml file
)

# create environment with python3
conda_create(
    name = "py3_env",
    environment = "@//third_party/conda:py3_environment.yml" # label pointing to environment.yml file
)

# register pythons from environment as toolchain
register_toolchain(
    py2_env = "py2_env", # python2 is optional
    py3_env = "py3_env"
)

0.0.1

29 Aug 13:16
Compare
Choose a tag to compare

WORKSPACE setup

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_conda",
    sha256 = "f5c5e6be86ddc28ef2ed9163878f5a073defc5d79b82e60570f502549c9ef602",
    url = "https://github.com/spietras/rules_conda/releases/download/0.0.1/rules_conda-0.0.1.zip"
)

load("@rules_conda//:defs.bzl", "load_conda", "conda_create", "register_toolchain")

# download and install conda
load_conda(
    version="4.8.4" # optional, defaults to 4.8.4
)

# create environment with python2
conda_create(
    name = "py2_env",
    environment = "@//third_party/conda:py2_environment.yml" # label pointing to environment.yml file
)

# create environment with python3
conda_create(
    name = "py3_env",
    environment = "@//third_party/conda:py3_environment.yml" # label pointing to environment.yml file
)

# register pythons from environment as toolchain
register_toolchain(
    py2_env = "py2_env", # python2 is optional
    py3_env = "py3_env"
)