To set up the development environment, follow these steps:
-
Deactivate and Remove Existing Virtual Environment (if applicable):
deactivate rm -rf .venv
-
Create and Activate a New Virtual Environment:
python3 -m venv .venv source .venv/bin/activate
-
Install the Base Ingenious Package: Run the following command to install the
ingenious
package without dependencies:pip install git+https://github.com/Insight-Services-APAC/Insight_Ingenious.git#egg=ingenious --force-reinstall
This folder includes custom extensions such as models, services, and templates required for extending the base
ingenious
package. -
Create a
.gitignore
File: Generate a.gitignore
file to exclude unnecessary files and directories from version control:echo " .DS_Store /.venv /.chainlit /.idea /.cache /env_mkdocs/ /tmp/context.md /tmp/*.db /dist/ /functional_test_outputs/ __pycache__" > .gitignore
Set up the APPSETTING_INGENIOUS_CONFIG
and APPSETTING_INGENIOUS_PROFILE
environment variables.
ingen_cli generate-template-folders
Check the ingenious_extensions
and tmp
folder in your project root directory. Ensure it contains the following structure:
tmp/
├── context.md
ingenious_extensions/
├── local_files/
├── models/
├── services/
├── templates/
└── tests/
Execute the test batch using the following command:
ingen_cli run-test-batch
python ingenious_extensions/tests/run_flask_app.py
python ingenious_extensions/tests/run_ingen_cli.py
You are now ready to begin development using the ingenious
package!