Skip to content

Commit

Permalink
Merge branch 'master' into consistent-ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
shyuep authored Dec 10, 2024
2 parents bfe9431 + 534456d commit 7fb24cd
Show file tree
Hide file tree
Showing 33 changed files with 797 additions and 285 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ jobs:
max-parallel: 20
matrix:
os: [ubuntu-latest, macos-14, windows-latest]
python-version: ["3.9", "3.12"]
python-version: ["3.10", "3.12"]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.python }}

- name: Install dependencies
run: |
Expand All @@ -30,6 +30,6 @@ jobs:
run: pytest --cov=monty --cov-report html:coverage_reports tests

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ci:

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.9
rev: v0.8.1
hooks:
- id: ruff
args: [--fix]
Expand All @@ -24,7 +24,7 @@ repos:
exclude: ^tests

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.2
rev: v1.13.0
hooks:
- id: mypy

Expand All @@ -37,19 +37,19 @@ repos:
additional_dependencies: [tomli] # needed to read pyproject.toml below py3.11

- repo: https://github.com/MarcoGorelli/cython-lint
rev: v0.16.2
rev: v0.16.6
hooks:
- id: cython-lint
args: [--no-pycodestyle]
- id: double-quote-cython-strings

- repo: https://github.com/adamchainz/blacken-docs
rev: 1.19.0
rev: 1.19.1
hooks:
- id: blacken-docs

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.42.0
rev: v0.43.0
hooks:
- id: markdownlint
# MD013: line too long
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ Monty is created to serve as a complement to the Python standard library. It
provides suite of tools to solve many common problems, and hopefully,
be a resource to collect the best solutions.

Monty supports Python 3.x.
Monty supports Python 3.10+.

Please visit the [official docs](https://materialsvirtuallab.github.io/monty) for more information.
4 changes: 1 addition & 3 deletions docs/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,7 @@ GEM
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.3.6)
strscan
rexml (3.3.9)
rouge (3.26.0)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
Expand All @@ -240,7 +239,6 @@ GEM
faraday (>= 0.17.3, < 3)
simpleidn (0.2.1)
unf (~> 0.1.4)
strscan (3.1.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
typhoeus (1.4.0)
Expand Down
2 changes: 1 addition & 1 deletion pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ persistent=yes

# Minimum Python version to use for version dependent checks. Will default to
# the version used to run pylint.
py-version=3.9
py-version=3.10

# Discover python modules and packages in the file system subtree.
recursive=no
Expand Down
30 changes: 15 additions & 15 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ maintainers = [
]
description = "Monty is the missing complement to Python."
readme = "README.md"
requires-python = ">=3.9"
requires-python = ">=3.10"
classifiers = [
"Programming Language :: Python :: 3",
"Development Status :: 4 - Beta",
Expand All @@ -20,7 +20,7 @@ classifiers = [
]
dependencies = [
"ruamel.yaml",
"numpy<2.0.0",
"numpy",
]
version = "2024.10.21"

Expand All @@ -31,6 +31,7 @@ ci = [
"pytest>=8",
"pytest-cov>=4",
"types-requests",
"pymongo"
]
# dev is for "dev" module, not for development
dev = ["ipython"]
Expand All @@ -39,12 +40,14 @@ docs = [
"sphinx_rtd_theme",
]
json = [
"bson",
"pymongo",
"orjson>=3.6.1",
"pandas",
"pydantic",
"pint",
"torch",
# https://github.com/hgrecco/pint/issues/2065
"pint; python_version<'3.13'",
# Note: need torch>=2.3.0 for numpy 2 # 719
"torch; python_version<'3.13'", # python 3.13 not supported yet
]
multiprocessing = ["tqdm"]
optional = ["monty[dev,json,multiprocessing,serialization]"]
Expand All @@ -57,10 +60,9 @@ include = ["monty", "monty.*"]

[tool.black]
line-length = 120
target-version = ['py39']
target-version = ["py310"]
include = '\.pyi?$'
exclude = '''
(
/(
\.eggs # exclude a few common directories in the
Expand All @@ -85,26 +87,24 @@ branch = true
exclude_also = [
"@deprecated",
"def __repr__",
"if 0:",
"if __name__ == .__main__.:",
"if self.debug:",
"if settings.DEBUG",
"pragma: no cover",
"raise AssertionError",
"raise NotImplementedError",
"show_plot",
"if TYPE_CHECKING:",
"if typing.TYPE_CHECKING:",
"except ImportError:"
]

[tool.mypy]
ignore_missing_imports = true

[tool.ruff]
lint.select = [
"I", #isort
[tool.ruff.lint]
select = [
"I", # isort
]

lint.isort.required-imports = ["from __future__ import annotations"]
lint.isort.known-first-party = ["monty"]
[tool.ruff.lint.isort]
required-imports = ["from __future__ import annotations"]
known-first-party = ["monty"]
Loading

0 comments on commit 7fb24cd

Please sign in to comment.