draft-classic icon indicating copy to clipboard operation
draft-classic copied to clipboard

Improve pack intelligence

Open bjornmagnusson opened this issue 7 years ago • 2 comments

Discovered in discussions of #837, there is a need for an improved intelligence of the packs. Especially in the java case there are quite a few reasonable combinations out there.

  • Detect programming language version
  • Detect build tool
  • Maybe support for specific frameworks
  • ...more?

bjornmagnusson avatar Jul 26 '18 09:07 bjornmagnusson

I'm not sure we can reasonably chew this off given how many people are working on the project. There are a finite number of programming languages, but there are a significant amount of permutations of frameworks, build tools, programming language versions etc. We rely heavily on github/linguist to provide the sample code and metadata to train the naive bayesian classifier, and their sample data/bayesian classifier only detects the programming language in a given directory.

A simpler solution would probably be to disable the auto-detection of draft create, and prompt the user for the correct pack to use. That would allow us to "dumb down" the smart detection while still giving the user options for choosing the right pack.

For example:

$ draft create
Which pack should be used with this app?

1) java (75% certainty)
2) javascript (25% certainty)
3) None of these

Your selection: 3

Please choose one from the list of available packs:

1) c#
2) python
3) ...

Make a selection: 2

---> Ready to sail

bacongobbler avatar Aug 05 '18 08:08 bacongobbler

Yeah, that makes sense

bjornmagnusson avatar Aug 24 '18 14:08 bjornmagnusson