Day10(part2)

Wow. Who would have known I would need a part two.

I was practicing presenting the demo portion of my final project presentation, when I realized that generate_results wasn’t working as it probably should. The more buttons I pressed (purposes I selected), more grants appeared. But logically, this SHOULDN’T be the case. Thinking in terms of filters on shopping sites, choosing no filters should generate all results, and selecting filters should narrow the results down. I had a thought of keeping it the way I had it, because it was still functional in a way, but I couldn’t figure out what to say if anyone asked my why I made it that way instead of the narrow-down way–I couldn’t justify myself.

And so I went back to change the code, when I realized no matter what obvious change I made in my code (e.g. st.write(“hello”)), my app wouldn’t budge at all. When I looked in my app’s “manage app” terminal(?), I noticed that the last output from the system was a code update made on the 16th (TWO DAYS AGO!!!) My app hadn’t been connected to my github code since then (it just kept running on the 12/16 version) and I hadn’t noticed, because it seemed functional (in my view at the time). (But thinking about it now, no wonder my attempts to hyperlinking the Uni High Website wasn’t working!! Maybe I knew it in the back of my mind but was just too lazy to figure it out with so little time left.) I realized this was because I had renamed the github repo (I did some Googling to see if anyone else had the problem), so I made numerous attempts to reconnect the two platforms by renaming (i.e. github repo and app url), creating copies (i.e. github repo and app), but it just never worked. And so, I ended up creating a completely new, blank app and github repo and copy and pasting my code into it.

Finally, now I could finally start to edit my generate_results. I was really tired by this point, but I kept going because I felt like I could do it, and I wanted to prove to myself that I could (that sounds a little weird, but I think I was a little crazy). I ended up figuring it out, and I couldn’t tell you how because I honestly don’t remember (it was just a lot of trial and error and reading my code again and again), but I do know that a key point in helping me do it was that when dictionary keys have single values, those single values can still be contained as a list. This made all of the so many slicing/hashing errors go away!!!!

Also, this is a little random, but I noticed that I used a lot of lists and dictionaries throughout my code. I wonder if that’s just because of my app’s function, or if they are more frequently used than other collection types.

But anyways, with less than 12 hours until the finals period tomorrow, I achieved a lot.

What I did:

  • created new github repo and Streamlit app
  • changed generate_results to narrow results down instead of adding more
  • made it so that choosing no purposes displays all grants for selected association
  • hyperlinked Uni High website (different link based on selected association)
  • updated my About Me section to include the new links (i.e. github repo and app)

Phew!!!

Now I need to get back to my presentation…

My App My GitHub Code

Written on December 18, 2024