Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/mlco2/codecarbon
/ functions
Functions
1,889 in github.com/mlco2/codecarbon
⨍
Functions
1,889
◇
Types & classes
328
↳
Endpoints
162
Method
teardown_method
(self)
tests/test_gpu_nvidia.py:147
Method
teardown_method
(self)
tests/test_gpu_nvidia.py:409
Method
test_acquire_lock_creates_lock_file
(self, mock_file, mock_remove)
tests/test_lock.py:14
Method
test_acquire_lock_exits_when_lock_file_exists
(self, mock_file, mock_remove)
tests/test_lock.py:21
Method
test_acquire_release_with_multiple_threads
Test that the lock file is created and removed correctly when multiple threads are used.
tests/test_lock.py:44
Function
test_add_emission
(client, custom_test_server)
carbonserver/tests/api/routers/test_emissions.py:115
Method
test_add_emission
(self, mock_push_to_gateway)
tests/output_methods/metrics/test_prometheus.py:89
Method
test_add_emission_returns_false_on_unsuccessful_post
(self)
tests/test_api_call.py:228
Method
test_add_emission_returns_false_when_run_creation_fails
(self)
tests/test_api_call.py:175
Method
test_add_emission_skips_short_duration
(self)
tests/test_api_call.py:202
Function
test_add_emission_with_custom_wue_value
Test that custom WUE value is properly saved
carbonserver/tests/api/routers/test_emissions.py:263
Function
test_add_emission_with_default_wue_value
Test that WUE defaults to 0 when not provided
carbonserver/tests/api/routers/test_emissions.py:208
Function
test_add_experiment
(client, custom_test_server)
carbonserver/tests/api/routers/test_experiments.py:122
Method
test_add_experiment_returns_none_on_error
(self)
tests/test_api_call.py:291
Function
test_add_org
(client, custom_test_server)
carbonserver/tests/api/routers/test_organizations.py:73
Function
test_add_project
(client, custom_test_server)
carbonserver/tests/api/routers/test_projects.py:103
Function
test_add_project_token
(client, custom_test_server)
carbonserver/tests/api/routers/test_project_tokens.py:58
Function
test_add_run
(client, custom_test_server)
carbonserver/tests/api/routers/test_runs.py:97
Function
test_add_telemetry
(client, custom_test_server)
carbonserver/tests/api/routers/test_telemetry.py:44
Method
test_add_telemetry_posts_call_payload
(self)
tests/test_telemetry_client.py:57
Method
test_add_telemetry_posts_configured_payload
(self)
tests/test_telemetry_client.py:26
Method
test_add_telemetry_returns_none_without_payload
(self)
tests/test_telemetry_client.py:101
Method
test_algorithm_from_dict
(self)
tests/test_boamps_output.py:984
Method
test_algorithm_serialization
(self)
tests/test_boamps_output.py:150
Function
test_all_providers_unreadable_returns_false
Verify that is_rapl_available returns False when all main/package domains are unreadable across all providers.
tests/test_rapl_mmio_scanning.py:90
Function
test_api00_uuid_missing
()
carbonserver/tests/api/integration/test_api_black_box.py:93
Function
test_api09_organization_create
(user_session)
carbonserver/tests/api/integration/test_api_black_box.py:101
Function
test_api10_organization_read
(user_session)
carbonserver/tests/api/integration/test_api_black_box.py:119
Function
test_api11_organization_list
(user_session)
carbonserver/tests/api/integration/test_api_black_box.py:129
Function
test_api16_project_create
(user_session)
carbonserver/tests/api/integration/test_api_black_box.py:137
Function
test_api16_project_lastrun_empty
Test that empty result works.
carbonserver/tests/api/integration/test_api_black_box.py:149
Function
test_api18_experiment_create
(user_session)
carbonserver/tests/api/integration/test_api_black_box.py:159
Function
test_api19_experiment_read
(user_session)
carbonserver/tests/api/integration/test_api_black_box.py:180
Function
test_api20_experiment_list
(user_session)
carbonserver/tests/api/integration/test_api_black_box.py:186
Function
test_api21_create_api_project_token
(user_session)
carbonserver/tests/api/integration/test_api_black_box.py:192
Function
test_api21_run_create
()
carbonserver/tests/api/integration/test_api_black_box.py:238
Function
test_api21_run_create2
()
carbonserver/tests/api/integration/test_api_black_box.py:244
Function
test_api22_run_read
(user_session)
carbonserver/tests/api/integration/test_api_black_box.py:250
Function
test_api23_run_list
(user_session)
carbonserver/tests/api/integration/test_api_black_box.py:257
Function
test_api24_runs_for_experiment_list
(user_session)
carbonserver/tests/api/integration/test_api_black_box.py:264
Function
test_api25_emission_create
()
carbonserver/tests/api/integration/test_api_black_box.py:313
Function
test_api26_emission_list
(user_session)
carbonserver/tests/api/integration/test_api_black_box.py:324
Function
test_api27_emission_read
(user_session)
carbonserver/tests/api/integration/test_api_black_box.py:332
Function
test_api27_read_all
(user_session)
carbonserver/tests/api/integration/test_api_black_box.py:342
Function
test_api29_experiment_read_detailed_sums
(user_session)
carbonserver/tests/api/integration/test_api_black_box.py:359
Function
test_api30_run_read_detailed_sums
(user_session)
carbonserver/tests/api/integration/test_api_black_box.py:399
Function
test_api31_project_read_detailed_sums
(user_session)
carbonserver/tests/api/integration/test_api_black_box.py:433
Function
test_api32_organization_read_detailed_sums
(user_session)
carbonserver/tests/api/integration/test_api_black_box.py:462
Function
test_api33_project_read_last_run
(user_session)
carbonserver/tests/api/integration/test_api_black_box.py:495
Function
test_api34_project_api_token_delete
(user_session)
carbonserver/tests/api/integration/test_api_black_box.py:504
Function
test_api35_organization_read_users
(user_session)
carbonserver/tests/api/integration/test_api_black_box.py:510
Function
test_api_get_calls_api_and_prints
(monkeypatch)
tests/cli/test_cli_main.py:35
Function
test_api_get_uses_get_api_endpoint
(monkeypatch)
tests/cli/test_cli_main.py:45
Method
test_api_read_only
(self)
tests/test_api_call.py:49
Method
test_app
(self, MockApiClient)
tests/cli/test_cli.py:49
Method
test_apple_powermetrics
(self)
tests/test_powermetrics.py:27
Method
test_attributeerror_sets_amdsmi_unavailable
AttributeError during amdsmi import must disable AMD GPU support.
tests/test_gpu_amd.py:449
Method
test_auth_handler
(self, mock_basic_auth_handler)
tests/output_methods/metrics/test_prometheus.py:77
Method
test_authorize_raises_on_callback_error
( self, mock_discover, mock_session_cls, mock_server_cls )
tests/cli/test_cli_auth.py:284
Method
test_authorize_raises_when_no_callback_received
( self, mock_discover, mock_session_cls, mock_server_cls )
tests/cli/test_cli_auth.py:318
Method
test_authorize_success
( self, mock_discover, mock_session_cls, mock_server_cls, mock_browser
tests/cli/test_cli_auth.py:240
Function
test_backup
()
tests/test_core_util.py:43
Function
test_basic_functionality
Test basic package functionality works.
tests/test_package_integrity.py:108
Method
test_cache_populated_at_import
Verify that _CACHE is populated when module is imported.
tests/test_input.py:14
Method
test_calculate_ram_power
Test RAM power calculation with different system configurations
tests/test_ram.py:303
Method
test_call_api
(self)
tests/test_api_call.py:61
Method
test_camel_to_snake_conversion
(self)
tests/test_boamps_output.py:122
Function
test_can_create_run
(auth_context)
carbonserver/tests/api/service/test_auth_context.py:128
Function
test_can_read_organization
(auth_context)
carbonserver/tests/api/service/test_auth_context.py:104
Function
test_can_read_private_project_with_auth
(auth_context)
carbonserver/tests/api/service/test_auth_context.py:81
Function
test_can_read_private_project_without_auth
(auth_context)
carbonserver/tests/api/service/test_auth_context.py:94
Function
test_can_read_public_project
(auth_context)
carbonserver/tests/api/service/test_auth_context.py:71
Function
test_can_write_organization
(auth_context)
carbonserver/tests/api/service/test_auth_context.py:116
Method
test_carbon_tracker_TWO_GPU_PRIVATE_INFRA_CANADA
( self, mock_cli_setup, mock_log_values, mocked_get_gpu_details, mocke
tests/test_emissions_tracker.py:87
Method
test_carbon_tracker_custom_handler
(self)
tests/test_custom_handler.py:29
Method
test_carbon_tracker_offline_constant
(self)
tests/test_emissions_tracker_constant.py:53
Method
test_carbon_tracker_offline_constant_force_cpu_power
( self, mock_tdp, mock_psutil )
tests/test_emissions_tracker_constant.py:69
Method
test_carbon_tracker_offline_context_manager
( self, mock_cli_setup, mock_log_values, mocked_get_gpu_details, mocke
tests/test_emissions_tracker.py:721
Method
test_carbon_tracker_offline_flush
(self)
tests/test_emissions_tracker_flush.py:56
Method
test_carbon_tracker_offline_load_force_cpu_power
(self, mock_tdp, mock_psutil)
tests/test_emissions_tracker_constant.py:94
Method
test_carbon_tracker_offline_logging_output
(self)
tests/test_logging_output.py:63
Method
test_carbon_tracker_offline_region_error
(self)
tests/test_emissions_tracker_constant.py:141
Method
test_carbon_tracker_online_constant
(self)
tests/test_emissions_tracker_constant.py:41
Method
test_carbon_tracker_online_context_manager_TWO_GPU_PRIVATE_INFRA_CANADA
( self, mock_cli_setup, mock_log_values, mocked_get_gpu_details, mocke
tests/test_emissions_tracker.py:575
Method
test_carbon_tracker_online_flush
(self)
tests/test_emissions_tracker_flush.py:38
Method
test_carbon_tracker_online_logging_output
(self)
tests/test_logging_output.py:47
Method
test_carbon_tracker_timeout
( self, mocked_requests_get, mock_cli_setup, mock_log_values, mocked_g
tests/test_emissions_tracker.py:149
Method
test_check_auth_returns_none_on_error
(self)
tests/test_api_call.py:140
Method
test_check_energy_file_warns_on_permission_denied
(self)
tests/test_cpu.py:120
Method
test_check_organization_exists_returns_false_when_list_fails
(self)
tests/test_api_call.py:151
Function
test_check_user_from_jwt
(_)
carbonserver/tests/api/service/test_sign_up_service.py:126
Method
test_clean_env_key
(self)
tests/test_config.py:41
Function
test_cli_import
Test that CLI can be imported (basic smoke test).
tests/test_package_integrity.py:123
Function
test_client_create_payloads_validate_against_server_schemas
( client_payload, server_schema )
carbonserver/tests/api/test_schema_compatibility.py:117
Function
test_client_create_schemas_match_server_fields
(client_schema, server_schema)
carbonserver/tests/api/test_schema_compatibility.py:34
Method
test_cloud_detection
on_cloud='Y' -> infraType='publicCloud' with cloud_provider.
tests/test_boamps_output.py:410
Method
test_cloud_detection_from_provider_when_on_cloud_is_N
cloud_provider is used as secondary signal when on_cloud='N'.
tests/test_boamps_output.py:421
Method
test_cloud_metadata_AWS
(self, mock_get_env_cloud_details)
tests/test_geography.py:23
Method
test_cloud_metadata_AZURE
(self, mock_get_env_cloud_details)
tests/test_geography.py:38
Method
test_cloud_metadata_GCP
(self, mock_get_env_cloud_details)
tests/test_geography.py:53
← previous
next →
1,201–1,300 of 1,889, ranked by callers