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

feat: improve demo data to include TRG insitutes and group icons #186

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions util/demo_data_loader/ckan_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def load_resources(ckan, documents):
_upload_resource(ckan, file_path, resource_dict)


def load_groups(ckan, documents):
def load_groups(ckan):
"""
Helper method to load groups from the GROUPS_FILE config file
:param ckan: ckanapi instance
Expand Down Expand Up @@ -191,8 +191,8 @@ def load_data(ckan_url, ckan_api_key):
documents = _load_documents()

load_users(ckan)
orgs = load_organizations(ckan)
load_groups(ckan, documents)
load_organizations(ckan)
load_groups(ckan)
load_datasets(ckan, documents)
load_resources(ckan, documents)

Expand Down
206 changes: 106 additions & 100 deletions util/demo_data_loader/inputs/demo_data/groups.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,150 +3,156 @@
{
"users": [
{
"name": "test_admin",
"name": "fjelltopp_admin",
"capacity": "admin"
},
{
"name": "test_editor",
"capacity": "editor"
},
{
"name": "test_member",
"capacity": "member"
}
],
"display_name": "Publication",
"description": "Department publications and research studies",
"image_url": "https://dms.hiv.health.gov.mw/uploads/group/2022-03-17-123757.433896243660articlesquareicon.png",
"name": "publication",
"display_name": "Audio",
"description": "A resource primarily intended to be heard. Examples include a music playback file format, an audio compact disc, and recorded speech or sounds.",
"image_url": "https://raw.githubusercontent.com/google/material-design-icons/refs/heads/master/png/av/audio_file/materialiconsoutlined/48dp/2x/outline_audio_file_black_48dp.png",
"name": "sound",
"state": "active",
"title": "Publication"
}, {
"title": "Audio"
},
{
"users": [
{
"name": "test_admin",
"name": "fjelltopp_admin",
"capacity": "admin"
},
{
"name": "test_editor",
"capacity": "editor"
},
{
"name": "test_member",
"capacity": "member"
}
],
"display_name": "Guideline",
"description": "Guidelines for health service staff",
"image_url": "https://dms.hiv.health.gov.mw/uploads/group/2022-03-17-123643.7336343533402businessmanagementplanprojectreporticon.png",
"name": "guideline",
"display_name": "Collection",
"description": "An aggregation of resources. A collection is described as a group; its parts may also be separately described.",
"image_url": "https://raw.githubusercontent.com/google/material-design-icons/refs/heads/master/png/av/library_books/materialiconsoutlined/48dp/2x/outline_library_books_black_48dp.png",
"name": "collection",
"state": "active",
"title": "Guideline"
}, {
"title": "Collection"
},
{
"users": [
{
"name": "test_admin",
"name": "fjelltopp_admin",
"capacity": "admin"
},
{
"name": "test_editor",
"capacity": "editor"
},
{
"name": "test_member",
"capacity": "member"
}
],
"display_name": "Circulars",
"description": "Department internal circulars and reports",
"image_url": "https://dms.hiv.health.gov.mw/uploads/group/2022-03-17-123603.1298852205240clusterdatagrouporganizeicon.png",
"name": "circular",
"display_name": "Dataset",
"description": "Data encoded in a defined structure. Examples include lists, tables, and databases. A dataset may be useful for direct machine processing.",
"image_url": "https://raw.githubusercontent.com/google/material-design-icons/refs/heads/master/png/action/table_view/materialiconsoutlined/48dp/2x/outline_table_view_black_48dp.png",
"name": "dataset",
"state": "active",
"title": "Circulars"
}, {
"title": "Dataset"
},
{
"users": [
{
"name": "test_admin",
"name": "fjelltopp_admin",
"capacity": "admin"
},
{
"name": "test_editor",
"capacity": "editor"
},
{
"name": "test_member",
"capacity": "member"
}
],
"display_name": "Data",
"description": "Data group for demo purposes",
"image_url": "https://dms.hiv.health.gov.mw//uploads/group/2022-07-24-152420.906558circular.png",
"name": "data",
"display_name": "Document",
"description": "A resource consisting primarily of words for reading. Examples include books, letters, dissertations, poems, newspapers, articles, archives of mailing lists. Note that facsimiles or images of texts are still of the genre Text.",
"image_url": "https://raw.githubusercontent.com/google/material-design-icons/refs/heads/master/png/action/description/materialiconsoutlined/48dp/2x/outline_description_black_48dp.png",
"name": "text",
"state": "active",
"title": "Data"
}, {
"title": "Document"
},
{
"users": [
{
"name": "test_admin",
"name": "fjelltopp_admin",
"capacity": "admin"
},
{
"name": "test_editor",
"capacity": "editor"
},
{
"name": "test_member",
"capacity": "member"
}
],
"display_name": "Minutes",
"description": "Minutes group for demo purposes",
"image_url": "https://dms.hiv.health.gov.mw/uploads/group/2022-03-17-123701.0261814308050communicationconnectionmeetingofficeicon.png",
"name": "minutes",
"display_name": "Event",
"description": "A non-persistent, time-based occurrence. Metadata for an event provides descriptive information that is the basis for discovery of the purpose, location, duration, and responsible agents associated with an event. Examples include an exhibition, webcast, conference, workshop, open day, performance, battle, trial, wedding, tea party, conflagration.",
"image_url": "https://raw.githubusercontent.com/google/material-design-icons/refs/heads/master/png/action/event/materialiconsoutlined/48dp/2x/outline_event_black_48dp.png",
"name": "event",
"state": "active",
"title": "Minutes"
}, {
"title": "Event"
},
{
"users": [
{
"name": "test_admin",
"name": "fjelltopp_admin",
"capacity": "admin"
},
}
],
"display_name": "Image",
"description": "A visual representation other than text. Examples include images and photographs of physical objects, paintings, prints, drawings, other images and graphics, animations and moving pictures, film, diagrams, maps, musical notation. Note that Image may include both electronic and physical representations.",
"image_url": "https://raw.githubusercontent.com/google/material-design-icons/refs/heads/master/png/image/photo_camera/materialiconsoutlined/48dp/2x/outline_photo_camera_black_48dp.png",
"name": "still_image",
"state": "active",
"title": "Image"
},
{
"users": [
{
"name": "test_editor",
"capacity": "editor"
},
"name": "fjelltopp_admin",
"capacity": "admin"
}
],
"display_name": "Interactive Resource",
"description": "A resource requiring interaction from the user to be understood, executed, or experienced. Examples include forms on Web pages, applets, multimedia learning objects, chat services, or virtual reality environments.",
"image_url": "https://raw.githubusercontent.com/google/material-design-icons/refs/heads/master/png/action/touch_app/materialiconsoutlined/48dp/2x/outline_touch_app_black_48dp.png",
"name": "interactive_resource",
"state": "active",
"title": "Interactive Resource"
},
{
"users": [
{
"name": "test_member",
"capacity": "member"
"name": "fjelltopp_admin",
"capacity": "admin"
}
],
"display_name": "Monitoring Tool",
"description": "Monitoring tool group for demo purposes",
"image_url": "https://dms.hiv.health.gov.mw/uploads/group/2022-03-17-123717.467925211661eyeicon.png",
"name": "monitoring",
"display_name": "Physical Object",
"description": "An inanimate, three-dimensional object or substance. Note that digital representations of, or surrogates for, these objects should use Image, Text or one of the other types.",
"image_url": "https://raw.githubusercontent.com/google/material-design-icons/refs/heads/master/png/action/view_in_ar/materialiconsoutlined/48dp/2x/outline_view_in_ar_black_48dp.png",
"name": "physical_object",
"state": "active",
"title": "Monitoring Tool"
}, {
"title": "Physical Object"
},
{
"users": [
{
"name": "test_admin",
"name": "fjelltopp_admin",
"capacity": "admin"
},
}
],
"display_name": "Service",
"description": "A system that provides one or more functions. Examples include a photocopying service, a banking service, an authentication service, interlibrary loans, a Z39.50 or Web server.",
"image_url": "https://raw.githubusercontent.com/google/material-design-icons/refs/heads/master/png/notification/support_agent/materialiconsoutlined/48dp/2x/outline_support_agent_black_48dp.png",
"name": "service",
"state": "active",
"title": "Service"
},
{
"users": [
{
"name": "test_editor",
"capacity": "editor"
},
"name": "fjelltopp_admin",
"capacity": "admin"
}
],
"display_name": "Software",
"description": "A computer program in source or compiled form. Examples include a C source file, MS-Windows .exe executable, or Perl script.",
"image_url": "https://raw.githubusercontent.com/google/material-design-icons/refs/heads/master/png/action/terminal/materialiconsoutlined/48dp/2x/outline_terminal_black_48dp.png",
"name": "software",
"state": "active",
"title": "Software"
},
{
"users": [
{
"name": "test_member",
"capacity": "member"
"name": "fjelltopp_admin",
"capacity": "admin"
}
],
"display_name": "Plan",
"description": "Plan group for demo purposes",
"image_url": "https://dms.hiv.health.gov.mw/uploads/group/2022-03-17-123743.3695114308313economicsmarketplanstrategicstrategyicon.png",
"name": "plan",
"display_name": "Video",
"description": "A series of visual representations imparting an impression of motion when shown in succession. Examples include animations, movies, television programs, videos, zoetropes, or visual output from a simulation.",
"image_url": "https://raw.githubusercontent.com/google/material-design-icons/refs/heads/master/png/av/videocam/materialiconsoutlined/48dp/2x/outline_videocam_black_48dp.png",
"name": "moving_image",
"state": "active",
"title": "Plan"
"title": "Video"
}
]
}
Loading