Clinical-Genomics / housekeeper

File data orchestrator
MIT License
2 stars 0 forks source link

Refactor file sql filters #96

Closed seallard closed 1 year ago

seallard commented 1 year ago

Description

Refactored file queries and the delete cli command.

Changes

Breaking changes (renaming and splitting functions).

Added

The following functions were added:

- get_bundle_by_id(bundle_id: int) -> Bundle
- get_bundle_by_name(bundle_name: str) -> Bundle
- get_version_by_id(version_id: int) -> Version
- get_version_by_date_and_bundle_name(version_date: datetime, bundle_name: str) -> Version
- get_file_by_id(file_id: int) -> File
- get_files(bundle_name: str = None, tag_names: List[str] = None, version_id: int = None, file_path: str) -> Query
- get_files_not_on_disk(files: List[File]) -> List[File]
- get_files_before(bundle_name: str = None, tag_names: List[str] = None, before_date: dt.datetime = None) -> List[File]

Changed

The following functions were removed:

- version(bundle: str = None, date: dt.datetime = None, version_id: int = None) -> Version
- bundle(name: str = None, bundle_id: int = None) -> Bundle
- file_(file_id: int) -> File
- files(*, bundle: str = None, tags: List[str] = None, version: int = None, path: str = None) -> Iterable[File]
- files_before(*, bundle: str = None, tags: List[str] = None, before: str = None) -> File
- files_ondisk(file_objs: File) -> Set[File]

Review

This version is a:

Implementation plan

diitaz93 commented 1 year ago

Also remember that the name changes of bundle and file_ functions are going to raise errors in cg when running the CRONTABS

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 11 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication