website icon indicating copy to clipboard operation
website copied to clipboard

ER: Rationalizing the sponsors and partners info in code base

Open ExperimentsInHonesty opened this issue 1 year ago • 4 comments

Emergent Requirement - Problem

We have sponsors and partners in different files and recently we made new files for former partners because we think we might reuse that info in a former partners section if we make a partners/sponsors page. But we are ending with too many files with different information schemas

Issue you discovered this emergent requirement in

  • #5948
  • #3328

Date discovered

Did you have to do something temporarily

  • [ ] YES
  • [x] NO

Who was involved

@ExperimentsInHonesty @roslynwythe @KwameTaylor

What happens if this is not addressed

more inefficient code, etc.

Resources

  • https://github.com/hackforla/website/blob/gh-pages/_data/internal/sponsors.yml
  • https://github.com/hackforla/website/blob/gh-pages/_data/internal/partners.yml
  • https://github.com/hackforla/website/blob/gh-pages/_data/internal/former-sponsors-partners.yml

Recommended Action Items

  • [x] Make a new issue
  • [x] Discuss with team
  • [ ] Let a Team Lead know

Potential solutions [draft]

What if we combined all the information into one file, and it looked something like this

File format/schema
- name: 
  image:   
  link: 
  instance:
    - location: 
       type: 
       position: 
       start date:
       end date:
    - location: 
       type: partner
       position: 
       start date:
       end date:
Excerpt of two records from proposed file
- name: Los Angeles Department of Neighborhood Empowerment
  image: /assets/images/partners/empower-la.png
  link: https://empowerla.org/
  instance:
  - location: Citizen Engagement
    type: partner
    position: 1
    start date:
    end date:
  - location: 311 data
    type: partner
    position: 1
    start date:
    end date:
  - location: Lucky Parking
    type: partner
    position: 1
    start date:
    end date:
  - location: Open Community Survey
    type: partner
    position: 1
    start date:
    end date:
  - location: about
    type: partner
    position: 1
    start date:
    end date:
- name: Atwater Village
  image: /assets/images/partners/atwater-village.png
  link: https://www.atwatervillage.org/
  instance:
  - location: Citizen Engagement
    type: partner
    position: 2
    start date:
    end date:
  - location: lucky parking
    type: partner
    position: 2
    start date:
    end date:
  - location: about
    type: partner
    position: 2
    start date:
    end date:
New sponsors-partners.yml file
- name: Los Angeles Department of Neighborhood Empowerment
  image: /assets/images/partners/empower-la.png
  link: https://empowerla.org/
  instance:
  - location: Citizen Engagement
    type: partner
    position: 1
    start date:
    end date:
  - location: 311 data
    type: partner
    position: 1
    start date:
    end date:
  - location: Lucky Parking
    type: partner
    position: 1
    start date:
    end date:
  - location: Open Community Survey
    type: partner
    position: 1
    start date:
    end date:
  - location: about
    type: partner
    position: 1
    start date:
    end date:
- name: Atwater Village
  image: /assets/images/partners/atwater-village.png
  link: https://www.atwatervillage.org/
  instance:
  - location: Citizen Engagement
    type: partner
    position: 2
    start date:
    end date:
  - location: lucky parking
    type: partner
    position: 2
    start date:
    end date:
  - location: about
    type: partner
    position: 2
    start date:
    end date:
- name: Yale Open Lab
  image: /assets/images/partners/yale-open-labs.svg
  link: https://openlab.yale.edu/
  instance:
  - location: about
    type: partner
    position: 3
    start date:
    end date:
  - location: Civic Tech Infrastructure
    type: partner
    position: 1
    start date:
    end date:
  - location: Environment
    type: partner
    position: 1
    start date:
    end date:
  - location: Climate Collabathon
    type: partner
    position: 1
    start date:
    end date:
- name: Los Angeles Metro
  image: /assets/images/partners/m.svg
  link: https://www.metro.net/
  instance:
  - location: about
    type: partner
    position: 4
    start date:
    end date:  
  - location: Environment
    type: partner
    position: 2
    start date:
    end date:
  - location: Railstats LA
    type: partner
    position: 2
    start date:
    end date:
- name: City of Santa Monica
  image: /assets/images/partners/city-of-santa-monica.png
  link: https://www.santamonica.gov/
  instance:
  - location: Environment
    type: partner
    position: 1
    start date:
    end date:
  - location: Public Tree Map
    type: partner
    position: 1
    start date:
    end date:
  - location: about
    type: partner
    position: 5
    start date:
    end date:
- name: FoodCycle LA
  image: /assets/images/partners/food-cycle-la.png
  link: https://www.foodcyclela.org/
  instance:
  - location: Social Safety Net
    type: partner
    position: 
    start date:
    end date:
  - location: Food Oasis
    type: partner
    position: 1
    start date:
    end date:
  - location: about
    type: partner
    position: 6
    start date:
    end date:
- name: Food Forward
  image: /assets/images/partners/food-forward.png
  link: https://www.goodfoodla.org/food-waste
  instance:
  - location: Social Safety Net
    type: partner
    position: 
    start date:
    end date:
  - location: Food Oasis
    type: partner
    position: 2
    start date:
    end date:
  - location: about
    type: partner
    position: 7
    start date:
    end date:
- name: Good Food LA
  image: /assets/images/partners/good-food-la.png
  link: https://www.goodfoodla.org/food-waste
  instance:
  - location: Social Safety Net
    type: partner
    position: 
    start date:
    end date:
  - location: Food Oasis
    type: partner
    position: 3
    start date:
    end date:
  - location: about
    type: partner
    position: 8
    start date:
    end date:
- name: Los Angeles Regional Food Bank
  image: /assets/images/partners/la-food-bank.png
  link: https://www.lafoodbank.org/
  instance:
  - location: Social Safety Net
    type: partner
    position: 
    start date:
    end date:
  - location: Food Oasis
    type: partner
    position: 4
    start date:
    end date:
  - location: about
    type: partner
    position: 9
    start date:
    end date:
- name: Safe Place for Youth
  image: /assets/images/partners/safe-place-for-youth.png
  link: https://www.safeplaceforyouth.org/
  instance:
  - location: Social Safety Net
    type: partner
    position: 
    start date:
    end date:
  - location: Home Unite Us
    type: partner
    position: 
    start date:
    end date:
  - location: about
    type: partner
    position: 10
    start date:
    end date:
- name: Point Source Youth
  image: /assets/images/partners/point-source-youth.svg
  link: https://www.pointsourceyouth.org/
  instance:
  - location: Social Safety Net
    type: partner
    position: 
    start date:
    end date:
  - location: Home Unite Us
    type: partner
    position: 
    start date:
    end date:
  - location: about
    type: partner
    position: 11
    start date:
    end date:
- name: Los Angeles City Attorney
  image: /assets/images/partners/la-city-attorney.png
  link: https://www.lacityattorney.org/
  instance:
  - location: Social Safety Net
    type: partner
    position: 
    start date:
    end date:
  - location: Heart
    type: partner
    position: 
    start date:
    end date:
  - location: about
    type: partner
    position: 12
    start date:
    end date:
- name: Los Angeles Department of Transportation
  image: /assets/images/partners/la-dot.png
  link: https://ladot.lacity.org/
  instance:
  - location: Environment
    type: partner
    position: 
    start date:
    end date:
  - location: LA TDM Calculator
    type: partner
    position: 
    start date:
    end date:
  - location: about
    type: partner
    position: 13
    start date:
    end date:
- name: Los Angeles City Planning
  image: /assets/images/partners/la-city-planning.png
  link: https://planning.lacity.org/
  instance:
  - location: Environment
    type: partner
    position: 
    start date:
    end date:
  - location: LA TDM Calculator
    type: partner
    position: 
    start date:
    end date:
  - location: about
    type: partner
    position: 14
    start date:
    end date:
- name: The National Diversity & Inclusion Cannabis Alliance
  image: /assets/images/partners/ndica.png
  link: https://www.thendica.org/
  instance:
  - location: Justice
    type: partner
    position: 
    start date:
    end date:
  - location: Expunge Assist
    type: partner
    position: 
    start date:
    end date:
  - location: about
    type: partner
    position: 15
    start date:
    end date:
- name: Ballotpedia
  image: /assets/images/partners/bp.png
  link: https://ballotpedia.org/Main_Page
  instance:
  - location: Vote / Representation
    type: partner
    position: 
    start date:
    end date:
  - location: Undebate
    type: partner
    position: 
    start date:
    end date:
  - location: about
    type: partner
    position: 16
    start date:
    end date:
- name: EnCiv
  image: /assets/images/partners/enciv.svg
  link: https://enciv.org/
  instance:
  - location: Vote / Representation
    type: partner
    position: 
    start date:
    end date:
  - location: Undebate
    type: partner
    position: 
    start date:
    end date:
  - location: about
    type: partner
    position: 17
    start date:
    end date:
- name: UCLA Law
  image: /assets/images/partners/ucla-law.png
  link: https://law.ucla.edu/
  instance:
  - location: Justice
    type: partner
    position: 
    start date:
    end date:
  - location: Youth Justice Nav
    type: partner
    position: 
    start date:
    end date:
  - location: about
    type: partner
    position: 18
    start date:
    end date:
- name: Golden Gate University School of Law
  image: /assets/images/partners/ggu-school-of-law.png
  link: https://law.ggu.edu/
  instance:
  - location: Justice
    type: partner
    position: 
    start date:
    end date:
  - location: Youth Justice Nav
    type: partner
    position: 
    start date:
    end date:
  - location: about
    type: partner
    position: 19
    start date:
    end date:
- name: Los Angeles County District Attorney
  image: /assets/images/partners/da-county-of-la.png
  link: https://da.lacounty.gov/
  instance:
  - location: Social Safety Net
    type: partner
    position: 20
    start date:
    end date:
  - location: Heart
    type: partner
    position: 
    start date:
    end date:
  - location: about
    type: partner
    position: 
    start date:
    end date:
- name: Digital Defense Fund
  image: /assets/images/partners/digital-defense-fund.png
  link: https://digitaldefensefund.org/
  instance:
  - location: Vote / Representation
    type: partner
    position: 
    start date:
    end date:
  - location: HelloGOV
    type: partner
    position: 
    start date:
    end date:
  - location: about
    type: partner
    position: 21
    start date:
    end date:
- name: City of Los Angeles Personnel Department
  image: /assets/images/partners/la-department-of-personnel.png
  link: https://personnel.lacity.org/
  instance:
  - location: Workforce Development
    type: partner
    position: 
    start date:
    end date:
  - location: Work for LA
    type: partner
    position: 
    start date:
    end date:
  - location: about
    type: partner
    position: 22
    start date:
    end date:
- name: The Los Angeles County Homeless Initiative
  image: /assets/images/partners/la-county-homeless-initiative.png
  link: https://homeless.lacounty.gov/
  instance:
  - location: Social Safety Net
    type: partner
    position: 
    start date:
    end date:
  - location: Jobs for Hope
    type: partner
    position: 
    start date:
    end date:
  - location: about
    type: partner
    position: 24
    start date:
    end date:
- name: Hope of the Valley
  image: /assets/images/partners/hope-of-the-valley.png
  link: https://www.hopeofthevalley.org/
  instance:
  - location: Social Safety Net
    type: partner
    position: 
    start date:
    end date:
  - location: Jobs for Hope
    type: partner
    position: 
    start date:
    end date:
  - location: about
    type: partner
    position: 24
    start date:
    end date:

And the pages will all have code that iterates though this file looking for content to display based on whatever logic we are using. And all pages will get the order of the logos from this file (location of all applicable sponsors/partners combined with position values).

  • program-areas (template)
    • organizations we work with (a combo of partners and sponsors that apply to projects in that program area)
  • about
    • sponsors section
    • partners section (future enhancement)
  • project (template)
    • partners section
  • project's page and currently homepage
    • project card display

Ideally the partners/sponsors would be all in one file for ease of quarterly review, but if it's not feasible to have multiple location variables then break into individual files.

How to handle order anomalies in the file

  • If there were multiple records with the same location and position, it would display them in order that it found them
  • if there were records missing from the order, it would ignore the missing and just display what is available in number order

Issues to create

  • Issue 1 (large): feasibility test/determination for rationalizing sponsors-partner info in code base
    • [ ] uses provided schema and data and revises as needed to test feasibility
    • [ ] specifies how info would be retrieved from the schema by the pages that will need it.
    • [ ] dev commits data file to repo
    • [ ] dev makes issues from this ER to use the new data file and provides the guidance and general code snipit that will enable the issue assignees to
  • Issue 2 (medium, non-prescriptive but has the code snipit that will allow the data to display): Update the about page sponsors section
    • https://github.com/hackforla/website/blob/gh-pages/_includes/about-page/about-card-partners.html
    • https://github.com/hackforla/website/blob/gh-pages/_includes/about-page/about-card-sponsors.html
  • Issue 3 & 4 (medium, contains the guidance and references the code snipit from the about page, but the assignee has to figure out how it applies or needs to change for these pages): - 3: Revise HTML file that creates each project page - https://github.com/hackforla/website/blob/gh-pages/_layouts/project.html - 4: Revise HTML file that generates the projects page and current homepage content - https://www.hackforla.org/ & https://www.hackforla.org/projects - Both the projects page and the homepage HTML pages (a. & b.) use this include to render the project cards, which in turn drives the filter (filter does not need any changes) https://github.com/hackforla/website/blob/gh-pages/_includes/current-projects.html - a. projects-page https://github.com/hackforla/website/blob/gh-pages/pages/projects-page.html - b. https://github.com/hackforla/website/blob/gh-pages/pages/index.html
  • Issue 5: update the wiki about how the website team handles if PMs from projects add or delete partners/sponsors
    • when PMs use this template Project Profile Card review and update to ask for changes to their project cards, we will have a different work flow. We don't have to do anything with that template we just have to update the new sponsor-partner.yml file, not the project file anymore.
    • WIKI page that needs updating https://github.com/hackforla/website/wiki/Update-Project-Profile-Template
    • first action item on the issue:
      - [ ] We are currently in the process of moving the old wiki to the new [website-wiki repo](https://github.com/hackforla/website-wiki), so we will not be making any changes or additions to the old wiki at this time. Thus, we will be adding wiki content through a different process now. Read [How to Contribute to the Wiki](https://github.com/hackforla/website/wiki/How-to-Contribute-to-the-Wiki)
      
  • Issue 6: EPIC (good first issues): remove partners info from each project file
    • [ ] Make template
    • [ ] Create issues
    • [ ] ...

ExperimentsInHonesty avatar May 05 '24 17:05 ExperimentsInHonesty

sponsors-partners.yml

schema

  • name: image:
    link: instance:
    • location: type: position: start date: end date:
    • location: type: partner position: start date: end date:

file contents

  • name: Los Angeles Department of Neighborhood Empowerment image: /assets/images/partners/empower-la.png link: https://empowerla.org/ instance:
    • location: Citizen Engagement type: partner position: 1 start date: end date:
    • location: 311 data type: partner position: 1 start date: end date:
    • location: Lucky Parking type: partner position: 1 start date: end date:
    • location: Open Community Survey type: partner position: 1 start date: end date:
    • location: about type: partner position: 1 start date: end date:
  • name: Atwater Village image: /assets/images/partners/atwater-village.png link: https://www.atwatervillage.org/ instance:
    • location: Citizen Engagement type: partner position: 2 start date: end date:
    • location: lucky parking type: partner position: 2 start date: end date:
    • location: about type: partner position: 2 start date: end date:
  • name: Yale Open Lab image: /assets/images/partners/yale-open-labs.svg link: https://openlab.yale.edu/ instance:
    • location: about type: partner position: 3 start date: end date:
    • location: Civic Tech Infrastructure type: partner position: 1 start date: end date:
    • location: Environment type: partner position: 1 start date: end date:
    • location: Climate Collabathon type: partner position: 1 start date: end date:
  • name: Los Angeles Metro image: /assets/images/partners/m.svg link: https://www.metro.net/ instance:
    • location: about type: partner position: 4 start date: end date:
    • location: Environment type: partner position: 2 start date: end date:
    • location: Railstats LA type: partner position: 2 start date: end date:
  • name: City of Santa Monica image: /assets/images/partners/city-of-santa-monica.png link: https://www.santamonica.gov/ instance:
    • location: Environment type: partner position: 1 start date: end date:
    • location: Public Tree Map type: partner position: 1 start date: end date:
    • location: about type: partner position: 5 start date: end date:
  • name: FoodCycle LA image: /assets/images/partners/food-cycle-la.png link: https://www.foodcyclela.org/ instance:
    • location: Social Safety Net type: partner position: start date: end date:
    • location: Food Oasis type: partner position: 1 start date: end date:
    • location: about type: partner position: 6 start date: end date:
  • name: Food Forward image: /assets/images/partners/food-forward.png link: https://www.goodfoodla.org/food-waste instance:
    • location: Social Safety Net type: partner position: start date: end date:
    • location: Food Oasis type: partner position: 2 start date: end date:
    • location: about type: partner position: 7 start date: end date:
  • name: Good Food LA image: /assets/images/partners/good-food-la.png link: https://www.goodfoodla.org/food-waste instance:
    • location: Social Safety Net type: partner position: start date: end date:
    • location: Food Oasis type: partner position: 3 start date: end date:
    • location: about type: partner position: 8 start date: end date:
  • name: Los Angeles Regional Food Bank image: /assets/images/partners/la-food-bank.png link: https://www.lafoodbank.org/ instance:
    • location: Social Safety Net type: partner position: start date: end date:
    • location: Food Oasis type: partner position: 4 start date: end date:
    • location: about type: partner position: 9 start date: end date:
  • name: Safe Place for Youth image: /assets/images/partners/safe-place-for-youth.png link: https://www.safeplaceforyouth.org/ instance:
    • location: Social Safety Net type: partner position: start date: end date:
    • location: Home Unite Us type: partner position: start date: end date:
    • location: about type: partner position: 10 start date: end date:
  • name: Point Source Youth image: /assets/images/partners/point-source-youth.svg link: https://www.pointsourceyouth.org/ instance:
    • location: Social Safety Net type: partner position: start date: end date:
    • location: Home Unite Us type: partner position: start date: end date:
    • location: about type: partner position: 11 start date: end date:
  • name: Los Angeles City Attorney image: /assets/images/partners/la-city-attorney.png link: https://www.lacityattorney.org/ instance:
    • location: Social Safety Net type: partner position: start date: end date:
    • location: Heart type: partner position: start date: end date:
    • location: about type: partner position: 12 start date: end date:
  • name: Los Angeles Department of Transportation image: /assets/images/partners/la-dot.png link: https://ladot.lacity.org/ instance:
    • location: Environment type: partner position: start date: end date:
    • location: LA TDM Calculator type: partner position: start date: end date:
    • location: about type: partner position: 13 start date: end date:
  • name: Los Angeles City Planning image: /assets/images/partners/la-city-planning.png link: https://planning.lacity.org/ instance:
    • location: Environment type: partner position: start date: end date:
    • location: LA TDM Calculator type: partner position: start date: end date:
    • location: about type: partner position: 14 start date: end date:
  • name: The National Diversity & Inclusion Cannabis Alliance image: /assets/images/partners/ndica.png link: https://www.thendica.org/ instance:
    • location: Justice type: partner position: start date: end date:
    • location: Expunge Assist type: partner position: start date: end date:
    • location: about type: partner position: 15 start date: end date:
  • name: Ballotpedia image: /assets/images/partners/bp.png link: https://ballotpedia.org/Main_Page instance:
    • location: Vote / Representation type: partner position: start date: end date:
    • location: Undebate type: partner position: start date: end date:
    • location: about type: partner position: 16 start date: end date:
  • name: EnCiv image: /assets/images/partners/enciv.svg link: https://enciv.org/ instance:
    • location: Vote / Representation type: partner position: start date: end date:
    • location: Undebate type: partner position: start date: end date:
    • location: about type: partner position: 17 start date: end date:
  • name: UCLA Law image: /assets/images/partners/ucla-law.png link: https://law.ucla.edu/ instance:
    • location: Justice type: partner position: start date: end date:
    • location: Youth Justice Nav type: partner position: start date: end date:
    • location: about type: partner position: 18 start date: end date:
  • name: Golden Gate University School of Law image: /assets/images/partners/ggu-school-of-law.png link: https://law.ggu.edu/ instance:
    • location: Justice type: partner position: start date: end date:
    • location: Youth Justice Nav type: partner position: start date: end date:
    • location: about type: partner position: 19 start date: end date:
  • name: Los Angeles County District Attorney image: /assets/images/partners/da-county-of-la.png link: https://da.lacounty.gov/ instance:
    • location: Social Safety Net type: partner position: 20 start date: end date:
    • location: Heart type: partner position: start date: end date:
    • location: about type: partner position: start date: end date:
  • name: Digital Defense Fund image: /assets/images/partners/digital-defense-fund.png link: https://digitaldefensefund.org/ instance:
    • location: Vote / Representation type: partner position: start date: end date:
    • location: HelloGOV type: partner position: start date: end date:
    • location: about type: partner position: 21 start date: end date:
  • name: City of Los Angeles Personnel Department image: /assets/images/partners/la-department-of-personnel.png link: https://personnel.lacity.org/ instance:
    • location: Workforce Development type: partner position: start date: end date:
    • location: Work for LA type: partner position: start date: end date:
    • location: about type: partner position: 22 start date: end date:
  • name: The Los Angeles County Homeless Initiative image: /assets/images/partners/la-county-homeless-initiative.png link: https://homeless.lacounty.gov/ instance:
    • location: Social Safety Net type: partner position: start date: end date:
    • location: Jobs for Hope type: partner position: start date: end date:
    • location: about type: partner position: 24 start date: end date:
  • name: Hope of the Valley image: /assets/images/partners/hope-of-the-valley.png link: https://www.hopeofthevalley.org/ instance:
    • location: Social Safety Net type: partner position: start date: end date:
    • location: Jobs for Hope type: partner position: start date: end date:
    • location: about type: partner position: 24 start date: end date:

ExperimentsInHonesty avatar May 05 '24 18:05 ExperimentsInHonesty

  • This issue replaces #5948

ExperimentsInHonesty avatar May 06 '24 01:05 ExperimentsInHonesty

Please, can someone from the @hackforla/website-merge team give me a review on this ER and see if you see any problems with it before I prioritize?

ExperimentsInHonesty avatar May 06 '24 04:05 ExperimentsInHonesty

hold until I finish talking to People depot.

ExperimentsInHonesty avatar May 07 '24 00:05 ExperimentsInHonesty