Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions dissect/cramfs/c_cramfs.pyi
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Generated by cstruct-stubgen
from typing import BinaryIO, Literal, overload
from typing import BinaryIO, Literal, TypeAlias, overload

import dissect.cstruct as __cs__
from typing_extensions import TypeAlias

class _c_cramfs(__cs__.cstruct):
CRAMFS_MAGIC: Literal[684539205] = ...
Expand Down
30 changes: 25 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
[build-system]
requires = ["setuptools>=65.5.0", "setuptools_scm[toml]>=6.4.0"]
requires = ["setuptools>=77.0.0", "setuptools_scm[toml]>=6.4.0"]
build-backend = "setuptools.build_meta"

[project]
name = "dissect.cramfs"
description = "A Dissect module implementing a parser for the Cram file system, commonly used in appliance or device firmware"
readme = "README.md"
requires-python = "~=3.9"
license.text = "Affero General Public License v3"
requires-python = ">=3.10"
license = "AGPL-3.0-or-later"
license-files = ["LICENSE", "COPYRIGHT"]
authors = [
{name = "Dissect Team", email = "dissect@fox-it.com"}
]
Expand All @@ -16,7 +17,6 @@ classifiers = [
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"License :: OSI Approved",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Topic :: Internet :: Log Analysis",
Expand All @@ -41,9 +41,29 @@ dev = [
"dissect.util>=3.0.dev,<4.0.dev",
]

[dependency-groups]
test = [
"pytest",
]
lint = [
"ruff==0.13.1",
"vermin",
]
build = [
"build",
]
debug = [
"ipdb",
]
dev = [
{include-group = "test"},
{include-group = "lint"},
{include-group = "debug"},
]

[tool.ruff]
line-length = 120
required-version = ">=0.11.0"
required-version = ">=0.13.1"

[tool.ruff.format]
docstring-code-format = true
Expand Down
20 changes: 8 additions & 12 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ envlist = lint, py3, pypy3
# requires if they are not available on the host system. This requires the
# locally installed tox to have a minimum version 3.3.0. This means the names
# of the configuration options are still according to the tox 3.x syntax.
minversion = 4.4.3
minversion = 4.27.0
# This version of virtualenv will install setuptools version 68.2.2 and pip
# 23.3.1. These versions fully support python projects defined only through a
# pyproject.toml file (PEP-517/PEP-518/PEP-621). This pip version also support
Expand All @@ -14,38 +14,34 @@ requires = virtualenv>=20.24.6
[testenv]
extras = dev
deps =
pytest
pytest-cov
coverage
dependency_groups = test
commands =
pytest --basetemp="{envtmpdir}" {posargs:--color=yes --cov=dissect --cov-report=term-missing -v tests}
coverage report
coverage xml

[testenv:build]
package = skip
deps =
build
dependency_groups = build
commands =
pyproject-build

[testenv:fix]
package = skip
deps =
ruff==0.11.7
dependency_groups = lint
commands =
ruff format dissect tests
ruff check --fix dissect tests
ruff format dissect tests

[testenv:lint]
package = skip
deps =
ruff==0.11.7
vermin
dependency_groups = lint
commands =
ruff format --check dissect tests
ruff check dissect tests
vermin -t=3.9- --no-tips --lint dissect tests
ruff format --check dissect tests
vermin -t=3.10- --no-tips --lint dissect tests

[testenv:docs-build]
allowlist_externals = make
Expand Down
Loading