rust-crate-pipeline 1.2.3__py3-none-any.whl → 1.2.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -111,15 +111,52 @@ Examples:
111
111
  return parser.parse_args()
112
112
 
113
113
  def configure_logging(log_level: str = 'INFO'):
114
+ """Configure logging with both console and file output"""
114
115
  level = getattr(logging, log_level.upper())
115
- logging.basicConfig(
116
- level=level,
117
- format="%(asctime)s [%(levelname)s] %(message)s",
118
- handlers=[
119
- logging.StreamHandler(),
120
- logging.FileHandler(f"crate_enrichment_{time.strftime('%Y%m%d-%H%M%S')}.log")
121
- ]
116
+
117
+ # Clear any existing handlers to avoid conflicts
118
+ root_logger = logging.getLogger()
119
+ for handler in root_logger.handlers[:]:
120
+ root_logger.removeHandler(handler)
121
+
122
+ # Set root logger level
123
+ root_logger.setLevel(level)
124
+
125
+ # Create formatters
126
+ detailed_formatter = logging.Formatter(
127
+ "%(asctime)s [%(levelname)s] %(name)s: %(message)s",
128
+ datefmt='%Y-%m-%d %H:%M:%S'
122
129
  )
130
+ simple_formatter = logging.Formatter(
131
+ "%(asctime)s [%(levelname)s] %(message)s"
132
+ )
133
+
134
+ # Console handler
135
+ console_handler = logging.StreamHandler()
136
+ console_handler.setLevel(level)
137
+ console_handler.setFormatter(simple_formatter)
138
+ root_logger.addHandler(console_handler)
139
+
140
+ # File handler with unique timestamp
141
+ log_filename = f"crate_enrichment_{time.strftime('%Y%m%d-%H%M%S')}.log"
142
+ try:
143
+ file_handler = logging.FileHandler(log_filename, mode='w', encoding='utf-8')
144
+ file_handler.setLevel(logging.DEBUG) # Always capture DEBUG+ to file
145
+ file_handler.setFormatter(detailed_formatter)
146
+ root_logger.addHandler(file_handler)
147
+
148
+ # Log a test message to verify file handler works
149
+ logging.info(f"Logging initialized - file: {log_filename}")
150
+
151
+ except Exception as e:
152
+ logging.error(f"Failed to create log file {log_filename}: {e}")
153
+ print(f"Warning: Could not create log file: {e}")
154
+
155
+ # Set library loggers to less verbose levels
156
+ logging.getLogger('requests').setLevel(logging.WARNING)
157
+ logging.getLogger('urllib3').setLevel(logging.WARNING)
158
+ logging.getLogger('requests_cache').setLevel(logging.WARNING)
159
+ logging.getLogger('llama_cpp').setLevel(logging.WARNING)
123
160
 
124
161
  def check_disk_space():
125
162
  if shutil.disk_usage(".").free < 1_000_000_000: # 1GB
@@ -12,14 +12,8 @@ import os
12
12
  def configure_production_logging():
13
13
  """Configure logging for production to reduce verbose warnings"""
14
14
 
15
- # Set up logging format
16
- logging.basicConfig(
17
- level=logging.INFO, # Default to INFO level
18
- format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
19
- datefmt='%Y-%m-%d %H:%M:%S'
20
- )
21
-
22
- # Set specific loggers to less verbose levels
15
+ # Don't use basicConfig here - let main.py handle it
16
+ # Just set specific loggers to less verbose levels
23
17
  logging.getLogger('requests').setLevel(logging.WARNING)
24
18
  logging.getLogger('urllib3').setLevel(logging.WARNING)
25
19
  logging.getLogger('requests_cache').setLevel(logging.WARNING)
@@ -1,6 +1,6 @@
1
1
  """Version information for rust-crate-pipeline."""
2
2
 
3
- __version__ = "1.2.3"
3
+ __version__ = "1.2.4"
4
4
  __version_info__ = tuple(int(x) for x in __version__.split("."))
5
5
 
6
6
  # Version history
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rust-crate-pipeline
3
- Version: 1.2.3
3
+ Version: 1.2.4
4
4
  Summary: A comprehensive system for gathering, enriching, and analyzing metadata for Rust crates using AI-powered insights
5
5
  Home-page: https://github.com/DaveTmire85/SigilDERG-Data_Production
6
6
  Author: SuperUser666-Sigil
@@ -4,16 +4,16 @@ rust_crate_pipeline/ai_processing.py,sha256=B93rCDdxE-UkYMjmT0UotQTahx9-Lgzec7_b
4
4
  rust_crate_pipeline/analysis.py,sha256=ijP4zp3cFnN09nZkeCluyAvbyAtAW_M2YSxALpQX8LY,18615
5
5
  rust_crate_pipeline/config.py,sha256=r4Y_5SD-lfrM1112edk9T0S0MiVxaNSSHk4q2yDrM88,1528
6
6
  rust_crate_pipeline/github_token_checker.py,sha256=MJqHP8J84NEZ6nzdutpC7iRnsP0kyqscjLUosvmI4MI,3768
7
- rust_crate_pipeline/main.py,sha256=J8ORQA6s3wyWw2R3oB_IEm2J5tx1CFdspw5kb5Ep8zQ,6323
7
+ rust_crate_pipeline/main.py,sha256=Wz4Q4TX-G7qvLNMyYT6cHbgRCeMJoWILCvXcJr1FYAc,7876
8
8
  rust_crate_pipeline/network.py,sha256=t_G8eh_WHNugm_laMftcWVbHsmP0bOlTPnVW9DqF6SU,13375
9
9
  rust_crate_pipeline/pipeline.py,sha256=Uwfw4uLL3aN1gJl5xSwvvyaY9ceeP7LVr02IzNx0tPM,12033
10
- rust_crate_pipeline/production_config.py,sha256=2GT8bxytcrMRrcfjzpay5RTtATE3rbmDvNUBvVhrYSQ,2472
11
- rust_crate_pipeline/version.py,sha256=r_w4Eokm27opXYKcOCTKax8TO7pFI5E3TkB0L9c62yY,1022
10
+ rust_crate_pipeline/production_config.py,sha256=TdvmO1SIRpex1xZ0AymTKXpLfkkvOG44Jyy7S5M-u7k,2304
11
+ rust_crate_pipeline/version.py,sha256=2lrXFDZ6MoIDoVmCVjimRfWZ-kaHEYJztx3FH5Xe22o,1022
12
12
  rust_crate_pipeline/utils/file_utils.py,sha256=lnHeLrt1JYaQhRDKtA1TWR2HIyRO8zwOyWb-KmAmWgk,2126
13
13
  rust_crate_pipeline/utils/logging_utils.py,sha256=O4Jnr_k9dBchrVqXf-vqtDKgizDtL_ljh8g7G2VCX_c,2241
14
- rust_crate_pipeline-1.2.3.dist-info/licenses/LICENSE,sha256=tpd4XNpbssrSx9-iErATOLrOh0ivNPfO2I5MAPUpats,1088
15
- rust_crate_pipeline-1.2.3.dist-info/METADATA,sha256=1bU7P1g6veyD0hJ78cjGJcVWRTujAF6Q6RL_CV_MVIY,16741
16
- rust_crate_pipeline-1.2.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
17
- rust_crate_pipeline-1.2.3.dist-info/entry_points.txt,sha256=9Rr_IRuFRIridXxUSdEJbB3ba0NnpEfKmknZXFdYRC0,70
18
- rust_crate_pipeline-1.2.3.dist-info/top_level.txt,sha256=GUdB7RyxHLhijQxui_KTy3B8p_L2APui9C6RYa0FuaE,20
19
- rust_crate_pipeline-1.2.3.dist-info/RECORD,,
14
+ rust_crate_pipeline-1.2.4.dist-info/licenses/LICENSE,sha256=tpd4XNpbssrSx9-iErATOLrOh0ivNPfO2I5MAPUpats,1088
15
+ rust_crate_pipeline-1.2.4.dist-info/METADATA,sha256=mK5PgcCxTXpREkmyF6qlpCuYsZErqETS-gFbOsldeuY,16741
16
+ rust_crate_pipeline-1.2.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
17
+ rust_crate_pipeline-1.2.4.dist-info/entry_points.txt,sha256=9Rr_IRuFRIridXxUSdEJbB3ba0NnpEfKmknZXFdYRC0,70
18
+ rust_crate_pipeline-1.2.4.dist-info/top_level.txt,sha256=GUdB7RyxHLhijQxui_KTy3B8p_L2APui9C6RYa0FuaE,20
19
+ rust_crate_pipeline-1.2.4.dist-info/RECORD,,