loco-philippe / environmental-sensing Goto Github PK
View Code? Open in Web Editor NEWEnvironmental data interoperability (standard and connectors)
License: MIT License
Environmental data interoperability (standard and connectors)
License: MIT License
Is your feature request related to a problem? Please describe.
Simplify Observation data
Describe the solution you'd like
id = hash(self)
Additional context
report id in Observation._info() method
Describe the bug
When modecodec='dict', Observation.from_obj converts ISO dates to datetimes correctly, but cannot convert date intervals.
To Reproduce
print(Observation.from_obj('{"type":"observation","name":"test_datation_1_valid_2","data":{"datation":{"type":"DatationValue","value":[{"record":0,"codec":["2022-02-01T00:00:00.000Z","2022-02-02T00:00:00.000Z"]}]}}}'))
returns:
name: test_datation_1_valid_2
data:
["datation", ["0001-01-01T00:00:00+00:00"]]
Expected behavior
should return
name: test_datation_1_valid_2
data:
["datation", ["2022-02-01T00:00:00.000Z", "2022-02-02T00:00:00.000Z"]]
Describe the bug
def from_csv(cls, filename='ilist.csv', var=None, header=True, nrow=None,
optcsv={'quoting': csv.QUOTE_NONNUMERIC}, dtype=ES.def_dtype):
Expected behavior
def from_csv(cls, filename='ilist.csv', var=None, header=True, nrow=None, dtype=ES.def_dtype, **kwargs):
Describe the bug
Equality test is not based on hash value
Expected behavior
New hash method and new equal method
Is your feature request related to a problem? Please describe.
PEP8
Is your feature request related to a problem? Please describe.
simplify update of Iindex hash value
Describe the solution you'd like
internal attributes : _keys and _codec
getters (@Property) and setters (set_keys, set_codec)
Describe the bug
bounding box too long
Expected behavior
direct calculation.
Describe the bug
applyfilter method inherited from Ilist does not properly work when used on an Observation with a list of True
To Reproduce
obs=Observation([['datation', ['2022-09-01T00:00:00+00:00','2022-09-02T00:00:00+00:00']], ['location', [[2.1, 45.1],[2.2, 45.2]]]]) obs.setfilter([True, True])
obs.applyfilter()
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\dimit\Documents\Environmental-Sensing\python\observation\ilist.py", line 717, in applyfilter
minind = min(il.lindex[ifilt].recordfromvalue(reverse))
File "C:\Users\dimit\Documents\Environmental-Sensing\python\observation\iindex.py", line 662, in recordfromvalue
if not value in self.codec: raise IndexError('value not present')
IndexError: value not present
Expected behavior
No error should be raised.
Is your feature request related to a problem? Please describe.
Mauvaises performances liées aux données d'analyse non persistante
Describe the solution you'd like
Module analysis (nouvelle classe)
Describe the bug
Not available for all information and indexes. Not useful for MongoDB requests.
Expected behavior
Apply the proposal defined in 'Fonction extraction'
Is your feature request related to a problem? Please describe.
Simplify MongoDB request
Describe the solution you'd like
new option in to_obj(json) method
Is your feature request related to a problem? Please describe.
Difficult to filter Observation in MongoDB
Describe the solution you'd like
Define a dict json format in witch MongoDB request can filter records
Describe alternatives you've considered
Actual json format
Describe the bug
json_info parameter in Ilist.json does not work on Observation with precisely one element.
To Reproduce
obs = Observation([['datation', ["2022-09-01T00:00:00+00:00"]]])
obs_json=obs.json(json_info=True)
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\dimit\Documents\Environmental-Sensing\python\observation\ilist.py", line 993, in json
return self.to_obj(**kwargs)
File "C:\Users\dimit\Documents\Environmental-Sensing\python\observation\esobservation.py", line 459, in to_obj
dic |= self._info(**option)
File "C:\Users\dimit\Documents\Environmental-Sensing\python\observation\esobservation.py", line 504, in _info
dcinf |= self._infoOther()
File "C:\Users\dimit\Documents\Environmental-Sensing\python\observation\esobservation.py", line 530, in _infoOther
dcinf[ES.obs_complet] = self.complete
File "C:\Users\dimit\Documents\Environmental-Sensing\python\observation\ilist.py", line 490, in complete
return self.lencomplete == len(self) and self.consistent
File "C:\Users\dimit\Documents\Environmental-Sensing\python\observation\ilist.py", line 495, in consistent
return max(Counter(zip(*self.iidx)).values()) == 1
ValueError: max() arg is an empty sequence
Describe the bug
see example
To Reproduce
i2 = Ilist.Iext([[0,0,0,0],['a','b','c','d'],[1,2,3]])
print(i2)
["i0", [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]
["i1", ["a", "a", "a", "b", "b", "b", "c", "c", "c", "d", "d", "d", "a", "a", "a", "b", "b", "b", "c", "c", "c", "d", "d", "d", "a", "a", "a", "b", "b", "b", "c", "c", "c", "d", "d", "d", "a", "a", "a", "b", "b", "b", "c", "c", "c", "d", "d", "d"]]
["i2", [1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3]]
Expected behavior
Error message
Describe the bug
two Iindex can have the same name
Expected behavior
Check the unicity of an Iindex name in the init method
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.