nxbench package¶
Subpackages¶
- nxbench.data package
- Subpackages
- Submodules
- nxbench.data.constants module
- nxbench.data.db module
- nxbench.data.loader module
- nxbench.data.repository module
NetworkMetadata
NetworkMetadata.__init__()
NetworkMetadata.category
NetworkMetadata.citations
NetworkMetadata.collection
NetworkMetadata.description
NetworkMetadata.directed
NetworkMetadata.download_url
NetworkMetadata.edge_type
NetworkMetadata.name
NetworkMetadata.network_statistics
NetworkMetadata.source
NetworkMetadata.tags
NetworkMetadata.vertex_type
NetworkMetadata.weighted
NetworkRepository
NetworkRepository.__init__()
NetworkRepository.discover_networks_by_category()
NetworkRepository.extract_download_url()
NetworkRepository.fetch_with_retry()
NetworkRepository.get_category_for_network()
NetworkRepository.get_network_metadata()
NetworkRepository.list_networks()
NetworkRepository.verify_url()
NetworkStats
NetworkStats.__init__()
NetworkStats.assortativity
NetworkStats.avg_clustering
NetworkStats.avg_degree
NetworkStats.avg_triangles
NetworkStats.density
NetworkStats.max_clique_lb
NetworkStats.max_degree
NetworkStats.max_kcore
NetworkStats.max_triangles
NetworkStats.min_degree
NetworkStats.n_edges
NetworkStats.n_nodes
NetworkStats.n_triangles
NetworkStats.transitivity
- nxbench.data.synthesize module
- nxbench.data.utils module
- Module contents
- nxbench.validation package
- nxbench.viz package
Submodules¶
nxbench.cli module¶
nxbench.log module¶
- class nxbench.log.LoggerConfig(name, level='INFO', handlers=<factory>)[source]¶
Bases:
object
Configuration for a single logger.
- Parameters:
name (str)
level (str)
handlers (list[LoggingHandlerConfig])
- __init__(name, level='INFO', handlers=<factory>)¶
- Parameters:
name (str)
level (str)
handlers (list[LoggingHandlerConfig])
- Return type:
None
-
handlers:
list
[LoggingHandlerConfig
]¶
- class nxbench.log.LoggingConfig(loggers=<factory>)[source]¶
Bases:
object
Configuration for all loggers.
- Parameters:
loggers (list[LoggerConfig])
- __init__(loggers=<factory>)¶
- Parameters:
loggers (list[LoggerConfig])
- Return type:
None
-
loggers:
list
[LoggerConfig
]¶
- class nxbench.log.LoggingHandlerConfig(handler_type, level='INFO', formatter='%(asctime)s - %(name)s - %(levelname)s - %(message)s', log_file=None, rotate_logs=True, backup_count=7, when='midnight')[source]¶
Bases:
object
Configuration for a single logging handler.
- Parameters:
- __init__(handler_type, level='INFO', formatter='%(asctime)s - %(name)s - %(levelname)s - %(message)s', log_file=None, rotate_logs=True, backup_count=7, when='midnight')¶
- class nxbench.log.NxBenchConfig(active=False, verbosity_level=0, backend_name='nxbench', backend_params=<factory>, logging_config=<factory>)[source]¶
Bases:
Config
Configuration for NetworkX that controls behaviors such as how to use backends and logging.
- Parameters:
active (bool)
verbosity_level (int)
backend_name (str)
backend_params (dict)
logging_config (LoggingConfig)
- __init__(active=False, verbosity_level=0, backend_name='nxbench', backend_params=<factory>, logging_config=<factory>)¶
- Parameters:
active (bool)
verbosity_level (int)
backend_name (str)
backend_params (dict)
logging_config (LoggingConfig)
- Return type:
None
-
logging_config:
LoggingConfig
¶
- notify_observers(name, value)[source]¶
Notify all registered observers about a configuration change.
- register_observer(callback)[source]¶
Register an observer callback to be notified on configuration changes.
- nxbench.log.create_handler(handler_cfg)[source]¶
Create a logging handler based on the handler configuration.
- Return type:
- Parameters:
handler_cfg (LoggingHandlerConfig)
- nxbench.log.get_default_logger()[source]¶
Return a default logger instance for simple logging.
- Return type:
- nxbench.log.setup_logger(logger_cfg)[source]¶
Set up a single logger based on LoggerConfig.
- Return type:
- Parameters:
logger_cfg (LoggerConfig)
- nxbench.log.setup_logger_from_config(logging_config)[source]¶
Set up all loggers based on the provided LoggingConfig.
- Return type:
- Parameters:
logging_config (LoggingConfig)