Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
870b965
Updated test set to 241 and latests schema changes
marcoooo Feb 1, 2024
101630b
Refreshed test with 241 datasets. and updated schema / attributes fro…
marcoooo Feb 1, 2024
8acf1c7
Updated some tests.
marcoooo Feb 1, 2024
20249e4
Merge branch 'main' into features/ftp_links-updated-testsample
marcoooo Feb 2, 2024
08ab439
fix some tests
bilalebi Feb 6, 2024
3034d2e
fix more tests
bilalebi Feb 6, 2024
69a4e28
fix more tests (nearly there..)
bilalebi Feb 6, 2024
1313731
fix more tests (nearly there....)
bilalebi Feb 6, 2024
de0831f
fix more tests (less than 24 tests to fix..)
bilalebi Feb 6, 2024
d2e56a7
Updated and fixed some more tests.
marcoooo Feb 6, 2024
fa98fee
fix more tests
bilalebi Feb 7, 2024
634fc49
Test fixes
dpopleton Feb 7, 2024
ef9aea9
Merge remote-tracking branch 'origin/features/ftp_links-updated-tests…
dpopleton Feb 7, 2024
7292d5a
Test fixes
dpopleton Feb 7, 2024
b9144a6
Fixed some tests datasets
marcoooo Feb 9, 2024
d4016be
fix grpc tests
bilalebi Feb 9, 2024
6df568f
Updated tests
marcoooo Feb 9, 2024
087b342
Merge remote-tracking branch 'origin/features/ftp_links-updated-tests…
marcoooo Feb 9, 2024
872abec
Merge remote-tracking branch 'origin/main' into features/ftp_links-up…
marcoooo Feb 9, 2024
5cda32f
Tests "Pass", in the sense that the failures for `force` param are ju…
marcoooo Feb 9, 2024
42b953a
The test passes locally but fails remotely. HAs to be fixed to pass o…
marcoooo Feb 9, 2024
c83056d
reverse the changes on test_fetch_sequences_chromosomal()
bilalebi Feb 12, 2024
33690b5
update comment
bilalebi Feb 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/ensembl/production/metadata/api/models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,5 @@
class LoadAble(object):
def __repr__(self):
class_name = self.__class__.__name__
attributes = {name: getattr(self, name) for name in dir(self) if
isinstance(getattr(self, name), (type(None), str, int, float, bool))}
attributes = {name: value for name, value in self.__dict__.items() if isinstance(value, (type(None), str, int, float, bool))}
return '<{}({})>'.format(class_name, attributes)
21 changes: 21 additions & 0 deletions src/ensembl/production/metadata/api/models/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@
import datetime
import uuid

from ensembl.production.metadata.api.exceptions import MissingMetaException
from ensembl.production.metadata.api.models.base import Base, LoadAble



class Attribute(LoadAble, Base):
__tablename__ = 'attribute'

Expand Down Expand Up @@ -56,6 +58,25 @@ class Dataset(LoadAble, Base):
# dataset_source_id to dataset source
dataset_source = relationship('DatasetSource', back_populates="datasets")

@property
def genebuild_version(self):
logger.debug(f"dataset type {self.dataset_type.name} {self.version}")
if self.dataset_type.name == 'genebuild':
# Return version

return next(
(att.value for att in self.dataset_attributes if att.attribute.name == 'genebuild.last_geneset_update'),
next((att.value for att in self.dataset_attributes if att.attribute.name == 'genebuild.start_date'), None))
else:
# return Related genebuild version
logger.debug(F"Related datasets! : {self.genome_datasets.datasets}")
genebuild_ds = next(
(dataset for dataset in self.genome_datasets.datasets if dataset.dataset_type.name == 'genebuild'), None)
if genebuild_ds:
return genebuild_ds.genebuild_version
else:
raise MissingMetaException(f"Something is very wrong with dataset {self.dataset_uuid}")


class DatasetAttribute(LoadAble, Base):
__tablename__ = 'dataset_attribute'
Expand Down

Large diffs are not rendered by default.

2,226 changes: 201 additions & 2,025 deletions src/ensembl/production/metadata/api/sample/ensembl_metadata/assembly_sequence.txt

Large diffs are not rendered by default.

Large diffs are not rendered by default.

922 changes: 890 additions & 32 deletions src/ensembl/production/metadata/api/sample/ensembl_metadata/dataset.txt

Large diffs are not rendered by default.

Loading