git clone [email protected]:noizu-labs-ml/smah.git
https://asdf-vm.com/guide/getting-started.html
cd ~/
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.1
Add asdf and auto completion hooks to your ~/.bashrc
. "$HOME/.asdf/asdf.sh"
. "$HOME/.asdf/completions/asdf.bash"
apt install direnv
Add to shell (in ~/.bashrc) and restart terminal session.
eval "$(direnv hook bash)"
Run the below and then refresh or restart terminal session.
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
chmod +x Miniconda3-latest-Linux-x86_64.sh
./Miniconda3-latest-Linux-x86_64.sh
conda create -n poetry python=3.10
https://pipx.pypa.io/stable/installation/
conda activate poetry
pipx install poetry
cd smah # go to repo folder
conda create -n smah-dev python=3.10
conda activate smah-dev
poetry install
set OPENAI_API_KEY env variable or set key in your smah config file ~/.smah/config.yaml
touch and add the following to smah/.envrc.dev
export SMAH_OPENAI_API_KEY=${YOUR_OPENAI_API_KEY}"
and run direnv allow
Add the same line to the end of your ~/.bashrc
file
export SMAH_OPENAI_API_KEY=${YOUR_OPENAI_API_KEY}"
Start a new terminal session or run source ~/.bashrc
Switch back to smah-dev conda environment
conda activate smah-dev
Test
poetry run pytest --verbose
If tests look good: (of are known issues with your local change)
pip build
pip install
smah -q "Hello World"
The env active version of smah will now be pointed at your local repo.
On first run if not already configured you will be walked through the setup process.
export PYPI_TOKEN="your api token"
poetry config pypi-token.pypi $PYPI_TOKEN
poetry publish --build