If you want to run code locally for development, contributions or simply want to adjust a few lines of code here are a few instructions on how to get setup.
This project is developed in python, using poetry
for dependencies and package management hence you need to have:
Installed and available.
Checkout general package requirements before moving onward.
To operate the package from the source code.
-
Download the repository.
git clone https://github.com/Katolus/functions.git
-
Ensure that
python
andpip
are installed. -
Using
poetry
, install all package's dependencies by runningpoetry install
inside the project's directory.
-
Run
poetry shell
to enter the scope of the package. -
Run
functions --version
to validate that the package is available correctly. You should see something like this.You are using 0.1.0 version of the functions-cli package
-
Execute or invoke the commands like you would normally, by running
functions [OPTIONS] COMMAND [ARGS] ...
in the invoked shell.Additionally you can install the package from source code by building a wheel and installing it manually in your environment's scope.
If you want to install package from the repository as a local package (available outside of the poetry shell
scope), then you might want to build and install following these steps:
- Run
poetry build
and you should see adist
folder appear in the root directory of the code (assuming you are running the command from there). - Install the package directly by the while specifying a path to the source -
pip install /home/{your_user}/{project_root_path}/dist/functions_cli-0.1.0a2-py3-none-any.whl
.
Handy tutorial in the scope of the typer
package, that could help with this -> here.
Alternatively there run the install_locally.sh
script.
Make poetry build the virtual env locally.
poetry config virtualenvs.in-project true
to set the virtual env folder to be created in the current directory.
This is mainly to enable working with the context in VSCode.