cc-archive / cccatalog

[PROJECT TRANSFERRED] Mapping the commons towards an open ledger and cc search.
https://github.com/WordPress/openverse-catalog
MIT License
63 stars 60 forks source link

Rewrite Met Museum Provider API Script using new ImageStore class #254

Closed mathemancer closed 4 years ago

mathemancer commented 4 years ago

The old version can be found at src/cc_catalog_airflow/dags/provider_api_scripts/MetMuseum.py. The script should be rewritten with the following goals:

ayanchoudhary commented 4 years ago

Is this PR ready to be worked on? If yes, can I take this?

Gbahdeyboh commented 4 years ago

@AyanChoudhary I don't think anyone is currently working on this issue. You could take it and send a PR, but note that the PR wouldn't be merged if tests are not written.

akshgpt7 commented 4 years ago

@gauravahlawat81 Regarding #277, the Contributing Guidelines say the following:

Once you have identified an issue you'd like to work on, follow these steps:

(Kindly go through the page once.)

ayanchoudhary commented 4 years ago

I had started working on this as soon as I was given the go.

akshgpt7 commented 4 years ago

You need the approval of a maintainer, who will label the issue as in progress before starting work.

ayanchoudhary commented 4 years ago

@AyanChoudhary I don't think anyone is currently working on this issue. You could take it and send a PR, but note that the PR wouldn't be merged if tests are not written.

Actually he did approve it

gauravahlawat81 commented 4 years ago

Oh, @akshgpt7 Thanks for that. But as the issue wasn't marked In progress, I took the Liberty of sending a WIP PR, since I didn't see one. If you guys think that I broke rules here, I would happily delete the PR .

gauravahlawat81 commented 4 years ago

I've deleted the PR. @AyanChoudhary Go ahead and work on it if you had already started.

mathemancer commented 4 years ago

The met has just updated their API. The new response json is:

{

    "objectID": 45734,

    "isHighlight": false,

    "accessionNumber": "36.100.45",

    "accessionYear": "1936",

    "isPublicDomain": true,

    "primaryImage": "https://images.metmuseum.org/CRDImages/as/original/DP251139.jpg",

    "primaryImageSmall": "https://images.metmuseum.org/CRDImages/as/web-large/DP251139.jpg",

    "additionalImages": [

        "https://images.metmuseum.org/CRDImages/as/original/DP251138.jpg",

        "https://images.metmuseum.org/CRDImages/as/original/DP251120.jpg"

    ],

    "constituents": [

        {

            "role": "Artist",

            "name": "Kiyohara Yukinobu",

            "constituentULAN_URL": "http://vocab.getty.edu/page/ulan/500034433",

            "constituentWikidata_URL": "https://www.wikidata.org/wiki/Q11560527",

            "gender": "Female"

        }

    ],

    "department": "Asian Art",

    "objectName": "Hanging scroll",

    "title": "Quail and Millet",

    "culture": "Japan",

    "period": "Edo period (1615–1868)",

    "dynasty": "",

    "reign": "",

    "portfolio": "",

    "artistRole": "Artist",

    "artistPrefix": "",

    "artistDisplayName": "Kiyohara Yukinobu",

    "artistDisplayBio": "Japanese, 1643–1682",

    "artistSuffix": "",

    "artistAlphaSort": "Kiyohara Yukinobu",

    "artistNationality": "Japanese",

    "artistBeginDate": "1643",

    "artistEndDate": "1682",

    "artistGender": "Female",

    "artistWikidata_URL": "https://www.wikidata.org/wiki/Q11560527",

    "artistULAN_URL": "http://vocab.getty.edu/page/ulan/500034433",

    "objectDate": "late 17th century",

    "objectBeginDate": 1667,

    "objectEndDate": 1682,

    "medium": "Hanging scroll; ink and color on silk",

    "dimensions": "46 5/8 x 18 3/4 in. (118.4 x 47.6 cm)",

    "creditLine": "The Howard Mansfield Collection, Purchase, Rogers Fund, 1936",

    "geographyType": "",

    "city": "",

    "state": "",

    "county": "",

    "country": "",

    "region": "",

    "subregion": "",

    "locale": "",

    "locus": "",

    "excavation": "",

    "river": "",

    "classification": "Paintings",

    "rightsAndReproduction": "",

    "linkResource": "",

    "metadataDate": "2020-02-07T15:50:59.677Z",

    "repository": "Metropolitan Museum of Art, New York, NY",

    "objectURL": "https://wwwstg.metmuseum.org/art/collection/search/45734",

    "tags": [

        {

            "term": "Birds",

            "AAT_URL": "http://vocab.getty.edu/page/aat/300266506"

        },

        {

            "term": "Leaves",

            "AAT_URL": "http://vocab.getty.edu/page/aat/300011892"

        }

    ],

    "objectWikidata_URL": "https://www.wikidata.org/wiki/Q29910832",

    "isTimelineWork": false

}
mathemancer commented 4 years ago

I don't think this will affect anything about the script, but we should use this response json (or subobjects of it) in testing

Nikitag0329IITkgp commented 4 years ago

Is this issue still open to working on?

ayanchoudhary commented 4 years ago

The pr concerning this is complete.

akshgpt7 commented 4 years ago

I think @AyanChoudhary has a linked PR to this and is currently working on it (#278).

mathemancer commented 4 years ago

This is correct, there's a PR for this currently.