Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Performance and Accuracy Testing Script for FertiScan Pipeline #32

Merged
merged 20 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
20a8d14
feat: setup devcontainer + implement basic performance testing
Endlessflow Aug 27, 2024
4745032
feat: add a new input field for the form signature for the json_schema
snakedye Aug 28, 2024
67d8183
fix: clean up expected.json (#17)
snakedye Aug 26, 2024
f8edef8
feat: setup devcontainer + implement basic performance testing
Endlessflow Aug 27, 2024
869497e
feat: adding the feature to mesure accuracy for one field at a time a…
Endlessflow Sep 12, 2024
186bc4e
Merge branch '18-copy' into 18-implement-basic-performance-testing-fr…
Endlessflow Sep 12, 2024
ca312cd
Merge branch 'main' into 18-implement-basic-performance-testing-frame…
Endlessflow Sep 12, 2024
6638a0f
Issue #22: JSON Schema (#23)
snakedye Sep 16, 2024
44c2f6c
feat: setup devcontainer + implement basic performance testing
Endlessflow Aug 27, 2024
981d23e
bugfix: fixed most bugs in performance_assessment.py + partial work d…
Endlessflow Oct 3, 2024
3b90655
Thinks start breaking if I use model_validator instead of field_valid…
Endlessflow Oct 3, 2024
19d5166
refactor: simplify performance_assessment.py by removing unnecessary …
Endlessflow Oct 7, 2024
19b15b8
feat: Add unit tests for `performance_assessment.py` and improve edge…
Endlessflow Oct 7, 2024
7a1c837
fix: lint and markdown lint
Endlessflow Oct 7, 2024
5078634
fix: updated the gitignore file + fixed the conflicts with main
Endlessflow Oct 8, 2024
37b7764
fix: adding EOL
Endlessflow Oct 8, 2024
cd29f93
feat: adding simple progress logging.
Endlessflow Oct 16, 2024
9428a27
Merge branch 'main' into 18-implement-basic-performance-testing-frame…
Endlessflow Oct 16, 2024
4179c58
fix: fixed the model_validator missing import
Endlessflow Oct 16, 2024
b8a4581
fix: removed f-string in places they are not necessary
Endlessflow Oct 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "Python 3",
"image": "mcr.microsoft.com/devcontainers/python:1-3.12-bullseye",
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {}
},
//"forwardPorts": [],
"postCreateCommand": "pip3 install --user -r requirements.txt",
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"ms-toolsai.jupyter",
"stkb.rewrap",
"DavidAnson.vscode-markdownlint",
"charliermarsh.ruff",
"GitHub.vscode-pull-request-github"
]
}
},
"mounts": [
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind"
],
"remoteUser": "vscode", // Use a non-root user
"containerEnv": {
"PYTHONUNBUFFERED": "1",
"PYTHONPATH": "/workspace/src"
}
}
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for more information:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
# https://containers.dev/guide/dependabot

version: 2
updates:
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: weekly
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,5 @@ cython_debug/

# Testing artifacts
end_to_end_pipeline_artifacts
reports
logs
200 changes: 81 additions & 119 deletions expected.json
Original file line number Diff line number Diff line change
@@ -1,75 +1,84 @@
{
"company_name":"GreenGrow Fertilizers Inc.",
"company_address":"123 Greenway Blvd, Springfield IL 62701 USA",
"company_website":"www.greengrowfertilizers.com",
"company_phone_number":"+1 800 555 0199",
"manufacturer_name":"AgroTech Industries Ltd.",
"manufacturer_address":"456 Industrial Park Rd, Oakville ON L6H 5V4 Canada",
"manufacturer_website":"www.agrotechindustries.com",
"manufacturer_phone_number":"+1 416 555 0123",
"fertiliser_name":"SuperGrow 20-20-20",
"registration_number":"F12345678",
"lot_number":"L987654321",
"weight":[
{
"value":"25",
"unit":"kg"
},
{
"value":"55",
"unit":"lb"
"company_name": "GreenGrow Inc.",
"company_address": "123 Green Road, Farmville, State, 12345",
"company_website": "https://www.greengrow.com",
"company_phone_number": "123-456-7890",
"manufacturer_name": "AgriSupply Co.",
"manufacturer_address": "456 Supply Lane, AgriTown, State, 67890",
"manufacturer_website": "https://www.agrisupply.com",
"manufacturer_phone_number": "987-654-3210",
"fertiliser_name": "GreenGrow Fertilizer 20-20-20",
"registration_number": "FG123456",
"lot_number": "LOT20240901",
"weight": [
{
"value": 50,
"unit": "kg"
}
],
"density":{
"value":"1.2",
"unit":"g/cm³"
"density": {
"value": 1.5,
"unit": "g/cm³"
},
"volume":{
"value":"20.8",
"unit":"L"
"volume": {
"value": 33.3,
"unit": "L"
},
"npk": "20-20-20",
"guaranteed_analysis_en": {
"title": "Guaranteed Analysis",
"nutrients": [
{
"nutrient": "Total Nitrogen (N)",
"value": 20,
"unit": "%"
},
{
"nutrient": "Available Phosphate (P2O5)",
"value": 20,
"unit": "%"
},
{
"nutrient": "Soluble Potash (K2O)",
"value": 20,
"unit": "%"
}
]
},
"guaranteed_analysis_fr": {
"title": "Analyse Garantie",
"nutrients": [
{
"nutrient": "Azote total (N)",
"value": 20,
"unit": "%"
},
{
"nutrient": "Phosphate assimilable (P2O5)",
"value": 20,
"unit": "%"
},
{
"nutrient": "Potasse soluble (K2O)",
"value": 20,
"unit": "%"
}
]
},
"npk":"20-20-20",
"warranty":"Guaranteed analysis of nutrients.",
"cautions_en":[
"Keep out of reach of children.",
"Avoid contact with skin and eyes."
],
"instructions_en":[
"1. Dissolve 50g in 10L of water.",
"2. Apply every 2 weeks.",
"3. Store in a cool, dry place."
],
"micronutrients_en":[
{
"nutrient":"Iron (Fe)",
"value":"0.10",
"unit":"%"
},
{
"nutrient":"Zinc (Zn)",
"value":"0.05",
"unit":"%"
},
{
"nutrient":"Manganese (Mn)",
"value":"0.05",
"unit":"%"
}
],
"ingredients_en":[
{
"nutrient":"Bone meal",
"value":"5",
"value":5,
"unit":"%"
},
{
"nutrient":"Seaweed extract",
"value":"3",
"value":3,
"unit":"%"
},
{
"nutrient":"Humic acid",
"value":"2",
"value":2,
"unit":"%"
},
{
Expand All @@ -82,56 +91,20 @@
"nutrient":"Perlite"
}
],
"specifications_en":[
{
"humidity":"10",
"ph":"6.5",
"solubility":"100"
}
],
"first_aid_en":[
"In case of contact with eyes, rinse immediately with plenty of water and seek medical advice."
],
"cautions_fr":[
"Tenir hors de portée des enfants.",
"Éviter le contact avec la peau et les yeux."
],
"instructions_fr":[
"1. Dissoudre 50g dans 10L d'eau.",
"2. Appliquer toutes les 2 semaines.",
"3. Conserver dans un endroit frais et sec."
],
"micronutrients_fr":[
{
"nutrient":"Fer (Fe)",
"value":"0.10",
"unit":"%"
},
{
"nutrient":"Zinc (Zn)",
"value":"0.05",
"unit":"%"
},
{
"nutrient":"Manganèse (Mn)",
"value":"0.05",
"unit":"%"
}
],
"ingredients_fr":[
{
"nutrient":"Farine d'os",
"value":"5",
"value":5,
"unit":"%"
},
{
"nutrient":"Extrait d'algues",
"value":"3",
"value":3,
"unit":"%"
},
{
"nutrient":"Acide humique",
"value":"2",
"value":2,
"unit":"%"
},
{
Expand All @@ -144,31 +117,20 @@
"nutrient":"Perlite"
}
],
"specifications_fr":[
{
"humidity":"10",
"ph":"6.5",
"solubility":"100"
}
"cautions_en": [
"Keep out of reach of children.",
"Store in a cool, dry place."
],
"first_aid_fr":[
"En cas de contact avec les yeux, rincer immédiatement à grande eau et consulter un médecin."
"cautions_fr": [
"Garder hors de la portée des enfants.",
"Conserver dans un endroit frais et sec."
],
"guaranteed_analysis":[
{
"nutrient":"Total Nitrogen (N)",
"value":"20",
"unit":"%"
},
{
"nutrient":"Available Phosphate (P2O5)",
"value":"20",
"unit":"%"
},
{
"nutrient":"Soluble Potash (K2O)",
"value":"20",
"unit":"%"
}
"instructions_en": [
"Apply evenly across the field at a rate of 5 kg per hectare.",
"Water thoroughly after application."
],
"instructions_fr": [
"Appliquer uniformément sur le champ à raison de 5 kg par hectare.",
"Arroser abondamment après l'application."
]
}
Loading
Loading