Skip to content

Conversation

@FlorianPfaff
Copy link
Owner

No description provided.

@github-actions
Copy link

github-actions bot commented Nov 27, 2025

MegaLinter analysis: Error

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ COPYPASTE jscpd yes no no 4.34s
✅ JSON prettier 2 0 0 0 0.37s
✅ JSON v8r 2 0 0 4.13s
✅ MARKDOWN markdownlint 1 0 0 0 0.56s
✅ MARKDOWN markdown-table-formatter 1 0 0 0 0.19s
✅ PYTHON bandit 247 0 0 2.81s
✅ PYTHON black 247 5 0 0 5.23s
❌ PYTHON flake8 247 9 0 1.64s
✅ PYTHON isort 247 5 0 0 0.42s
✅ PYTHON mypy 247 0 0 3.51s
❌ PYTHON pylint 247 13 0 56.22s
✅ PYTHON ruff 247 5 0 0 0.04s
✅ REPOSITORY checkov yes no no 12.11s
✅ REPOSITORY gitleaks yes no no 2.04s
✅ REPOSITORY git_diff yes no no 0.01s
✅ REPOSITORY secretlint yes no no 3.86s
✅ REPOSITORY syft yes no no 1.56s
✅ REPOSITORY trivy-sbom yes no no 0.86s
✅ REPOSITORY trufflehog yes no no 11.03s
✅ YAML prettier 4 0 0 0 0.39s
✅ YAML v8r 4 0 0 5.46s
✅ YAML yamllint 4 0 0 0.33s

Detailed Issues

