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

Add collection list and manages block #40

Merged

Conversation

priyanshunayan
Copy link
Member

Addresses #39

Checklist

  • My branch is up-to-date with upstream/develop branch.
  • Everything works and tested for Python 3.5.2 and above.

Description

This PR does following things:

  • Add collection array to the entry point
  • Add default manages block to the collections

Earlier it was ambiguous to identify a collection. Implementation of collection array and manages block explicitly marks a resource collection.

Change logs

  • Default manages block
  • Add collection Array

@priyanshunayan priyanshunayan changed the title Add collection and manages block Add collection list and manages block Jul 8, 2020
@priyanshunayan priyanshunayan marked this pull request as ready for review July 9, 2020 18:03
Copy link
Member

@chrizandr chrizandr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generate a sample with the collection array as well. Write sample code for both.

@@ -347,8 +348,12 @@
},
{
"@id": "vocab:dummyClassCollection",
"@type": "hydra:Class",
"@type": "Collection",
Copy link
Member Author

@priyanshunayan priyanshunayan Jul 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chrizandr Do we want hydra:Class here or hydra:Collection or vocab:DummyClassCollection? Going by the default apidoc we are using, it seems like DummyClassCollection will be a good choice, but in the spec repo, i have seen using 'hydra:Collection' only as a type.

@chrizandr chrizandr merged commit 8b7f1b6 into HTTP-APIs:develop Jul 20, 2020
sameshl added a commit to sameshl/hydrus that referenced this pull request Aug 10, 2020
Fix tests for collections array in EntryPoint endpoint response
(HTTP-APIs/hydra-python-core#40).
Fix tests for expanded ids.
chrizandr pushed a commit to HTTP-APIs/hydrus that referenced this pull request Aug 13, 2020
* Use expanded @id for EntryPoint in doc_parse function

* Get resource name from expanded @id

* Get foreign key relationships through expanded ids

* get vocab route from apidoc to build vocab endpoint

* remove hardcoding of vocab keyword on link header

* remove hardcoding of vocab keyword in checkEndpoint function

* Fix hardcoding of vocab in getType function

* Fix hardcoding of vocab keyword in finalize_response function

* Fix hardcoding of vocab keyword in generate_iri_mappings

* Fix hardcoding of vocab keyword in get_link_props

* Remove hardcoding of vocab keyword in conftest.py

* Fix hardcoded vocab - test_app.py

* Remove hardcoded vocab - test_curd.py

* Get the parsed_class name directly

* Remove accidental import of pdb

* Use correct conditions for propertyNotGiven test

* Fix tests as now collections array in entrypoint response

* Correctly get mananged class type and title for collections

* Fix multiple add and delete endpoints for parsed classes

* Fix tests for updates in the hydra-python-core repo

Fix tests for collections array in EntryPoint endpoint response
(HTTP-APIs/hydra-python-core#40).
Fix tests for expanded ids.

* Add check for db setup

* Add check for PUT operation before inserting objects

* Fix IRI template tests

* Revert "Add check for db setup"

This reverts commit e152fa2.

* Update doc_writer_sample.py and its output with latest changes at core library

* Update Drone doc with latest changes at core

* Fix PEP8 errors
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.

2 participants