Giter Club home page Giter Club logo

Comments (4)

adrianoamaral avatar adrianoamaral commented on July 17, 2024

@andreaszenasidi Could you please provide more context and the specific need, because could not be a bug that need a fix, instead, be a feature that's not in place anymore

from ckanext-iati.

akmiller01 avatar akmiller01 commented on July 17, 2024

Hi @adrianoamaral , thanks for taking a look at this.

There are several services, including the Unified Platform, that use the file hash from the Registry to uniquely identify files by content. The hashing on the Registry allows for our services to tell when the contents of a file have actually changed, without needing to re-download each and every file. In several cases, we've found the hash has not been updating. Sometimes it's due to a missing version number, as above, but other times we cannot identify why the Registry is not assigning a unique hash to the file (e.g. https://iatiregistry.org/dataset/ec-intpa-tz). Would it be possible to de-couple the creation and assigning of a file hash in the Registry from the process that checks the version-number/count of activities? If not, is there another method you could suggest for the Unified Platform to identify when the contents of a file changes without re-downloading the file and doing the hashing ourselves?

from ckanext-iati.

nosvalds avatar nosvalds commented on July 17, 2024

Here is the recent example: https://iatiregistry.org/api/3/action/package_show?id=pont-activities

from ckanext-iati.

nosvalds avatar nosvalds commented on July 17, 2024

@akmiller01 and I took a quick look at the code responsible for the version in the archiver:

# IATI standard version (iati_version extra)
xpath = '/iati-activities/@version | /iati-organisations/@version'
version = tree.xpath(xpath)
log.info(version)
log.info(version[0])
allowed_versions = IATI_STANDARD_VERSIONS
if len(version) and version[0] in allowed_versions:
version = version[0]
else:
version = 'n/a'
new_extras['iati_version'] = version

If the version list returned by the xpath is length 0, this line log.info(version[0]) will drop an IndexError

from ckanext-iati.

Related Issues (20)

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.