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

Improve testing - developer experience #914

Closed
4 tasks done
soapy1 opened this issue Oct 24, 2024 · 1 comment · Fixed by #926 or #928
Closed
4 tasks done

Improve testing - developer experience #914

soapy1 opened this issue Oct 24, 2024 · 1 comment · Fixed by #926 or #928

Comments

@soapy1
Copy link
Contributor

soapy1 commented Oct 24, 2024

Context

Currently the test coverage on conda-store is minimal. This makes it difficult to identify when changes might have unintended consequences (like breaking some functionality in another part of the application). For example, it would be nice if issues like #615 could be caught by automated tests.

It would be nice to:

  • have more test coverage in conda-store
  • remove tests that are not helpful (if possible)
  • have the ability to see code coverage information for each pr (eg. integration with code cov, or a github action)
  • be able to run unit tests locally (eg. the unit tests are fast)

Value and/or benefit

This will give developers more confidence that their proposed changes will not have unintended consequences in other parts of the software.

Anything else?

Currently the code coverage is:

Name                                                                                                    Stmts   Miss  Cover
---------------------------------------------------------------------------------------------------------------------------
conda_store_server/__init__.py                                                                             71     30    58%
conda_store_server/_internal/__init__.py                                                                    0      0   100%
conda_store_server/_internal/action/__init__.py                                                            14      0   100%
conda_store_server/_internal/action/add_conda_prefix_packages.py                                           30      1    97%
conda_store_server/_internal/action/add_lockfile_packages.py                                               22      1    95%
conda_store_server/_internal/action/base.py                                                                54      3    94%
conda_store_server/_internal/action/download_packages.py                                                   55      0   100%
conda_store_server/_internal/action/generate_conda_docker.py                                                5      1    80%
conda_store_server/_internal/action/generate_conda_export.py                                               10      1    90%
conda_store_server/_internal/action/generate_conda_pack.py                                                  6      0   100%
conda_store_server/_internal/action/generate_constructor_installer.py                                      64      4    94%
conda_store_server/_internal/action/generate_lockfile.py                                                   36      6    83%
conda_store_server/_internal/action/get_conda_prefix_stats.py                                               9      1    89%
conda_store_server/_internal/action/install_lockfile.py                                                    12      0   100%
conda_store_server/_internal/action/install_specification.py                                               10      0   100%
conda_store_server/_internal/action/remove_conda_prefix.py                                                  9      0   100%
conda_store_server/_internal/action/set_conda_prefix_permissions.py                                        19      4    79%
conda_store_server/_internal/action/utils.py                                                                2      0   100%
conda_store_server/_internal/alembic/env.py                                                                25      5    80%
conda_store_server/_internal/alembic/versions/0f7e23ff24ee_add_worker.py                                   10      1    90%
conda_store_server/_internal/alembic/versions/03c839888c82_add_canceled_status.py                          13      2    85%
conda_store_server/_internal/alembic/versions/5ad723de2abd_adding_container_registry_value_to_enum.py      16      3    81%
conda_store_server/_internal/alembic/versions/8d63a091aff8_add_environment_description.py                  12      2    83%
conda_store_server/_internal/alembic/versions/16f65805dc8f_split_conda_package_into_conda_package_.py      70     26    63%
conda_store_server/_internal/alembic/versions/30b37e725c32_add_build_key_version.py                        10      1    90%
conda_store_server/_internal/alembic/versions/48be4072fe58_initial_schema.py                               44     11    75%
conda_store_server/_internal/alembic/versions/57cd11b949d5_add_installer.py                                15      4    73%
conda_store_server/_internal/alembic/versions/771180018e1b_add_v2_role_mappings.py                         10      1    90%
conda_store_server/_internal/alembic/versions/abd7248d5327_adding_a_settings_table.py                      12      1    92%
conda_store_server/_internal/alembic/versions/b387747ca9b7_role_mapping.py                                 12      2    83%
conda_store_server/_internal/alembic/versions/bf065abf375b_lockfile_spec.py                                10      1    90%
conda_store_server/_internal/alembic/versions/d78e9889566a_add_status_info.py                              10      1    90%
conda_store_server/_internal/alembic/versions/e17b4cc6e086_add_build_hash.py                               10      1    90%
conda_store_server/_internal/build.py                                                                     175     60    66%
conda_store_server/_internal/client.py                                                                      7      7     0%
conda_store_server/_internal/conda_utils.py                                                                78     45    42%
conda_store_server/_internal/dbutil.py                                                                     31      1    97%
conda_store_server/_internal/environment.py                                                                87     19    78%
conda_store_server/_internal/orm.py                                                                       361    107    70%
conda_store_server/_internal/schema.py                                                                    367     29    92%
conda_store_server/_internal/server/__init__.py                                                             0      0   100%
conda_store_server/_internal/server/__main__.py                                                             4      4     0%
conda_store_server/_internal/server/app.py                                                                160     42    74%
conda_store_server/_internal/server/views/__init__.py                                                       5      0   100%
conda_store_server/_internal/server/views/api.py                                                          454    159    65%
conda_store_server/_internal/server/views/conda_store_ui.py                                                 7      0   100%
conda_store_server/_internal/server/views/metrics.py                                                       23      0   100%
conda_store_server/_internal/server/views/registry.py                                                      92     65    29%
conda_store_server/_internal/server/views/ui.py                                                           101     70    31%
conda_store_server/_internal/testing.py                                                                    39      0   100%
conda_store_server/_internal/utils.py                                                                     104     20    81%
conda_store_server/_internal/worker/__init__.py                                                             0      0   100%
conda_store_server/_internal/worker/__main__.py                                                             4      4     0%
conda_store_server/_internal/worker/app.py                                                                 34     12    65%
conda_store_server/_internal/worker/tasks.py                                                              192    101    47%
conda_store_server/_version.py                                                                             11     11     0%
conda_store_server/api.py                                                                                 333     79    76%
conda_store_server/app.py                                                                                 293     64    78%
conda_store_server/registry.py                                                                             85     63    26%
conda_store_server/server/__init__.py                                                                       0      0   100%
conda_store_server/server/auth.py                                                                         334     73    78%
conda_store_server/server/dependencies.py                                                                  11      0   100%
conda_store_server/storage.py                                                                             106     36    66%
---------------------------------------------------------------------------------------------------------------------------
TOTAL                                                                                                    4205   1185    72%
@soapy1 soapy1 self-assigned this Oct 24, 2024
@soapy1 soapy1 mentioned this issue Oct 25, 2024
3 tasks
@peytondmurray peytondmurray moved this from New 🚦 to In Progress 🏗 in conda-store 🐍 Oct 25, 2024
@soapy1 soapy1 changed the title Increase test coverage Improve testing developer experience Oct 25, 2024
@soapy1 soapy1 changed the title Improve testing developer experience Improve testing - developer experience Oct 26, 2024
@github-project-automation github-project-automation bot moved this from In Progress 🏗 to Done 💪🏾 in conda-store 🐍 Oct 28, 2024
@soapy1
Copy link
Contributor Author

soapy1 commented Oct 28, 2024

With the pr's:

we achieve most of the goals of this issue. Code coverage is at 75%

TOTAL                                         4168   1062    75%

I think there is still lots of room for improvements with the tests, but I think this is a good start. Will write new issues for other improvements that can be made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
1 participant