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

Put examples in folder by language #154

Open
bkmgit opened this issue May 25, 2021 · 13 comments
Open

Put examples in folder by language #154

bkmgit opened this issue May 25, 2021 · 13 comments

Comments

@bkmgit
Copy link
Contributor

bkmgit commented May 25, 2021

Current readme indicates examples should be put in folders by programming language and/or environment. Do this and ensure that any paths are adjusted appropriately.

@zoq
Copy link
Member

zoq commented May 26, 2021

In this case we should update the README, because right now the structure is more like a folder, named after the problem and the method that is used to solve and in that folder there are language specific scripts.

@shrit
Copy link
Member

shrit commented May 31, 2021

Would it easier to organize that per example, rather than per programming language?
For instance, we can open a folder, and then inside we find a set of folders each one is named with a relative programming language. For instance, suppose we have the following example: lstm_electricity_consumption:
Inside it will be as follows:

lstm_electricity_consumption/
|- .
|- ..
|- Jupyter_notebook_code/   <-- code relative to Jupyter notebook
|- C++/    <-- code relative to C++, Makefiles, etc..
|- Go/     <-- similar thing here
|- Python/
|- etc/   <-- other language binding 
README.md <-- this will explain what is happening inside this folder.

This will standardize the structure on all sets of examples and will require few modifications since the current state is going in this direction.
In addition, the user is usually will start by looking for a specific example by name rather than a specific programming language.
Let me know what do you think?

@rcurtin
Copy link
Member

rcurtin commented Jun 4, 2021

I like @shrit's suggestion, but if we really wanted to get crazy, we could use symlinks, so that users could look either by programming language or by example. :)

https://mokacoding.com/blog/symliks-in-git/

(That may not work right on Windows if someone actually clones the repository, but it should at least work for browsing on Github.)

@mlpack-bot
Copy link

mlpack-bot bot commented Jul 4, 2021

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions! 👍

@mlpack-bot mlpack-bot bot added the s: stale label Jul 4, 2021
@rcurtin
Copy link
Member

rcurtin commented Jul 8, 2021

Should we keep this one open? I think it is maybe a nice idea, it just needs someone to take the initiative and do it. (Given infinite time, I will do it, but the task list won't be clean anytime soon :).)

@mlpack-bot mlpack-bot bot removed the s: stale label Jul 8, 2021
@shrit
Copy link
Member

shrit commented Jul 12, 2021

Yes, Let us keep this open, I will do it one day when I have the time unless someone volunteers to do this.

@dnabanita7
Copy link
Contributor

I will take it up.

@dnabanita7
Copy link
Contributor

The user can create symlinks accordingly, won't it be messy if we do it from our side? The number of examples will keep on increasing and for each example the respective folders and the language bindings will add up.

@dnabanita7
Copy link
Contributor

I like @shrit 's idea better. Let me know if we should go with symlinks or not.
So, we don't have bindings for all languages for a particular example at the moment. I will have to create that as well? It will be good if I take up one like lstm_electricity_consumption and create a sample PR for the same.

@bkmgit
Copy link
Contributor Author

bkmgit commented Feb 25, 2022

This could also be done in the README document. The list of examples could be updated to have links and the language used.

@bkmgit
Copy link
Contributor Author

bkmgit commented Feb 25, 2022

The main README is sufficient, but feel free to do anything else that would make it easier for others to use the examples and find appropriate ones.

@rcurtin
Copy link
Member

rcurtin commented Feb 25, 2022

Yeah, symlinks might be not a great solution here. If we want to arrange things such that the primary way we intend for users to find examples is by reading the README, then it may be worth putting all the examples under an examples/ subfolder, so that when someone accesses the Github repository they don't have to scroll far to get to the README and the organized list of examples. 👍

@bkmgit
Copy link
Contributor Author

bkmgit commented Feb 25, 2022

Maybe the top of the README should have the list of examples and the languages they are available in? It need not have the links, but this would save time checking each folder to find if it has examples in the language you want to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants