Mercurial > repos > tduigou > save_to_db
comparison save_to_db.py @ 5:f934215bdb78 draft default tip
planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
| author | tduigou |
|---|---|
| date | Mon, 02 Jun 2025 10:29:28 +0000 |
| parents | c7a7520afb4b |
| children |
comparison
equal
deleted
inserted
replaced
| 4:c7a7520afb4b | 5:f934215bdb78 |
|---|---|
| 121 insert_rows = [] | 121 insert_rows = [] |
| 122 | 122 |
| 123 for gb_file in gb_files: | 123 for gb_file in gb_files: |
| 124 # Extract base file name (just the file name, not the full path) | 124 # Extract base file name (just the file name, not the full path) |
| 125 real_file_name = os.path.basename(gb_file) | 125 real_file_name = os.path.basename(gb_file) |
| 126 | 126 fragment_name = file_name_mapping_dict.get(real_file_name) |
| 127 print(f"Processing file: {real_file_name}") # Debugging: Log the current file | 127 |
| 128 print(f"Processing file: {real_file_name}({fragment_name})") # Debugging: Log the current file | |
| 128 | 129 |
| 129 # Get the corresponding fragment name from the mapping | 130 # Get the corresponding fragment name from the mapping |
| 130 fragment_name = file_name_mapping_dict.get(real_file_name) | 131 fragment_name = file_name_mapping_dict.get(real_file_name) |
| 131 | 132 |
| 132 if not fragment_name: | 133 if not fragment_name: |
| 194 # Load JSON config if provided | 195 # Load JSON config if provided |
| 195 json_config = {} | 196 json_config = {} |
| 196 if args.json_conf != 'None' or '': | 197 if args.json_conf != 'None' or '': |
| 197 with open(args.json_conf, "r") as f: | 198 with open(args.json_conf, "r") as f: |
| 198 json_config = json.load(f) | 199 json_config = json.load(f) |
| 200 if "execution" in json_config and json_config["execution"] is False: | |
| 201 print("Execution was blocked by config (execution = false)") | |
| 202 return | |
| 199 | 203 |
| 200 # Prefer user input; fallback to JSON_ values if not provided | 204 # Prefer user input; fallback to JSON_ values if not provided |
| 201 user_params = { | 205 user_params = { |
| 202 "table": args.table, | 206 "table": args.table, |
| 203 "sequence_column": args.sequence_column, | 207 "sequence_column": args.sequence_column, |
