dvc icon indicating copy to clipboard operation
dvc copied to clipboard

config: limit section names(e.g. remote) to alpha-numeric

Open efiop opened this issue 6 years ago • 6 comments

~~https://github.com/iterative/dvc/pull/2012#discussion_r290092102~~ See https://github.com/iterative/dvc/blob/master/dvc/config.py .

We could adopt what git does:

The file consists of sections and variables. A section begins with the name of the section in square brackets and continues until the next section begins. Section names are case-insensitive. Only alphanumeric characters, - and . are allowed in section names. Each variable must belong to some section, which means that there must be a section header before the first setting of a variable.

from https://git-scm.com/docs/git-config#_syntax

efiop avatar Jun 04 '19 12:06 efiop

May also want to review the /doc/commands-reference/config doc to specify whatever format ends up being allowed for config option values 👽

jorgeorpinel avatar Jun 04 '19 16:06 jorgeorpinel

stale

efiop avatar Oct 08 '21 18:10 efiop

Reopening, still worth looking into.

efiop avatar Oct 08 '21 18:10 efiop

Is this still relevant @efiop ? Would be happy to pick this up.

MFreidank avatar Feb 02 '23 08:02 MFreidank

Hello, I'd like to take up this issue if this is still relevant @efiop . Could I get some advice on what would be a good place to start looking(new to oss and the project, so any help is greatly appreciated!).

Fletchersan avatar Oct 14 '23 20:10 Fletchersan

Thanks for the interest, folks.

@MFreidank Sorry, missed your message 🙁

@Fletchersan All config-related logic is in https://github.com/iterative/dvc/blob/main/dvc/config.py , validation is happening in https://github.com/iterative/dvc/blob/8ea9d3edef146c239086a7aec3cec9ead1bd32a9/dvc/config.py#L383 so it is likely this validation might fit into the schema itself, but need to take a closer look.

efiop avatar Oct 15 '23 03:10 efiop