From 08d247073b6ba4cdae1efead4d844ed43ded97de Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 19:47:01 +0000 Subject: [PATCH 1/5] Bump betterproto from 2.0.0b6 to 2.0.0b7 Bumps [betterproto](https://github.com/danielgtaylor/python-betterproto) from 2.0.0b6 to 2.0.0b7. - [Release notes](https://github.com/danielgtaylor/python-betterproto/releases) - [Changelog](https://github.com/danielgtaylor/python-betterproto/blob/master/CHANGELOG.md) - [Commits](https://github.com/danielgtaylor/python-betterproto/compare/v.2.0.0b6...v.2.0.0b7) --- updated-dependencies: - dependency-name: betterproto dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index fb25bb6..23b1577 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -betterproto==2.0.0b6 +betterproto==2.0.0b7 hagelkorn numpy pandas From 270281f39d29e259209f57ebdd20a968fc36c06b Mon Sep 17 00:00:00 2001 From: Michael Osthege Date: Mon, 24 Mar 2025 14:45:46 +0100 Subject: [PATCH 2/5] Update dev environment instructions --- README.md | 34 ++++++++++++++++------------------ requirements-dev.txt | 1 + 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 559079b..97b52e6 100644 --- a/README.md +++ b/README.md @@ -109,16 +109,30 @@ As the schema and API stabilizes a mid-term goal might be to replace PyMC `BaseT Getting rid of `MultiTrace` was a [long-term goal](https://github.com/pymc-devs/pymc/issues/4372#issuecomment-770100410) behind making `pm.sample(return_inferencedata=True)` the default. ## Development -First clone the repository and install `mcbackend` locally: + +First clone the repository and set up a development environment containing the protobuf compiler. ```bash +mamba create -n mcb python=3.11 grpcio-tools protobuf -y +activate mcb +pip install -r requirements-dev.txt +pip install --pre "betterproto[compiler]" pip install -e . ``` +To compile the `*.proto` files for languages other than Python, check the [ProtocolBuffers documentation](https://developers.google.com/protocol-buffers/docs/tutorials). + +The following script compiles them for Python using the [`betterproto`](https://github.com/danielgtaylor/python-betterproto) compiler plugin to get nice-looking dataclasses. +It also copies the generated files to the right place in `mcbackend`. + +```bash +python protobufs/generate.py +pre-commit run --all +``` + To run the tests: ```bash -pip install -r requirements-dev.txt pytest -v ``` @@ -128,19 +142,3 @@ To start one in Docker: ```bash docker run --detach --rm --name mcbackend-db -p 9000:9000 --ulimit nofile=262144:262144 clickhouse/clickhouse-server ``` - -### Compiling the ProtocolBuffers -If you don't already have it, first install the protobuf compiler: -```bash -conda install protobuf -pip install --pre "betterproto[compiler]" -``` - -To compile the `*.proto` files for languages other than Python, check the [ProtocolBuffers documentation](https://developers.google.com/protocol-buffers/docs/tutorials). - -The following script compiles them for Python using the [`betterproto`](https://github.com/danielgtaylor/python-betterproto) compiler plugin to get nice-looking dataclasses. -It also copies the generated files to the right place in `mcbackend`. - -```bash -python protobufs/generate.py -``` diff --git a/requirements-dev.txt b/requirements-dev.txt index 59a41df..4a24bc9 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,6 +1,7 @@ arviz clickhouse-driver flake8 +pre-commit pytest pytest-cov twine From df586d2a84e0ac20f39f156bb27b3977a5db3fd4 Mon Sep 17 00:00:00 2001 From: Michael Osthege Date: Mon, 24 Mar 2025 14:46:31 +0100 Subject: [PATCH 3/5] Upgrade pylint --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c26835b..da6d4df 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,7 +25,7 @@ repos: hooks: - id: black - repo: https://github.com/PyCQA/pylint - rev: v3.0.3 + rev: v3.3.6 hooks: - id: pylint args: [--rcfile=.pylintrc] From 1c571f77ca1ad9047535570e89e93105f2986056 Mon Sep 17 00:00:00 2001 From: Michael Osthege Date: Mon, 24 Mar 2025 14:53:30 +0100 Subject: [PATCH 4/5] Rerun code generation --- mcbackend/meta.py | 2 -- mcbackend/npproto/__init__.py | 2 -- 2 files changed, 4 deletions(-) diff --git a/mcbackend/meta.py b/mcbackend/meta.py index 4ba18c2..ccd53b5 100644 --- a/mcbackend/meta.py +++ b/mcbackend/meta.py @@ -1,8 +1,6 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # sources: meta.proto # plugin: python-betterproto -# This file has been @generated - from dataclasses import dataclass from datetime import datetime, timedelta from typing import Dict, List diff --git a/mcbackend/npproto/__init__.py b/mcbackend/npproto/__init__.py index 72c096a..e3d99a6 100644 --- a/mcbackend/npproto/__init__.py +++ b/mcbackend/npproto/__init__.py @@ -1,8 +1,6 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # sources: npproto/ndarray.proto # plugin: python-betterproto -# This file has been @generated - from dataclasses import dataclass from typing import List From daf6bc4e7a0e62142887ae633a9e6cd999b689f1 Mon Sep 17 00:00:00 2001 From: Michael Osthege Date: Mon, 24 Mar 2025 14:59:38 +0100 Subject: [PATCH 5/5] Bump to 0.5.3 --- mcbackend/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mcbackend/__init__.py b/mcbackend/__init__.py index a0eb735..45ae0c8 100644 --- a/mcbackend/__init__.py +++ b/mcbackend/__init__.py @@ -14,7 +14,7 @@ except ModuleNotFoundError: pass -__version__ = "0.5.2" +__version__ = "0.5.3" __all__ = [ "NumPyBackend", "NullBackend",