Skip to content
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
0c7d9a2
Create publish-book.yml
MMathisLab Jun 12, 2025
ad9836e
Create python-package.yml
MMathisLab Jun 12, 2025
12d5465
Merge branch 'main' into MMathisLab-actions
CeliaBenquet Jun 20, 2025
a17b954
Add makefile
CeliaBenquet Jun 20, 2025
19f1dbf
Update requirements.txt
CeliaBenquet Jun 20, 2025
0834687
Fix tests, run formater and codespell checks
CeliaBenquet Jun 20, 2025
9669054
Add gitactions for formatting and codespell
CeliaBenquet Jun 20, 2025
cb28ccc
Update title of visual notebook
CeliaBenquet Jun 20, 2025
be26f03
Add the shell in yml git action file
CeliaBenquet Jun 20, 2025
c3d11e2
Remove yapf on notebooks
CeliaBenquet Jun 20, 2025
89b9ac7
Fix tests and add more
CeliaBenquet Jun 20, 2025
8abc266
Run formatter
CeliaBenquet Jun 20, 2025
d6a02e2
Fix imports with matplotlib
CeliaBenquet Jun 20, 2025
382ac10
Adapt so that runs for unified CEBRA and simplification
CeliaBenquet Jun 24, 2025
f049ca0
Merge main into celia/test-unified-cebra
CeliaBenquet Jul 3, 2025
6121296
Fix typos
CeliaBenquet Jul 3, 2025
c77a1f5
Fix tests
CeliaBenquet Jul 3, 2025
c03d831
Fix some unified-CEBRA related issues
CeliaBenquet Jul 3, 2025
575cb4b
Fix plots
CeliaBenquet Jul 3, 2025
2aa0e19
Fix formatting
CeliaBenquet Jul 3, 2025
af70639
fix(batch): prevent overwriting batch outputs
Jul 21, 2025
9750078
Add binary decoding and correct axis name for plot, fix plot per layers
Jul 22, 2025
5beff0c
cleaned-up requirements.txt & small fixes to pass the test & Mock KNN…
Jul 22, 2025
2482830
Merge pull request #58 from AdaptiveMotorControlLab/ananda/activation…
CeliaBenquet Jul 24, 2025
01765ce
add some comments, removed is_binary_label flag
Jul 28, 2025
fdcd2e5
Fix: skip raw input decoding for UnifiedSolver to avoid duplicating l…
Jul 31, 2025
54b3b40
Merge branch 'celia/test-unified-cebra' into ananda/binary-decoding-a…
CeliaBenquet Dec 9, 2025
9cee035
Merge pull request #59 from AdaptiveMotorControlLab/ananda/binary-dec…
CeliaBenquet Dec 11, 2025
48ad9fb
Merge branch 'main' into celia/test-unified-cebra
MMathisLab Apr 14, 2026
94b39ae
Fix: Prevent AttributeError when checking for UnifiedSolver in transf…
anandawolz Apr 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/publish-book.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: publish-book

on:
push:
branches:
- main

jobs:
deploy-book:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[docs]
pip install jupyter-book sphinxcontrib-mermaid

- name: Build the book
run: |
jupyter-book build .

- name: GitHub Pages action
uses: peaceiris/actions-gh-pages@v3.9.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_build/html
67 changes: 67 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: python-package

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-14, windows-latest]
python-version: ["3.10"]
include:
- os: ubuntu-latest
path: ~/.cache/pip
- os: macos-14
path: ~/Library/Caches/pip
- os: windows-latest
path: ~\AppData\Local\pip\Cache

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: conda-incubator/setup-miniconda@v3
with:
channels: conda-forge,defaults
channel-priority: strict
python-version: ${{ matrix.python-version }}

- name: Install PyTables through Conda
shell: bash -el {0}
run: |
conda install pytables==3.8.0 "numpy<2"

- name: Install dependencies
shell: bash -el {0}
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements.txt

- name: Run the formatter
shell: bash -el {0}
run: |
make format

- name: Run the spelling detector
shell: bash -el {0}
run: |
make codespell

- name: Check the documentation coverage
shell: bash -el {0}
run: |
make interrogate

- name: Run all pytest tests
shell: bash -el {0}
run: |
pip install pytest
pytest tests/
54 changes: 54 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
CEBRA_LENS_VERSION := 0.1.0.dev0

dist:
python3 -m pip install virtualenv
python3 -m pip install --upgrade build twine
python3 -m build --wheel --sdist

build: dist

test:
python -m pytest --ff tests

interrogate:
interrogate \
--ignore-property-decorators \
--ignore-init-method \
--verbose \
--ignore-semiprivate \
--ignore-private \
--ignore-magic \
--omit-covered-files \
-f 80 \
cebra_lens

docs:
jupyter-book build docs

docs-touch:
find docs/docs -iname '*.md' -exec touch {} \;
jupyter-book build docs/docs

docs-strict:
jupyter-book build docs --keep-going --strict

# Serve the docs
serve_docs:
python -m http.server 8080 --bind 127.0.0.1 -d docs/_build/html

# Serve the entire page
serve_page:
python -m http.server 8080 --bind 127.0.0.1 -d docs/_build/html

# Format code in the main package and docs
format:
yapf -i -p -r cebra_lens
yapf -i -p -r tests
isort cebra_lens/
isort tests/

codespell:
codespell cebra_lens/ tests/ docs/docs/*.md -L "nce, nd"


.PHONY: docs docs-touch docs-strict serve_docs serve_page
10 changes: 5 additions & 5 deletions cebra_lens/__init__.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# example of structure so that you can directly use the functions get_layer_activations instead of having to do CEBRA_Lens.activations.get_layer_activations
from .activations import *
from .quantification import *
from .quantification.decoding import *
from .quantification.distance import *
from .quantification.cka_metric import *
from .quantification.decoder import *
from .quantification.distance import *
from .quantification.rdm_metric import *
from .quantification.tsne import *
from .matplotlib import *
from .utils import *
from .utils_allen import *
from .utils_hpc import *
from .utils import *
from .utils_plot import *
from .utils_wrapper import *

# selects what files can be imported when doing from CEBRA_Lens import * --> keep env clean
# __all__ = ['get_layer_activations']
Loading
Loading