Provide the ability to set configuration values via command line
Personne n'a encore pris cette issue.
- Langage dominant
- Python
- Étoiles
- 1.4k
- Forks
- 191
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
It would be helpful in many automation scenarios to provide a --c / --config name=value command-line option.
In many scripting scenarios, there is the need to vary configuration values for a single invocation of mssql-cli. For example, one might want to create an API implemented in terms of mssql-cli and provide callers the ability to use arguments representing configuration values. Or one might wish to write a batch job that does some kind of extract from a database (in a particular format which differs from the default format) and sends it somewhere. Currently, the only apparent way to do this is to copy the configuration file, vary the values one wants to change, write out a new copy of the configuration file, and then use the --mssqlclirc option to use the new copy. In the second scenario a person could do this (although the batch file configuration would now be completely detached from the original and would not reflect subsequent changes). In the first scenario, a script can certainly do this, but it now needs a configuration file parser / writer, and the process is not nearly so intuitive as what other tools provide.
Compare this with git, which provides the -c option, or Mercurial, which provides the --config option. In these cases, values provided on the command line override all other configuration sources. Tools have converged on this solution because it provides maximum flexibility to callers.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par localiser la gestion des options de ligne de commande et le chargement de la configuration dans mssql-cli, y compris le chemin --mssqlclirc. Suivez la manière dont les sources de configuration sont appliquées et définissez la priorité des remplacements --c/--config name=value. Le travail est terminé lorsque l’automatisation peut fournir des valeurs de configuration pour une seule exécution sans créer de fichier de configuration distinct.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- cli, databases
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100