Giter VIP home page Giter VIP logo

image-commondatapool's People

Contributors

alexey-ebi avatar bunop avatar dependabot[bot] avatar peterwharrison avatar

Watchers

 avatar  avatar  avatar

image-commondatapool's Issues

:bug: Broken links FAO-IMAGE data portal

FAO has changed the interface for breed data sheet links and now the respective links in IMAGE Data Portal are broken. The change is: instead of the country name, country 3 letters code is used now, e.g. NLD instead of Netherlands:

The link in Image:

https://fao-dadis-breed-detail.firebaseapp.com/?country=Netherlands&specie=Goose%20%28domestic%29&breed=Twentse%20landgans

should be:

https://fao-dadis-breed-detail.firebaseapp.com/?country=NLD&specie=Goose%20%28domestic%29&breed=Twentse%20landgans

:bug: CDP Browsable API doesn't return valid DAD-IS link with spaces in breed_name

An entry with spaces in URLField (such the dadis_url attribute at https://api.image2020genebank.eu/backend/dadis_link/1/) doesn't render correctly URLs with encoded spaces in templates. This beaviour seems depends by the urlize template tags, which is called in rest_framework/templates/rest_framework/base.html to render a string formatted like this (not a JSON but a <pre> formatted text):

{
    "url": "http://localhost:26081/backend/dadis_link/1/",
    "species": {
        "scientific_name": "Ovis aries",
        "common_name": "Sheep"
    },
    "supplied_breed": "Schoonebeek heath",
    "country": "Netherlands",
    "most_common_name": "Schoonebeeker Heideschaap",
    "transboundary_name": "Schoonebeek heath sheep",
    "other_name": [],
    "dadis_url": "https://fao-dadis-breed-detail.firebaseapp.com/?country=Netherlands&specie=Sheep&breed=Schoonebeeker%20Heideschaap",           
    "is_custom": true
}

more precisely, urlize cant represent the encoded space %20 in the href link:

from django.utils.html import urlize
urlize("https://fao-dadis-breed-detail.firebaseapp.com/?country=Netherlands&specie=Sheep&breed=Schoonebeeker%20Heideschaap")
# '<a href="https://fao-dadis-breed-detail.firebaseapp.com/?country=Netherlands&amp;specie=Sheep&amp;breed=Schoonebeeker+Heideschaap">https://fao-dadis-breed-detail.firebaseapp.com/?country=Netherlands&specie=Sheep&breed=Schoonebeeker%20Heideschaap</a>'

The returned link (in which %20 is changed in +) is not a valid dad-is permalink

:sparkles: add custom DAD-IS link to organism

Sometimes supplied_breed breed doesn't match the FAO DAD-IS breed name. Adding a record in a table is not sufficient since process_fao_metadata.py is able to operate over DAD-IS exported CSV file. Find a way to detect custom links between CDP supplied_breed and DAD-IS breed

  • Add a custom link to DAD-IS table and manage table relationship through atomated scripts

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.