Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NDCollection 2 #238

Merged
merged 61 commits into from
Mar 27, 2020
Merged

NDCollection 2 #238

merged 61 commits into from
Mar 27, 2020

Conversation

DanRyanIrish
Copy link
Member

@DanRyanIrish DanRyanIrish commented Mar 18, 2020

Description

This PR is a continuation of #231. (I messed up the git history and it was easier to open a new PR.) As with #231, this PR introduces a new class for holding a collection of NDCubes/Sequences.

Still To Do

  • Get refactor of NDCollection.__init__ working.
  • Rename NDCollection.update to something like NDCollection.extend and implement a new NDCollection.update that takes another NDCollection in the same way the dict.update takes another dict.
  • Make NDCollection._first_key and NDCollection._cube_types properties.
  • Add NDCollection to guide in docs
  • Extend tests to NDCollection of NDCubeSequences
  • Change aligned_axes default to None
  • Changed NDCollection input to (key, value) pairs, like dict.
  • Move _sanitize_aligned_axes to ndcollection.py?

DanRyanIrish and others added 27 commits February 3, 2020 14:13
Not yet supported by __getitem__
Also fix some slicing bugs.
@pep8speaks
Copy link

pep8speaks commented Mar 18, 2020

Hello @DanRyanIrish! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 38:37: E721 do not compare types, use 'isinstance()'
Line 46:38: E721 do not compare types, use 'isinstance()'

Line 17:101: E501 line too long (102 > 100 characters)
Line 23:101: E501 line too long (102 > 100 characters)

Comment last updated at 2020-03-27 17:52:58 UTC

ndcube/ndcollection.py Outdated Show resolved Hide resolved
ndcube/ndcollection.py Outdated Show resolved Hide resolved
@DanRyanIrish
Copy link
Member Author

@Cadair, it's done! __setitem__ raises and error. copy works. And pop's docstring is deleted. update now works even more like dict.update and there are guide docs. It's done! Once approved and merged we can release 1.3! I'm done for the week!

@DanRyanIrish
Copy link
Member Author

Drop mic!

docs/ndcollection.rst Outdated Show resolved Hide resolved
ndcube/ndcollection.py Outdated Show resolved Hide resolved
ndcube/ndcollection.py Outdated Show resolved Hide resolved
ndcube/ndcollection.py Outdated Show resolved Hide resolved
ndcube/ndcollection.py Outdated Show resolved Hide resolved
ndcube/ndcollection.py Outdated Show resolved Hide resolved
ndcube/ndcollection.py Outdated Show resolved Hide resolved
Simplify checking whether kwargs exisits.

Co-Authored-By: Stuart Mumford <[email protected]>
@DanRyanIrish DanRyanIrish merged commit 07cf757 into sunpy:master Mar 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants