-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1796756
commit 969de7c
Showing
4 changed files
with
75 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import sys | ||
import os | ||
import logging | ||
from pathlib import Path | ||
|
||
# Add the project root to Python path | ||
project_root = str(Path(__file__).parents[2]) | ||
sys.path.insert(0, project_root) | ||
|
||
from backend.src.sources.parsers.herd_data import HerdDataParser | ||
|
||
# Setup logging | ||
logging.basicConfig(level=logging.INFO) | ||
logger = logging.getLogger(__name__) | ||
|
||
def test_single_chr(): | ||
# Test configuration with direct secrets | ||
config = { | ||
'enabled': True, | ||
'type': 'herd_data', | ||
'project_id': 'landbrugsdata-1', # Updated to correct project ID | ||
'use_google_secrets': True, | ||
'secrets': { | ||
'fvm_username': '42731978', | ||
'fvm_password': 'GiXOEqqWjzWa3BXWCPGT1SINA' | ||
} | ||
} | ||
|
||
# Initialize parser | ||
parser = HerdDataParser(config) | ||
|
||
# Test with known CHR number | ||
test_chr = "10860" | ||
|
||
try: | ||
result = parser.query_herd(test_chr) | ||
logger.info(f"Result for CHR {test_chr}:") | ||
logger.info(result) | ||
except Exception as e: | ||
logger.error(f"Error: {str(e)}") | ||
logger.error(f"Error type: {type(e)}") | ||
import traceback | ||
logger.error(traceback.format_exc()) | ||
|
||
if __name__ == "__main__": | ||
test_single_chr() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+970 KB
backend/src/sources/static/herd_data/Vejledning_til_at_benytte_FVM_Web_Services (2).pdf
Binary file not shown.
File renamed without changes.