tomopy/tomopy

View on GitHub
test/test_tomopy/test_recon/test_algorithm.py

Summary

Maintainability
F
5 days
Test Coverage

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

    def test_bart(self):
        rng = default_rng(0)
        ind_block = np.arange(len(self.ang))
        rng.shuffle(ind_block)
        assert_allclose(
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 3 other locations - About 4 hrs to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 198..211
test/test_tomopy/test_recon/test_algorithm.py on lines 216..229
test/test_tomopy/test_recon/test_algorithm.py on lines 234..247

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

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

    def test_osem(self):
        rng = default_rng(0)
        ind_block = np.arange(len(self.ang))
        rng.shuffle(ind_block)
        assert_allclose(
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 3 other locations - About 4 hrs to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 88..101
test/test_tomopy/test_recon/test_algorithm.py on lines 216..229
test/test_tomopy/test_recon/test_algorithm.py on lines 234..247

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

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

    def test_ospml_hybrid(self):
        rng = default_rng(0)
        ind_block = np.arange(len(self.ang))
        rng.shuffle(ind_block)
        assert_allclose(
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 3 other locations - About 4 hrs to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 88..101
test/test_tomopy/test_recon/test_algorithm.py on lines 198..211
test/test_tomopy/test_recon/test_algorithm.py on lines 234..247

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

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

    def test_ospml_quad(self):
        rng = default_rng(0)
        ind_block = np.arange(len(self.ang))
        rng.shuffle(ind_block)
        assert_allclose(
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 3 other locations - About 4 hrs to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 88..101
test/test_tomopy/test_recon/test_algorithm.py on lines 198..211
test/test_tomopy/test_recon/test_algorithm.py on lines 216..229

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

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

    @unittest.skipUnless("CUDA_VERSION" in os.environ, "CUDA_VERSION not set.")
    def test_mlem_gpu(self):
        result = recon(self.prj,
                       self.ang,
                       algorithm='mlem',
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 1 other location - About 3 hrs to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 282..292

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

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

    @unittest.skipUnless("CUDA_VERSION" in os.environ, "CUDA_VERSION not set.")
    def test_sirt_gpu(self):
        result = recon(self.prj,
                       self.ang,
                       algorithm='sirt',
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 1 other location - About 3 hrs to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 186..196

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

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

    @unittest.skipUnless(found_opencv, "CPU acceleration requires OpenCV.")
    def test_mlem_accel(self):
        result = recon(self.prj,
                       self.ang,
                       algorithm='mlem',
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 1 other location - About 3 hrs to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 270..280

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

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

    @unittest.skipUnless(found_opencv, "CPU acceleration requires OpenCV.")
    def test_sirt_accel(self):
        result = recon(self.prj,
                       self.ang,
                       algorithm='sirt',
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 1 other location - About 3 hrs to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 174..184

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

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

    def test_sirt(self):
        result = recon(self.prj, self.ang, algorithm='sirt', num_iter=4)
        assert_allclose(result, read_file('sirt.npy'), rtol=1e-2)
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 1 other location - About 1 hr to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 170..172

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

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

    def test_mlem(self):
        result = recon(self.prj, self.ang, algorithm='mlem', num_iter=4)
        assert_allclose(result, read_file('mlem.npy'), rtol=1e-2)
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 1 other location - About 1 hr to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 266..268

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

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

    def test_pml_hybrid(self):
        assert_allclose(
            recon(self.prj, self.ang, algorithm='pml_hybrid', num_iter=4),
            read_file('pml_hybrid.npy'),
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 4 other locations - About 1 hr to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 259..262
test/test_tomopy/test_recon/test_algorithm.py on lines 294..296
test/test_tomopy/test_recon/test_algorithm.py on lines 299..302
test/test_tomopy/test_recon/test_algorithm.py on lines 305..308

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

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

    def test_tv(self):
        assert_allclose(recon(self.prj, self.ang, algorithm='tv', num_iter=4),
                        read_file('tv.npy'),
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 4 other locations - About 1 hr to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 252..255
test/test_tomopy/test_recon/test_algorithm.py on lines 259..262
test/test_tomopy/test_recon/test_algorithm.py on lines 299..302
test/test_tomopy/test_recon/test_algorithm.py on lines 305..308

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

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

    def test_pml_quad(self):
        assert_allclose(
            recon(self.prj, self.ang, algorithm='pml_quad', num_iter=4),
            read_file('pml_quad.npy'),
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 4 other locations - About 1 hr to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 252..255
test/test_tomopy/test_recon/test_algorithm.py on lines 294..296
test/test_tomopy/test_recon/test_algorithm.py on lines 299..302
test/test_tomopy/test_recon/test_algorithm.py on lines 305..308

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

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

    def test_grad(self):
        assert_allclose(recon(self.prj, self.ang, algorithm='grad',
                              num_iter=4),
                        read_file('grad.npy'),
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 4 other locations - About 1 hr to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 252..255
test/test_tomopy/test_recon/test_algorithm.py on lines 259..262
test/test_tomopy/test_recon/test_algorithm.py on lines 294..296
test/test_tomopy/test_recon/test_algorithm.py on lines 305..308

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

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

    def test_tikh(self):
        assert_allclose(recon(self.prj, self.ang, algorithm='tikh',
                              num_iter=4),
                        read_file('tikh.npy'),
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 4 other locations - About 1 hr to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 252..255
test/test_tomopy/test_recon/test_algorithm.py on lines 259..262
test/test_tomopy/test_recon/test_algorithm.py on lines 294..296
test/test_tomopy/test_recon/test_algorithm.py on lines 299..302

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

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

        assert_allclose(recon(self.prj,
                              self.ang,
                              algorithm='gridrec',
                              filter_name='none'),
                        read_file('gridrec_none.npy'),
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 7 other locations - About 30 mins to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 127..131
test/test_tomopy/test_recon/test_algorithm.py on lines 133..137
test/test_tomopy/test_recon/test_algorithm.py on lines 139..143
test/test_tomopy/test_recon/test_algorithm.py on lines 145..149
test/test_tomopy/test_recon/test_algorithm.py on lines 151..155
test/test_tomopy/test_recon/test_algorithm.py on lines 157..161
test/test_tomopy/test_recon/test_algorithm.py on lines 163..167

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

        assert_allclose(recon(self.prj,
                              self.ang,
                              algorithm='gridrec',
                              filter_name='ramlak'),
                        read_file('gridrec_ramlak.npy'),
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 7 other locations - About 30 mins to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 121..125
test/test_tomopy/test_recon/test_algorithm.py on lines 127..131
test/test_tomopy/test_recon/test_algorithm.py on lines 133..137
test/test_tomopy/test_recon/test_algorithm.py on lines 139..143
test/test_tomopy/test_recon/test_algorithm.py on lines 145..149
test/test_tomopy/test_recon/test_algorithm.py on lines 157..161
test/test_tomopy/test_recon/test_algorithm.py on lines 163..167

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

        assert_allclose(recon(self.prj,
                              self.ang,
                              algorithm='gridrec',
                              filter_name='hamming'),
                        read_file('gridrec_hamming.npy'),
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 7 other locations - About 30 mins to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 121..125
test/test_tomopy/test_recon/test_algorithm.py on lines 127..131
test/test_tomopy/test_recon/test_algorithm.py on lines 133..137
test/test_tomopy/test_recon/test_algorithm.py on lines 139..143
test/test_tomopy/test_recon/test_algorithm.py on lines 151..155
test/test_tomopy/test_recon/test_algorithm.py on lines 157..161
test/test_tomopy/test_recon/test_algorithm.py on lines 163..167

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

        assert_allclose(recon(self.prj,
                              self.ang,
                              algorithm='gridrec',
                              filter_name='parzen'),
                        read_file('gridrec_parzen.npy'),
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 7 other locations - About 30 mins to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 121..125
test/test_tomopy/test_recon/test_algorithm.py on lines 127..131
test/test_tomopy/test_recon/test_algorithm.py on lines 133..137
test/test_tomopy/test_recon/test_algorithm.py on lines 139..143
test/test_tomopy/test_recon/test_algorithm.py on lines 145..149
test/test_tomopy/test_recon/test_algorithm.py on lines 151..155
test/test_tomopy/test_recon/test_algorithm.py on lines 163..167

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

        assert_allclose(recon(self.prj,
                              self.ang,
                              algorithm='gridrec',
                              filter_name='cosine'),
                        read_file('gridrec_cosine.npy'),
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 7 other locations - About 30 mins to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 121..125
test/test_tomopy/test_recon/test_algorithm.py on lines 127..131
test/test_tomopy/test_recon/test_algorithm.py on lines 139..143
test/test_tomopy/test_recon/test_algorithm.py on lines 145..149
test/test_tomopy/test_recon/test_algorithm.py on lines 151..155
test/test_tomopy/test_recon/test_algorithm.py on lines 157..161
test/test_tomopy/test_recon/test_algorithm.py on lines 163..167

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

        assert_allclose(recon(self.prj,
                              self.ang,
                              algorithm='gridrec',
                              filter_name='shepp'),
                        read_file('gridrec_shepp.npy'),
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 7 other locations - About 30 mins to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 121..125
test/test_tomopy/test_recon/test_algorithm.py on lines 133..137
test/test_tomopy/test_recon/test_algorithm.py on lines 139..143
test/test_tomopy/test_recon/test_algorithm.py on lines 145..149
test/test_tomopy/test_recon/test_algorithm.py on lines 151..155
test/test_tomopy/test_recon/test_algorithm.py on lines 157..161
test/test_tomopy/test_recon/test_algorithm.py on lines 163..167

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

        assert_allclose(recon(self.prj,
                              self.ang,
                              algorithm='gridrec',
                              filter_name='hann'),
                        read_file('gridrec_hann.npy'),
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 7 other locations - About 30 mins to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 121..125
test/test_tomopy/test_recon/test_algorithm.py on lines 127..131
test/test_tomopy/test_recon/test_algorithm.py on lines 133..137
test/test_tomopy/test_recon/test_algorithm.py on lines 145..149
test/test_tomopy/test_recon/test_algorithm.py on lines 151..155
test/test_tomopy/test_recon/test_algorithm.py on lines 157..161
test/test_tomopy/test_recon/test_algorithm.py on lines 163..167

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

        assert_allclose(recon(self.prj,
                              self.ang,
                              algorithm='gridrec',
                              filter_name='butterworth'),
                        read_file('gridrec_butterworth.npy'),
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 7 other locations - About 30 mins to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 121..125
test/test_tomopy/test_recon/test_algorithm.py on lines 127..131
test/test_tomopy/test_recon/test_algorithm.py on lines 133..137
test/test_tomopy/test_recon/test_algorithm.py on lines 139..143
test/test_tomopy/test_recon/test_algorithm.py on lines 145..149
test/test_tomopy/test_recon/test_algorithm.py on lines 151..155
test/test_tomopy/test_recon/test_algorithm.py on lines 157..161

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

There are no issues that match your filters.

Category
Status