Closed eschombu closed 1 month ago
You can check the linting with the following commands :
black --check pynapple
isort --check pynapple --profile black
flake8 pynapple --max-complexity 10
coverage run --source=pynapple --branch -m pytest tests/
coverage report -m
Reformatted with black, hopefully all good now. Let me know if you have any further comments/requests/suggestions.
Great thanks Eric
It doesn't seem to make a ton of sense to me to require that users manually package their timestamp/series objects into a dict when creating
TsGroup
objects, since the keys are required to be unique integers. I would guess that the vast majority of the time, users would be just doing{0: ts0, 1: ts1, ...}
. Sure, this can be easily done by sayingdata = dict(enumerate(ts_list))
, but why not just allow the user to saydata = ts_list
and do the dict creation automatically?If the change described above is not desired, the second commit is probably still worth including. It ensures that the keys in
.data
and.index
are in the same order by doing this:This might not be assured if
bypass_check == True
.I added some tests for the new functionality. Again, any and all feedback/concerns/thoughts are welcome!