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

methodsOfControl property should be singular ie. "methodOfControl" #26

Open
0xdir opened this issue Jul 17, 2023 · 3 comments
Open

methodsOfControl property should be singular ie. "methodOfControl" #26

0xdir opened this issue Jul 17, 2023 · 3 comments

Comments

@0xdir
Copy link

0xdir commented Jul 17, 2023

Referring to the schema: https://hapi.etica.ai/eng-Latn/data-schema/UN/HTCDS/HTCDS.json

      "vic_MethodsOfControl": {
                  "description": "Methods of Control",
                  "type": "string", 
                   ... 
      }

Problem:
From the property name, there could be multiple methods of control (plural). However the schema defines the expected type as "string". This causes confusion if multiple methods of control are required, should the developer:

  1. disregard the schema and use array of strings? [method1, method2]
  2. follow the schema and concat multiple methods together eg. method1; method2

This is undesirable for data interoperability and sharing.

Proposal:
Change the method name to singular "vic_MethodOfControl"

@fititnt
Copy link

fititnt commented Jul 18, 2023

Hi @0xdir

The link https://hapi.etica.ai/eng-Latn/data-schema/UN/HTCDS/HTCDS.json is actually generated from another (not related to UNMigration nor HTCDS) format of this repository, but that is not the authoritative version. How that file was generated is mentioned here HXL-CPLP/Auxilium-Humanitarium-API#15 .

Maybe do a quick look if this is a suggestion on UNMigration/HTCDS repository (the file was https://github.com/UNMigration/HTCDS/blob/master/Toolkit/Survey/htcds_xlsform.xlsx, which if I remember was updated between last time I released the eng-Latn/data-schema/UN/HTCDS/HTCDS.json) to this issue might not be applicable to UNMigration/HTCDS, but by fault.

I could quickly change that on the other repo if you believe it better reflects the authoritative version. The directory with the templates to generate the output are here https://github.com/HXL-CPLP/Auxilium-Humanitarium-API/tree/main/schemam/UN/HTCDS

Proposal:
Change the method name to singular "vic_MethodOfControl"

I haven't done a full check of what it's saying, but I'm under the impression it's just updating that data schema, not the field name.

@fititnt
Copy link

fititnt commented Jul 18, 2023

Ah, I just noticed the https://github.com/0xdir/htcds_dart/tree/master/lib. Great!

The data schemas are good to get a general idea, but anyway, you would need to do copy and paste to dart code. From the reference XLSX files, I had to also copy and paste to the JSONs. Also, while the major done was before v1.0 (the current version is 2.0, and the ported version which you based your code is v0.2) it may still have some small differences. So for example, you might want to review your library against the lastest https://github.com/UNMigration/HTCDS.

If after that you know somewhat what is missing from the https://hapi.etica.ai/eng-Latn/data-schema/UN/HTCDS/HTCDS.json, I would welcome the suggestion (even if not with the templated files, but something I could port in the future).

@0xdir
Copy link
Author

0xdir commented Jul 19, 2023

Hi @fititnt , thank you for the clarification! I'll update my dart library to reflect v2.0.

After reviewing the files, I would propose to make the change on the authoritative version (if possible), and cascade down the change to the template/generated/ported files (eg. reference XLSX files, json, dart lib). I feel the singular form is more aligned to the other fields eg. MethodOfRecruitment, TypeOfExploitation, which are both multiselect also.

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

No branches or pull requests

2 participants