A graphical user interface (GUI) built with Python and CustomTkinter to send experiment results to a MongoDB Sacred database. Optionally upload heavy files to MinIO or a local/network file path.
- Send experiment metadata (config, results, metrics) to MongoDB Sacred
- Upload artifacts to MongoDB (files < 50MB)
- Upload raw data (large files) to MinIO S3 or filesystem paths
- Batch send multiple experiments with the same folder structure
- Visual mapping of experiment files to Sacred data types
- Required: Python 3.x installed
- Required: MongoDB database running (locally or on a server)
- Recommended: Omniboard connected to your database for visualization
- Optional: MinIO server for large file storage
Deployment instructions: See AltarDocker for setting up MongoDB, MinIO, and Omniboard.
-
Clone or download the repository:
git clone https://github.com/DreamRepo/AltarSender.git cd AltarSender -
Create and activate a virtual environment (recommended):
python -m venv .venv
Windows:
.venv\Scripts\activate
Linux/macOS:
source .venv/bin/activate -
Install requirements:
pip install -r requirements.txt
python app.pyIf you see ModuleNotFoundError: No module named 'XXXX', run:
pip install XXXXThe app window should open.
Enter your database credentials in the app. Use the Test Connection button to verify connectivity.
If uploading raw data to MinIO, enter your MinIO credentials (endpoint, access key, secret key, bucket name).
Each experiment should have its own folder. The folder name becomes the experiment name.
The experiment configuration (name, conditions, instrument settings, etc.).
Supported formats: JSON, CSV, Excel
JSON example:
{
"experiment": {
"name": "Experiment1",
"duration": {
"time": 3200,
"unit": "seconds"
}
}
}With "Flatten JSON" enabled, this becomes:
{
"experiment_name": "Experiment1",
"experiment_duration_time": 3200,
"experiment_duration_unit": "seconds"
}CSV/Excel format (no header, key-value pairs):
| param1 | value1 |
|---|---|
| param2 | value2 |
| param3 | value3 |
Experiment result values. Same format as Config (JSON, CSV, or Excel).
Time series data for plotting. Supported formats: CSV, Excel.
- If columns have headers, enable Column header
- If there's an X-axis column, enable X-axis column and select it
- Select which columns to plot in the database
Large files to upload to MinIO or a filesystem path.
- Select a single file or an entire folder
- Choose destination: local path, network drive, and/or MinIO
- Files are renamed with a hash and organized by type
Naming convention:
video.tiff→video/[hash]_[datetime]_video.tiff(if folder name contains datetime)video.tiff→video/[hash]_video.tiff(otherwise)
The hash is generated from the experiment folder name (7 alphanumeric characters).
Small files (< 50MB) stored directly in MongoDB. Same organization as raw data. These files can be accessed directly from Omniboard.
Warning: Storing large artifacts impacts database performance.
- Select the experiment folder
- Configure file mappings
- Click Send experiment
For experiments with identical folder structures:
- Select one experiment folder and configure it
- Enable Send multiple experiments
- All sibling folders with the same structure will be selected
- Click Send experiment
Example structure:
Parent folder/
├── 2023-04-17_18_13_Experiment1/
│ ├── config.json
│ ├── results.csv
│ ├── metrics.xlsx
│ ├── capture.png
│ └── raw_data/
│ ├── frames.tiff
│ └── video.mp4
│
└── 2023-04-17_18_18_Experiment2/
├── config.json
├── results.csv
├── metrics.xlsx
├── capture.png
└── raw_data/
├── frames.tiff
└── video.mp4
Configure Experiment1, enable batch mode, and both experiments will be sent.
Access your experiments in Omniboard:
| Data type | Location in Omniboard |
|---|---|
| Config | Config (last menu item) |
| Results | Run Info → root → result |
| Metrics | Metrics plot |
| Artifacts | Artifacts |
| Raw data | Run Info → dataFiles (paths) |
You can build a standalone executable that doesn't require Python to be installed. The executable will include all dependencies.
Ensure you have the development environment set up:
# Create and activate virtual environment
python -m venv .venv
# Windows
.venv\Scripts\activate
# Linux/macOS
source .venv/bin/activate
# Install dependencies
pip install -r requirements.txt
pip install pyinstaller# Option 1: Use the build script (recommended)
python build_exe.py
# Option 2: Use PyInstaller directly with the spec file
pyinstaller AltarSender.spec
# Option 3: Build manually
pyinstaller --name=AltarSender --onefile --windowed --noconfirm ^
--add-data=".venv\Lib\site-packages\customtkinter;customtkinter" ^
--hidden-import=customtkinter --hidden-import=sacred ^
--hidden-import=sacred.observers --hidden-import=pymongo ^
--hidden-import=pandas --hidden-import=numpy --hidden-import=openpyxl ^
--hidden-import=boto3 --hidden-import=botocore ^
--collect-all=customtkinter --collect-all=sacred ^
app.pyThe executable will be in the dist/ folder: dist/AltarSender.exe
# Option 1: Use the build script (recommended)
python build_exe.py
# Option 2: Use PyInstaller directly with the spec file
pyinstaller AltarSender.spec
# Option 3: Build manually
pyinstaller --name=AltarSender --onefile --windowed --noconfirm \
--add-data=".venv/lib/python3.*/site-packages/customtkinter:customtkinter" \
--hidden-import=customtkinter --hidden-import=sacred \
--hidden-import=sacred.observers --hidden-import=pymongo \
--hidden-import=pandas --hidden-import=numpy --hidden-import=openpyxl \
--hidden-import=boto3 --hidden-import=botocore \
--collect-all=customtkinter --collect-all=sacred \
app.pyThe executable will be in the dist/ folder: dist/AltarSender
Make it executable if needed:
chmod +x dist/AltarSender# Option 1: Use the build script (recommended)
python build_exe.py
# Option 2: Use PyInstaller directly with the spec file
pyinstaller AltarSender.spec
# Option 3: Build manually
pyinstaller --name=AltarSender --onefile --windowed --noconfirm \
--add-data=".venv/lib/python3.*/site-packages/customtkinter:customtkinter" \
--hidden-import=customtkinter --hidden-import=sacred \
--hidden-import=sacred.observers --hidden-import=pymongo \
--hidden-import=pandas --hidden-import=numpy --hidden-import=openpyxl \
--hidden-import=boto3 --hidden-import=botocore \
--collect-all=customtkinter --collect-all=sacred \
app.pyThe executable will be in the dist/ folder: dist/AltarSender.app (or dist/AltarSender binary)
Note: On macOS, you may need to right-click and select "Open" the first time to bypass Gatekeeper, or run
xattr -cr dist/AltarSender.appto remove quarantine attributes.
| Platform | Output Location | Output Name |
|---|---|---|
| Windows | dist/ |
AltarSender.exe |
| Linux | dist/ |
AltarSender |
| macOS | dist/ |
AltarSender.app or AltarSender |
- Missing module errors: Add the module as a
--hidden-importflag - Missing data files: Use
--add-datato include necessary files - Large executable size: This is normal (~50-100MB) due to bundled Python and dependencies
- Antivirus warnings: False positives are common with PyInstaller; whitelist the executable if needed
This repository includes a GitHub Actions workflow that automatically builds executables for Windows, Linux, and macOS.
- Go to the Actions tab in this repository
- Click on the latest successful Build Executables workflow run
- Scroll down to Artifacts and download the version for your platform:
- AltarSender-Windows.exe — Windows executable
- AltarSender-Linux — Linux executable
- AltarSender-macOS — macOS executable
- Extract the ZIP file to get the executable
Note: On Linux/macOS, you may need to make the file executable:
chmod +x AltarSender-Linux # or AltarSender-macOS
To publish a versioned release with executables attached:
- Go to the Releases page and click Draft a new release
- Create a new tag (e.g.,
v1.0.0) and give the release a title - Add release notes describing changes
- Click Publish release
The GitHub Action will automatically:
- Build executables for all three platforms
- Attach all executables to the release
Users can then download the executable for their platform directly from the release page.
You can also manually trigger a build:
- Go to the Actions tab
- Select Build Executables workflow
- Click Run workflow → Run workflow
- AltarDocker — Deploy MongoDB, MinIO, Omniboard, and AltarExtractor
- AltarExtractor — Browse and filter Sacred experiments in a web UI