Skip to content

Commit

Permalink
Merge pull request #198 from tpvasconcelos/197-fix-statsmodels
Browse files Browse the repository at this point in the history
[197] Fix statsmodels import issue
  • Loading branch information
tpvasconcelos authored Sep 18, 2024
2 parents e2bf34e + 007e912 commit 96983be
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 16 deletions.
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ default_language_version:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-added-large-files
args: [ '--maxkb=500' ]
Expand Down Expand Up @@ -31,7 +31,7 @@ repos:
exclude: .bumpversion.cfg

- repo: https://github.com/python-jsonschema/check-jsonschema.git
rev: 0.28.2
rev: 0.29.2
hooks:
- id: check-github-actions
- id: check-github-workflows
Expand All @@ -43,14 +43,14 @@ repos:
- id: check-readthedocs

- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.3.0
hooks:
- id: codespell
args: [ "-L", "probly" ]
exclude: ^docs/_static/.*\.(js|html)$|^src/ridgeplot/.*\.c$

- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.6
rev: v0.10.0.1
hooks:
- id: shellcheck

Expand All @@ -68,7 +68,7 @@ repos:
- mdformat-myst

- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.16
rev: v0.19
hooks:
- id: validate-pyproject

Expand All @@ -79,17 +79,17 @@ repos:
args: [ --no-build-isolation ]

- repo: https://github.com/adamchainz/blacken-docs
rev: 1.16.0
rev: 1.18.0
hooks:
- id: blacken-docs

- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.2.0
rev: 24.8.0
hooks:
- id: black-jupyter

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.2
rev: v0.6.5
hooks:
- id: ruff
args: [ --show-fixes, --exit-non-zero-on-fix ]
Expand Down
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
identity and expression, level of experience, education, socioeconomic status,
nationality, personal appearance, race, caste, color, religion, or sexual identity
and orientation.

Expand Down
9 changes: 5 additions & 4 deletions cicd_utils/cicd/scripts/extract_latest_release_notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,12 @@ def replace_pr_links(tokens: list[Token]) -> list[Token]:
for token in tokens:
if token.children:
token.children = replace_pr_links(token.children)
if token.type == "myst_role" and token.meta.get("name", "") == "gh-pr":
pr_number = int(token.content)
if token.type == "myst_role" and token.meta.get("name", "") in ("gh-pr", "gh-issue"):
gh_number = int(token.content)
gh_type = "pull" if token.meta["name"] == "gh-pr" else "issues"
link_tokens = get_link_tokens(
text=f"#{pr_number}",
href=f"https://github.com/tpvasconcelos/ridgeplot/pull/{pr_number}",
text=f"#{gh_number}",
href=f"https://github.com/tpvasconcelos/ridgeplot/{gh_type}/{gh_number}",
)
tokens_new.extend(link_tokens)
continue
Expand Down
4 changes: 4 additions & 0 deletions docs/reference/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ Unreleased changes

- ...

### Breaking changes

- Dropped support for `statsmodels==0.14.2` due to import-time issue. See {gh-issue}`197` for more details. ({gh-pr}`198`)

### CI/CD

- Refactor test coverage logic ({gh-pr}`193`)
Expand Down
2 changes: 2 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ plugins = numpy.typing.mypy_plugin

[mypy-importlib_metadata.*]
ignore_missing_imports = True
[mypy-importlib_resources.*]
ignore_missing_imports = True
[mypy-plotly.*]
ignore_missing_imports = True
[mypy-_plotly_utils.*]
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ requires-python = ">=3.8"
dependencies = [
"numpy>=1",
"plotly>=4",
"statsmodels>=0.12",
"statsmodels>=0.12,!=0.14.2", # See GH197 for details
'typing-extensions; python_version<"3.10"',
'importlib-resources; python_version<"3.10"',
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def test_extract_latest_release_notes(


def test_myst_roles() -> None:
whitelisted_roles = {"gh-pr"}
whitelisted_roles = {"gh-pr", "gh-issue"}

def validate_tokens(tkns: list[Token]) -> None:
for token in tkns:
Expand Down
4 changes: 3 additions & 1 deletion tests/unit/test_kde.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ def test_estimate_density_trace_points() -> None:
assert np.argmin(y) == 0


#
# ==============================================================
# --- estimate_densities()
# ==============================================================


def test_estimate_densities() -> None:
Expand Down

0 comments on commit 96983be

Please sign in to comment.