microlens-submit
Submission tool for the 2nd Roman microlensing data challenge
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (17.7%) to scientific vocabulary
Keywords
Repository
Submission tool for the 2nd Roman microlensing data challenge
Basic Info
- Host: GitHub
- Owner: AmberLee2427
- License: mit
- Language: Python
- Default Branch: main
- Homepage: https://microlens-submit.readthedocs.io/en/latest/
- Size: 1.79 MB
Statistics
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
- Releases: 4
Topics
Metadata Files
README.md
microlens-submit
A stateful submission toolkit for the RGES-PIT Microlensing Data Challenge.
microlens-submit provides a robust, version-controlled workflow for managing, validating, and packaging your challenge submission over a long period. It supports both a programmatic Python API and a full-featured Command Line Interface (CLI) for language-agnostic use.
Full documentation is hosted on Read the Docs. A comprehensive tutorial notebook is available at docs/Submission_Tool_Tutorial.ipynb. Challenge participants who prefer not to use this tool can consult the Submission Manual for the manual submission format.
Key Features
- Persistent Projects: Treat your submission as a local project that you can load, edit, and save over weeks or months.
- Python API & CLI: Use the tool directly in your Python analysis scripts or via the command line.
- Solution Management: Easily add, update, and deactivate degenerate solutions for any event without losing your work history.
- Active Solution Control: Quickly list just the active solutions or mark all solutions inactive in one call.
- Automatic Validation: Aggressive data validation powered by Pydantic ensures your submission is always compliant with the challenge rules.
- Parameter Validation: Centralized validation logic checks parameter completeness, types, and physical consistency based on model type and higher-order effects.
- Rich Documentation: Notes field supports Markdown formatting for creating detailed, structured documentation and submission dossiers.
- Environment Capture: Automatically records your Python dependencies for each specific model fit, ensuring reproducibility.
- Optional Posterior Storage: Record the path to posterior samples for any solution.
- Simple Export: Packages all your active solutions into a clean, standardized
.ziparchive for final submission. - Bulk Import: Import multiple solutions at once from a CSV file using the
import-solutionsCLI command. Supports column mapping, alias handling, duplicate handling, notes, dry-run, and validation options.
Installation
The package is available on PyPI:
bash
pip install microlens-submit
Quickstart Using the Command Line Interface (CLI)
The CLI is the recommended way to interact with your submission project.
You can pass --no-color to any command if your terminal does not support ANSI colors.
- Initialize your project:
microlens-submit init --team-name "Planet Pounders" --tier "advanced" - Add a new solution to an event:
bash microlens-submit add-solution ogle-2025-blg-0042 1S2L \ --param t0=555.5 \ --param u0=0.1 \ --param tE=25.0 \ --notes "This is a great fit!"Model types must be one of1S1L,1S2L,2S1L,2S2L,1S3L,2S3L, orother. This will create a new solution and print its uniquesolution_id. You can run the same command with--dry-runfirst to verify the parsed input without saving anything. - Bulk import multiple solutions from a CSV file:
bash microlens-submit import-solutions tests/data/test_import.csv --dry-runSee the filetests/data/test_import.csvfor a comprehensive example covering all features and edge cases. You can use this file as a template for your own imports. - Deactivate a solution that didn't work out:
microlens-submit deactivate <solution_id> - List all solutions for an event:
microlens-submit list-solutions ogle-2025-blg-0042 - Validate solutions and check for issues:
microlens-submit validate-solution <solution_id> - Export your final submission:
microlens-submit export final_submission.zip
Note: When you add a solution, it's automatically validated and any warnings are displayed. Use --dry-run to check validation without saving.
Using the Python API
For those who want to integrate the tool directly into their Python analysis pipeline.
```python import microlens_submit
Load or create the project
sub = microlenssubmit.load(projectpath="./mychallengesubmission") sub.team_name = "Planet Pounders" sub.tier = "advanced"
Get an event and add a solution
evt = sub.getevent("ogle-2025-blg-0042") params = {"t0": 555.5, "u0": 0.1, "tE": 25.0} sol = evt.addsolution(model_type="1S2L", parameters=params)
Record compute info for this specific run
sol.setcomputeinfo(cpu_hours=15.5) sol.notes = "This fit was generated from our Python script."
Save progress to disk
sub.save()
When ready, export the final package
sub.export("final_submission.zip") ```
Development
The full development plan can be found in agents.md. Contributions are welcome!
To build and test this project, install the development dependencies using either pip install -e .[dev] or pip install -r requirements-dev.txt. These packages are required to run the test suite and are listed in requirements-dev.txt.
After installing the dependencies, run pre-commit install to set up the Git hooks for automatic formatting and linting. The development environment needs the following Python libraries.
Core Dependencies:
typer[all]: For building the powerful command-line interface. The[all]extra ensures shell completion support is included.pydantic: For aggressive data validation and settings management.
Testing Dependencies:
pytest: The standard framework for testing Python code.pytest-cov: To measure test coverage.
Packaging & Distribution Dependencies:
build: For building the package from thepyproject.tomlfile.twine: For uploading the final package to PyPI.
Test Data
A comprehensive test CSV file is provided at tests/data/test_import.csv. This file is used in the test suite and can be copied or adapted for your own bulk imports or for development/testing purposes.
Citation
If you use microlens-submit in your research, please cite the project using
the metadata provided in the CITATION.cff file. Most reference managers can
import this file directly.
Owner
- Name: Amber
- Login: AmberLee2427
- Kind: user
- Location: New Zealand
- Repositories: 1
- Profile: https://github.com/AmberLee2427
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use microlens-submit, please cite it as below."
title: "microlens-submit"
version: "0.16.0"
authors:
- family-names: Malpas
given-names: Amber
url: "https://github.com/AmberLee2427/microlens-submit"
GitHub Events
Total
- Release event: 2
- Watch event: 1
- Delete event: 33
- Public event: 1
- Push event: 172
- Pull request event: 80
- Create event: 44
Last Year
- Release event: 2
- Watch event: 1
- Delete event: 33
- Public event: 1
- Push event: 172
- Pull request event: 80
- Create event: 44
Packages
- Total packages: 1
-
Total downloads:
- pypi 28 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 3
- Total maintainers: 1
pypi.org: microlens-submit
A tool for managing and submitting microlensing solutions
- Homepage: https://github.com/AmberLee2427/microlens-submit
- Documentation: https://microlens-submit.readthedocs.io/
- License: MIT
-
Latest release: 0.16.0
published 8 months ago
Rankings
Maintainers (1)
Dependencies
- pydantic >=2.0
- typer [all]>=0.9.0
- build * development
- pytest * development
- pytest-cov * development
- twine * development
- actions/checkout v4 composite
- actions/setup-python v5 composite
- sphinx *
- sphinx_rtd_theme *
- pydantic >=2.0.0
- typer *