Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with the DIRECTORY.md script #14

Closed
dlesnoff opened this issue May 12, 2023 · 4 comments
Closed

Issue with the DIRECTORY.md script #14

dlesnoff opened this issue May 12, 2023 · 4 comments

Comments

@dlesnoff
Copy link
Collaborator

@ZoomRmc proposed a script to automatically fetch the names of the different algorithms implementations.
This script does not detect the catalan_numbers.nim file in the dynamic programming directory.
I would accept any PR that partially fix these algorithm's detection issues.

@ZoomRmc
Copy link
Contributor

ZoomRmc commented May 12, 2023

The script assumes implementations conform to the regular Nim module format, with the description being Doc comments. I wanted to mention on your PR, but got distracted.

I propose we just add the requirement to the guidelines.

The script should fall back on the file name to get the title in case it can't be read from the first line. I'll check it a bit later.

@ZoomRmc
Copy link
Contributor

ZoomRmc commented May 13, 2023

I've checked and can't reproduce. All files are detected, including the scripts directory, which I'm adding to a list of ignored sub dirs in a follow-up PR.

@ZoomRmc
Copy link
Contributor

ZoomRmc commented May 13, 2023

Here's the output after changes made in #15:

⚠: "dynamic_programming\catalan_numbers.nim". First line is not a doc comment! Deriving title from a file name.
⚠: "dynamic_programming\viterbi.nim". First line is not a doc comment! Deriving title from a file name.
<!--- DO NOT EDIT: This file is automatically generated by `directory.nim` -->

# The Algorithms — Nim: Directory Hierarchy

## Dynamic Programming
  * [Catalan Numbers](dynamic_programming/catalan_numbers.nim)
  * [Viterbi](dynamic_programming/viterbi.nim)

## Strings
  * [Check Anagram](strings/check_anagram.nim)

First two lines are written to standard error stream.

@dlesnoff
Copy link
Collaborator Author

I could not reproduce the issue on my desktop, I have to investigate this a little on my laptop.
Thank you for the PR, I will merge this tomorrow. Ping me if I forget.

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

No branches or pull requests

2 participants