-
Notifications
You must be signed in to change notification settings - Fork 12
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
Attempt to Address Issue-225 and Issue-226. #227
base: main
Are you sure you want to change the base?
Conversation
|
||
|
||
class MakeCollection: | ||
|
||
def make_collection(self, **kwargs): | ||
"""Create a Collection. | ||
"""Creates a Collection or CollectionRef. | ||
|
||
Creates a new collection, adds it to the calling Collection `items` | ||
and returns the newly created object. Accepts keyword arguments to | ||
customize the resulting instance. | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should update the description to mention if you don't pass in items
then it creates a CollectionRef.
How easy is it to convert a CollectionRef to Collection? If a user doesn't pass items then tries to add it later will this cause an error? Should we have two methods, make_collection and make_collection_ref to make it more explicit?
@glenrobson, you are right. If this comes in and someone did this:
You're going to get an error since make_manifest() doesn't exist on |
What Does This Do?
This makes
MakeCollection
create a Collection when there are items or a CollectionRef when there are not. It also popsitems
on data forMakeManifest
so that we don't accidentally end up with an embedded Manifest. This is needed due to an issue withReference
andextra.allow
.