Snap Env (https://snapenv.com) Python base module.
Project description
Snap SAAS Base
Snap Env (https://snapenv.com) Python base module.
Using
Python package: To add and install this package as a dependency of your project, run poetry add snap-saas-base
.
Contributing
Prerequisites
1. Set up Git to use SSH
- Generate an SSH key and add the SSH key to your GitHub account.
- Configure SSH to automatically load your SSH keys:
cat << EOF >> ~/.ssh/config Host * AddKeysToAgent yes IgnoreUnknown UseKeychain UseKeychain yes EOF
2. Install Docker
- Install Docker Desktop.
- Enable Use Docker Compose V2 in Docker Desktop's preferences window.
- Linux only:
- Export your user's user id and group id so that files created in the Dev Container are owned by your user:
cat << EOF >> ~/.bashrc export UID=$(id --user) export GID=$(id --group) EOF
- Export your user's user id and group id so that files created in the Dev Container are owned by your user:
3. Install VS Code or PyCharm
- Install VS Code and VS Code's Dev Containers extension. Alternatively, install PyCharm.
- Optional: install a Nerd Font such as FiraCode Nerd Font and configure VS Code or configure PyCharm to use it.
4. Install OpenCommit
- Install OpenCommit. Open a new shell window and execute the following commands:
npm install -g opencommit oco config set OCO_OPENAI_API_KEY=sk-N... oco config set OCO_MODEL=gpt-4 oco config set OCO_EMOJI=true
5. Install gpt4docstrings (dont install until tool upgrade to use new openai API client)
- Install gpt4docstrings. In the directory of the project and with poetry activated, execute the following commands:
poetry add --group dev gpt4docstrings
- Optional: Test the command:
OPENAI_API_KEY=sk-N... gpt4docstrings -w src/api.py
- Check src/snap_saas_base/api.py to see the generated docstring.
6. Install aider
- Install aider. In the directory of the project and with poetry activated, execute the following commands:
poetry add --group dev aider-chat
- Optional: Test the command:
OPENAI_API_KEY=sk-N... aider --no-auto-commits
- After aider is loaded, use
/help
to see avaiable commands and check [aider project(https://github.com/paul-gauthier/aider) to understand this tool.
- After aider is loaded, use
7. Install cz-conventional-gitmoji
- Install cz-conventional-gitmoji. In the directory of the project and with poetry activated, execute the following commands:
poetry add --group dev cz-conventional-gitmoji
- Optional: Test the command:
cz commit
Development environments
The following development environments are supported:
- ⭐️ GitHub Codespaces: click on Code and select Create codespace to start a Dev Container with GitHub Codespaces.
- ⭐️ Dev Container (with container volume): click on Open in Dev Containers to clone this repository in a container volume and create a Dev Container with VS Code.
- Dev Container: clone this repository, open it with VS Code, and run Ctrl/⌘ + ⇧ + P → Dev Containers: Reopen in Container.
- PyCharm: clone this repository, open it with PyCharm, and configure Docker Compose as a remote interpreter with the
dev
service. - Terminal: clone this repository, open it with your terminal, and run
docker compose up --detach dev
to start a Dev Container in the background, and then rundocker compose exec dev zsh
to open a shell prompt in the Dev Container.
Developing
- This project follows the Conventional Commits standard to automate Semantic Versioning and Keep A Changelog with Commitizen.
- Run
poe
from within the development environment to print a list of Poe the Poet tasks available to run on this project. - Run
poetry add {package}
from within the development environment to install a run time dependency and add it topyproject.toml
andpoetry.lock
. Add--group test
or--group dev
to install a CI or development dependency, respectively. - Run
poetry update
from within the development environment to upgrade all dependencies to the latest versions allowed bypyproject.toml
. - Run
cz --name cz_gitmoji commit
so commit files using conventional commits with emojis. - Run
cz --name cz_gitmoji bump --changelog
to bump the package's version, update theCHANGELOG.md
, and create a git tag. - Run
git push --tags
to push the new tag to github.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
snap_saas_base-0.10.2.tar.gz
(12.6 kB
view details)
Built Distribution
File details
Details for the file snap_saas_base-0.10.2.tar.gz
.
File metadata
- Download URL: snap_saas_base-0.10.2.tar.gz
- Upload date:
- Size: 12.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.9 Linux/6.5.0-1018-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03c7a7288f72e540ab6b8978dc93864b78226228ccde0fd12ea85331cc3452e1 |
|
MD5 | 7b62b1aa6d5311e484d87fd8ac182b92 |
|
BLAKE2b-256 | 7b8823e6374e6c6742d7062c3f289ecf212e144f824f7ec96157e337105ebaaf |
File details
Details for the file snap_saas_base-0.10.2-py3-none-any.whl
.
File metadata
- Download URL: snap_saas_base-0.10.2-py3-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.9 Linux/6.5.0-1018-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 095176b0118cbe18a6b724474b5716a272085856a582b45710eff70e48b51ca0 |
|
MD5 | 6e611a8dbc17c739f38de5cc2932fd2e |
|
BLAKE2b-256 | a6375b38be25532684c2377e2b0ee9af5021519de51ba2a78b778870130fec6d |