Skip to content
This repository has been archived by the owner on May 11, 2022. It is now read-only.

Wiki Appears to be out of Order #16

Closed
jrg94 opened this issue Oct 3, 2018 · 4 comments
Closed

Wiki Appears to be out of Order #16

jrg94 opened this issue Oct 3, 2018 · 4 comments
Labels
bug Something isn't working

Comments

@jrg94
Copy link
Member

jrg94 commented Oct 3, 2018

I was just checking the wiki after a slew of changes thanks to Hacktoberfest, and I noticed the table is not alphabetized. We'll have to dig into this: https://github.com/TheRenegadeCoder/sample-programs/wiki/Alphabetical-Language-Catalog.

@jrg94 jrg94 added enhancement New feature or request bug Something isn't working and removed enhancement New feature or request labels Oct 3, 2018
@jrg94
Copy link
Member Author

jrg94 commented Oct 4, 2018

@jrg94
Copy link
Member Author

jrg94 commented Oct 4, 2018

I believe the change lines up with a set of merges that happened this morning around 11AM:

Unfortunately, I don't see anything out of the ordinary.

@jrg94
Copy link
Member Author

jrg94 commented Oct 4, 2018

I have a feeling the issue is related to the following line:

https://github.com/TheRenegadeCoder/sample-programs-wiki-generator/blob/9a1089d95b8ec7d4ec23592c9881de48b2973de1/generate_wiki/generate_wiki.py#L133

Here, we assume the list of folders is alphabetical. That seemed to be a safe bet for awhile, but I guess that's not valid anymore. I'm not sure why, but it may be worth sorting this list to ensure proper order.

@jrg94
Copy link
Member Author

jrg94 commented Oct 4, 2018

I think we can solve this issue using a basic sort:

sorted_list = sorted(unsorted_list, key=lambda s: s.casefold())

I chose this because of it's case folding which should fix any issues if case comes up. I know all the folders are lowercase but who knows what's happening to scramble everything. Just going to play it safe.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant