Closed bebatut closed 3 months ago
Hi @bebatut ππΌπ I'm an Outreachy intern and would absolutely love to work on this issue. Thanks!
Hello @bebatut My name is Jolade, I am an Outreachy applicant, I will be working on this issue. thank you.
As defined in the OLS Outreachy contribution guide,
@NPDebs were the first one to comment here. Are you still interested to work on this issue? You are already interested in other issues. You might need to pick one
As defined in the OLS Outreachy contribution guide,
- If someone else has already commented, let them try first
- If they donβt update after three days, the issue is βfreeβ again, and you can pick it up.
@NPDebs were the first one to comment here. Are you still interested to work on this issue? You are already interested in other issues. You might need to pick one
Hi @bebatut Yeah. I was throwing darts, hoping to land as many contributions as possible! π
I'll take whatever you assign to me. Thank you!
You are already assigned to another one. Finish it and if this issue is still not assigned you could work on it later
You are already assigned to another one. Finish it and if this issue is still not assigned you could work on it later
Alrightie. Thank you! @bebatut
You are already assigned to another one. Finish it and if this issue is still not assigned you could work on it later
Hi @bebatut. π
I'm now free as a bird! Well, technically, my PRs are yet to be reviewed and merged. π
Can I please start working on this one while I wait? Please, please, pretty please! ππΌ
Ok. I assign it to you @NPDebs
Thank you, @bebatut ! ππΌπ₯°
Just to verify my understanding of the issue, I have a few questions, please.
This is a project called "ABC..." Vicky Hellon is a participant.
When I click on her name, it goes to her bio. The goal of this issue is to add a section that states what projects she's involved in, right?
Yes that is the idea. If you look also at the people page, you can see the role of people in the different cohorts. It could be nice when they were participants to add also there the link to their project in the cohort they participated to
Okay. ππΌ I understand the first part of the task.
When I go to the people page, this is what I find...
To be clear, are you asking me to do the same thing to the bio of all the people here, who were participants in a project?
below you see more details about the people
below you see more details about the people
Ah. Yes yes! Seen.
I'll get right on it, and revert to you if I have some more questions. Thanks for your patience. ππΌ
Hi @bebatut. π Here's a little progress update from me to you...
In the people.yaml file, I added a new key
, named projects
and assigned its value
to be the name of the project the individual participated in. (Note: This info was gotten from the projects.yaml file of each cohort)
Additionally, I specified the cohort
of the individual as a new key.
In lines 74-79 of the people.html
file (under _includes
), you will find the block of code I used to reference these new keys, and print them on the "bio card" of each participant.
On click, the link goes to "https://openlifesci.org/{{% user.cohort %}}/projects-participants/"
.
I have only done this for the members of cohort ols-1. Please, kindly let me know if I am on the right track, so that I can do the same for the remaining cohorts.
I have attached a link to the commit containing the aforementioned changes, right HERE.
Thank you for your time. Best regards.
Thanks @NPDebs for the initial work there.
Regarding adding project information in the people.yaml
file
ols-x-projects.yaml
filespeople.yaml
should also only keep information about the people, not their participation in OLSIn the people.html
file, you can see starting on line 41 that I already extract information about roles of people in the different OLS cohorts.
You could add there the extraction of the name of project in which they participated.
Btw, I realize the information about participation in OLS cohorts is not displayed anymore in the card as it used to be inside the "Role in OLS: " blurb
That would be nice to fix that, and then for participants, adding there the link to their project as {{ site.ur }}/{{ cohort }}/projects-participants/{{ project }}
(adding then also the link to the project section in the page, a bit like done in the table on the bottom the project page)
Hi @bebatut. Thank you so much for your guidance. I now realise how redundant my method would have been.
I'll revert the last commit and get to work, using your roadmap. π
Hi @bebatut. π
Progress update: Not so much progress.
I successfully extracted the projects in each cohort by looping through ols-1-projects.yaml
.
{% for proj in project.name %}
{% capture ols-1-projectnames %}{{ ols-1-projectnames }} {{ proj }}{% endcapture %}
{% endfor %}
I rendered that on a page to confirmed that it worked. See screenshot below:
To render the specific project a person is associated with (on their bio card), I wrote this block of code. π
{% for person in ols-1-participants &}
{% for project in ols-1-projects %}
{% if project contains person %}
{% capture project-name %}{{ project-name }}{{ project.name }}{% endcapture %}
{% endif %}
{% endfor %}
{% endfor %}
Explanation: The variable ols-1-participants stores all the participants, and ols-1-projectnames contains all the projects.
So, I attempted to loop through each person. For that person, loop through the projects, checking for the person in the project.
Since project
here represents a unique project (with name, participants, mentors and description), the condition ought to check if the person is in the project. If this condition is met, then capture the name
of the project (i.e project.name of the project containing the participant, person).
A link to my commits are attached here....
Please tell me know your thoughts on this. Thank you for your patience! π€
It sounds like a great start and you seem to go in the good direction. One comment, what is display in the card in your screenshot looks like the project description not the name π
In the commit you linked I could not see all the changes you mentioned. Did you push all changes?
Hi @bebatut. I'm glad you approve of my approach, however fruitless it may seem at the moment. π
What's displayed on the card is actually the name, and not the description of the projects. That particular project seemed to have a really long title. π
About the linked commit.......I removed the block of code that threw an error. Would you like me to put that back in and push?
Up to you right now π How can I help you on that?
Up to you right now π How can I help you on that?
Well, for one...I'd like to know how I can relate all the keys in a particular project to each other.
- name: Open Science Community Barcelona
participants:
- bonetcarne mentors:
- zebetus
description: > Description
If the participant is in the same object as the "name" of the project, then render the name of the project.
It seems so straightforward. Yet, the logic has been flying over my head for days.
I think I am not sure to follow / understand here
I think I am not sure to follow / understand here
Okay. Here's my train of thought.
Loop through the participants. Within that loop, begin to loop through the project.yaml file.
For each participant, check if the person's name is the same as project.participants
. Then capture the project.name
of that project (where person == participant name), and render it on the person's bio card.
Not sure I'm explaining this properly.
If it's not too much to ask, can we do a quick Slack call at your convenience, please? @bebatut
The loop over the project.yaml
file are already done before in the page to get if people participated in cohorts.
You could use that loop to extract projects for each cohort.
Then when looping on the people to create the card, you could check their status (in which cohort they participated) and for the cohort in which they were participants, looping on the projects for that cohort to extract the project name
Do you understand what I mean? I am not sure if my way of explaining is clear :smile:
Hi @bebatut. Thank you for your response. Yes, I was actually following your explanation, until my brain got stuck in all the loops. π
When you say a loop has already been done, do you mean from line 41?
Yesterday, I was looking at how you wrote the logic for a similar thing, here. It gave me an idea, but I still did not succeed.
This is what I did...
Maybe we can communicate better over a call?
When you say a loop has already been done, do you mean from line 41?
Yes
This is what I did...
I think I do not understand your logic there. Participants are extracted from the ols-1-projects
(in loop starting in line 41) so your loop is redundant with previous one. If you need to do something it is better to use the previous loop .
And also if you loop there, you are not yet in the big loop on the people so the project name will not be rendered.
Please have a look at my suggestion from yesterday and break them in piece and see how to implement it
Maybe we can communicate better over a call?
Please join the call with @yo today (I will not be able to join)
Hi @bebatut. Yesterday, after brainstorming with a fellow Outreachy participant, we were able to output the title of one participant's project on her card. But the twist is, it also got printed on all the participants for OLS-1. π A problem in the loop, apparently.
Thank you for your suggestions. I'll try to implement them as soon as I resolve the Gitpod/Miniconda situation.
Yes, I'll be joining the call, later today. I'll ask them any questions I might have and update you.
Thank you. ππΌ
Hi @bebatut.
For the Roles in OLS: part...it shows up for only the organisers of OLS. This is because only organisers have it as a key:value
pair, under title. Shouldn't the other people also have titles, to be displayed as roles on their cards?
The role of participants (participant, mentor, etc in the different cohorts) are extracted here: https://github.com/open-life-science/open-life-science.github.io/blob/main/_layouts/people.html It should be displayed, given the code here: https://github.com/open-life-science/open-life-science.github.io/blob/main/_includes/people.html#L59 I did not investigate why it is not the case anymore
Hi @bebatut. π
I tweaked the logic a bit and the cards now display the people's roles. Here's a link to the commit.
Observation:
Two quick questions, please:
Thank you! π
Please open the PR with the fix :smile:
For making Roles in OLS:
bold, not sure. Because Expertise
is not bold
Please open the PR with the fix :smile: For making
Roles in OLS:
bold, not sure. BecauseExpertise
is not bold
Thank you! I'll open the PR right away. π
Oh, that's true. We either make both bold...or maintain the current state.
Suggested by a community member:
"When I go in projects and participants of previous OLSs, like OLS5, I can click on the project leads of each project (https://openlifesci.org/ols-5/projects-participants/), and that takes me to their bios. It'd be nice that if I am in the bios, I can see which project XY person is related to."