❌ PYTHON / flake8 - 9 errors
pyrecest/distributions/abstract_mixture.py:92:24: E203 whitespace before ':'
pyrecest/distributions/hypersphere_subset/abstract_hyperhemispherical_distribution.py:9:1: F811 redefinition of unused 'linalg' from line 9
pyrecest/distributions/hypersphere_subset/abstract_hyperhemispherical_distribution.py:9:1: F401 'pyrecest.backend.sqrt' imported but unused
pyrecest/distributions/hypersphere_subset/abstract_hyperhemispherical_distribution.py:9:1: F401 'pyrecest.backend.cos' imported but unused
pyrecest/distributions/hypersphere_subset/abstract_hyperhemispherical_distribution.py:9:1: F401 'pyrecest.backend.sin' imported but unused
pyrecest/distributions/hypersphere_subset/abstract_hyperhemispherical_distribution.py:9:1: F401 'pyrecest.backend.stack' imported but unused
pyrecest/distributions/hypersphere_subset/abstract_hyperspherical_distribution.py:8:1: F401 'pyrecest.backend.sqrt' imported but unused
pyrecest/distributions/hypersphere_subset/abstract_hyperspherical_distribution.py:8:1: F401 'pyrecest.backend.stack' imported but unused
pyrecest/distributions/hypersphere_subset/abstract_hyperspherical_distribution.py:8:1: F401 'pyrecest.backend.linalg' imported but unused
❌ PYTHON / pylint - 13 errors
************* Module pyrecest.distributions.hypersphere_subset.abstract_hyperhemispherical_distribution
pyrecest/distributions/hypersphere_subset/abstract_hyperhemispherical_distribution.py:9:0: W0404: Reimport 'linalg' (imported line 9) (reimported)
pyrecest/distributions/hypersphere_subset/abstract_hyperhemispherical_distribution.py:69:16: E0102: function already defined line 59 (function-redefined)
pyrecest/distributions/hypersphere_subset/abstract_hyperhemispherical_distribution.py:76:16: E0102: function already defined line 59 (function-redefined)
pyrecest/distributions/hypersphere_subset/abstract_hyperhemispherical_distribution.py:9:0: W0611: Unused sqrt imported from pyrecest.backend (unused-import)
pyrecest/distributions/hypersphere_subset/abstract_hyperhemispherical_distribution.py:9:0: W0611: Unused cos imported from pyrecest.backend (unused-import)
pyrecest/distributions/hypersphere_subset/abstract_hyperhemispherical_distribution.py:9:0: W0611: Unused sin imported from pyrecest.backend (unused-import)
pyrecest/distributions/hypersphere_subset/abstract_hyperhemispherical_distribution.py:9:0: W0611: Unused stack imported from pyrecest.backend (unused-import)
************* Module pyrecest.distributions.hypersphere_subset.abstract_hyperspherical_distribution
pyrecest/distributions/hypersphere_subset/abstract_hyperspherical_distribution.py:81:16: E0102: function already defined line 57 (function-redefined)
pyrecest/distributions/hypersphere_subset/abstract_hyperspherical_distribution.py:86:16: E0102: function already defined line 57 (function-redefined)
pyrecest/distributions/hypersphere_subset/abstract_hyperspherical_distribution.py:8:0: W0611: Unused sqrt imported from pyrecest.backend (unused-import)
pyrecest/distributions/hypersphere_subset/abstract_hyperspherical_distribution.py:8:0: W0611: Unused stack imported from pyrecest.backend (unused-import)
pyrecest/distributions/hypersphere_subset/abstract_hyperspherical_distribution.py:8:0: W0611: Unused linalg imported from pyrecest.backend (unused-import)
************* Module update_init_helper
update_init_helper.py:1:0: R0801: Similar lines in 2 files
==pyrecest.distributions.hypersphere_subset.abstract_hyperhemispherical_distribution:[70:100]
==pyrecest.distributions.hypersphere_subset.abstract_hyperspherical_distribution:[82:108]
            else:
                # JAX backend: proposal(key, x) -> x_prop
                import jax as _jax
                import jax.numpy as _jnp

                def proposal(key, _):
                    """JAX independence proposal: uniform on upper hemisphere."""
                    if self.dim == 2:
                        # Explicit S² sampling
                        key, key_phi = _jax.random.split(key)
                        key, key_sz = _jax.random.split(key)

                        phi = 2.0 * _jnp.pi * _jax.random.uniform(key_phi, shape=(1,))
                        sz = 2.0 * _jax.random.uniform(key_sz, shape=(1,)) - 1.0
                        r = _jnp.sqrt(1.0 - sz**2)

                        # Shape (1, 3)
                        s = _jnp.stack(
                            [r * _jnp.cos(phi), r * _jnp.sin(phi), sz],
                            axis=1,
                        )
                    else:
                        # General S^d: sample N(0, I) in R^{d+1} and normalize
                        key, subkey = _jax.random.split(key)
                        samples_unnorm = _jax.random.normal(subkey, shape=(1, self.dim + 1))
                        norms = _jnp.linalg.norm(samples_unnorm, axis=1, keepdims=True)
                        s = samples_unnorm / norms

                    # Project to upper hemisphere: last coordinate >= 0
                    # s shape: (1, dim+1); last coord is s[..., -1:] (duplicate-code)

-----------------------------------
Your code has been rated at 9.97/10

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@9.2.0 --custom-flavor-setup --custom-flavor-linters PYTHON_PYLINT,PYTHON_BLACK,PYTHON_FLAKE8,PYTHON_ISORT,PYTHON_BANDIT,PYTHON_MYPY,PYTHON_RUFF,COPYPASTE_JSCPD,JSON_V8R,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_CHECKOV,REPOSITORY_GIT_DIFF,REPOSITORY_GITLEAKS,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R

MegaLinter is graciously provided by OX Security

@github-actions
Copy link

github-actions bot commented Nov 27, 2025

Test Results

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit e45b82c.

♻️ This comment has been updated with latest results.

@FlorianPfaff FlorianPfaff force-pushed the metropolishastingjax branch 16 times, most recently from 20aaeb4 to 970d1fa Compare November 30, 2025 04:09
@FlorianPfaff FlorianPfaff force-pushed the main branch 3 times, most recently from cbbee9b to 22baafb Compare December 1, 2025 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants