Azure / draft-classic

A tool for developers to create cloud-native applications on Kubernetes.
https://draft.sh
MIT License
3.92k stars 397 forks source link

Improve pack intelligence #845

Open bjornmagnusson opened 5 years ago

bjornmagnusson commented 5 years ago

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.

bacongobbler commented 5 years ago

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
bjornmagnusson commented 5 years ago

Yeah, that makes sense