Skip to content

Conversation

@Khalilsqu
Copy link
Collaborator

Description

This PR introduces alphabetical sorting for all resources, categories, and subcategories in the README to improve readability and navigation.

Key Changes:

  • Alphabetical Order: Resources are now sorted case-insensitively by name at all levels (categories, subcategories, nested resources).
  • TOC Consistency: The table of contents now reflects the sorted structure.
  • Special Handling: Maintained table format for "Software and Tools" while sorting entries.
  • Recursive Sorting: Implemented hierarchical sorting for nested subcategories.

Why This Matters

  • 🔍 Easier Navigation: Users can quickly locate resources without scanning entire sections.
  • 🧩 Consistency: Standardizes the presentation of 300+ resources.
  • 🤖 Automation: Ensures future additions will follow alphabetical order.

Technical Details

  • Used sorted(resources, key=lambda x: x['name'].lower()) for case-insensitive sorting.
  • Updated process_subcategory and generate_toc functions to handle recursion.
  • Verified sorting integrity across all 8 main categories and 32 subcategories.

Note
This change does not affect existing URLs or resource metadata – only the display order is modified.

@Khalilsqu Khalilsqu marked this pull request as draft March 27, 2025 22:32
@Khalilsqu Khalilsqu marked this pull request as ready for review March 27, 2025 23:03
@Khalilsqu Khalilsqu requested a review from Copilot March 27, 2025 23:12
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements alphabetical sorting of resources, categories, and subcategories in the README to enhance readability and navigation.

  • Sorted resource lists in both the generation script and the README, using case-insensitive ordering.
  • Adjusted the table of contents and resource display to reflect the new sorted order.
  • Removed or reordered duplicate entries in the README.

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
scripts/generate_readme.py Updated functions to sort resource listings and added a docstring in github_star_count.
README.md Reordered resource entries alphabetically and removed duplicate entries where needed.
Files not reviewed (1)
  • awesome_geophysics.json: Language not supported
Comments suppressed due to low confidence (3)

scripts/generate_readme.py:148

  • [nitpick] The inline comment '# Remove sorting' may be confusing since resource sorting still occurs later; consider clarifying the comment to better reflect the intended behavior.
for category in data['AwesomeGeophysics']['categories']:  # Remove sorting

README.md:94

  • Duplicate entry for 'hypopy' detected; please verify that this resource is not inadvertently listed twice.
| **[`hypopy`](https://github.com/groupeLIAMG/hypopy)** | HYPOcenter location from arrival time data in PYthon. | [![GitHub stars](https://img.shields.io/github/stars/groupeLIAMG/hypopy?style=social)](https://github.com/groupeLIAMG/hypopy/stargazers) |

README.md:307

  • A duplicate 'Rock Physics Cheat Sheet' entry appears to have been reintroduced; if unintentional, please remove the extra instance.
| **[`Rock Physics Cheat Sheet`](https://static.squarespace.com/static/549dcda5e4b0a47d0ae1db1e/54a06d6ee4b0d158ed960042/1374593568367/Cheatsheet_Rock_Physics.pdf) |  Cheat Sheet for Rock Physics.

@Khalilsqu Khalilsqu merged commit e91b2e7 into aradfarahani:main Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant