Skip to content

CRC-Centre-Recherche-Conservation/ElabLite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

262 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

python version code quality Version License

ElabLite

ElabLite is a metadata generator tool for instrumental acquisition batches designed for use with electronic laboratory notebooks (ELN), specifically tailored for elabFTW instances. It simplifies the process of creating, managing, and exporting scientific experiment metadata through an intuitive desktop app offline.

🎯 Features

Core Features

  • πŸ“ Template-based Metadata Creation: Upload or select existing templates (JSON, CSV, ELN formats)
  • πŸ”¬ Scientific Technique Management: Pre-configured technical analysis codes (3D imaging, spectroscopy, chromatography, etc.)
  • πŸ“Š Dataframe Editor: Manage multiple analyses with spreadsheet-like interface
  • πŸ’Ύ Auto-save System: Automatic saving with manual save options
  • πŸ“¦ Batch Export: Generate CSV files and ZIP archives for multiple experiments`
  • 🏷️ Comprehensive Metadata: Support for titles, dates, authors, ratings, tags, and custom fields

Supported File Formats`

  • Input: JSON, CSV, ELN, ELABLITE
  • Output: ELABLITE (custom format), CSV, ZIP archives

Technical Analysis Support

Built-in support for 50+ analytical techniques including:

  • Imaging: 3D, RGB, UV, IR, X-ray
  • Spectroscopy: FTIR, Raman, XRF, Mass Spec
  • Microscopy: SEM, Optical, Multiphoton
  • Chromatography: GC-MS, LC-MS, CE-MS
  • And many more...

πŸš€ Installation (User)

  • Platform: Windows

You can download the latest version (.exe) of ElabLite here.

You can find an user guide here.

βš™οΈ Installation (Development)

πŸ“‹ Prerequisites

  • Python 3.10 or higher
  • pip package manager

1. Clone the Repository

git clone https://github.com/CRC-Centre-Recherche-Conservation/ElabLite.git
cd ElabLite

2. Create Virtual Environment (Recommended)

# Create virtual environment
python -m venv venv

# Activate virtual environment
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate

3. Install Dependencies

pip install -r requirements.txt

πŸƒ Running the Application

Start the Streamlit application:

streamlit run app.py

The application will open in your default web browser at http://localhost:8501

πŸ“¦ Packaging

This project uses stlite@desktop to package the Streamlit application into an executable, standalone format. The commands below install dependencies, generate the necessary files, and test the application locally before creating the final package.

npm install

npm run dump

npm run serve # To test locally

npm npm run app:dist

πŸ“– Quick Start Guide

Creating a New Experiment

  1. Select/Upload Template

    • Navigate to "New Experiment" in the sidebar
    • Either upload a new template or select an existing one
  2. Fill Base Metadata (Step 1)

    • Enter experiment title, date, and author
    • Select analytical technique
    • Add commentary, tags, and rating
    • Save your experiment
  3. Complete Experiment Metadata (Step 2)

    • Fill in technique-specific metadata fields
    • All required fields are marked with *
  4. Manage Files Metadata (Step 3)

    • Add rows for multiple analyses
    • Fill in IdentifierAnalysis and Object/Sample
    • Edit cells directly in the spreadsheet
  5. Export (Step 4)

    • Save final version
    • Download .elablite file for archiving

Loading an Existing Experiment

  1. Navigate to "Load Experiment"
  2. Import or select a saved .elablite file
  3. Continue editing from where you left off

Completing with Files

  1. Go to "Select Experiment" β†’ "Complete Experiment(s)"
  2. Upload your .elablite preset
  3. Upload associated data files
  4. Map files to metadata rows
  5. Generate filenames and download ZIP archive

πŸ“ Project Structure

ElabLite/
β”œβ”€β”€ app.py                      # Main application entry point
β”œβ”€β”€ requirements.txt            # Python dependencies
β”œβ”€β”€ __version__.py             # Version information
β”œβ”€β”€ .streamlit/
β”‚   └── config.toml            # Streamlit configuration
β”œβ”€β”€ models/
β”‚   β”œβ”€β”€ forms.py               # Metadata form models
β”‚   β”œβ”€β”€ technical.py           # Technical analysis definitions
β”‚   └── validator.py           # Input validators
β”œβ”€β”€ pages/
β”‚   β”œβ”€β”€ 1-select_template.py   # Template selection page
β”‚   β”œβ”€β”€ 1-load_template.py     # Load existing experiment
β”‚   β”œβ”€β”€ 2-metadata_forms.py    # Main metadata editor
β”‚   β”œβ”€β”€ 3-metadata_preset.py   # Preset selection
β”‚   └── 4-metadata_management.py # File management
β”œβ”€β”€ utils/
β”‚   β”œβ”€β”€ manager.py             # File and data management
β”‚   β”œβ”€β”€ menu.py                # Sidebar menu
β”‚   β”œβ”€β”€ parser.py              # Template parsers
β”‚   β”œβ”€β”€ save_manager.py        # Save operations
β”‚   └── stepper.py             # Workflow stepper UI
└── static/
    └── icons/                 # Application icons

πŸ”§ Configuration

Streamlit Configuration

Edit .streamlit/config.toml to customize:

[client]
showSidebarNavigation = false

[server]
maxUploadSize = 100  # Maximum upload size in MB

πŸ’‘ Key Concepts

ELABLITE Format

ELABLITE is a custom serialized format that stores:

  • Base metadata (title, date, author, etc.)
  • Form data (technique-specific metadata)
  • Template metadata structure
  • Dataframe of analyses

Metadata Fields

Required Fields:

  • Title
  • Date
  • Author
  • Technique

Optional Fields:

  • Commentary
  • Tags
  • Rating (0-5 stars)
  • Project information

Number Fields with Units

Number fields support unit selection. Data is stored as:

value||unit

Example: 25.5||Β°C

πŸ” Data Storage

  • Temporary Storage: Files stored in system temp directory (tmp/templates/)
  • Auto-save: Experiments saved to tmp/templates/presets/
  • Retention: Last 10 files kept automatically
  • Download: Manual export for permanent archiving

πŸ› Troubleshooting

Common Issues

Template not loading:

  • Check file format (JSON, CSV, ELN, ELABLITE) -> You need to export model from your instance elabFTW
  • Check file permissions
  • Verify file is not corrupted

Files not uploading:

  • Check file size (max 100MB per file)
  • Verify file permissions

Save not working:

  • Ensure all required fields are filled
  • Check disk space availability

🀝 Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Developed for the Centre de Recherche et de Conservation (CRC) - Equipex Biblissima+
  • Built with Streamlit
  • Designed for use with elabFTW

πŸ“ž Support

About

Metadata generator tool for instrumental acquisition batches designed for use with electronic laboratory notebooks

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages