examples icon indicating copy to clipboard operation
examples copied to clipboard

Put examples in folder by language

Open bkmgit opened this issue 4 years ago • 13 comments

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.

bkmgit avatar May 25 '21 05:05 bkmgit

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.

zoq avatar May 26 '21 18:05 zoq

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?

shrit avatar May 31 '21 22:05 shrit

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.)

rcurtin avatar Jun 04 '21 23:06 rcurtin

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! :+1:

mlpack-bot[bot] avatar Jul 04 '21 23:07 mlpack-bot[bot]

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 :).)

rcurtin avatar Jul 08 '21 21:07 rcurtin

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

shrit avatar Jul 12 '21 19:07 shrit

I will take it up.

dnabanita7 avatar Feb 24 '22 07:02 dnabanita7

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 avatar Feb 25 '22 05:02 dnabanita7

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.

dnabanita7 avatar Feb 25 '22 05:02 dnabanita7

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

bkmgit avatar Feb 25 '22 05:02 bkmgit

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.

bkmgit avatar Feb 25 '22 06:02 bkmgit

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. :+1:

rcurtin avatar Feb 25 '22 14:02 rcurtin

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.

bkmgit avatar Feb 25 '22 14:02 bkmgit

this is already done, see the repo with the last merged PR, therefore I am closing this issue

shrit avatar Jun 26 '24 16:06 shrit