Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: improve coverage, fix warnings, fix bugs #160

Open
oanabotezat opened this issue Jan 19, 2024 · 2 comments
Open

Feature: improve coverage, fix warnings, fix bugs #160

oanabotezat opened this issue Jan 19, 2024 · 2 comments

Comments

@oanabotezat
Copy link
Member

oanabotezat commented Jan 19, 2024

improve coverage from 67% to 80%

running a full test with coverage:
pytest --cov oceanstream

results in a bunch of warnings (-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html) and:

---------- coverage: platform darwin, python 3.9.18-final-0 ----------
Name                                                    Stmts   Miss  Cover
---------------------------------------------------------------------------
oceanstream/__init__.py                                     0      0   100%
oceanstream/cli.py                                        108    108     0%
oceanstream/denoise/__init__.py                             2      0   100%
oceanstream/denoise/apply_masks.py                         35     26    26%
oceanstream/denoise/applying_masks_handler.py              34      3    91%
oceanstream/denoise/background_noise_remover.py            16      0   100%
oceanstream/denoise/create_masks.py                        44     31    30%
oceanstream/denoise/noise_masks.py                         46      6    87%
oceanstream/denoise/types.py                               53      0   100%
oceanstream/echodata/__init__.py                            5      0   100%
oceanstream/echodata/ensure_time_continuity.py             17      1    94%
oceanstream/echodata/processed_data_io.py                  46      9    80%
oceanstream/echodata/raw_handler.py                       179     40    78%
oceanstream/echodata/read_file.py                          48     39    19%
oceanstream/echodata/sv_computation.py                     54     16    70%
oceanstream/echodata/sv_dataset_extension.py               30      4    87%
oceanstream/echodata/sv_interpolation.py                   88      0   100%
oceanstream/echodata/target_strength_computation.py        41      6    85%
oceanstream/exports/__init__.py                             3      0   100%
oceanstream/exports/csv/__init__.py                         3      0   100%
oceanstream/exports/csv/csv_export_from_Sv.py              30      9    70%
oceanstream/exports/csv/csv_export_from_raw.py             30      9    70%
oceanstream/exports/csv/csv_export_nasc.py                 58      4    93%
oceanstream/exports/frequency_differencing_handler.py      30      0   100%
oceanstream/exports/mvbs_computation.py                    19      1    95%
oceanstream/exports/nasc.py                                15     11    27%
oceanstream/exports/nasc_computation.py                    15      1    93%
oceanstream/exports/plot.py                                27      1    96%
oceanstream/exports/shoals/__init__.py                      1      0   100%
oceanstream/exports/shoals/shoal_detection_handler.py      13      0   100%
oceanstream/exports/shoals/shoal_process.py                76      5    93%
oceanstream/exports/shoals/shoals_handler.py               28     19    32%
oceanstream/report/__init__.py                              1      0   100%
oceanstream/report/echogram.py                             30     30     0%
oceanstream/report/profiling.py                            37     32    14%
oceanstream/settings/__init__.py                            1      1     0%
oceanstream/settings/config.py                             12     12     0%
oceanstream/utils.py                                       26      0   100%
---------------------------------------------------------------------------
TOTAL                                                    1301    424    67%

=============== 83 passed, 591 warnings in 1120.57s (0:18:40) =====================================
@oanabotezat
Copy link
Member Author

oanabotezat commented Jan 19, 2024

what is actually useful from the list above (stripped ---init.py and >= 70% covered files):

Name                                                    Stmts   Miss  Cover
---------------------------------------------------------------------------
oceanstream/cli.py                                        108    108     0%
oceanstream/denoise/apply_masks.py                         35     26    26%
oceanstream/denoise/create_masks.py                        44     31    30%
oceanstream/echodata/read_file.py                          48     39    19%
oceanstream/exports/nasc.py                                15     11    27%
oceanstream/exports/shoals/shoals_handler.py               28     19    32%
oceanstream/report/echogram.py                             30     30     0%
oceanstream/report/profiling.py                            37     32    14%
oceanstream/settings/config.py                             12     12     0%

@oanabotezat
Copy link
Member Author

oanabotezat commented Jan 19, 2024

24 warnings:

  • 14 DeprecationWarning
  • 3 UserWarning
  • 2 PytestUnknownMarkWarning

most are in 3rd party libraries...

remaining: 6.

oanabotezat pushed a commit that referenced this issue Jan 19, 2024
…ms -> DataArray.sizes; fixed downloading of files over FTP only when those files are missing.
oanabotezat added a commit that referenced this issue Jan 31, 2024
…rror; fix one typo; fix FutureWarning for DataArray.dims -> DataArray.sizes; fixed downloading of files over FTP only when those files are missing; fix warning: PytestUnknownMarkWarning.
oanabotezat added a commit that referenced this issue Jan 31, 2024
…rror; fix one typo; fix FutureWarning for DataArray.dims -> DataArray.sizes; fixed downloading of files over FTP only when those files are missing; fix warning: PytestUnknownMarkWarning.
beatfactor pushed a commit that referenced this issue Jan 31, 2024
…rror; fix one typo; fix FutureWarning for DataArray.dims -> DataArray.sizes; fixed downloading of files over FTP only when those files are missing; fix warning: PytestUnknownMarkWarning. (#161)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant