datahuborg/datahub

View on GitHub

Showing 1,132 of 1,132 total issues

Identical blocks of code found in 2 locations. Consider refactoring.
Open

def json_response(json_dict):
    json_dict["success"] = True
    return HttpResponse(json.dumps(json_dict),
Severity: Minor
Found in src/apps/dataq/views.py and 1 other location - About 40 mins to fix
src/apps/datatables/views.py on lines 17..19

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 34.

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

            with self.assertRaises(ValueError):
                m.add_collaborator(
                    repo=repo,
                    collaborator=collaborator,
                    db_privileges=['select'],
Severity: Major
Found in src/integration_tests/test_manager.py and 2 other locations - About 40 mins to fix
src/integration_tests/test_manager.py on lines 564..569
src/integration_tests/test_manager.py on lines 582..587

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 34.

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 2 locations. Consider refactoring.
Open

        self.mock_execute_sql.return_value = {
            'status': True, 'row_count': 2,
            'tuples': [
                ('al_carter=UC/al_carter',),
                ('foo_bar=U/al_carter',)
Severity: Minor
Found in src/core/test/test_connector_pg.py and 1 other location - About 40 mins to fix
src/core/test/test_connector_pg.py on lines 815..818

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 34.

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

            with self.assertRaises(PermissionDenied):
                m.add_collaborator(
                    repo=repo,
                    collaborator=collaborator,
                    db_privileges=['select'],
Severity: Major
Found in src/integration_tests/test_manager.py and 2 other locations - About 40 mins to fix
src/integration_tests/test_manager.py on lines 564..569
src/integration_tests/test_manager.py on lines 570..575

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 34.

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

            with self.assertRaises(ValueError):
                m.add_collaborator(
                    repo=repo,
                    collaborator=collaborator,
                    db_privileges=['_invalid_db_privilege'],
Severity: Major
Found in src/integration_tests/test_manager.py and 2 other locations - About 40 mins to fix
src/integration_tests/test_manager.py on lines 570..575
src/integration_tests/test_manager.py on lines 582..587

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 34.

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 2 locations. Consider refactoring.
Open

        with _superuser_connection(settings.POLICY_DB) as conn:
            res = conn.find_security_policies(
Severity: Minor
Found in src/core/db/rlsmanager.py and 1 other location - About 40 mins to fix
src/core/db/rlsmanager.py on lines 238..238

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 34.

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 2 locations. Consider refactoring.
Open

        security_policies = RowLevelSecurityManager.find_security_policies(
Severity: Minor
Found in src/core/db/rlsmanager.py and 1 other location - About 40 mins to fix
src/core/db/rlsmanager.py on lines 180..181

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 34.

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 2 locations. Consider refactoring.
Open

        self.mock_execute_sql.return_value = {
            'status': True, 'row_count': 2,
            'tuples': [(u'delete_me_alpha_user',), (u'delete_me_beta_user',)],
            'fields': [{'type': 19, 'name': 'usename'}]
Severity: Minor
Found in src/core/test/test_connector_pg.py and 1 other location - About 40 mins to fix
src/core/test/test_connector_pg.py on lines 790..796

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 34.

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

Function compute_aggregate has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

api.compute_aggregate = function(repo, table, agg_type, col_name, callback) {
Severity: Minor
Found in src/browser/static/datatables/js/dataTables.extra.js - About 35 mins to fix

    Function program has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        program: function(i, data, declaredBlockParams, blockParams, depths) {
    Severity: Minor
    Found in src/browser/static/datatables/js/dataTables.extra.js - About 35 mins to fix

      Function compute_aggregate has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      api.compute_aggregate = function(repo, table, agg_type, col_name, callback) {
      Severity: Minor
      Found in src/apps/datatables/client/js/api.js - About 35 mins to fix

        Function get_user_details has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def get_user_details(strategy, details, is_new=False, *args, **kwargs):
        Severity: Minor
        Found in src/account/pipeline.py - About 35 mins to fix

          Function aggregate has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def aggregate(request, repo, table, agg_type, col_name):
          Severity: Minor
          Found in src/apps/datatables/views.py - About 35 mins to fix

            Function get has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def get(self, request, repo_base, repo_name, table, format=None):
            Severity: Minor
            Found in src/api/views.py - About 35 mins to fix

              Function get has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def get(self, request, repo_base, repo_name, card_name, format=None):
              Severity: Minor
              Found in src/api/views.py - About 35 mins to fix

                Function patch has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def patch(self, request, repo_base, repo_name, card_name, format=None):
                Severity: Minor
                Found in src/api/views.py - About 35 mins to fix

                  Function import_rows has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def import_rows(self, repo, table, rows, delimiter=',', header=False):
                  Severity: Minor
                  Found in src/core/db/manager.py - About 35 mins to fix

                    Function get has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def get(self, request, repo_base, repo_name, view, format=None):
                    Severity: Minor
                    Found in src/api/views.py - About 35 mins to fix

                      Function describe_card has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def describe_card(
                      Severity: Minor
                      Found in src/api/serializer.py - About 35 mins to fix

                        Function security_policy_edit has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        def security_policy_edit(request, repo_base, repo, table, policyid):
                        Severity: Minor
                        Found in src/browser/views.py - About 35 mins to fix
                          Severity
                          Category
                          Status
                          Source
                          Language