iterative/dvc

View on GitHub

Showing 32 of 444 total issues

Similar blocks of code found in 20 locations. Consider refactoring.
Open

    parser = subparsers.add_parser(
        "check-ignore",
        parents=[parent_parser],
        description=append_doc_link(ADD_HELP, "check-ignore"),
        help=ADD_HELP,
Severity: Major
Found in dvc/commands/check_ignore.py and 19 other locations - About 35 mins to fix
dvc/commands/add.py on lines 45..50
dvc/commands/cache.py on lines 35..40
dvc/commands/commit.py on lines 42..47
dvc/commands/completion.py on lines 26..31
dvc/commands/destroy.py on lines 39..44
dvc/commands/experiments/apply.py on lines 26..31
dvc/commands/experiments/branch.py on lines 21..26
dvc/commands/gc.py on lines 72..77
dvc/commands/get.py on lines 58..63
dvc/commands/imp.py on lines 41..46
dvc/commands/imp_url.py on lines 41..46
dvc/commands/install.py on lines 23..28
dvc/commands/move.py on lines 33..38
dvc/commands/params.py on lines 50..55
dvc/commands/params.py on lines 69..74
dvc/commands/remove.py on lines 28..33
dvc/commands/root.py on lines 22..27
dvc/commands/run.py on lines 61..66
dvc/commands/update.py on lines 32..37

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 33.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 20 locations. Consider refactoring.
Open

    root_parser = subparsers.add_parser(
        "root",
        parents=[parent_parser],
        description=append_doc_link(ROOT_HELP, "root"),
        help=ROOT_HELP,
Severity: Major
Found in dvc/commands/root.py and 19 other locations - About 35 mins to fix
dvc/commands/add.py on lines 45..50
dvc/commands/cache.py on lines 35..40
dvc/commands/check_ignore.py on lines 87..92
dvc/commands/commit.py on lines 42..47
dvc/commands/completion.py on lines 26..31
dvc/commands/destroy.py on lines 39..44
dvc/commands/experiments/apply.py on lines 26..31
dvc/commands/experiments/branch.py on lines 21..26
dvc/commands/gc.py on lines 72..77
dvc/commands/get.py on lines 58..63
dvc/commands/imp.py on lines 41..46
dvc/commands/imp_url.py on lines 41..46
dvc/commands/install.py on lines 23..28
dvc/commands/move.py on lines 33..38
dvc/commands/params.py on lines 50..55
dvc/commands/params.py on lines 69..74
dvc/commands/remove.py on lines 28..33
dvc/commands/run.py on lines 61..66
dvc/commands/update.py on lines 32..37

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 33.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 20 locations. Consider refactoring.
Open

    destroy_parser = subparsers.add_parser(
        "destroy",
        parents=[parent_parser],
        description=append_doc_link(DESTROY_HELP, "destroy"),
        help=DESTROY_HELP,
Severity: Major
Found in dvc/commands/destroy.py and 19 other locations - About 35 mins to fix
dvc/commands/add.py on lines 45..50
dvc/commands/cache.py on lines 35..40
dvc/commands/check_ignore.py on lines 87..92
dvc/commands/commit.py on lines 42..47
dvc/commands/completion.py on lines 26..31
dvc/commands/experiments/apply.py on lines 26..31
dvc/commands/experiments/branch.py on lines 21..26
dvc/commands/gc.py on lines 72..77
dvc/commands/get.py on lines 58..63
dvc/commands/imp.py on lines 41..46
dvc/commands/imp_url.py on lines 41..46
dvc/commands/install.py on lines 23..28
dvc/commands/move.py on lines 33..38
dvc/commands/params.py on lines 50..55
dvc/commands/params.py on lines 69..74
dvc/commands/remove.py on lines 28..33
dvc/commands/root.py on lines 22..27
dvc/commands/run.py on lines 61..66
dvc/commands/update.py on lines 32..37

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 33.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 20 locations. Consider refactoring.
Open

    remove_parser = subparsers.add_parser(
        "remove",
        parents=[parent_parser],
        description=append_doc_link(REMOVE_HELP, "remove"),
        help=REMOVE_HELP,
Severity: Major
Found in dvc/commands/remove.py and 19 other locations - About 35 mins to fix
dvc/commands/add.py on lines 45..50
dvc/commands/cache.py on lines 35..40
dvc/commands/check_ignore.py on lines 87..92
dvc/commands/commit.py on lines 42..47
dvc/commands/completion.py on lines 26..31
dvc/commands/destroy.py on lines 39..44
dvc/commands/experiments/apply.py on lines 26..31
dvc/commands/experiments/branch.py on lines 21..26
dvc/commands/gc.py on lines 72..77
dvc/commands/get.py on lines 58..63
dvc/commands/imp.py on lines 41..46
dvc/commands/imp_url.py on lines 41..46
dvc/commands/install.py on lines 23..28
dvc/commands/move.py on lines 33..38
dvc/commands/params.py on lines 50..55
dvc/commands/params.py on lines 69..74
dvc/commands/root.py on lines 22..27
dvc/commands/run.py on lines 61..66
dvc/commands/update.py on lines 32..37

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 33.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 20 locations. Consider refactoring.
Open

    parser = subparsers.add_parser(
        "add",
        parents=[parent_parser],
        description=append_doc_link(ADD_HELP, "add"),
        help=ADD_HELP,
Severity: Major
Found in dvc/commands/add.py and 19 other locations - About 35 mins to fix
dvc/commands/cache.py on lines 35..40
dvc/commands/check_ignore.py on lines 87..92
dvc/commands/commit.py on lines 42..47
dvc/commands/completion.py on lines 26..31
dvc/commands/destroy.py on lines 39..44
dvc/commands/experiments/apply.py on lines 26..31
dvc/commands/experiments/branch.py on lines 21..26
dvc/commands/gc.py on lines 72..77
dvc/commands/get.py on lines 58..63
dvc/commands/imp.py on lines 41..46
dvc/commands/imp_url.py on lines 41..46
dvc/commands/install.py on lines 23..28
dvc/commands/move.py on lines 33..38
dvc/commands/params.py on lines 50..55
dvc/commands/params.py on lines 69..74
dvc/commands/remove.py on lines 28..33
dvc/commands/root.py on lines 22..27
dvc/commands/run.py on lines 61..66
dvc/commands/update.py on lines 32..37

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 33.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 20 locations. Consider refactoring.
Open

    run_parser = subparsers.add_parser(
        "run",
        parents=[parent_parser],
        description=append_doc_link(RUN_HELP, "run"),
        help=RUN_HELP,
Severity: Major
Found in dvc/commands/run.py and 19 other locations - About 35 mins to fix
dvc/commands/add.py on lines 45..50
dvc/commands/cache.py on lines 35..40
dvc/commands/check_ignore.py on lines 87..92
dvc/commands/commit.py on lines 42..47
dvc/commands/completion.py on lines 26..31
dvc/commands/destroy.py on lines 39..44
dvc/commands/experiments/apply.py on lines 26..31
dvc/commands/experiments/branch.py on lines 21..26
dvc/commands/gc.py on lines 72..77
dvc/commands/get.py on lines 58..63
dvc/commands/imp.py on lines 41..46
dvc/commands/imp_url.py on lines 41..46
dvc/commands/install.py on lines 23..28
dvc/commands/move.py on lines 33..38
dvc/commands/params.py on lines 50..55
dvc/commands/params.py on lines 69..74
dvc/commands/remove.py on lines 28..33
dvc/commands/root.py on lines 22..27
dvc/commands/update.py on lines 32..37

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 33.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 20 locations. Consider refactoring.
Open

    params_diff_parser = params_subparsers.add_parser(
        "diff",
        parents=[parent_parser],
        description=append_doc_link(PARAMS_DIFF_HELP, "params/diff"),
        help=PARAMS_DIFF_HELP,
Severity: Major
Found in dvc/commands/params.py and 19 other locations - About 35 mins to fix
dvc/commands/add.py on lines 45..50
dvc/commands/cache.py on lines 35..40
dvc/commands/check_ignore.py on lines 87..92
dvc/commands/commit.py on lines 42..47
dvc/commands/completion.py on lines 26..31
dvc/commands/destroy.py on lines 39..44
dvc/commands/experiments/apply.py on lines 26..31
dvc/commands/experiments/branch.py on lines 21..26
dvc/commands/gc.py on lines 72..77
dvc/commands/get.py on lines 58..63
dvc/commands/imp.py on lines 41..46
dvc/commands/imp_url.py on lines 41..46
dvc/commands/install.py on lines 23..28
dvc/commands/move.py on lines 33..38
dvc/commands/params.py on lines 50..55
dvc/commands/remove.py on lines 28..33
dvc/commands/root.py on lines 22..27
dvc/commands/run.py on lines 61..66
dvc/commands/update.py on lines 32..37

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 33.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 20 locations. Consider refactoring.
Open

    update_parser = subparsers.add_parser(
        "update",
        parents=[parent_parser],
        description=append_doc_link(UPDATE_HELP, "update"),
        help=UPDATE_HELP,
Severity: Major
Found in dvc/commands/update.py and 19 other locations - About 35 mins to fix
dvc/commands/add.py on lines 45..50
dvc/commands/cache.py on lines 35..40
dvc/commands/check_ignore.py on lines 87..92
dvc/commands/commit.py on lines 42..47
dvc/commands/completion.py on lines 26..31
dvc/commands/destroy.py on lines 39..44
dvc/commands/experiments/apply.py on lines 26..31
dvc/commands/experiments/branch.py on lines 21..26
dvc/commands/gc.py on lines 72..77
dvc/commands/get.py on lines 58..63
dvc/commands/imp.py on lines 41..46
dvc/commands/imp_url.py on lines 41..46
dvc/commands/install.py on lines 23..28
dvc/commands/move.py on lines 33..38
dvc/commands/params.py on lines 50..55
dvc/commands/params.py on lines 69..74
dvc/commands/remove.py on lines 28..33
dvc/commands/root.py on lines 22..27
dvc/commands/run.py on lines 61..66

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 33.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 20 locations. Consider refactoring.
Open

    completion_parser = subparsers.add_parser(
        "completion",
        parents=[parent_parser],
        description=append_doc_link(COMPLETION_DESCRIPTION, "completion"),
        help=COMPLETION_HELP,
Severity: Major
Found in dvc/commands/completion.py and 19 other locations - About 35 mins to fix
dvc/commands/add.py on lines 45..50
dvc/commands/cache.py on lines 35..40
dvc/commands/check_ignore.py on lines 87..92
dvc/commands/commit.py on lines 42..47
dvc/commands/destroy.py on lines 39..44
dvc/commands/experiments/apply.py on lines 26..31
dvc/commands/experiments/branch.py on lines 21..26
dvc/commands/gc.py on lines 72..77
dvc/commands/get.py on lines 58..63
dvc/commands/imp.py on lines 41..46
dvc/commands/imp_url.py on lines 41..46
dvc/commands/install.py on lines 23..28
dvc/commands/move.py on lines 33..38
dvc/commands/params.py on lines 50..55
dvc/commands/params.py on lines 69..74
dvc/commands/remove.py on lines 28..33
dvc/commands/root.py on lines 22..27
dvc/commands/run.py on lines 61..66
dvc/commands/update.py on lines 32..37

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 33.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

@contextmanager
def modify_yaml(path, fs=None):
    with _modify_data(path, parse_yaml_for_update, dump_yaml, fs=fs) as d:
        yield d
Severity: Minor
Found in dvc/utils/serialize/_yaml.py and 2 other locations - About 30 mins to fix
dvc/utils/serialize/_json.py on lines 26..29
dvc/utils/serialize/_toml.py on lines 47..50

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

@contextmanager
def modify_json(path, fs=None):
    with _modify_data(path, parse_json, dump_json, fs=fs) as d:
        yield d
Severity: Minor
Found in dvc/utils/serialize/_json.py and 2 other locations - About 30 mins to fix
dvc/utils/serialize/_toml.py on lines 47..50
dvc/utils/serialize/_yaml.py on lines 77..80

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

@contextmanager
def modify_toml(path, fs=None):
    with _modify_data(path, parse_toml_for_update, dump_toml, fs=fs) as d:
        yield d
Severity: Minor
Found in dvc/utils/serialize/_toml.py and 2 other locations - About 30 mins to fix
dvc/utils/serialize/_json.py on lines 26..29
dvc/utils/serialize/_yaml.py on lines 77..80

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language