https://github.com/MarximusMaximus/batteries-forking-included
by Marximus Maximus (https://marximus.com)
A single command cross-platform all-in-one installer for users and developers for git repos/projects. Completely sets up either a user environment or development environment from scratch. No longer deal with pages of steps of setup nor dependency hell!
NOTE: Currently in Alpha Phase
bootstrap.sh
- Automatically downloads and installs/updates to latest miniforge, sets up/updates project's conda environment.activate.sh
- Activates conda environment for project.run.sh
- Runs specified command within project's conda environment. (Will try default command if first arg is not a path to an executable file nor script.)- Python File Preamble - Automatically activates project's conda environment when attempting to run python script directly. (Optional)
bfi-update.sh
- Updates batteries-forking-included files within your project to latest versionspost-bootstrap.sh
- Any additional commands to run after environment setup provided by supported package managers (currently: conda, poetry, & pip).
Additional Files:
conda-environment.yml
- (required) the conda environment definition for your project, default starting file is includedpip-requirements.txt
(optional) - pip requirements to install (example provided)pip-constraints.txt
(optional) - pip constraints to be used with pip-requirements.txt (example provided)pip-uninstall.txt
(optional) - pip packages to uninstall list (explicitly remove old packages you no longer use) (example provided)pyproject.toml
w/[tool.poetry]
line (optional) - poetry data & requirements that will be installed (takes precedence over pip) (example provided)
- User clones or otherwise acquires your project.
- User runs
bootstrap.sh
from within your project. - User runs either
run.sh
or your custom entry points to your project.
- Create a
conda-environment.yml
file in the root of your project with these contents:
channels:
- nodefaults
- conda-forge
dependencies:
- git
- python<3.11
- If you plan to use poetry (recommended), add this line to the end of
conda-environment.yml
:
- poetry
- Copy latest
bfi-update.sh
to your project root. - Run
bfi-update.sh
from within your project root.cd YOUR_PROJECT_ROOT_FOLDER
./bfi-update.sh
- (Optional) Modify
conda-environment.yml
andpip-*.txt
directly and/orpyproject.toml
(viapoetry
commands) as desired. - Remove the line
# TODO: do additional setup/update things here; if nothing to do, just delete this line
frompost-bootstrap.sh
. - (Optional) Modify
post-bootstrap.sh
with any additional commands you wish to run during bootstrapping an environment (such as creating additional conda envs or running npm commands.) - Run
bootstrap.sh --dev
to create development environment.
- Developer clones or otherwise acquires project repo.
- Run
bootstrap.sh --dev
to create development environment.
- Run
bfi-update.sh
from within your project root. - Run
bootstrap.sh --dev
to update environment.- (
--dev
here is optional if you already have a development environment)
- (
- (Optional) Modify
conda-environment.yaml
andpip-*
directly and/orpyproject.toml
(viapoetry
commands) as desired.- NOTE: If using
poetry
, remember to runpoetry update
if you want your dependencies' pinned versions updated!
- NOTE: If using
- Run
bootstrap.sh --dev
to update environment.- (
--dev
here is optional if you already have a development environment)
- (
NOT YET IMPLEMENTED
- Clone or otherwise acquire your project to its destination.
- Run
bootstrap.sh --deploy
to create environment. - Setup your favorite supervisor software to run
run.sh
with a current working directory of your project root.
TBD
Please submit bug reports and feature requests to: https://github.com/MarximusMaximus/batteries-forking-included/issues
Pull Requests will be reviewed at: https://github.com/MarximusMaximus/batteries-forking-included/pulls
- Main Website: https://marximus.com
- Patreon (On Going Support): https://www.patreon.com/marximus
- Ko-fi (One Time Tip): https://ko-fi.com/marximusmaximus