bob.db.base issueshttps://gitlab.idiap.ch/bob/bob.db.base/-/issues2020-11-25T16:17:38Zhttps://gitlab.idiap.ch/bob/bob.db.base/-/issues/27check_parameters_for_validity does not handle empty lists as advertised2020-11-25T16:17:38ZYannick DAYERcheck_parameters_for_validity does not handle empty lists as advertisedPassing an empty list as parameter should be handled as `None` is: return `default_parameters`.
[bob.db.base.utils l.341](https://gitlab.idiap.ch/bob/bob.db.base/-/blob/2f2b60b6eb08564dcf6abcc6194b1210b15be579/bob/db/base/utils.py#L341)Passing an empty list as parameter should be handled as `None` is: return `default_parameters`.
[bob.db.base.utils l.341](https://gitlab.idiap.ch/bob/bob.db.base/-/blob/2f2b60b6eb08564dcf6abcc6194b1210b15be579/bob/db/base/utils.py#L341)Bob 9.0.0Yannick DAYERYannick DAYERhttps://gitlab.idiap.ch/bob/bob.db.base/-/issues/21The file-based databases should not have an option of original_extension2021-06-24T12:53:33ZAmir MOHAMMADIThe file-based databases should not have an option of original_extension@andre.anjos raised this issue yesterday. Since the discussions we do offline tend to get lost and ignored, I am opening an issue for it here.@andre.anjos raised this issue yesterday. Since the discussions we do offline tend to get lost and ignored, I am opening an issue for it here.Bob 9.0.0https://gitlab.idiap.ch/bob/bob.db.base/-/issues/22Loading data from databases with minimal parameters provided2021-06-24T12:54:01ZAmir MOHAMMADILoading data from databases with minimal parameters providedAs of now it seems that we do not have a single way to load a sample in our databases.
The old db's load like this:
```python
db = Database(original_directory='/some/path')
sample = db.objects()[0]
data = sample.load(db.original_directo...As of now it seems that we do not have a single way to load a sample in our databases.
The old db's load like this:
```python
db = Database(original_directory='/some/path')
sample = db.objects()[0]
data = sample.load(db.original_directory, db.original_extension)
```
The current guide advices this:
```python
db = Database(original_directory='/some/path')
sample = db.objects()[0]
data = sample.load()
```
but this requires changes in all db interfaces because it suggests that each db sample object will carry a reference to `original_directory`.
I suggest we do like this:
```python
db = Database(original_directory='/some/path')
sample = db.objects()[0]
data = db.load(sample)
```
This is similar in how annotations are returned in high-level interfaces and hides away the fact that the database is a file-based one.
It can be easily implemented for all current databases that we have like this:
```python
class bob.db.base.Database:
def load(self, file):
return file.load(self.original_directory, self.original_extension)
```
What do you think?Bob 9.0.0