Coverage report: 95%

Files Functions Classes

coverage.py v7.17.0, created at 2026-10-30 18:01 +0000

      Statements   Branches   Total
File function   coverage statements missing excluded   coverage branches partial   coverage
src/crimepy/__init__.py (no function)   100% 6 0 0   100% 0 0   100%
src/crimepy/analyze.py count   100% 1 0 0   100% 0 0   100%
src/crimepy/analyze.py trend   100% 1 0 0   100% 0 0   100%
src/crimepy/analyze.py rates   100% 1 0 0   100% 0 0   100%
src/crimepy/analyze.py crime_rates   100% 1 0 0   100% 0 0   100%
src/crimepy/analyze.py clearance_rates   100% 1 0 0   100% 0 0   100%
src/crimepy/analyze.py percent_change   100% 3 0 0   100% 2 0   100%
src/crimepy/analyze.py crosstab   100% 1 0 0   100% 0 0   100%
src/crimepy/analyze.py coverage   100% 1 0 0   100% 0 0   100%
src/crimepy/analyze.py _describe   100% 2 0 0   100% 0 0   100%
src/crimepy/analyze.py (no function)   100% 17 0 0   100% 0 0   100%
src/crimepy/cli.py main   100% 6 0 0   100% 2 0   100%
src/crimepy/cli.py _parser   100% 30 0 0   100% 0 0   100%
src/crimepy/cli.py _add_folder   100% 1 0 0   100% 0 0   100%
src/crimepy/cli.py _add_years   100% 1 0 0   100% 0 0   100%
src/crimepy/cli.py _convert   100% 5 0 0   100% 2 0   100%
src/crimepy/cli.py _download   0% 3 3 0   0% 2 0   0%
src/crimepy/cli.py _export   100% 14 0 0   100% 6 0   100%
src/crimepy/cli.py _project   0% 6 6 0   0% 2 0   0%
src/crimepy/cli.py _years   0% 3 3 0   100% 0 0   0%
src/crimepy/cli.py (no function)   100% 17 0 0   100% 0 0   100%
src/crimepy/combine.py stack   95% 21 1 0   92% 12 1   94%
src/crimepy/combine.py merge   100% 15 0 0   100% 6 0   100%
src/crimepy/combine.py _dataset   100% 6 0 0   100% 2 0   100%
src/crimepy/combine.py (no function)   100% 12 0 0   100% 0 0   100%
src/crimepy/nibrs/__init__.py (no function)   100% 7 0 0   100% 0 0   100%
src/crimepy/nibrs/cde.py available_years   100% 2 0 0   100% 0 0   100%
src/crimepy/nibrs/cde.py master_path   100% 2 0 0   100% 0 0   100%
src/crimepy/nibrs/cde.py download   94% 18 1 0   88% 8 1   92%
src/crimepy/nibrs/cde.py download_documentation   100% 4 0 0   50% 2 1   83%
src/crimepy/nibrs/cde.py _fetch   100% 21 0 0   83% 6 1   96%
src/crimepy/nibrs/cde.py _resume   89% 19 2 0   90% 10 1   90%
src/crimepy/nibrs/cde.py _show   80% 5 1 0   50% 2 1   71%
src/crimepy/nibrs/cde.py _signed_url   71% 7 2 0   50% 2 1   67%
src/crimepy/nibrs/cde.py _year_range   75% 8 2 0   50% 4 2   67%
src/crimepy/nibrs/cde.py (no function)   100% 30 0 0   100% 0 0   100%
src/crimepy/nibrs/codes.py (no function)   100% 47 0 0   100% 0 0   100%
src/crimepy/nibrs/layouts.py Field.__post_init__   100% 6 0 0   100% 4 0   100%
src/crimepy/nibrs/layouts.py Field.width   100% 1 0 0   100% 0 0   100%
src/crimepy/nibrs/layouts.py Layout.names   100% 1 0 0   100% 0 0   100%
src/crimepy/nibrs/layouts.py Layout.width   100% 1 0 0   100% 0 0   100%
src/crimepy/nibrs/layouts.py Layout.__iter__   100% 1 0 0   100% 0 0   100%
src/crimepy/nibrs/layouts.py _field   100% 1 0 0   100% 0 0   100%
src/crimepy/nibrs/layouts.py _repeated   100% 1 0 0   100% 0 0   100%
src/crimepy/nibrs/layouts.py _arrestee   100% 7 0 0   100% 2 0   100%
src/crimepy/nibrs/layouts.py _county   100% 1 0 0   100% 0 0   100%
src/crimepy/nibrs/layouts.py _activity   100% 6 0 0   100% 2 0   100%
src/crimepy/nibrs/layouts.py _tail   100% 1 0 0   100% 0 0   100%
src/crimepy/nibrs/layouts.py (no function)   100% 63 0 0   100% 6 0   100%
src/crimepy/nibrs/munge.py to_pandas   100% 8 0 0   100% 4 0   100%
src/crimepy/nibrs/munge.py prepare   100% 8 0 0   75% 4 1   92%
src/crimepy/nibrs/munge.py add_ages   86% 7 1 0   75% 4 1   82%
src/crimepy/nibrs/munge.py add_offense_details   100% 9 0 0   100% 6 0   100%
src/crimepy/nibrs/munge.py decode   80% 10 2 0   83% 6 1   81%
src/crimepy/nibrs/munge.py _add_agency_totals   100% 9 0 0   50% 4 2   85%
src/crimepy/nibrs/munge.py _after   100% 1 0 0   100% 0 0   100%
src/crimepy/nibrs/munge.py _age_years   60% 5 2 0   50% 4 2   56%
src/crimepy/nibrs/munge.py _lookup   80% 5 1 0   50% 2 1   71%
src/crimepy/nibrs/munge.py _relabel   73% 11 3 0   50% 4 2   67%
src/crimepy/nibrs/munge.py (no function)   100% 27 0 0   100% 0 0   100%
src/crimepy/nibrs/reader.py _Deflate64.__init__   100% 10 0 0   100% 0 0   100%
src/crimepy/nibrs/reader.py _Deflate64.readable   100% 1 0 0   100% 0 0   100%
src/crimepy/nibrs/reader.py _Deflate64.readinto   90% 10 1 0   75% 4 1   86%
src/crimepy/nibrs/reader.py _Deflate64.close   100% 2 0 0   100% 0 0   100%
src/crimepy/nibrs/reader.py open_master   90% 20 2 0   88% 8 1   89%
src/crimepy/nibrs/reader.py records   100% 5 0 0   75% 4 1   89%
src/crimepy/nibrs/reader.py year_of   82% 17 3 0   80% 10 2   81%
src/crimepy/nibrs/reader.py parse   100% 17 0 0   90% 10 1   96%
src/crimepy/nibrs/reader.py schema   78% 9 2 0   75% 4 1   77%
src/crimepy/nibrs/reader.py tables   100% 39 0 0   94% 18 1   98%
src/crimepy/nibrs/reader.py read   100% 11 0 0   100% 6 0   100%
src/crimepy/nibrs/reader.py _agencies   93% 14 1 0   83% 6 1   90%
src/crimepy/nibrs/reader.py _constant   86% 7 1 0   75% 4 1   82%
src/crimepy/nibrs/reader.py _convert   100% 5 0 0   100% 0 0   100%
src/crimepy/nibrs/reader.py _parse_batch   90% 10 1 0   75% 4 1   86%
src/crimepy/nibrs/reader.py _state_codes   92% 12 1 0   83% 6 1   89%
src/crimepy/nibrs/reader.py _wanted   100% 6 0 0   100% 2 0   100%
src/crimepy/nibrs/reader.py _to_bool   100% 2 0 0   100% 0 0   100%
src/crimepy/nibrs/reader.py _to_date   71% 7 2 0   100% 2 0   78%
src/crimepy/nibrs/reader.py _to_int   100% 2 0 0   100% 0 0   100%
src/crimepy/nibrs/reader.py _to_quantity   83% 6 1 0   75% 4 1   80%
src/crimepy/nibrs/reader.py _to_text   100% 2 0 0   100% 0 0   100%
src/crimepy/nibrs/reader.py _to_yes   100% 1 0 0   100% 0 0   100%
src/crimepy/nibrs/reader.py (no function)   100% 58 0 0   100% 0 0   100%
src/crimepy/nibrs/store.py table_path   100% 2 0 0   100% 0 0   100%
src/crimepy/nibrs/store.py convert   92% 12 1 0   83% 6 1   89%
src/crimepy/nibrs/store.py load   100% 2 0 0   100% 0 0   100%
src/crimepy/nibrs/store.py load_frame   91% 23 2 0   92% 12 1   91%
src/crimepy/nibrs/store.py load_tables   100% 1 0 0   100% 0 0   100%
src/crimepy/nibrs/store.py _write   100% 20 0 0   93% 14 1   97%
src/crimepy/nibrs/store.py _write.show   100% 1 0 0   100% 0 0   100%
src/crimepy/nibrs/store.py (no function)   100% 21 0 0   100% 0 0   100%
src/crimepy/nibrs/tables.py _dataset_builder   100% 3 0 0   100% 0 0   100%
src/crimepy/nibrs/tables.py _dataset_builder.build_dataset   100% 2 0 0   100% 0 0   100%
src/crimepy/nibrs/tables.py incidents   100% 28 0 0   67% 12 4   90%
src/crimepy/nibrs/tables.py victims   100% 11 0 0   50% 2 1   92%
src/crimepy/nibrs/tables.py offenses   100% 1 0 0   100% 0 0   100%
src/crimepy/nibrs/tables.py offenders   100% 1 0 0   100% 0 0   100%
src/crimepy/nibrs/tables.py arrestees   100% 3 0 0   100% 0 0   100%
src/crimepy/nibrs/tables.py build   100% 5 0 0   100% 2 0   100%
src/crimepy/nibrs/tables.py _join_agencies   89% 9 1 0   50% 2 1   82%
src/crimepy/nibrs/tables.py _join_counts   100% 4 0 0   100% 0 0   100%
src/crimepy/nibrs/tables.py _join_offense_summary   100% 19 0 0   90% 10 1   97%
src/crimepy/nibrs/tables.py _require   100% 4 0 0   100% 2 0   100%
src/crimepy/nibrs/tables.py _snake   100% 2 0 0   100% 0 0   100%
src/crimepy/nibrs/tables.py _with_incident   100% 7 0 0   50% 2 1   89%
src/crimepy/nibrs/tables.py (no function)   100% 39 0 0   100% 0 0   100%
src/crimepy/nibrs/techniques.py LoadNibrs.load   89% 9 1 0   75% 4 1   85%
src/crimepy/nibrs/techniques.py LoadNibrs.apply   100% 12 0 0   50% 2 1   93%
src/crimepy/nibrs/techniques.py DecodeNibrs.munge   100% 2 0 0   100% 0 0   100%
src/crimepy/nibrs/techniques.py (no function)   100% 18 0 0   100% 0 0   100%
src/crimepy/options.py (no function)   100% 8 0 0   100% 0 0   100%
src/crimepy/plot.py TrendPlot.draw   100% 9 0 0   75% 4 1   92%
src/crimepy/plot.py TopValues.draw   100% 7 0 0   100% 0 0   100%
src/crimepy/plot.py TimeHeatmap.draw   100% 11 0 0   100% 0 0   100%
src/crimepy/plot.py AgePyramid.draw   100% 13 0 0   100% 2 0   100%
src/crimepy/plot.py trend   100% 1 0 0   100% 0 0   100%
src/crimepy/plot.py top_values   100% 1 0 0   100% 0 0   100%
src/crimepy/plot.py time_heatmap   100% 1 0 0   100% 0 0   100%
src/crimepy/plot.py age_pyramid   100% 1 0 0   100% 0 0   100%
src/crimepy/plot.py _draw   100% 2 0 0   100% 0 0   100%
src/crimepy/plot.py _readable   100% 1 0 0   100% 0 0   100%
src/crimepy/plot.py (no function)   100% 35 0 0   100% 0 0   100%
src/crimepy/techniques.py CountCrimes.shape   100% 15 0 0   100% 6 0   100%
src/crimepy/techniques.py CountCrimes.apply   100% 3 0 0   100% 2 0   100%
src/crimepy/techniques.py CrimeTrend.describe   100% 9 0 0   100% 4 0   100%
src/crimepy/techniques.py PopulationRates.describe   100% 11 0 0   100% 2 0   100%
src/crimepy/techniques.py CrimeRates.describe   100% 17 0 0   100% 2 0   100%
src/crimepy/techniques.py ClearanceRates.describe   100% 10 0 0   100% 2 0   100%
src/crimepy/techniques.py PercentChange.describe   100% 4 0 0   100% 2 0   100%
src/crimepy/techniques.py Crosstab.describe   57% 7 3 0   50% 4 2   55%
src/crimepy/techniques.py Coverage.describe   100% 12 0 0   50% 2 1   93%
src/crimepy/techniques.py _agencies_of   100% 4 0 0   100% 0 0   100%
src/crimepy/techniques.py (no function)   100% 43 0 0   100% 0 0   100%
src/crimepy/utilities.py data_folder   100% 6 0 0   100% 2 0   100%
src/crimepy/utilities.py to_bool   100% 9 0 0   100% 6 0   100%
src/crimepy/utilities.py to_dataset   100% 1 0 0   100% 0 0   100%
src/crimepy/utilities.py to_frame   100% 1 0 0   100% 0 0   100%
src/crimepy/utilities.py to_list   100% 5 0 0   100% 4 0   100%
src/crimepy/utilities.py to_names   100% 4 0 0   100% 2 0   100%
src/crimepy/utilities.py to_years   88% 17 2 0   86% 14 2   87%
src/crimepy/utilities.py _to_year   100% 7 0 0   100% 4 0   100%
src/crimepy/utilities.py (no function)   100% 21 0 0   100% 0 0   100%
tests/conftest.py _record   100% 5 0 0   100% 2 0   100%
tests/conftest.py write_deflate64_zip   100% 8 0 0   100% 0 0   100%
tests/conftest.py workspace   100% 3 0 0   100% 0 0   100%
tests/conftest.py data_folder   100% 6 0 0   100% 0 0   100%
tests/conftest.py master_2004   100% 1 0 0   100% 0 0   100%
tests/conftest.py master_2025   100% 1 0 0   100% 0 0   100%
tests/conftest.py _pad   100% 2 0 0   100% 0 0   100%
tests/conftest.py (no function)   100% 25 0 0   100% 0 0   100%
tests/test_analysis.py incidents   100% 1 0 0   100% 0 0   100%
tests/test_analysis.py agencies   100% 1 0 0   100% 0 0   100%
tests/test_analysis.py test_count   100% 13 0 0   100% 0 0   100%
tests/test_analysis.py test_trend   100% 6 0 0   100% 0 0   100%
tests/test_analysis.py test_rates_and_percent_change   100% 8 0 0   100% 0 0   100%
tests/test_analysis.py test_crime_rates   100% 5 0 0   100% 0 0   100%
tests/test_analysis.py test_clearance_rates   100% 4 0 0   100% 0 0   100%
tests/test_analysis.py test_crosstab_and_coverage   100% 5 0 0   100% 0 0   100%
tests/test_analysis.py test_analyses_accept_datasets   100% 5 0 0   100% 0 0   100%
tests/test_analysis.py test_coverage_and_percent_change_of_datasets   100% 8 0 0   100% 0 0   100%
tests/test_analysis.py test_crime_rates_load_agencies   100% 4 0 0   100% 0 0   100%
tests/test_analysis.py test_stack_keeps_categories   100% 11 0 0   100% 0 0   100%
tests/test_analysis.py test_merge_keeps_categories   100% 5 0 0   100% 0 0   100%
tests/test_analysis.py test_combining_keeps_label_and_groups   100% 8 0 0   100% 0 0   100%
tests/test_analysis.py test_plots_return_figures   100% 6 0 0   100% 0 0   100%
tests/test_analysis.py test_techniques_are_in_the_amos_library   100% 3 0 0   100% 2 0   100%
tests/test_analysis.py test_count_crimes_and_describers   100% 7 0 0   100% 0 0   100%
tests/test_analysis.py test_load_nibrs_in_a_project   100% 4 0 0   100% 0 0   100%
tests/test_analysis.py test_load_nibrs_needs_years   100% 2 0 0   100% 0 0   100%
tests/test_analysis.py test_decode_nibrs   100% 3 0 0   100% 0 0   100%
tests/test_analysis.py test_utilities   100% 10 0 0   100% 0 0   100%
tests/test_analysis.py test_cli_exports_tables   100% 12 0 0   100% 0 0   100%
tests/test_analysis.py (no function)   100% 35 0 0   100% 0 0   100%
tests/test_main.py test_crimepy   100% 6 0 0   100% 4 0   100%
tests/test_main.py (no function)   100% 4 0 2   100% 0 0   100%
tests/test_nibrs_reader.py _read   100% 3 0 0   100% 0 0   100%
tests/test_nibrs_reader.py test_layouts_have_no_overlapping_fields   100% 4 0 0   100% 4 0   100%
tests/test_nibrs_reader.py test_layouts_have_unique_names_and_known_codebooks   100% 5 0 0   100% 6 0   100%
tests/test_nibrs_reader.py test_layout_widths_match_the_documentation   100% 8 0 0   100% 0 0   100%
tests/test_nibrs_reader.py test_field_rejects_bad_kinds   100% 4 0 0   100% 0 0   100%
tests/test_nibrs_reader.py test_year_of_finds_years_in_names   100% 4 0 0   100% 0 0   100%
tests/test_nibrs_reader.py test_records_reads_both_compressions   100% 6 0 0   100% 0 0   100%
tests/test_nibrs_reader.py test_open_master_reads_plain_text   100% 5 0 0   100% 0 0   100%
tests/test_nibrs_reader.py test_parse_converts_each_kind   100% 11 0 0   100% 0 0   100%
tests/test_nibrs_reader.py test_parse_of_no_records_has_the_layouts_columns   100% 3 0 0   100% 0 0   100%
tests/test_nibrs_reader.py test_read_makes_every_table   100% 10 0 0   100% 2 0   100%
tests/test_nibrs_reader.py test_read_decodes_fields   100% 25 0 0   100% 0 0   100%
tests/test_nibrs_reader.py test_read_joins_split_batch_headers   100% 15 0 0   100% 0 0   100%
tests/test_nibrs_reader.py test_read_of_a_recent_year   100% 13 0 0   100% 0 0   100%
tests/test_nibrs_reader.py test_read_keeps_states   100% 7 0 0   100% 0 0   100%
tests/test_nibrs_reader.py test_tables_parses_in_chunks   100% 4 0 0   100% 0 0   100%
tests/test_nibrs_reader.py test_read_stops_at_the_limit   100% 3 0 0   100% 0 0   100%
tests/test_nibrs_reader.py test_read_rejects_unknown_tables   100% 2 0 0   100% 0 0   100%
tests/test_nibrs_reader.py (no function)   100% 28 0 0   100% 0 0   100%
tests/test_nibrs_store.py test_convert_and_load   100% 12 0 0   100% 0 0   100%
tests/test_nibrs_store.py test_load_keeps_states_and_columns   100% 8 0 0   100% 0 0   100%
tests/test_nibrs_store.py test_load_converts_missing_years   100% 5 0 0   100% 0 0   100%
tests/test_nibrs_store.py test_convert_skips_converted_tables   100% 6 0 0   100% 0 0   100%
tests/test_nibrs_store.py test_load_tables   100% 3 0 0   100% 0 0   100%
tests/test_nibrs_store.py test_build_incidents   100% 18 0 0   100% 0 0   100%
tests/test_nibrs_store.py test_build_victims_joins_offenders   100% 6 0 0   100% 0 0   100%
tests/test_nibrs_store.py test_build_other_tables   100% 9 0 0   100% 2 0   100%
tests/test_nibrs_store.py test_decode_later   100% 7 0 0   100% 0 0   100%
tests/test_nibrs_store.py test_unknown_codes_are_kept   100% 3 0 0   100% 0 0   100%
tests/test_nibrs_store.py test_download_checks_years   100% 11 0 0   100% 0 0   100%
tests/test_nibrs_store.py test_download_saves_files   100% 18 0 0   100% 0 0   100%
tests/test_nibrs_store.py test_download_saves_files.Response.__init__   100% 2 0 0   100% 0 0   100%
tests/test_nibrs_store.py test_download_saves_files.Response.raise_for_status   100% 1 0 0   100% 0 0   100%
tests/test_nibrs_store.py test_download_saves_files.Response.json   100% 1 0 0   100% 0 0   100%
tests/test_nibrs_store.py test_download_saves_files.Response.iter_content   100% 1 0 0   100% 0 0   100%
tests/test_nibrs_store.py test_download_saves_files.Response.__enter__   100% 1 0 0   100% 0 0   100%
tests/test_nibrs_store.py test_download_saves_files.Response.__exit__   100% 1 0 0   100% 0 0   100%
tests/test_nibrs_store.py test_download_saves_files.get   100% 6 0 0   100% 4 0   100%
tests/test_nibrs_store.py test_download_resumes_with_new_links   100% 13 0 0   100% 0 0   100%
tests/test_nibrs_store.py test_download_resumes_with_new_links.signed_url   100% 2 0 0   100% 0 0   100%
tests/test_nibrs_store.py test_download_resumes_with_new_links.get   100% 2 0 0   100% 0 0   100%
tests/test_nibrs_store.py test_download_starts_over_if_range_is_ignored   100% 6 0 0   100% 0 0   100%
tests/test_nibrs_store.py test_download_gives_up_without_progress   100% 9 0 0   100% 0 0   100%
tests/test_nibrs_store.py test_download_gives_up_without_progress.get   100% 2 0 0   100% 0 0   100%
tests/test_nibrs_store.py _Broken.__init__   100% 4 0 0   100% 0 0   100%
tests/test_nibrs_store.py _Broken.raise_for_status   100% 1 0 0   100% 0 0   100%
tests/test_nibrs_store.py _Broken.iter_content   100% 3 0 0   100% 2 0   100%
tests/test_nibrs_store.py _Broken.__enter__   100% 1 0 0   100% 0 0   100%
tests/test_nibrs_store.py _Broken.__exit__   100% 1 0 0   100% 0 0   100%
tests/test_nibrs_store.py (no function)   100% 34 0 0   100% 0 0   100%
tests/test_utilities.py test_the_data_folder_is_in_the_workspace   100% 3 0 0   100% 0 0   100%
tests/test_utilities.py test_another_data_folder_can_be_named   100% 6 0 0   100% 0 0   100%
tests/test_utilities.py (no function)   100% 7 0 0   100% 0 0   100%
Total     97% 1965 55 2   85% 376 51   95%

No items found using the specified filter.