profile
viewpoint
David Genest davidovich Montreal

davidovich/flask-mongokit 1

Flask-MongoKit simplifies to use MongoKit, a powerful MongoDB ORM in Flask applications.

davidovich/mongokit 1

MongoKit framework try to keep its simplicity when you manage mongodb in python. MongoKit was developed to be fast and light with KISS and DRY in mind. MongoKit brings structured schema and validation layer on top of the great pymongo driver. Discuss with us on Google group : http://groups.google.com/group/mongokit or follow the news on Twitter: http://twitter.com/namlook

cjauvin/chartmuseum 0

Helm Chart Repository with support for Amazon S3 and Google Cloud Storage

davidovich/angular-leaflet-directive 0

AngularJS directive to embed an interact with maps managed by Leaflet library

davidovich/angular-seed 0

Seed project for angular apps.

davidovich/betamax 0

A VCR imitation designed only for python-requests.

davidovich/boltons 0

Like builtins, but boltons. Constructs/recipes/snippets that would be handy in the standard library. Nothing like Michael Bolton.

davidovich/bootstrap 0

Native AngularJS (Angular) directives for Twitter's Bootstrap. Small footprint (5kB gzipped!), no 3rd party JS dependencies (jQuery, bootstrap JS) required!

startedgohugoio/hugoDocs

started time in 5 days

delete branch davidovich/summon

delete branch : fix-default-outputdir

delete time in 5 days

push eventdavidovich/summon

David Genest

commit sha 40ea1f238e4c7fdaa52182940d0fdc222c8a9dfc

add failing test

view details

David Genest

commit sha 6785c2d2657ef0e05ff78b989006eaf5bfbc613f

use config.OutputDir as default parameter value instead of a global forgotten variable.

view details

David Genest

commit sha 54042af0a4a38629590c29a880454506c8f5e4f2

Merge pull request #70 from davidovich/fix-default-outputdir Fix default outputdir when configured

view details

push time in 5 days

PR merged davidovich/summon

Fix default outputdir

fixes #69

+13 -16

0 comment

7 changed files

davidovich

pr closed time in 5 days

issue closeddavidovich/summon

bug: outputdir configured in summon.config.yaml is not honoured

The .summoned default outputdir is overriden only if passed as -o command-line parameter.

closed time in 5 days

davidovich

PR opened davidovich/summon

Fix default outputdir

fixes #69

+13 -16

0 comment

7 changed files

pr created time in 5 days

create barnchdavidovich/summon

branch : fix-default-outputdir

created branch time in 5 days

issue openeddavidovich/summon

bug: outputdir configured in summon.config.yaml is not honoured

The .summoned default outputdir is overriden only if passed as -o command-line parameter.

created time in 5 days

startedjsonnet-libs/k8s

started time in 6 days

startedgohugoio/hugo

started time in 21 days

issue commentbep/algolia-test

hugo mod vendor breaks this site

@bep any pointers ?

davidovich

comment created time in 23 days

issue openedbep/algolia-test

hugo mod vendor breaks this site

I have been trying to learn hugo with it's mod support, and found this repo.

In a plain checkout this works:

hugo server

But if I do a hugo mod vendor, then hugo server,

I get this error:

Error: "/Users/david/Documents/dev/hugo/algolia-test/_vendor/github.com/gohugoio/hugo-mod-heroicons" not found: module does not exist

In fact, I cannot find the github.com/gohugoio/hugo-mod-heroicons under the _vendor dir. Is it because there are no go files at the module root and the go module system removes the files from the vendor folder ?

If I hugo mod get github.com/gohugoio/hugo-mod-heroicons:

david$ hugo mod get github.com/gohugoio/hugo-mod-heroicons
go: github.com/gohugoio/hugo-mod-heroicons upgrade => v0.0.0-20200822140006-fc590bc3dc55

I then delete the _vendor folder

I get:

Error: Error building site: failed to render pages: render of "home" failed: "/Users/david/Documents/dev/hugo/algolia-test/layouts/index.html:11:22": execute of template failed: template: index.html:11:22: executing "main" at <$icon.Content>: nil pointer evaluating resource.Resource.Content

hugo version: v0.75.1 go version: go version go1.15 darwin/amd64 MacOS 10.14.6

created time in 23 days

push eventdavidovich/davidovich.github.io

automation

commit sha 6dd1a17b28bc3420d2ddbc67aa40bd9f9719b3e6

automated coverage commit of 83.8 %

view details

push time in 25 days

delete branch davidovich/summon

delete branch : davidovich/issue55

delete time in 25 days

push eventdavidovich/summon

david

commit sha 12cfa7a9aaa4bdbb823eef050b92945626b0ef4b

adds config option to fold invocables to root

view details

david

commit sha d4e4be216dca88e295d7de22a7121cdff94039ec

prepares delegation to runCmd for invocable list

view details

David Genest

commit sha de9eb69a726f89f716c7952577e3002043f22fad

fix master divergences

view details

David Genest

commit sha 6516edb24f26eeeba4280cf430943ce3ac270cfc

adds experimental direct calls on command in this mode, invocables are not attached to the `run` subcommand, and are directly invocable.

view details

David Genest

commit sha 58b4a4506d832f6a13349e12760247c124282e80

removes the config file option to disable `run` Instead of allowing dynamic configuration, this config should be a compile time decision, so that the interface wanted by the user cannot be changed by error in the summon.config.yaml. Introduces a programmatic config knob for the user for future configuration purposes. Keeps the config commit 6516edb24f26eeeba4280cf430943ce3ac270cfc for future reference.

view details

David Genest

commit sha 6d4c6eeaf79fb5b62ed8badc280a3ebe4527f9d0

Merge pull request #68 from davidovich/davidovich/issue55 allow anchoring invocables directly to main command

view details

push time in 25 days

PR merged davidovich/summon

allow anchoring invocables directly to main command

This PR allows folding summonable assets and runnable invocables on the main command.

This behavior is enabled by adding summon.WithoutRunCmd() to the main summon.Main() entry-point.

fixes #55

+237 -80

0 comment

13 changed files

davidovich

pr closed time in 25 days

issue closeddavidovich/summon

feature: fold invocables at main command

This will allow invocations like: summon hello where hello is an invocable handle reference. Allows to omit the run subcommand.

<!-- Edit the body of your new issue then click the ✓ "Create Issue" button in the top right of the editor. The first line will be the issue title. Assignees and Labels follow after a blank line. Leave an empty line before beginning the body of the issue. -->

closed time in 25 days

davidovich

PR opened davidovich/summon

allow anchoring invocables directly to main command

This PR allows folding summonable assets and runnable invocables on the main command.

This behavior is enabled by adding summon.WithoutRunCmd() to the main summon.Main() entry-point.

+237 -80

0 comment

13 changed files

pr created time in 25 days

push eventdavidovich/summon

David Genest

commit sha 58b4a4506d832f6a13349e12760247c124282e80

removes the config file option to disable `run` Instead of allowing dynamic configuration, this config should be a compile time decision, so that the interface wanted by the user cannot be changed by error in the summon.config.yaml. Introduces a programmatic config knob for the user for future configuration purposes. Keeps the config commit 6516edb24f26eeeba4280cf430943ce3ac270cfc for future reference.

view details

push time in 25 days

issue openeddavidovich/summon

feature: support dynamic completions and delegation

Allow calling into a user defined completion program (including self references).

This will require changing the format of the invocables to allow further customizations (help, completion hook, cmd etc.)

A design will follow.

Dynamic completion from cobra:

https://github.com/spf13/cobra/blob/master/shell_completions.md#customizing-completions

created time in a month

issue closeddavidovich/summon

bug: older versions of packr2 create an uninstallable asset repo

If the user is not using packr2 > v2.2.0, the build process (suggested in the scaffold) creates a wrong packrd import path:

