Skip to content

Commit bea2c04

Browse files
stesMMathisLab
andauthored
Release 0.5.0rc1 (#189)
* Make bump_version script runnable on MacOS * Bump version to 0.5.0rc1 * fix minor formatting issues * remove commented code --------- Co-authored-by: Mackenzie Mathis <[email protected]>
1 parent 3100730 commit bea2c04

File tree

8 files changed

+37
-30
lines changed

8 files changed

+37
-30
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ RUN make dist
4040
FROM cebra-base
4141

4242
# install the cebra wheel
43-
ENV WHEEL=cebra-0.4.0-py2.py3-none-any.whl
43+
ENV WHEEL=cebra-0.5.0rc1-py2.py3-none-any.whl
4444
WORKDIR /build
4545
COPY --from=wheel /build/dist/${WHEEL} .
4646
RUN pip install --no-cache-dir ${WHEEL}'[dev,integrations,datasets]'

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CEBRA_VERSION := 0.4.0
1+
CEBRA_VERSION := 0.5.0rc1
22

33
dist:
44
python3 -m pip install virtualenv

PKGBUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Maintainer: Steffen Schneider <[email protected]>
22
pkgname=python-cebra
33
_pkgname=cebra
4-
pkgver=0.4.0
4+
pkgver=0.5.0rc1
55
pkgrel=1
66
pkgdesc="Consistent Embeddings of high-dimensional Recordings using Auxiliary variables"
77
url="https://cebra.ai"

cebra/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666

6767
import cebra.integrations.sklearn as sklearn
6868

69-
__version__ = "0.4.0"
69+
__version__ = "0.5.0rc1"
7070
__all__ = ["CEBRA"]
7171
__allow_lazy_imports = False
7272
__lazy_imports = {}

cebra/integrations/sklearn/cebra.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
np.dtypes.Float64DType, np.dtypes.Int64DType
5252
]
5353

54-
5554
def check_version(estimator):
5655
# NOTE(stes): required as a check for the old way of specifying tags
5756
# https://github.com/scikit-learn/scikit-learn/pull/29677#issuecomment-2334229165
@@ -77,6 +76,7 @@ def _safe_torch_load(filename, weights_only, **kwargs):
7776
return checkpoint
7877

7978

79+
8080
def _init_loader(
8181
is_cont: bool,
8282
is_disc: bool,

docs/source/conf.py

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,13 @@
2828

2929
# -- Path setup --------------------------------------------------------------
3030

31-
# If extensions (or modules to document with autodoc) are in another directory,
32-
# add these directories to sys.path here. If the directory is relative to the
33-
# documentation root, use os.path.abspath to make it absolute, like shown here.
34-
#
31+
import datetime
3532
import os
3633
import sys
3734

3835
sys.path.insert(0, os.path.abspath("."))
3936

40-
import datetime
41-
42-
import cebra
37+
import cebra # noqa: E402
4338

4439

4540
def get_years(start_year=2021):
@@ -156,11 +151,6 @@ def get_years(start_year=2021):
156151
"url": "https://twitter.com/cebraAI",
157152
"icon": "fab fa-twitter",
158153
},
159-
# {
160-
# "name": "DockerHub",
161-
# "url": "https://hub.docker.com/r/stffsc/cebra",
162-
# "icon": "fab fa-docker",
163-
# },
164154
{
165155
"name": "PyPI",
166156
"url": "https://pypi.org/project/cebra/",
@@ -247,6 +237,9 @@ def get_years(start_year=2021):
247237

248238
# Download link for the notebook, see
249239
# https://nbsphinx.readthedocs.io/en/0.3.0/prolog-and-epilog.html
240+
241+
# fmt: off
242+
# flake8: noqa: E501
250243
nbsphinx_prolog = r"""
251244
252245
.. only:: html
@@ -269,3 +262,5 @@ def get_years(start_year=2021):
269262
270263
----
271264
"""
265+
# fmt: on
266+
# flake8: enable=E501

reinstall.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pip uninstall -y cebra
1515
# Get version info after uninstalling --- this will automatically get the
1616
# most recent version based on the source code in the current directory.
1717
# $(tools/get_cebra_version.sh)
18-
VERSION=0.4.0
18+
VERSION=0.5.0rc1
1919
echo "Upgrading to CEBRA v${VERSION}"
2020

2121
# Upgrade the build system (PEP517/518 compatible)

tools/bump_version.sh

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
# Bump the CEBRA version to the specified value.
33
# Edits all relevant files at once.
4-
#
4+
#
55
# Usage:
66
# tools/bump_version.sh 0.3.1rc1
77

@@ -10,24 +10,36 @@ if [ -z ${version} ]; then
1010
>&1 echo "Specify a version number."
1111
>&1 echo "Usage:"
1212
>&1 echo "tools/bump_version.sh <semantic version>"
13+
exit 1
14+
fi
15+
16+
# Determine the correct sed command based on the OS
17+
# On macOS, the `sed` command requires an empty string argument after `-i` for in-place editing.
18+
# On Linux and other Unix-like systems, the `sed` command only requires `-i` for in-place editing.
19+
if [[ "$OSTYPE" == "darwin"* ]]; then
20+
# macOS
21+
SED_CMD="sed -i .bkp -e"
22+
else
23+
# Linux and other Unix-like systems
24+
SED_CMD="sed -i -e"
1325
fi
1426

1527
# python cebra version
16-
sed -i "s/__version__ = .*/__version__ = \"${version}\"/" \
17-
cebra/__init__.py
28+
$SED_CMD "s/__version__ = .*/__version__ = \"${version}\"/" cebra/__init__.py
1829

1930
# reinstall script in root
20-
sed -i "s/VERSION=.*/VERSION=${version}/" \
21-
reinstall.sh
31+
$SED_CMD "s/VERSION=.*/VERSION=${version}/" reinstall.sh
2232

2333
# Makefile
24-
sed -i "s/CEBRA_VERSION := .*/CEBRA_VERSION := ${version}/" \
25-
Makefile
34+
$SED_CMD "s/CEBRA_VERSION := .*/CEBRA_VERSION := ${version}/" Makefile
2635

27-
# Arch linux PKGBUILD
28-
sed -i "s/pkgver=.*/pkgver=${version}/" \
29-
PKGBUILD
36+
# Arch linux PKGBUILD
37+
$SED_CMD "s/pkgver=.*/pkgver=${version}/" PKGBUILD
3038

3139
# Dockerfile
32-
sed -i "s/ENV WHEEL=cebra-.*\.whl/ENV WHEEL=cebra-${version}-py2.py3-none-any.whl/" \
33-
Dockerfile
40+
$SED_CMD "s/ENV WHEEL=cebra-.*\.whl/ENV WHEEL=cebra-${version}-py2.py3-none-any.whl/" Dockerfile
41+
42+
# Remove backup files
43+
if [[ "$OSTYPE" == "darwin"* ]]; then
44+
rm cebra/__init__.py.bkp reinstall.sh.bkp Makefile.bkp PKGBUILD.bkp Dockerfile.bkp
45+
fi

0 commit comments

Comments
 (0)