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

Why is the list of contacts a dictionary in the manifest.json ? #72

Open
Oodnadatta opened this issue May 26, 2018 · 2 comments
Open

Why is the list of contacts a dictionary in the manifest.json ? #72

Oodnadatta opened this issue May 26, 2018 · 2 comments
Labels
question Open question and discussion

Comments

@Oodnadatta
Copy link
Member

We could use a list of lists as:

"contacts": [
    ["Olivier Gueudelot", "gueudelotolive@gmail.com"],
    ["Asdp", "as.denomme@outlook.com"],
    ["Arkanosis", "jroquet@arkanosis.net"]
]
@Arkanosis
Copy link
Member

It looks like it would almost work already, except that the current code is waiting for arbitrary JSON within a string, and we'd rather want the aforementioned specific JSON, as JSON.

This might be the only necessary change for the current code to accept that:

diff --git a/regovar/core/managers/pipeline_manager.py b/regovar/core/managers/pipeline_manager.py
index d22478d..0f55619 100644
--- a/regovar/core/managers/pipeline_manager.py
+++ b/regovar/core/managers/pipeline_manager.py
@@ -242,7 +242,7 @@ class PipelineManager:
                 log(data)
                 manifest = json.loads(data)
                 manifest = self.check_manifest(manifest)
-                pipeline.developpers = manifest.pop("contacts")
+                pipeline.developpers = str(manifest.pop("contacts"))
                 pipeline.manifest = manifest 
 
                 # list documents available

… but I'm not even sure it's required, as the call to str() might be implicit when writing to the database.

If after verification, that change appears to not be required, then it'd probably be better to leave the code unchanged, to keep the structured (ie. JSON) variable instead of a simple string.

@ikit
Copy link
Member

ikit commented May 26, 2018

I don't know if we really need this information in the manifest., as this information is not mandatory for the usage of the pipeline, and can be just handle by the about.html document...

@ikit ikit added the question Open question and discussion label May 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Open question and discussion
Projects
None yet
Development

No branches or pull requests

3 participants