diff --git a/Design-UX/DESIGN-UX-PHILOSOPHY.md b/Design-UX/DESIGN-UX-PHILOSOPHY.md index ca7edc8..a6a2838 100644 --- a/Design-UX/DESIGN-UX-PHILOSOPHY.md +++ b/Design-UX/DESIGN-UX-PHILOSOPHY.md @@ -1,4 +1,4 @@ -## Design Philosophy and UX Concept for CFIA Projects +# Design Philosophy and UX Concept for CFIA Projects ### User-Centric Design diff --git a/DevOps-documentation/devops-intake.md b/DevOps-documentation/devops-intake.md index c3ce092..cf54667 100644 --- a/DevOps-documentation/devops-intake.md +++ b/DevOps-documentation/devops-intake.md @@ -1,4 +1,4 @@ -## Introduction +# Introduction The purpose of this document is to provide a clear and concise set of tasks and prerequisites that need to be addressed for the successful initialization, @@ -33,7 +33,8 @@ and development of the project. - [ ] **Project Initialization and Documentation** - [ ] Internal AI Project intake and criteria for internal AI products. - [ ] Product functionality explained in the Wiki. - - [ ] [GitHub project created](https://github.com/orgs/ai-cfia/projects) for managing the product. + - [ ] [GitHub project created](https://github.com/orgs/ai-cfia/projects) + for managing the product. - [ ] [Configure repository to our own internal standards](https://github.com/ai-cfia/devops/blob/main/github-repository-creation-guide.md). - [ ] Architecture documented with a diagram. diff --git a/Development-Environment-Setup-Guide/DEV-ENV-SETUP.md b/Development-Environment-Setup-Guide/DEV-ENV-SETUP.md index 792be09..f00c2e5 100644 --- a/Development-Environment-Setup-Guide/DEV-ENV-SETUP.md +++ b/Development-Environment-Setup-Guide/DEV-ENV-SETUP.md @@ -44,9 +44,9 @@ commands without `sudo`. 3. Open terminal: `Terminal > New Terminal` or `` Ctrl+` ``. 4. Create your project's folder in your working directory: - ```bash - mkdir - ``` + ```bash + mkdir + ``` 5. In Command Palette, select `WSL: Open Folder in WSL...` and choose your project folder. @@ -76,14 +76,14 @@ Make sure to include the following fields: - **name**: Container name for VS Code. - **image**: The Docker image to use. We recommended using the Dev Container -base images provided by Microsoft: [Docker Hub] -(https://hub.docker.com/_/microsoft-devcontainers?tab=description). +base images provided by Microsoft: [Docker Hub]( +https://hub.docker.com/_/microsoft-devcontainers?tab=description). - **postCreateCommand**: Commands that will execute after the container's creation. This is useful for the installation of dependencies or initial setup tasks. -For a comprehensive list of options, refer to the [official documentation] -(https://containers.dev/implementors/json_reference/). +For a comprehensive list of options, refer to the [official documentation]( +https://containers.dev/implementors/json_reference/). #### Default extensions diff --git a/Minimal-Backend-Setup-Guides/PYTHON-BACKEND-SETUP.md b/Minimal-Backend-Setup-Guides/PYTHON-BACKEND-SETUP.md index 3806355..14be529 100644 --- a/Minimal-Backend-Setup-Guides/PYTHON-BACKEND-SETUP.md +++ b/Minimal-Backend-Setup-Guides/PYTHON-BACKEND-SETUP.md @@ -21,143 +21,143 @@ after the issue (ie, `/issue-a-meaningful-tag`) 1. Configure `devcontainer.json`: - ```json - { - "name": "Python 3", - "image": "mcr.microsoft.com/devcontainers/python:3.11", - "postCreateCommand": "pip3 install --user -r requirements.txt" - } - ``` + ```json + { + "name": "Python 3", + "image": "mcr.microsoft.com/devcontainers/python:3.11", + "postCreateCommand": "pip3 install --user -r requirements.txt" + } + ``` 2. At the root of the project, Create a `requirements.txt` file: - ``` - flask - gunicorn - # additional dependencies - ``` + ```text + flask + gunicorn + # additional dependencies + ``` 3. Create a `requirements-production.txt` file: - ``` - flask - gunicorn - ``` + ```text + flask + gunicorn + ``` 4. Set up the directory structure: - ```bash - mkdir src tests && touch src/main.py tests/test_main.py src/__init__.py tests/__init__.py Dockerfile - ``` + ```bash + mkdir src tests && touch src/main.py tests/test_main.py src/__init__.py tests/__init__.py Dockerfile + ``` 5. Setting up the Flask app: - ```python - # src/main.py - from datetime import datetime - from flask import Flask + ```python + # src/main.py + from datetime import datetime + from flask import Flask - app = Flask(__name__) + app = Flask(__name__) - @app.route('/') - def read_root(): - current_time = datetime.now() - unix_timestamp = int(current_time.timestamp()) - return {"current_time": unix_timestamp} - ``` + @app.route('/') + def read_root(): + current_time = datetime.now() + unix_timestamp = int(current_time.timestamp()) + return {"current_time": unix_timestamp} + ``` - **Note**: Don't run the app from the code (i.e., with: - `app.run(host='0.0.0.0', port=8000)`) as this violates several rules - from the [12 factor app](https://12factor.net). + **Note**: Don't run the app from the code (i.e., with: + `app.run(host='0.0.0.0', port=8000)`) as this violates several rules + from the [12 factor app](https://12factor.net). 6. Setting up tests: - ```python - # tests/test_main.py - import unittest - from src.main import app + ```python + # tests/test_main.py + import unittest + from src.main import app - class TestApp(unittest.TestCase): + class TestApp(unittest.TestCase): - def setUp(self): - self.app = app.test_client() - self.app.testing = True + def setUp(self): + self.app = app.test_client() + self.app.testing = True - def test_read_root(self): - response = self.app.get('/') - data = response.get_json() - self.assertEqual(response.status_code, 200) - self.assertTrue('current_time' in data) - self.assertIsInstance(data['current_time'], int) - ``` + def test_read_root(self): + response = self.app.get('/') + data = response.get_json() + self.assertEqual(response.status_code, 200) + self.assertTrue('current_time' in data) + self.assertIsInstance(data['current_time'], int) + ``` 7. Setting up the Dockerfile: - ```dockerfile - # Dockerfile - # Base image with Python 3.11 on Alpine - FROM python:3.11-alpine + ```dockerfile + # Dockerfile + # Base image with Python 3.11 on Alpine + FROM python:3.11-alpine - # Establish /code as working directory in the container - WORKDIR /code + # Establish /code as working directory in the container + WORKDIR /code - # Copy production requirements and install dependencies - COPY ./requirements-production.txt requirements.txt - RUN pip3 install --no-cache-dir -r requirements.txt + # Copy production requirements and install dependencies + COPY ./requirements-production.txt requirements.txt + RUN pip3 install --no-cache-dir -r requirements.txt - # Copy source code into the working directory - COPY ./src . + # Copy source code into the working directory + COPY ./src . - # Use Gunicorn as the server, configuring it for the Flask app - ENTRYPOINT gunicorn --bind :$PORT --workers 1 --threads 8 --timeout 0 --forwarded-allow-ips "*" main:app - ``` + # Use Gunicorn as the server, configuring it for the Flask app + ENTRYPOINT gunicorn --bind :$PORT --workers 1 --threads 8 --timeout 0 --forwarded-allow-ips "*" main:app + ``` 8. Open the project in Dev Containers or rebuild it if it was already open in Dev Containers. 9. Test the Flask app: - ```bash - export PORT=5001 - cd src && gunicorn --bind :$PORT --workers 1 --threads 8 --timeout 0 --forwarded-allow-ips "*" main:app - ``` + ```bash + export PORT=5001 + cd src && gunicorn --bind :$PORT --workers 1 --threads 8 --timeout 0 --forwarded-allow-ips "*" main:app + ``` 10. Run the tests. From the root: -```bash -python -m unittest discover -s tests -``` + ```bash + python -m unittest discover -s tests + ``` 11. Test running the app from Dockerfile: -```bash -docker build -t flask-app . -docker run -p $PORT:$PORT -e PORT=$PORT flask-app -``` + ```bash + docker build -t flask-app . + docker run -p $PORT:$PORT -e PORT=$PORT flask-app + ``` ## Pushing the App to GitHub 1. Create a `.gitignore`: - ``` - __pycache__/ - *.pyc - .cache/ - env/ - ``` + ```text + __pycache__/ + *.pyc + .cache/ + env/ + ``` 2. Create a `README.md`: - ``` - # Presentation - ... - # Steps to Run the Project from Dev Containers - ... - # Running the unit tests from Dev Containers - ... - # Steps to Run the Project from Dockerfile - ... - ``` + ```markdown + # Presentation + ... + # Steps to Run the Project from Dev Containers + ... + # Running the unit tests from Dev Containers + ... + # Steps to Run the Project from Dockerfile + ... + ``` 3. Commit and push the changes to the repository. Make sure the commit references the issue (ie, `issue #`). Make sure the commit message diff --git a/adr/008-naming-convention.md b/adr/008-naming-convention.md index d23adac..4fec6c7 100644 --- a/adr/008-naming-convention.md +++ b/adr/008-naming-convention.md @@ -106,8 +106,7 @@ researchers, developers. - [Rootsoft. Database Naming Convention](#rootsoft) - [Vertabelo. Worst Database Naming Conventions](#vertabelo) - - ### Database Table, Column and View +### Database Table, Column and View - **Convention**: Use lowercase and separate words with underscore. For naming use plural. diff --git a/adr/016-networking.fr-ca.md b/adr/016-networking.fr-ca.md index dcb1159..7043983 100644 --- a/adr/016-networking.fr-ca.md +++ b/adr/016-networking.fr-ca.md @@ -2,12 +2,12 @@ ## Résumé exécutif -Cette décision d'architecture vise à formaliser la stratégie de réseautique pour nos applications -déployées sur Kubernetes, en évaluant les composants actuels et futures d'accès -réseau pour maximiser performance, sécurité et facilité de gestion. -Nous utilisons Azure pour cette architecture, en intégrant ingress Nginx, -cert-manager, vouch-proxy, ainsi qu'une gestion automatique des enregistrements -DNS grâce à external-dns. +Cette décision d'architecture vise à formaliser la stratégie de réseautique pour +nos applications déployées sur Kubernetes, en évaluant les composants actuels et +futures d'accès réseau pour maximiser performance, sécurité et facilité de +gestion. Nous utilisons Azure pour cette architecture, en intégrant ingress +Nginx, cert-manager, vouch-proxy, ainsi qu'une gestion automatique des +enregistrements DNS grâce à external-dns. ## Contexte diff --git a/development-with-aI/000-index.md b/development-with-aI/000-index.md index 291c088..d99d4ad 100644 --- a/development-with-aI/000-index.md +++ b/development-with-aI/000-index.md @@ -6,6 +6,7 @@ multitude of pivotal roles: ## Enhancing Functionality AI amplifies our system's capabilities by: + - **Automating Processes:** Streamlining complex tasks for increased efficiency. - **Enabling Smart Decision-Making:** Providing predictive insights from data analysis. diff --git a/development-with-aI/001-generate-qna-for-search-test-challenges.md b/development-with-aI/001-generate-qna-for-search-test-challenges.md index c628d82..c63c38d 100644 --- a/development-with-aI/001-generate-qna-for-search-test-challenges.md +++ b/development-with-aI/001-generate-qna-for-search-test-challenges.md @@ -1,6 +1,7 @@ # Coding Journey: Addressing Challenges and Finding Solutions ## Chunk Quality and Missing Scores + During development, one significant challenge revolved around chunk quality ratings, each assigned a score, ranging from 0.0 to 1.0. However, issues emerged due to missing scores, specifically in identifying tables within chunks and diff --git a/development-with-aI/001-generate-qna-for-search-test-implementation.md b/development-with-aI/001-generate-qna-for-search-test-implementation.md index e60a1c7..ad03b6b 100644 --- a/development-with-aI/001-generate-qna-for-search-test-implementation.md +++ b/development-with-aI/001-generate-qna-for-search-test-implementation.md @@ -50,6 +50,7 @@ The system aims to provide valuable Q&A pairs and ensure search result accuracy, addressing challenges in chunk quality and scoring accuracy along the way. ## Related Links + - [Pull Request #47](https://github.com/ai-cfia/ailab-db/pull/47) - [Issue #9](https://github.com/ai-cfia/ailab-db/issues/9) - [Related Issue #4](https://github.com/ai-cfia/finesse-data/issues/4) diff --git a/postmortems/incident-1.md b/postmortems/incident-1.md index 1e99a03..d044e49 100644 --- a/postmortems/incident-1.md +++ b/postmortems/incident-1.md @@ -105,22 +105,22 @@ maximum upload limite to the nachet backend. |Action items|Type|Priority|Owner|Tracking bug| |--------|-------|-------|-------|-------| -|Instrument the application|mitigate|P0|NBT|[issue 50](#ref-50)| +|Instrument the application|mitigate|P0|NBT|[issue 50](#ref50)| ### Nachet frontend team (NFT): |Action items|Type|Priority|Owner|Tracking bug| |--------|-------|-------|-------|-------| -|Instrument the application|mitigate|P0|NFT|[issue 88](#ref-88)| +|Instrument the application|mitigate|P0|NFT|[issue 88](#ref88)| ### DevSecOps Team (DT): |Action items|Type|Priority|Owner|Tracking bug| |--------|-------|-------|-------|-------| -|Monitor API Key regeneration|detect|P1|DT|[issue 22](#ref-22)| -|Add 500 internal server error alerts|detect|P1|DT|[issue 23](#ref-23)| -|Disallow API Key changes without approval|mitigate|P1|DT|[issue 21](#ref-21)| -|Support instrumented applications|mitigate|P1|DT|[issue 13](#ref-13)| +|Monitor API Key regeneration|detect|P1|DT|[issue 22](#ref22)| +|Add 500 internal server error alerts|detect|P1|DT|[issue 23](#ref23)| +|Disallow API Key changes without approval|mitigate|P1|DT|[issue 21](#ref21)| +|Support instrumented applications|mitigate|P1|DT|[issue 13](#ref13)| ## Lessons Learned