GSoC 2021 Project: The REST of Administration

Hi everyone!

I’ve been selected for the Google Summer of Code 2021 to work on the project “The REST of Administration”. I’ll be using this thread for discussion and updates about the project. I will also write about my GSoC 2021 experience on my blog: https://rasztabiga.me/blog

Project mentors:

Related resources:

  1. Project Proposal: Bartłomiej Rasztabiga GSOC Student Application
  2. Thread for gathering requirements: GSoC 2021: The REST of Administration

Unfortunately, I’m currently busy with my university responsibilities, that’s the reason for my reduced activity, but I will try to get familiar with the project and collect any left requirements until the start of it.

Question to my mentors, do you want me to schedule a weekly meeting with the three of us to talk through updates on the project, or do you want to keep the discussions here?

4 Likes

Congrats @navareth upon being selected to contribute on this project

IMO we can keep the discussions here more so for the updates in regards to your progress though feel free to engage the mentors for a call ,also on irc or slack

1 Like

Welcome @navareth :slight_smile:

The more public the updates, the better. When will you be done with your university responsibilities? During this time, how many hours do you offer?

I’d change that “or” to an “and”. :slight_smile: If weekly meetings work for mentor(s) and help keep you unblocked, that’s fine, but asynchronous discussions on Talk help others follow along.

I’d love to see an enumeration of missing admin functions – i.e., a list of admin functions that are currently not exposed via the REST API that we could prioritize and work through. Some are probably going to be straightforward and others may need some design (new resources). We could help you work through design on those while you are coding the others.

2 Likes

My final exams should be hopefully completed by the 23rd of June. I can probably spend about 6-8 hours per week until then :slight_smile:

Sounds good. I guess we could first focus on the part described on the project’s wiki page, which is exposing the administration links list through REST API.

By the way, are there any currently known admin functions that are not exposed via the REST API so I could take a look and start designing them soon, or should I just tinker within the legacy UI module to find them on my own?

@dkayiwa @gcliff May I ask you what is your preferred way of communication on daily basis and which timezones are you comfortable with?

Looking at each function in the Legacy UI and subtracting those that have been done as an OWA would be a start. rest.openmrs.org could help (i.e., those functions that aren’t documented).

1 Like

Thanks for the clarification. I guess I will start with adding the resource that was first described on the project’s page - that is the list of administration links for installed modules on the advanced administration page in legacy UI.

I had an idea to gather all classes that extend AdministrationSectionExt abstract class using Java reflection. Is that a viable solution in a system with multiple modules installed? I’m wondering whether other module classes will be present on the classpath of the REST-WS module? @dkayiwa @gcliff

What do you plan to use this for?

One of the tasks of this GSOC project is to expose a list of administration links through REST API.

Each module, to participate in that list, has to extend AdministrationSectionExt interface. That’s why I thought I could gather all classes that extend this abstract class and then map them (with their links) to appropriate REST resource.

If you know a better solution to gather these links, please let me know or guide me in the right direction :slightly_smiling_face:

I believe every module needs to register itself and the admin service is already maintaining a list of these, so you shouldn’t have to search for them; rather, get access to the admin service’s list – presumably the list used to generate the links in the legacy UI.

Good point, I will take a look at how LegacyUI module is generating the administration links list.

EDIT: After taking a look I guess I could use ModuleFactory.getExtensions("org.openmrs.admin.list") to retrieve list of AdministrationSectionExt. I could then map them to a list of administration links. I will try to come up with some prototype if that’s a proper solution. @dkayiwa @gcliff

Instead of guessing, you can try it out to confirm. :slight_smile:

1 Like

Hi @dkayiwa.

I will need to create an object for the AdministrationLink REST resource. Can you tell me whether I should create it in the rest-ws module or openmrs-core? Also, should I extend BaseOpenmrsMetadata?

Best regards,

Bart

I’ve created a new Jira ticket to track progress on this task: https://issues.openmrs.org/browse/RESTWS-820

I’ve created a prototype of a REST resource, which provides links for administration functions, that uses ModuleFactory.getExtensions(pointId). It means that I have also confirmed that my assumptions were correct and the idea above works.

I will now proceed to create a design document to share and discuss with you.

I’m also going to add a new blog post about REST-WS module development. I think it could be useful for future developers. :slightly_smiling_face:

EDIT: Here’s the post: https://rasztabiga.me/blog/gsoc-2021-week-0/

2 Likes

@dkayiwa @gcliff I think I’ve managed to create JIRA tasks for most (if not all) of the tasks related to my GSoC 2021 project. I’ve gathered requirements from wiki subpages of this page: https://wiki.openmrs.org/display/projects/GSOC+2021%3A+Modernizing+Administration+functions+for+OpenMRS

I will update each one of them with more details as soon as they are approved and I will be able to move to the design phase.

I have also added a few tasks that I thought might be useful and are still related to OpenMRS REST API, like updating documentation.

Please let me know if you have any comments about them. If there are any known priorities (which tasks should be done first) then also kindly let me know :slightly_smiling_face:

Best regards

#gsoc2021

2 Likes

thanks @navareth for putting this together :+1:

1 Like

@dkayiwa @gcliff

What do you think about the tasks I’ve prepared? Do you think it will be an ideal amount for this summer? I don’t want to overcommit as well as not to underperform :slight_smile:

If it looks good to you, maybe you could help me get these tasks approved so I could claim them in JIRA.

By the way, I should have the first PR ready for the task RESTWS-821 by the end of this week.

#gsoc2021

The tasks look good. We can always adjust the scope by removing or adding more, depending on the reality of the time that you will have.