$ cat summon/main-packr.go  
// +build !skippackr 
// Code generated by github.com/gobuffalo/packr/v2. DO NOT EDIT.

// You can use the "packr clean" command to clean up this,
// and any other packr generated files.
package main
 
import _ "github.com/davidovich/summon-example-assets/fleet-summon/packrd"

instead of

import _ "github.com/davidovich/summon-example-assets/fleet-summon/summon/packrd"

closed time in a month

davidovich

create barnchdavidovich/summon

branch : davidovich/issue55

created branch time in 2 months

issue openeddavidovich/summon

Simplify testing helpers

I think testing helpers can be moved to the testutil package as all we do with the helper is recuperate and evaluate executable arguments.

i.e No need to specify a test to call on every FakeExecCommand as we only use it in one manner.

<!-- Edit the body of your new issue then click the ✓ "Create Issue" button in the top right of the editor. The first line will be the issue title. Assignees and Labels follow after a blank line. Leave an empty line before beginning the body of the issue. -->

created time in 2 months

push eventdavidovich/davidovich.github.io

automation

commit sha ab9d0698d31b3d462ad427da2c4c1d4a3e298617

automated coverage commit of 82.5 %

view details

push time in 2 months

delete branch davidovich/summon

delete branch : better-makefile-in-scaffolded-data

delete time in 2 months

push eventdavidovich/summon

David Genest

commit sha f850ec609f613b78353127cbc19a9abca269fe5d

adds dependencies on summon files for better make make now depends on all summon packages, to help the tight dev loop. make rebuilds if changes were made in summon or a go mod replace of it.

view details

David Genest

commit sha e8649ec9cb3851be8a140c71fb70f9a17b50072a

no exclude stdlib as input modules are specified

view details

David Genest

commit sha ca4609e658df40c84f1cf3365c8f2d40a1c5ecce

updates scaffold embedded data

view details

David Genest

commit sha 54e8bc3aae77e67b5af1b3eaac576759ec15131d

Merge pull request #65 from davidovich/better-makefile-in-scaffolded-data Better makefile in scaffolded data

view details

push time in 2 months

push eventdavidovich/summon

David Genest

commit sha 9c5f1dcc80148f5b5f1d8cef656b9f50b2192fbe

adds args,osArgs predefined data for config tmpl user can now use {{ index .args 0 }} to get at the passed arguments invokable arguments can be defined in multiple arrays which will be flattened. This allows yaml anchor usages: ``` base: &base - a - b ... exec: bash -c: echo: [*base, c, d] ``` Without flattening, this would result in: [[a,b], c, d], but now, it renders nicely to [a, b, c, d]

view details

David Genest

commit sha d564ec733513fc0cc56e741f35a922181b09eef6

add documentation of new features

view details

David Genest

commit sha c566824b5718475b6488773543b785d5417bb148

fix edge case on single and double '-', '--'

view details

David Genest

commit sha 18218d14bc1d7813831a5cfb765991ed30c13ab1

unused args should be present on the command line merge array representation with final arg array

view details

David Genest

commit sha 67f671fd6bd60f17933fd7a0885b05dd59eabe8d

adds template naming according to driver exe name this gives better error messages when the exe is not named "summon".

view details

David Genest

commit sha a4e3f5eb61322880d2cf80685828cfe2bc2ded24

better implementation of args consumption

view details

David Genest

commit sha a48f7052e1b09cf791809815962efa919f234711

add all args access test

view details

David Genest

commit sha 6c38b32d56cdd7a562ba54f96b9e1bd4378716ec

Merge pull request #63 from davidovich/introduce-args-and-args-flatten adds arg, args and osArgs predefined data for config tmpl

view details

David Genest

commit sha de0911e16a0845c862639d82e238a7e29d1365f2

Merge pull request #64 from davidovich/name-templates-by-driver-name adds template naming according to driver exe name

view details

David Genest

commit sha f850ec609f613b78353127cbc19a9abca269fe5d

adds dependencies on summon files for better make make now depends on all summon packages, to help the tight dev loop. make rebuilds if changes were made in summon or a go mod replace of it.

view details

David Genest

commit sha e8649ec9cb3851be8a140c71fb70f9a17b50072a

no exclude stdlib as input modules are specified

view details

David Genest

commit sha ca4609e658df40c84f1cf3365c8f2d40a1c5ecce

updates scaffold embedded data

view details

push time in 2 months

delete branch davidovich/summon

delete branch : name-templates-by-driver-name

delete time in 2 months

push eventdavidovich/summon

David Genest

commit sha 67f671fd6bd60f17933fd7a0885b05dd59eabe8d

adds template naming according to driver exe name this gives better error messages when the exe is not named "summon".

view details

David Genest

commit sha de0911e16a0845c862639d82e238a7e29d1365f2

Merge pull request #64 from davidovich/name-templates-by-driver-name adds template naming according to driver exe name

view details

push time in 2 months

PR merged davidovich/summon

adds template naming according to driver exe name

this gives better error messages when the exe is not named "summon".

+6 -2

0 comment

3 changed files

davidovich

pr closed time in 2 months

PR opened davidovich/summon

adds template naming according to driver exe name

this gives better error messages when the exe is not named "summon".

+6 -2

0 comment

3 changed files

pr created time in 2 months

push eventdavidovich/davidovich.github.io

automation

commit sha b2974f1f7c679782b2dcd0304a81405bc0c614fc

automated coverage commit of 82.6 %

view details

push time in 2 months

delete branch davidovich/summon

delete branch : introduce-args-and-args-flatten

delete time in 2 months

push eventdavidovich/summon

David Genest

commit sha 9c5f1dcc80148f5b5f1d8cef656b9f50b2192fbe

adds args,osArgs predefined data for config tmpl user can now use {{ index .args 0 }} to get at the passed arguments invokable arguments can be defined in multiple arrays which will be flattened. This allows yaml anchor usages: ``` base: &base - a - b ... exec: bash -c: echo: [*base, c, d] ``` Without flattening, this would result in: [[a,b], c, d], but now, it renders nicely to [a, b, c, d]

view details

David Genest

commit sha d564ec733513fc0cc56e741f35a922181b09eef6

add documentation of new features

view details

David Genest

commit sha c566824b5718475b6488773543b785d5417bb148

fix edge case on single and double '-', '--'

view details

David Genest

commit sha 18218d14bc1d7813831a5cfb765991ed30c13ab1

unused args should be present on the command line merge array representation with final arg array

view details

David Genest

commit sha a4e3f5eb61322880d2cf80685828cfe2bc2ded24

better implementation of args consumption

view details

David Genest

commit sha a48f7052e1b09cf791809815962efa919f234711

add all args access test

view details

David Genest

commit sha 6c38b32d56cdd7a562ba54f96b9e1bd4378716ec

Merge pull request #63 from davidovich/introduce-args-and-args-flatten adds arg, args and osArgs predefined data for config tmpl

view details

push time in 2 months

PR merged davidovich/summon

adds args,osArgs predefined data for config tmpl

user can now use {{ index .args 0 }} to get at the passed arguments

invokable arguments can be defined in multiple arrays which will be flattened. This allows yaml anchor usages:

base: &base
 - a
 - b
...
exec:
  bash -c:
    echo: [*base, c, d]

Without flattening, this would result in:

[[a,b], c, d], but now, it renders nicely to [a, b, c, d]

+347 -63

0 comment

11 changed files

davidovich

pr closed time in 2 months

push eventdavidovich/summon

David Genest

commit sha a48f7052e1b09cf791809815962efa919f234711

add all args access test

view details

push time in 2 months

push eventdavidovich/summon

David Genest

commit sha a4e3f5eb61322880d2cf80685828cfe2bc2ded24

better implementation of args consumption

view details

push time in 2 months

push eventdavidovich/summon

David Genest

commit sha de1f57e11a903222f4fcece20cfc512e34603d35

better implementation of args consumption

view details

push time in 2 months

push eventdavidovich/summon

David Genest

commit sha 9c5f1dcc80148f5b5f1d8cef656b9f50b2192fbe

adds args,osArgs predefined data for config tmpl user can now use {{ index .args 0 }} to get at the passed arguments invokable arguments can be defined in multiple arrays which will be flattened. This allows yaml anchor usages: ``` base: &base - a - b ... exec: bash -c: echo: [*base, c, d] ``` Without flattening, this would result in: [[a,b], c, d], but now, it renders nicely to [a, b, c, d]

view details

David Genest

commit sha d564ec733513fc0cc56e741f35a922181b09eef6

add documentation of new features

view details

David Genest

commit sha c566824b5718475b6488773543b785d5417bb148

fix edge case on single and double '-', '--'

view details

David Genest

commit sha 18218d14bc1d7813831a5cfb765991ed30c13ab1

unused args should be present on the command line merge array representation with final arg array

view details

David Genest

commit sha 67f671fd6bd60f17933fd7a0885b05dd59eabe8d

adds template naming according to driver exe name this gives better error messages when the exe is not named "summon".

view details

push time in 2 months

push eventdavidovich/summon

David Genest

commit sha 9c5f1dcc80148f5b5f1d8cef656b9f50b2192fbe

adds args,osArgs predefined data for config tmpl user can now use {{ index .args 0 }} to get at the passed arguments invokable arguments can be defined in multiple arrays which will be flattened. This allows yaml anchor usages: ``` base: &base - a - b ... exec: bash -c: echo: [*base, c, d] ``` Without flattening, this would result in: [[a,b], c, d], but now, it renders nicely to [a, b, c, d]

view details

David Genest

commit sha d564ec733513fc0cc56e741f35a922181b09eef6

add documentation of new features

view details

David Genest

commit sha c566824b5718475b6488773543b785d5417bb148

fix edge case on single and double '-', '--'

view details

David Genest

commit sha 18218d14bc1d7813831a5cfb765991ed30c13ab1

unused args should be present on the command line merge array representation with final arg array

view details

push time in 2 months

push eventdavidovich/summon

David Genest

commit sha 7ca70eaf0b3130921ab192f974471e0052c03d55

adds dependencies on summon files for better make make now depends on all summon packages, to help the tight dev loop. make rebuilds if changes were made in summon or a go mod replace of it.

view details

David Genest

commit sha aeee44606c55e889bd21d567330093b85ff75483

no exclude stdlib as input modules are specified

view details

push time in 2 months

push eventdavidovich/summon

David Genest

commit sha 1a4ecfc80db942efa5b8f65ccf5c9ea585bdc200

no exclude stdlib as input modules are specified

view details

push time in 2 months

push eventdavidovich/summon

David Genest

commit sha a7d226352bbf1ea315170bcc91fec72605e46502

fix edge case on single and double '-', '--'

view details

David Genest

commit sha 51f0cf4e93f6943259becdd1e07cdcf7834530c6

unused args should be present on the command line merge array representation with final arg array

view details

push time in 2 months

push eventdavidovich/summon

David Genest

commit sha aaa677417e41bcb7a37ccd1416241de43d881a26

add documentation of new features

view details

push time in 2 months

create barnchdavidovich/summon

branch : better-makefile-in-scaffolded-data

created branch time in 2 months

create barnchdavidovich/summon

branch : name-templates-by-driver-name

created branch time in 2 months

PR opened davidovich/summon

adds args,osArgs predefined data for config tmpl

user can now use {{ index .args 0 }} to get at the passed arguments

invokable arguments can be defined in multiple arrays which will be flattened. This allows yaml anchor usages:

base: &base
 - a
 - b
...
exec:
  bash -c:
    echo: [*base, c, d]

Without flattening, this would result in:

[[a,b], c, d], but now, it renders nicely to [a, b, c, d]

+142 -34

0 comment

7 changed files

pr created time in 2 months

create barnchdavidovich/summon

branch : introduce-args-and-args-flatten

created branch time in 2 months

delete branch davidovich/summon

delete branch : davidovich/issue61

delete time in 2 months

startedgrafana/tanka

started time in 2 months

created tagdavidovich/summon

tagv0.11.0

Summon: your data on caffeine

created time in 2 months

release davidovich/summon

v0.11.0

released time in 2 months

push eventdavidovich/davidovich.github.io

automation

commit sha d97ab043a707927824a9798d4eb111eda82cc5cf

automated coverage commit of 80.7 %

view details

push time in 2 months

push eventdavidovich/summon

david

commit sha c461377c8cb01ee7e11b140d853ce6518f600ca2

breaking: improve rendering algorithm of commands This breaks the config format which now takes an array of prameters to the invoker. The array is passed after the handle. fixes bug: suffix params are passed as single string render invoker template, then render the target The command line is better separated now. Fixes #61

view details

david

commit sha ac89c11b94b9b252ec36427a5cbbf6e60b8b63ca

Update doc for new exec config format

view details

David Genest

commit sha 3acecc09089848c4c2f4687cb52fa446cbb145db

Merge pull request #62 from davidovich/davidovich/issue61 breaking: improve rendering algorithm of commands

view details

push time in 2 months

PR merged davidovich/summon

breaking: improve rendering algorithm of commands

This breaks the config format which now takes an array of prameters to the invoker. The array is passed after the handle.

fixes bug: suffix params are passed as single string

render invoker template, then render the target The command line is better separated now.

Fixes #61

+68 -67

0 comment

8 changed files

davidovich

pr closed time in 2 months

issue closeddavidovich/summon

bug: suffix params are passed as single string

This causes the invoker to fail when multiple params are passed.

<!-- Edit the body of your new issue then click the ✓ "Create Issue" button in the top right of the editor. The first line will be the issue title. Assignees and Labels follow after a blank line. Leave an empty line before beginning the body of the issue. -->

closed time in 2 months

davidovich

push eventdavidovich/summon

david

commit sha ac89c11b94b9b252ec36427a5cbbf6e60b8b63ca

Update doc for new exec config format

view details

push time in 2 months

PR opened davidovich/summon

breaking: improve rendering algorithm of commands

This breaks the config format which now takes an array of prameters to the invoker. The array is passed after the handle.

fixes bug: suffix params are passed as single string

render invoker template, then render the target The command line is better separated now.

Fixes #61

+60 -61

0 comment

7 changed files

pr created time in 2 months

create barnchdavidovich/summon

branch : davidovich/issue61

created branch time in 2 months

issue openeddavidovich/summon

bug: suffix params are passed as single string

This causes the invoker to fail when multiple params are passed.

<!-- Edit the body of your new issue then click the ✓ "Create Issue" button in the top right of the editor. The first line will be the issue title. Assignees and Labels follow after a blank line. Leave an empty line before beginning the body of the issue. -->

created time in 2 months

pull request commentgrafana/tanka

feat(helmraiser): automatic repository resolution

@Duologic I think this is an improvement on your excellent idea. Building upon existing code an initiatives is what (to me) makes OpenSource so fulfilling.

From what I can see, this PR essentially adds helm repo update, which is missing from the initial work, and this is probably needed from a usability perspective.

sh0rez

comment created time in 2 months

issue commentgrafana/tanka

request: support more of the normal jsonnet input flags

I think this is a valid ask, and Tanka could enforce its preferred order, and append the user defined -J paths.

I have a shared base config for CI-CD, and this would allow inclusion even if not in the intended Tanka import order.

ghostsquad

comment created time in 2 months

created tagdavidovich/summon

tagv0.10.0

Summon: your data on caffeine

created time in 2 months

release davidovich/summon

v0.10.0

released time in 2 months

delete branch davidovich/summon

delete branch : davidovich/issue59

delete time in 2 months

push eventdavidovich/summon

david

commit sha 574ddfa7befde908851fbe05863910823d8fab2d

listen on CTRL-C for proper process termination Fixes #59

view details

David Genest

commit sha 5e752c09f017a217fe703ab2083d5a5b4384ae9d

Merge pull request #60 from davidovich/davidovich/issue59 listen on CTRL-C for proper process termination

view details

push time in 2 months

PR opened davidovich/summon

listen on CTRL-C for proper process termination

Fixes #59

+10 -0

0 comment

1 changed file

pr created time in 2 months

create barnchdavidovich/summon

branch : davidovich/issue59

created branch time in 2 months

delete branch davidovich/summon

delete branch : improve-go-doc

delete time in 2 months

delete branch davidovich/summon

delete branch : add-self-reference-summon-template-function

delete time in 2 months

push eventdavidovich/davidovich.github.io

automation

commit sha b11f0a3f1491f39a5f112c0f3083d84ffb57db02

automated coverage commit of 81.3 %

view details

push time in 2 months

delete branch davidovich/summon

delete branch : fix-json-params-in-run

delete time in 2 months

delete branch davidovich/summon

delete branch : davidovich/issue57

delete time in 2 months

push eventdavidovich/summon

david

commit sha a3b61a83e7b8de23f6b78366fb54245d1a0773e5

feature: Add a global debug switch Fixes #57

view details

David Genest

commit sha acc4e52be62bfcd30cf10b4267bfd2e7b2ed4e3e

Merge pull request #58 from davidovich/davidovich/issue57 feature: Add a global debug switch

view details

push time in 2 months

PR merged davidovich/summon

feature: Add a global debug switch

Fixes #57

+56 -6

0 comment

5 changed files

davidovich

pr closed time in 2 months

issue closeddavidovich/summon

feature: Add a global debug switch

Running through the run command can be hard to debug (what was the command that was invoked). Add a debug switch to show the command-line.

This will be the first diagnostic function, there may be others.

<!-- Edit the body of your new issue then click the ✓ "Create Issue" button in the top right of the editor. The first line will be the issue title. Assignees and Labels follow after a blank line. Leave an empty line before beginning the body of the issue. -->

closed time in 2 months

davidovich

PR opened davidovich/summon

feature: Add a global debug switch

Fixes #57

+56 -6

0 comment

5 changed files

pr created time in 2 months

create barnchdavidovich/summon

branch : davidovich/issue57

created branch time in 2 months

issue openeddavidovich/summon

feature: Add a global debug switch

Running through the run command can be hard to debug (what was the command that was invoked). Add a debug switch to show the command-line.

This will be the first diagnostic function, there may be others.

<!-- Edit the body of your new issue then click the ✓ "Create Issue" button in the top right of the editor. The first line will be the issue title. Assignees and Labels follow after a blank line. Leave an empty line before beginning the body of the issue. -->

created time in 2 months

issue commentspf13/cobra

Option to pass unknown flags to command

Once we have a pflags unknown flag set, we should be able to easily get it back to the cobra application code.

In fact, just a module version bump would suffice as Flags() returns a FlagSet already, on which we can call the new SetUnknownFlagsSlice() API.

underrun

comment created time in 2 months

pull request commentspf13/pflag

Add a method to expose unknown flags back to the user

This is a really simple, and to my understanding, a missing piece to the unknown flags mechanism. This would easily fix spf13/cobra#739.

ijc

comment created time in 2 months

push eventdavidovich/davidovich.github.io

automation

commit sha 036299c3bcb5ff70f22d0ed85777cae688ff4363

automated coverage commit of 84.1 %

view details

push time in 2 months

push eventdavidovich/summon

david

commit sha 85a884c8a4c7df3731cb1a0fa66bd95c4924c40d

fix json configuration on command-line

view details

David Genest

commit sha 82a5afcb8424bed61cfcf8757eece3618f6da4c9

Merge pull request #56 from davidovich/fix-json-params-in-run fix json configuration on command-line

view details

push time in 2 months

push eventdavidovich/summon

david

commit sha 85a884c8a4c7df3731cb1a0fa66bd95c4924c40d

fix json configuration on command-line

view details

push time in 2 months

PR opened davidovich/summon

fix json configuration on command-line
+143 -6

0 comment

4 changed files

pr created time in 2 months

create barnchdavidovich/summon

branch : fix-json-params-in-run

created branch time in 2 months

issue commentspf13/cobra

Option to pass unknown flags to command

If anyone wants a workaround, I came up with this atrocity:

func extractUnknownArgs(flags *pflag.FlagSet, args []string) []string {
	unknownArgs := []string{}

	for i := 0; i < len(args); i++ {
		a := args[i]
		var f *pflag.Flag
		if a[0] == '-' {
			if a[1] == '-' {
				f = flags.Lookup(strings.SplitN(a[2:], "=", 2)[0])
			} else {
				for _, s := range a[1:] {
					f = flags.ShorthandLookup(string(s))
					if f == nil {
						break
					}
				}
			}
		}
		if f != nil {
			if f.NoOptDefVal != "" && i+1 < len(args) && f.Value.String() == args[i+1] {
				i++
			}
			continue
		}
		unknownArgs = append(unknownArgs, a)
	}
	return unknownArgs
}
underrun

comment created time in 2 months

issue commentspf13/cobra

Option to pass unknown flags to command

I have a use case where I am writing a generic command runner. This runner is configurable by the user, and can call into many utility scripts, but the runner itself cannot know at build time what it will delegate to, only the user knows the flags at invocation time.

A binary plugin system where a driver is responsible for delegating to a subordinate cli is yet another use-case.

I see this kind of usage:

c := &cobra.Command{
	Use:		    "run",
	FParseErrWhitelist: cobra.FParseErrWhitelist{UnknownFlags: true},
	RunE: func(cmd *cobra.Command, args []string) error {
		cmd.SilenceUsage = true
		// use the hypothetical UnknownArgs() pflag API
		delegatedArgs := cmd.Flags().UnknownArgs()
		child := exec.Command(args[0], delegatedArgs...)
		return child.Run()
	},
}

underrun

comment created time in 2 months

issue commentspf13/cobra

Option to pass unknown flags to command

I also think cobra could help here. Something in the lines of python's parse_known_args would allow us to parse known flags and pass other flags to wrapped commands.

underrun

comment created time in 2 months

push eventdavidovich/summon

david

commit sha 1547b36e22a9696ef54cf5ce6f290638cc85c9b2

fix coverage calculation by using gobin -run

view details

push time in 2 months

issue openeddavidovich/summon

feature: fold invocables at main command

This will allow invocations like: summon hello where hello is an invocable handle reference. Allows to omit the run subcommand.

<!-- Edit the body of your new issue then click the ✓ "Create Issue" button in the top right of the editor. The first line will be the issue title. Assignees and Labels follow after a blank line. Leave an empty line before beginning the body of the issue. -->

created time in 2 months

push eventdavidovich/summon

david

commit sha 275d47c572037d29b5a235c2b0edaa06f08b0f2e

adds possibilty to summon asset data in invokables implemented with the {{ summon "asset" }} template function. Works like summon itself, but will summon to a temp directory. The summoned file is passed to the invoker. See summon/pkg/summon/testdata/summon.config.yaml for an example. fixes allow self-packed references #12

view details

david

commit sha dcebde75baaf734853a082e53690c361b0f86e64

fix complex multi-param invocation

view details

david

commit sha 22309e73b4815ebefca4c0a472fa7f2ff74ef60c

fix escaping

view details

david

commit sha 7942ee05cf8cddbdb6d15ff2ce5458fd593513c5

document new features

view details

david

commit sha 15bd823fb5f5d2ae15f031d0e19bc2c66f658409

fix TempDir() mac vs linux discrepancy in tests

view details

David Genest

commit sha 0a3cbc0f604eff2803e45b188388739b2548ef6b

Merge pull request #54 from davidovich/add-self-reference-summon-template-function Add self reference summon template function

view details

push time in 2 months

more