Coverage report: 95%

Files Functions Classes

coverage.py v7.6.12, created at 2025-04-18 11:10 +0000

File function statements missing excluded coverage
heritrace/__init__.py create_app 14 0 0 100%
heritrace/__init__.py (no function) 7 0 0 100%
heritrace/apis/orcid.py is_orcid_url 5 0 0 100%
heritrace/apis/orcid.py extract_orcid_id 8 0 0 100%
heritrace/apis/orcid.py get_orcid_data 19 0 0 100%
heritrace/apis/orcid.py format_orcid_attribution 11 0 0 100%
heritrace/apis/orcid.py (no function) 8 0 0 100%
heritrace/apis/zenodo.py is_zenodo_url 12 0 0 100%
heritrace/apis/zenodo.py extract_zenodo_id 17 0 0 100%
heritrace/apis/zenodo.py make_request_with_retry 19 0 0 100%
heritrace/apis/zenodo.py get_zenodo_data 9 0 0 100%
heritrace/apis/zenodo.py format_apa_date 13 0 0 100%
heritrace/apis/zenodo.py format_authors_apa 13 0 0 100%
heritrace/apis/zenodo.py format_zenodo_source 55 0 0 100%
heritrace/apis/zenodo.py (no function) 16 0 0 100%
heritrace/cli.py register_cli_commands 8 0 0 100%
heritrace/cli.py register_cli_commands.translate 1 0 0 100%
heritrace/cli.py register_cli_commands.update 5 0 0 100%
heritrace/cli.py register_cli_commands.compile 2 0 0 100%
heritrace/cli.py register_cli_commands.init 5 0 0 100%
heritrace/cli.py (no function) 5 0 0 100%
heritrace/editor.py Editor.__init__ 8 0 0 100%
heritrace/editor.py Editor._normalize_params 10 0 0 100%
heritrace/editor.py Editor.create 4 0 0 100%
heritrace/editor.py Editor.update 10 0 0 100%
heritrace/editor.py Editor.delete 41 0 0 100%
heritrace/editor.py Editor.import_entity 1 0 0 100%
heritrace/editor.py Editor.merge 44 0 0 100%
heritrace/editor.py Editor.preexisting_finished 1 0 0 100%
heritrace/editor.py Editor.save 6 0 0 100%
heritrace/editor.py Editor.to_posix_timestamp 7 0 0 100%
heritrace/editor.py (no function) 25 0 0 100%
heritrace/errors/handlers.py page_not_found 1 0 0 100%
heritrace/errors/handlers.py (no function) 4 0 0 100%
heritrace/extensions.py init_extensions 9 0 0 100%
heritrace/extensions.py init_login_manager 7 0 0 100%
heritrace/extensions.py init_login_manager.load_user 2 0 0 100%
heritrace/extensions.py init_login_manager.rotate_session_token 1 0 0 100%
heritrace/extensions.py initialize_change_tracking_config 41 0 0 100%
heritrace/extensions.py need_initialization 14 0 0 100%
heritrace/extensions.py update_cache 4 0 0 100%
heritrace/extensions.py initialize_counter_handler 14 1 0 93%
heritrace/extensions.py initialize_global_variables 29 0 0 100%
heritrace/extensions.py init_sparql_services 9 0 0 100%
heritrace/extensions.py init_filters 14 0 0 100%
heritrace/extensions.py init_request_handlers 4 0 0 100%
heritrace/extensions.py init_request_handlers.initialize_lock_manager 2 0 0 100%
heritrace/extensions.py init_request_handlers.close_redis_connection 2 0 0 100%
heritrace/extensions.py adjust_endpoint_url 11 0 0 100%
heritrace/extensions.py running_in_docker 1 0 0 100%
heritrace/extensions.py get_dataset_endpoint 1 0 0 100%
heritrace/extensions.py get_sparql 1 0 0 100%
heritrace/extensions.py get_provenance_endpoint 1 0 0 100%
heritrace/extensions.py get_provenance_sparql 1 0 0 100%
heritrace/extensions.py get_counter_handler 5 0 0 100%
heritrace/extensions.py get_custom_filter 1 0 0 100%
heritrace/extensions.py get_change_tracking_config 1 0 0 100%
heritrace/extensions.py get_display_rules 1 0 0 100%
heritrace/extensions.py get_form_fields 1 0 0 100%
heritrace/extensions.py get_dataset_is_quadstore 1 0 0 100%
heritrace/extensions.py get_shacl_graph 1 0 0 100%
heritrace/extensions.py (no function) 54 0 0 100%
heritrace/forms.py (no function) 15 0 0 100%
heritrace/meta_counter_handler.py MetaCounterHandler.__init__ 5 0 0 100%
heritrace/meta_counter_handler.py MetaCounterHandler._process_entity_name 4 0 0 100%
heritrace/meta_counter_handler.py MetaCounterHandler.set_counter 5 0 0 100%
heritrace/meta_counter_handler.py MetaCounterHandler.read_counter 6 0 0 100%
heritrace/meta_counter_handler.py MetaCounterHandler.increment_counter 4 0 0 100%
heritrace/meta_counter_handler.py MetaCounterHandler.close 2 0 0 100%
heritrace/meta_counter_handler.py (no function) 9 0 0 100%
heritrace/models.py User.__init__ 3 0 0 100%
heritrace/models.py (no function) 3 0 0 100%
heritrace/routes/__init__.py register_blueprints 12 0 0 100%
heritrace/routes/__init__.py (no function) 2 0 0 100%
heritrace/routes/api.py catalogue_api 13 0 0 100%
heritrace/routes/api.py get_deleted_entities_api 10 0 0 100%
heritrace/routes/api.py check_lock 14 0 0 100%
heritrace/routes/api.py acquire_lock 16 0 0 100%
heritrace/routes/api.py release_lock 12 0 0 100%
heritrace/routes/api.py renew_lock 12 0 0 100%
heritrace/routes/api.py validate_literal 10 0 0 100%
heritrace/routes/api.py check_orphans 38 0 0 100%
heritrace/routes/api.py check_orphans.format_entities 1 0 0 100%
heritrace/routes/api.py apply_changes 78 0 0 100%
heritrace/routes/api.py get_graph_uri_from_context 3 0 0 100%
heritrace/routes/api.py determine_datatype 5 0 0 100%
heritrace/routes/api.py create_logic 32 0 0 100%
heritrace/routes/api.py update_logic 4 0 0 100%
heritrace/routes/api.py rebuild_entity_order 8 0 0 100%
heritrace/routes/api.py delete_logic 7 0 0 100%
heritrace/routes/api.py order_logic 28 0 0 100%
heritrace/routes/api.py get_human_readable_entity 8 0 0 100%
heritrace/routes/api.py (no function) 53 0 0 100%
heritrace/routes/auth.py login 7 0 0 100%
heritrace/routes/auth.py callback 20 0 0 100%
heritrace/routes/auth.py logout 5 0 0 100%
heritrace/routes/auth.py (no function) 14 0 0 100%
heritrace/routes/entity.py about 58 1 0 98%
heritrace/routes/entity.py create_entity 91 3 0 97%
heritrace/routes/entity.py create_nested_entity 25 5 0 80%
heritrace/routes/entity.py determine_datatype 5 0 0 100%
heritrace/routes/entity.py validate_entity_data 76 8 0 89%
heritrace/routes/entity.py entity_history 38 6 0 84%
heritrace/routes/entity.py _format_snapshot_description 26 18 0 31%
heritrace/routes/entity.py entity_version 79 17 0 78%
heritrace/routes/entity.py restore_version 49 18 0 63%
heritrace/routes/entity.py compute_graph_differences 8 0 0 100%
heritrace/routes/entity.py get_entities_to_restore 11 0 0 100%
heritrace/routes/entity.py prepare_entity_snapshots 12 0 0 100%
heritrace/routes/entity.py find_appropriate_snapshot 12 0 0 100%
heritrace/routes/entity.py get_inverse_references 19 0 0 100%
heritrace/routes/entity.py generate_modification_text 28 0 0 100%
heritrace/routes/entity.py format_triple_modification 13 0 0 100%
heritrace/routes/entity.py get_object_label 22 0 0 100%
heritrace/routes/entity.py process_modification_data 7 0 0 100%
heritrace/routes/entity.py validate_modification 22 0 0 100%
heritrace/routes/entity.py get_predicate_count 6 0 0 100%
heritrace/routes/entity.py apply_modifications 23 0 0 100%
heritrace/routes/entity.py (no function) 54 0 0 100%
heritrace/routes/main.py index 1 0 0 100%
heritrace/routes/main.py catalogue 11 0 0 100%
heritrace/routes/main.py time_vault 13 0 0 100%
heritrace/routes/main.py sparql_proxy 16 0 0 100%
heritrace/routes/main.py endpoint 2 0 0 100%
heritrace/routes/main.py search 2 0 0 100%
heritrace/routes/main.py (no function) 25 0 0 100%
heritrace/routes/merge.py get_entity_details 29 0 0 100%
heritrace/routes/merge.py execute_merge 34 0 0 100%
heritrace/routes/merge.py compare_and_merge 16 0 0 100%
heritrace/routes/merge.py find_similar_resources 59 0 0 100%
heritrace/routes/merge.py (no function) 23 0 0 100%
heritrace/scripts/clean_missing_entities.py MissingEntityCleaner.__init__ 5 0 0 100%
heritrace/scripts/clean_missing_entities.py MissingEntityCleaner._find_missing_entities_with_references 20 0 0 100%
heritrace/scripts/clean_missing_entities.py MissingEntityCleaner._remove_references 17 0 0 100%
heritrace/scripts/clean_missing_entities.py MissingEntityCleaner.process_missing_entities 19 0 0 100%
heritrace/scripts/clean_missing_entities.py clean_missing_entities 2 0 0 100%
heritrace/scripts/clean_missing_entities.py load_config 8 0 0 100%
heritrace/scripts/clean_missing_entities.py main 25 0 0 100%
heritrace/scripts/clean_missing_entities.py (no function) 15 0 2 100%
heritrace/scripts/reset_provenance.py ProvenanceResetter.__init__ 5 0 0 100%
heritrace/scripts/reset_provenance.py ProvenanceResetter.reset_entity_provenance 20 0 0 100%
heritrace/scripts/reset_provenance.py ProvenanceResetter._get_entity_snapshots 7 0 0 100%
heritrace/scripts/reset_provenance.py ProvenanceResetter._delete_snapshots 19 0 0 100%
heritrace/scripts/reset_provenance.py ProvenanceResetter._reset_provenance_counter 4 0 0 100%
heritrace/scripts/reset_provenance.py ProvenanceResetter._remove_invalidated_time 12 0 0 100%
heritrace/scripts/reset_provenance.py reset_entity_provenance 2 0 0 100%
heritrace/scripts/reset_provenance.py load_config 8 0 0 100%
heritrace/scripts/reset_provenance.py main 25 0 0 100%
heritrace/scripts/reset_provenance.py (no function) 20 0 2 100%
heritrace/services/__init__.py (no function) 0 0 0 100%
heritrace/services/resource_lock_manager.py LockInfo.__post_init__ 2 0 0 100%
heritrace/services/resource_lock_manager.py ResourceLockManager.__init__ 4 0 0 100%
heritrace/services/resource_lock_manager.py ResourceLockManager._generate_lock_key 1 0 0 100%
heritrace/services/resource_lock_manager.py ResourceLockManager._generate_reverse_links_key 1 0 0 100%
heritrace/services/resource_lock_manager.py ResourceLockManager.get_lock_info 7 0 0 100%
heritrace/services/resource_lock_manager.py ResourceLockManager.check_lock_status 19 0 0 100%
heritrace/services/resource_lock_manager.py ResourceLockManager._decode_redis_item 3 0 0 100%
heritrace/services/resource_lock_manager.py ResourceLockManager.acquire_lock 15 0 0 100%
heritrace/services/resource_lock_manager.py ResourceLockManager._create_resource_lock 8 0 0 100%
heritrace/services/resource_lock_manager.py ResourceLockManager.release_lock 14 0 0 100%
heritrace/services/resource_lock_manager.py (no function) 31 0 0 100%
heritrace/uri_generator/__init__.py (no function) 2 0 0 100%
heritrace/uri_generator/default_uri_generator.py DefaultURIGenerator.__init__ 1 0 0 100%
heritrace/uri_generator/default_uri_generator.py DefaultURIGenerator.generate_uri 1 0 0 100%
heritrace/uri_generator/default_uri_generator.py DefaultURIGenerator.initialize_counters 1 0 0 100%
heritrace/uri_generator/default_uri_generator.py (no function) 7 0 0 100%
heritrace/uri_generator/meta_uri_generator.py MetaURIGenerator.__init__ 4 0 0 100%
heritrace/uri_generator/meta_uri_generator.py MetaURIGenerator.generate_uri 4 0 0 100%
heritrace/uri_generator/meta_uri_generator.py MetaURIGenerator.initialize_counters 36 0 0 100%
heritrace/uri_generator/meta_uri_generator.py (no function) 11 0 0 100%
heritrace/uri_generator/uri_generator.py URIGenerator.generate_uri 0 0 9 100%
heritrace/uri_generator/uri_generator.py URIGenerator.initialize_counters 0 0 7 100%
heritrace/uri_generator/uri_generator.py (no function) 1 0 10 100%
heritrace/utils/converters.py convert_to_datetime 8 0 0 100%
heritrace/utils/converters.py (no function) 3 0 0 100%
heritrace/utils/display_rules_utils.py get_class_priority 7 0 0 100%
heritrace/utils/display_rules_utils.py is_entity_type_visible 5 0 0 100%
heritrace/utils/display_rules_utils.py get_sortable_properties 32 0 0 100%
heritrace/utils/display_rules_utils.py get_highest_priority_class 8 0 0 100%
heritrace/utils/display_rules_utils.py get_grouped_triples 61 0 0 100%
heritrace/utils/display_rules_utils.py process_display_rule 15 0 0 100%
heritrace/utils/display_rules_utils.py execute_sparql_query 18 0 0 100%
heritrace/utils/display_rules_utils.py process_ordering 12 0 0 100%
heritrace/utils/display_rules_utils.py process_ordering.get_ordered_sequence 18 0 0 100%
heritrace/utils/display_rules_utils.py process_default_property 6 0 0 100%
heritrace/utils/display_rules_utils.py execute_historical_query 9 0 0 100%
heritrace/utils/display_rules_utils.py get_property_order_from_rules 10 0 0 100%
heritrace/utils/display_rules_utils.py get_similarity_properties 12 0 0 100%
heritrace/utils/display_rules_utils.py (no function) 21 0 0 100%
heritrace/utils/filters.py Filter.__init__ 5 0 0 100%
heritrace/utils/filters.py Filter.human_readable_predicate 30 0 0 100%
heritrace/utils/filters.py Filter.human_readable_entity 5 0 0 100%
heritrace/utils/filters.py Filter.get_fetch_uri_display 22 0 0 100%
heritrace/utils/filters.py Filter.human_readable_datetime 2 0 0 100%
heritrace/utils/filters.py Filter.split_ns 7 0 0 100%
heritrace/utils/filters.py Filter.human_readable_primary_source 8 0 0 100%
heritrace/utils/filters.py Filter.format_source_reference 5 0 0 100%
heritrace/utils/filters.py Filter.format_agent_reference 7 0 0 100%
heritrace/utils/filters.py (no function) 22 0 0 100%
heritrace/utils/shacl_utils.py get_form_fields_from_shacl 13 0 0 100%
heritrace/utils/shacl_utils.py extract_shacl_form_fields 6 0 0 100%
heritrace/utils/shacl_utils.py execute_shacl_query 3 0 0 100%
heritrace/utils/shacl_utils.py get_display_name_for_shape 9 0 0 100%
heritrace/utils/shacl_utils.py process_query_results 61 9 0 85%
heritrace/utils/shacl_utils.py get_shape_target_class 5 0 0 100%
heritrace/utils/shacl_utils.py get_object_class 6 0 0 100%
heritrace/utils/shacl_utils.py process_nested_shapes 17 0 0 100%
heritrace/utils/shacl_utils.py get_property_order 8 0 0 100%
heritrace/utils/shacl_utils.py order_fields 6 0 0 100%
heritrace/utils/shacl_utils.py apply_display_rules 18 0 0 100%
heritrace/utils/shacl_utils.py apply_display_rules_to_nested_shapes 21 0 0 100%
heritrace/utils/shacl_utils.py determine_input_type 5 0 0 100%
heritrace/utils/shacl_utils.py add_display_information 14 0 0 100%
heritrace/utils/shacl_utils.py handle_intermediate_relation 18 0 0 100%
heritrace/utils/shacl_utils.py handle_sub_display_rules 15 0 0 100%
heritrace/utils/shacl_utils.py extract_additional_properties 8 0 0 100%
heritrace/utils/shacl_utils.py order_form_fields 15 0 0 100%
heritrace/utils/shacl_utils.py get_valid_predicates 40 0 0 100%
heritrace/utils/shacl_utils.py validate_new_triple 97 12 0 88%
heritrace/utils/shacl_utils.py convert_to_matching_class 16 3 0 81%
heritrace/utils/shacl_utils.py convert_to_matching_literal 10 1 0 90%
heritrace/utils/shacl_utils.py get_datatype_label 15 3 0 80%
heritrace/utils/shacl_utils.py (no function) 35 0 0 100%
heritrace/utils/sparql_utils.py get_available_classes 11 0 0 100%
heritrace/utils/sparql_utils.py build_sort_clause 10 0 0 100%
heritrace/utils/sparql_utils.py get_entities_for_class 25 0 0 100%
heritrace/utils/sparql_utils.py get_catalog_data 9 0 0 100%
heritrace/utils/sparql_utils.py fetch_data_graph_for_subject 22 0 0 100%
heritrace/utils/sparql_utils.py parse_sparql_update 18 0 0 100%
heritrace/utils/sparql_utils.py parse_sparql_update.extract_quads 5 0 0 100%
heritrace/utils/sparql_utils.py fetch_current_state_with_related_entities 9 0 0 100%
heritrace/utils/sparql_utils.py get_deleted_entities_with_filtering 39 39 0 0%
heritrace/utils/sparql_utils.py process_deleted_entity 23 23 0 0%
heritrace/utils/sparql_utils.py find_orphaned_entities 21 0 0 100%
heritrace/utils/sparql_utils.py import_entity_graph 17 0 0 100%
heritrace/utils/sparql_utils.py import_entity_graph.recursive_import 12 0 0 100%
heritrace/utils/sparql_utils.py get_entity_types 6 0 0 100%
heritrace/utils/sparql_utils.py (no function) 25 0 0 100%
heritrace/utils/strategies.py (no function) 9 0 0 100%
heritrace/utils/uri_utils.py generate_unique_uri 3 0 0 100%
heritrace/utils/uri_utils.py (no function) 3 0 0 100%
heritrace/utils/virtuoso_utils.py is_virtuoso 4 0 0 100%
heritrace/utils/virtuoso_utils.py (no function) 3 0 0 100%
Total   3529 167 30 95%

No items found using the specified filter.