Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
75 changes: 46 additions & 29 deletions .tools/docs/README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,57 @@
# Internal LabConstrictor documentation
# LabConstrictor
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.20758747.svg)](https://doi.org/10.5281/zenodo.20758747)

This file temporarily lists all internal LabConstrictor documentation. After you set up and customise the repository, it will be replaced by the [main README.md](../../README.md) file.
![LabConstrictor Comic](https://github.com/CellMigrationLab/LabConstrictor/blob/doc_source/comic.png)

## From zero to installed notebooks
**LabConstrictor turns your Jupyter notebooks into desktop apps that anyone can install.** Your users download an installer, double-click, and work. They need no Python, no pip and no terminal.

- [Before getting started](before_getting_started.md)
- [Create a new repository from this template](create_repository.md)
- [Initialise your repository](initialise_repository.md)
- [Accept a Pull Request](accept_pull_request.md)
- [Generate notebook requirements](notebook_requirements.md)
- [Upload your notebooks](notebook_upload.md)
- [Create executable installers](executable_creation.md)
- [Install an app](install.md)
- [Download and install the application](download_executable.md) (this file will be available after creating executables)
- [Notebook usage after installation](notebook_usage.md)
- [Troubleshooting an installed app](troubleshooting_installed_app.md)
This repository is a GitHub template. You bring the notebooks; it builds the installers for Windows, macOS and Linux, and gives the app a Welcome page that lists your notebooks.

## Customise and share (optional)
**Website, guides and ready-made apps: <https://cellmigrationlab.github.io/LabConstrictor-Site/>**

- [Customise the installer images](installer_images.md)
- [Describe your app for the App Centre](app_manifest.md)
- [Upload external code, and publish it on PyPI (optional)](external_code_upload.md)
- [Expose tools to napari, Fiji and QuPath](tools_bridge.md)
## Who is it for?

## Keep your app up to date (optional)
- **Researchers** who want colleagues to run an analysis without setting up Python.
- **Developers** who ship interactive notebooks to people who do not code.
- **Teachers** who want a workshop to start with a double-click.

- [Keep your app up to date](keep_app_up_to_date.md)
- [Enable automatic template updates](template_synchronization.md)
Looking for an app to use, not to build? Go to the [App Centre](https://cellmigrationlab.github.io/LabConstrictor-Site/apps/).

## Notebook authoring tips
## What your users get

- [Write notebooks that run in both Google Colab and JupyterLab](notebook_portability.md)
- [Hide code cells in notebooks](code_hiding.md)
![An installed LabConstrictor app: installer, Welcome notebook and a notebook with hidden code](https://github.com/CellMigrationLab/LabConstrictor/blob/doc_source/Summary.gif)

## GitHub management
- An installer for their system: `.exe` (Windows), `.pkg` (macOS) or `.sh` (Linux).
- A Welcome notebook that opens in the browser and lists the app's notebooks.
- Notebooks with the code hidden, so they look like an app. The code can be shown again.
- A notice when a newer version of the app is available.

- [GitHub actions/workflows overview](workflow_status.md)
- [Troubleshooting repository setup](troubleshooting.md)
- [Create a personal access token for notebook access](personal_access_token.md)
## Quick start

You need a GitHub account and the notebooks you want to share. Read [Before getting started](./before_getting_started.md) first, then:

1. [Create a new repository from this template](./create_repository.md)
2. [Enable automatic template updates](./template_synchronization.md)
3. [Initialise your repository](./initialise_repository.md) with the web form
4. [Upload external code](./external_code_upload.md) (optional)
5. [Upload your notebooks](./notebook_upload.md)
6. [Create the installers](./executable_creation.md)

The same guides, with pictures and a search box, are on the [website](https://cellmigrationlab.github.io/LabConstrictor-Site/build/).

## Go further

- [List your app in the App Centre](./app_manifest.md)
- [Offer your app's functions in napari, Fiji and QuPath](./tools_bridge.md)
- [Write notebooks that run in both Colab and JupyterLab](./notebook_portability.md)
- [All guides](./README.md)

## Contributing and questions

Bug fixes and improvements are welcome: read the [contributing guidelines](.github/CONTRIBUTING.md). Using LabConstrictor, or stuck? [Open an issue](https://github.com/CellMigrationLab/LabConstrictor/issues).

## Citation

If you use LabConstrictor in your research, please cite the project to support its development:

Iván Hidalgo-Cenalmor, Marcela Xiomara Rivera Pineda, Bruno M. Saraiva, Ricardo Henriques, and Guillaume Jacquemet. **Packaging Jupyter notebooks as installable desktop apps using LabConstrictor. arXiv preprint 2026** DOI: https://doi.org/10.48550/arXiv.2603.10704
10 changes: 5 additions & 5 deletions .tools/docs/external_code_upload.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Organize your external code and follow Python packaging best practices. Set up t

```text
src/
|-- PYTHON_PROJ_NAME/
|-- alphafold2/
| |-- __init__.py
| |-- my_script.py
| |-- subpackage/
Expand All @@ -24,7 +24,7 @@ Think of `__init__.py` as the file that tells Python “this folder is a package
If you leave it empty, that is perfectly fine—the package will still import correctly. When you want to make notebooks feel friendlier, you can re-export helper functions so users can discover them more easily:

```python
# src/PYTHON_PROJ_NAME/__init__.py
# src/alphafold2/__init__.py
from .my_script import run_analysis, load_config

__all__ = ["run_analysis", "load_config"]
Expand All @@ -45,19 +45,19 @@ Once uploaded, your external code will be available to your notebooks as a packa

**Import the whole package:**
```python
import PYTHON_PROJ_NAME
import alphafold2
```

If your folder under `src/` is called `celltools`, then `import celltools` will work because `src/celltools/__init__.py` exists.

**Import function:**
```python
from PYTHON_PROJ_NAME import my_script
from alphafold2 import my_script
```

**Import submodule:**
```python
from PYTHON_PROJ_NAME.subpackage import submodule1
from alphafold2.subpackage import submodule1
```

## 4. Publish the code on PyPI (optional)
Expand Down
14 changes: 7 additions & 7 deletions .tools/python/bump_constructor.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def extract_project_folder(extra_files: list) -> str:
if parts:
return parts[0]
# Fallback
return "PROJECT_NAME"
return "AlphaFold2"

def ensure_requirements_in_extra_files(construct_data: dict):
extra_files = construct_data.get("extra_files")
Expand All @@ -59,7 +59,7 @@ def ensure_requirements_in_extra_files(construct_data: dict):
isinstance(item, dict) and "requirements.txt" in item for item in extra_files
)
if not requirements_included:
extra_files.append({"requirements.txt": "PROJECT_NAME/requirements.txt"})
extra_files.append({"requirements.txt": "AlphaFold2/requirements.txt"})
debug("Added mapping for requirements.txt")
else:
debug("requirements.txt mapping already present")
Expand All @@ -68,7 +68,7 @@ def ensure_requirements_in_extra_files(construct_data: dict):
isinstance(item, dict) and "requirements_gpu.txt" in item for item in extra_files
)
if not gpu_requirements_included and Path("requirements_gpu.txt").exists():
extra_files.append({"requirements_gpu.txt": "PROJECT_NAME/requirements_gpu.txt"})
extra_files.append({"requirements_gpu.txt": "AlphaFold2/requirements_gpu.txt"})
debug("Added mapping for requirements_gpu.txt")
elif Path("requirements_gpu.txt").exists():
debug("requirements_gpu.txt mapping already present")
Expand All @@ -81,7 +81,7 @@ def ensure_requirements_in_extra_files(construct_data: dict):
isinstance(item, dict) and "requirements-linux.txt" in item for item in extra_files
)
if not linux_included:
extra_files.append({"requirements-linux.txt": "PROJECT_NAME/requirements-linux.txt"})
extra_files.append({"requirements-linux.txt": "AlphaFold2/requirements-linux.txt"})
debug("Added mapping for requirements-linux.txt")
else:
debug("requirements-linux.txt mapping already present")
Expand All @@ -93,7 +93,7 @@ def ensure_requirements_in_extra_files(construct_data: dict):
isinstance(item, dict) and "requirements-windows.txt" in item for item in extra_files
)
if not windows_included:
extra_files.append({"requirements-windows.txt": "PROJECT_NAME/requirements-windows.txt"})
extra_files.append({"requirements-windows.txt": "AlphaFold2/requirements-windows.txt"})
debug("Added mapping for requirements-windows.txt")
else:
debug("requirements-windows.txt mapping already present")
Expand All @@ -106,7 +106,7 @@ def ensure_requirements_in_extra_files(construct_data: dict):
isinstance(item, dict) and "requirements-macos.txt" in item for item in extra_files
)
if not macos_included:
extra_files.append({"requirements-macos.txt": "PROJECT_NAME/requirements-macos.txt"})
extra_files.append({"requirements-macos.txt": "AlphaFold2/requirements-macos.txt"})
debug("Added mapping for requirements-macos.txt")
else:
debug("requirements-macos.txt mapping already present")
Expand Down Expand Up @@ -218,7 +218,7 @@ def ensure_extra_files(construct_data: dict, notebooks_root: Path, src_root: Pat

# First get the name of the package from setup.py
setup_path = repo_root / "setup.py"
project_name = "PROJECT_NAME"
project_name = "AlphaFold2"
if setup_path.exists():
setup_text = setup_path.read_text(encoding="utf-8")
name_match = re.search(r'name\s*=\s*["\']([^"\']+)["\']', setup_text)
Expand Down
2 changes: 1 addition & 1 deletion .tools/templates/Welcome_template.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "335f15f8",
"metadata": {},
"source": [
"# Welcome to PROJECT_NAME! \n",
"# Welcome to AlphaFold2! \n",
"---\n",
"\n",
"## How does it work?\n",
Expand Down
Loading
Loading