From 9bb198f0b3d9ff0d7419470eb5f6c4e0ec9d2856 Mon Sep 17 00:00:00 2001 From: Steffen Schneider Date: Sun, 29 Oct 2023 20:54:27 +0100 Subject: [PATCH 1/2] Add tool for editing package version --- tools/bump_version.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 tools/bump_version.sh diff --git a/tools/bump_version.sh b/tools/bump_version.sh new file mode 100755 index 00000000..fbc161b1 --- /dev/null +++ b/tools/bump_version.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# Bump the CEBRA version to the specified value. +# Edits all relevant files at once. +# +# Usage: +# tools/bump_version.sh 0.3.1rc1 + +version=$1 +if [ -z ${version} ]; then + >&1 echo "Specify a version number." + >&1 echo "Usage:" + >&1 echo "tools/bump_version.sh " +fi + +# python cebra version +sed -i "s/__version__ = .*/__version__ = \"${version}\"/" \ + cebra/__init__.py + +# reinstall script in root +sed -i "s/VERSION=.*/VERSION=${version}/" \ + reinstall.sh + +# Makefile +sed -i "s/CEBRA_VERSION := .*/CEBRA_VERSION := ${version}/" \ + Makefile + +# Arch linux PKGBUILD +sed -i "s/pkgver=.*/pkgver=${version}/" \ + PKGBUILD + +# Dockerfile +sed -i "s/ENV WHEEL=cebra-.*\.whl/ENV WHEEL=cebra-${version}-py2.py3-none-any.whl/" \ + Dockerfile From 71141a89894c92c2cc1a7e90bb14b5aa3109904c Mon Sep 17 00:00:00 2001 From: Steffen Schneider Date: Sun, 29 Oct 2023 20:57:52 +0100 Subject: [PATCH 2/2] Bump version to 0.3.1rc1 --- Dockerfile | 2 +- Makefile | 4 ++-- PKGBUILD | 2 +- README.md | 3 ++- cebra/__init__.py | 2 +- reinstall.sh | 2 +- 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 078ce767..ae7a766a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,7 +42,7 @@ RUN make dist FROM cebra-base # install the cebra wheel -ENV WHEEL=cebra-0.3.0-py2.py3-none-any.whl +ENV WHEEL=cebra-0.3.1rc1-py2.py3-none-any.whl WORKDIR /build COPY --from=wheel /build/dist/${WHEEL} . RUN pip install --no-cache-dir ${WHEEL}'[dev,integrations,datasets]' diff --git a/Makefile b/Makefile index 257401ba..cd4afd51 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -CEBRA_VERSION=$(shell python3 -c "import cebra; print(cebra.__version__)") +CEBRA_VERSION := 0.3.1rc1 dist: python3 -m pip install virtualenv @@ -10,7 +10,7 @@ build: dist archlinux: mkdir -p dist/arch cp PKGBUILD dist/arch - cp dist/cebra-0.3.0.tar.gz dist/arch + cp dist/cebra-${CEBRA_VERSION}.tar.gz dist/arch (cd dist/arch; makepkg --skipchecksums -f) # NOTE(stes): Ensure that no old tempfiles are present. Ideally, move this into diff --git a/PKGBUILD b/PKGBUILD index 8301ab53..cf513b90 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Steffen Schneider pkgname=python-cebra _pkgname=cebra -pkgver=0.3.0 +pkgver=0.3.1rc1 pkgrel=1 pkgdesc="Consistent Embeddings of high-dimensional Recordings using Auxiliary variables" url="https://cebra.ai" diff --git a/README.md b/README.md index c5f3d1b8..7494d6a2 100644 --- a/README.md +++ b/README.md @@ -45,5 +45,6 @@ It can jointly use behavioral and neural data in a hypothesis- or discovery-driv [Learnable latent embeddings for joint behavioral and neural analysis.](https://arxiv.org/abs/2204.00673) Steffen Schneider*, Jin Hwa Lee* and Mackenzie Weygandt Mathis - # License +# License + - CEBRA is released for academic use only (please read the license file). If this license is not appropriate for your application, please contact Prof. Mackenzie W. Mathis (mackenzie@post.harvard.edu) for a commercial use license. diff --git a/cebra/__init__.py b/cebra/__init__.py index a82da24a..8d9d14db 100644 --- a/cebra/__init__.py +++ b/cebra/__init__.py @@ -56,7 +56,7 @@ import cebra.integrations.sklearn as sklearn -__version__ = "0.3.0" +__version__ = "0.3.1rc1" __all__ = ["CEBRA"] __allow_lazy_imports = False __lazy_imports = {} diff --git a/reinstall.sh b/reinstall.sh index ad8cb83a..8ea10e40 100755 --- a/reinstall.sh +++ b/reinstall.sh @@ -15,7 +15,7 @@ pip uninstall -y cebra # Get version info after uninstalling --- this will automatically get the # most recent version based on the source code in the current directory. # $(tools/get_cebra_version.sh) -VERSION=0.3.0 +VERSION=0.3.1rc1 echo "Upgrading to CEBRA v${VERSION}" # Upgrade the build system (PEP517/518 compatible)