varfish-server icon indicating copy to clipboard operation
varfish-server copied to clipboard

feat: upgrade to sodar core v1 (#1973)

Open stolpeo opened this issue 1 year ago • 5 comments

Summary by CodeRabbit

  • New Features

    • Updated PostgreSQL Docker image version to enhance testing environment.
    • Added new targets in the build process for improved clarity in migrations and coverage reporting.
    • Introduced new dependencies for better functionality and compatibility.
  • Bug Fixes

    • Improved URL routing by replacing deprecated regex patterns with modern path converters for better readability and maintainability.
  • Refactor

    • Standardized base classes for permission testing across various test files to enhance consistency and maintainability.
  • Style

    • Improved code formatting and variable declarations for better clarity and maintainability in frontend components.
  • Chores

    • Enhanced database migration commands in the Docker entrypoint script for better management of variant summaries during deployment.

stolpeo avatar Oct 07 '24 12:10 stolpeo

deps-report 🔍

Commit scanned: 8c43d97 ℹ️ Python version 3.11 is used by your project but the latest version is 3.13.

Vulnerable dependencies

1 dependencies have vulnerabilities 😱
Dependency Advisory Versions impacted
sqlalchemy Sqlalchemy 2.0.0b1 avoids leaking cleartext passwords to the open for careless uses of str(engine.URL()) in logs and prints. https://github.com/sqlalchemy/sqlalchemy/pull/8563 <2.0.0b1

Outdated dependencies

32 outdated dependencies found (including 13 outdated major versions)😢
Dependency Installed version Latest version
alabaster (transitive) 0.7.16 1.0.0
aldjemy 2.6 3.2
argon2-cffi (transitive) 21.3.0 23.1.0
django 4.2.19 5.1.6
django-model-utils (transitive) 4.4.0 5.0.0
django-rest-knox (transitive) 4.2.0 5.0.2
packaging (transitive) 23.2 24.2
protobuf 3.20.3 5.29.3
setuptools (transitive) 70.0.0 75.8.2
sphinx (transitive) 7.2.6 8.3.0
sphinx-rtd-theme (transitive) 2.0.0 3.0.2
sqlalchemy 1.4.54 2.0.38
unidecode (transitive) 0.4.21 1.3.8
Dependency Installed version Latest version
aiohappyeyeballs (transitive) 2.4.6 2.4.8
botocore (transitive) 1.37.1 1.37.5
celery (transitive) 5.3.6 5.4.0
clinvar-this 0.18.3 0.18.5
crispy-bootstrap4 (transitive) 2024.1 2024.10
django-autocomplete-light (transitive) 3.11.0 3.12.1
django-crispy-forms (transitive) 2.1 2.3
django-environ (transitive) 0.11.2 0.12.0
django-iconify (transitive) 0.3 0.4.1
django-postgres-copy 2.3.7 2.7.6
django-sodar-core 1.0.5 1.1.0
docutils (transitive) 0.20.1 0.21.2
markdown (transitive) 3.5.2 3.7
mistune (transitive) 3.0.2 3.1.2
mypy-protobuf (dev) 3.3.0 3.6.0
pydantic-core (transitive) 2.27.2 2.30.0
requests-http-signature 0.2.0 0.7.1
rules (transitive) 3.3 3.5
wheel (transitive) 0.42.0 0.45.1

Logs

github-actions[bot] avatar Oct 07 '24 12:10 github-actions[bot]

@coderabbitai full review

holtgrewe avatar Oct 07 '24 13:10 holtgrewe

:white_check_mark: Actions performed

Full review triggered.

coderabbitai[bot] avatar Oct 07 '24 13:10 coderabbitai[bot]

Walkthrough

The changes in this pull request involve updates across various files, primarily focusing on modifying test classes to use a new base class for permission testing, updating URL routing definitions to utilize the path() function instead of the deprecated url() function, and enhancing GitHub Actions workflow configurations. Additionally, there are updates to the Makefile for improved clarity in migration commands, adjustments to the Pipfile for dependency versions, and modifications to executor logic in the case import process. The Dockerfile has also been updated to use newer base images for PostgreSQL and Python.

Changes

File Change Summary
.github/workflows/main.yml Updated PostgreSQL Docker image from postgres:14 to postgres:16 in Python-Test job; updated Python version from 3.10.15 to 3.11 in Python-Test and Python-Lint jobs; minor indentation adjustments.
backend/Makefile Renamed _migrate to _makemigrations; added makemigrations target; modified migrate target to run migration command directly; corrected indentation in docs target; added coverage target.
backend/Pipfile Updated package versions for django-plugins-bihealth, django-sodar-core, djangorestframework, drf-keyed-list-bihealth, django-auth-ldap; changed Python version from 3.10 to 3.11.
backend/beaconsite/tests/test_permissions.py Changed base class for TestIndexView, TestConsortiumViews, TestSiteViews from TestProjectPermissionBase to ProjectPermissionTestBase.
backend/beaconsite/tests/test_permissions_ajax.py Changed base class for TestOrganisationAjaxViews, TestBeaconQueryAjaxView from TestProjectAPIPermissionBase to ProjectAPIPermissionTestBase.
backend/beaconsite/tests/test_permissions_api.py Changed base class for TestBeaconInfoApiView, TestBeaconQueryApiView from TestProjectAPIPermissionBase to ProjectAPIPermissionTestBase.
backend/beaconsite/urls.py Replaced url() function with path() function for all URL patterns, simplifying regex patterns to use path converters.
backend/cases/tests/test_permissions.py Changed base class for TestCasesViews from TestProjectPermissionBase to ProjectPermissionTestBase.
backend/cases/tests/test_permissions_ajax.py Changed base class for multiple test classes from TestProjectAPIPermissionBase to ProjectAPIPermissionTestBase.
backend/cases/tests/test_permissions_api.py Changed base class for multiple test classes from TestProjectAPIPermissionBase to ProjectAPIPermissionTestBase.
backend/cases/urls.py Replaced url() function with path() function for all URL patterns, simplifying regex patterns to use path converters.
backend/cohorts/tests/test_permissions_ajax.py Changed base class for multiple test classes from TestProjectAPIPermissionBase to ProjectAPIPermissionTestBase.
backend/cohorts/tests/test_permissions_api.py Changed base class for multiple test classes from TestProjectAPIPermissionBase to ProjectAPIPermissionTestBase.
utils/docker/Dockerfile Updated PostgreSQL client version from postgresql-client-12 to postgresql-client-14; updated Python version from 3.10.15 to 3.11.
backend/cases_import/models/executors.py Changed keyword argument in _build_fs_options method from "app_name" to "plugin_name".
frontend/src/variants/components/FilterForm/FrequencyPane.vue Minor formatting adjustment in the template section.
frontend/src/variants/components/FilterForm/GenesRegionsPane.vue Enhanced conditional rendering logic for genomic region and gene allow list sections; minor adjustments in the template.
frontend/src/variants/components/FilterForm/QualityPane.vue Removed conditional rendering check for the <table> element, allowing it to render unconditionally.
frontend/src/variants/components/QueryPresets/SetEditor.vue Changed variable declarations from var to const for better immutability.
frontend/src/variants/components/QueryPresets/SetProperties.vue Reordered class and type attributes in checkbox input for defaultPresetSetModel.
backend/cohorts/migrations/0008_alter_cohort_user.py Modified user field in cohort model to allow blank and null values.
backend/varfish/templates/users/login.html Extended from projectroles/login.html, removing all custom content.

Poem

In the garden of code, we hop and play,
With updates and changes brightening the day.
From PostgreSQL to Vue, we dance with delight,
Each line a new story, each function takes flight.
So let’s celebrate progress, both big and small,
For every little change makes our project stand tall! 🐇✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

coderabbitai[bot] avatar Oct 07 '24 13:10 coderabbitai[bot]

@stolpeo just taking the CodeRabbit AI for a test drive here just for fun ;-)

holtgrewe avatar Oct 07 '24 13:10 holtgrewe

Codecov Report

Attention: Patch coverage is 92.54237% with 22 lines in your changes missing coverage. Please review.

Project coverage is 91%. Comparing base (5b7f4fd) to head (8c43d97). Report is 26 commits behind head on main.

Files with missing lines Patch % Lines
backend/config/settings/base.py 28% 10 Missing :warning:
backend/variants/models/maintenance.py 40% 6 Missing :warning:
...d/variants/migrations/0110_drop_variant_summary.py 82% 4 Missing :warning:
backend/config/urls.py 75% 1 Missing :warning:
...variants/migrations/0111_create_variant_summary.py 90% 1 Missing :warning:
Additional details and impacted files
@@          Coverage Diff           @@
##            main   #2010    +/-   ##
======================================
  Coverage     91%     91%            
======================================
  Files        678     684     +6     
  Lines      38537   38600    +63     
======================================
+ Hits       35140   35297   +157     
+ Misses      3397    3303    -94     
Files with missing lines Coverage Δ
backend/beaconsite/tests/test_permissions.py 100% <100%> (ø)
backend/beaconsite/tests/test_permissions_ajax.py 100% <100%> (ø)
backend/beaconsite/tests/test_permissions_api.py 100% <100%> (ø)
backend/beaconsite/tests/test_views_ajax.py 50% <100%> (ø)
backend/beaconsite/urls.py 100% <100%> (ø)
backend/cases/tests/test_permissions.py 100% <100%> (ø)
backend/cases/tests/test_permissions_ajax.py 100% <100%> (ø)
backend/cases/tests/test_permissions_api.py 100% <100%> (ø)
backend/cases/tests/test_views.py 100% <100%> (ø)
backend/cases/tests/test_views_ajax.py 100% <100%> (ø)
... and 55 more

... and 2 files with indirect coverage changes

codecov[bot] avatar Oct 16 '24 14:10 codecov[bot]