This is a template on how to package a simple Python project
- Installation
- Setting Up Your Package
- Installing Dependencies
- Building Your Package
- Publishing to PyPI
To install the package in editable mode (ideal for development), follow these steps:
- Python 3.7 or higher
pip(ensure it's the latest version)setuptools42 or higher (for building the package)
First, clone the repository to your local machine:
git clone https://github.com/CaltechOpticalObservatories/gecko.git
cd geckoCreate a virtual environment for your package:
python -m venv venv
source venv/bin/activateMake sure setuptools and pip are up to date:
pip install --upgrade pip setuptools wheelTo install your package in editable mode for development, use the following command:
pip install -e .This will install the package, allowing you to edit it directly and have changes take effect immediately without reinstalling.
To install any optional dependencies, such as development dependencies, use:
pip install -e .[dev]Run this in your terminal to create the gecko executable:
cd gecko
chmod +x geckoYou can run the command below and you will be prompted with questions to fill out the config file. Read promps and answer accordingly:
python3 gecko -init
(or ./gecko -init)Symlink the executable file to bin:
sudo ln -s /path/to/repo/Gecko/gecko /usr/local/bin/geckoYou can now generate gecko reports from any terminal on the machine! (assuming python is available globally)
./gecko -m "<insert description of bug or instrument failure here>"