Skip to content
Draft
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
34 changes: 28 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,23 @@ dependencies = [
"requests>=2.25.0",
"soundfile",
]
license = {file = 'LICENSE'}
license = "MIT"
license-files = ["LICENSE"]
authors = [
{ name="Lucas Gautheron", email="lucas.gautheron@gmail.com" },
{ name="Loann Peurey", email="loannpeurey@gmail.com" },
]
maintainers = [
{ name="Lucas Gautheron", email="lucas.gautheron@gmail.com" },
{ name="Loann Peurey", email="loannpeurey@gmail.com" },
]
description = "LAAC@LSCP"
readme = "README.md"
readme = { file = "README.md", content-type = "text/markdown" }
keywords = ["childproject", "long form recordings", "language acquisition", "laac", "linguistics", "child", "language", "development"]
requires-python = ">=3.8"
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: Unix",
"Programming Language :: Python",
Expand All @@ -56,16 +61,33 @@ repository = ["datalad"]
[project.urls]
Homepage = "https://github.com/LAAC-LSCP/ChildProject"
Documentation = "https://childproject.readthedocs.io/en/latest/"
Issues = "https://github.com/LAAC-LSCP/ChildProject/issues"
Discussions = "https://github.com/LAAC-LSCP/ChildProject/discussions"
ChangeLog = "https://github.com/LAAC-LSCP/ChildProject/blob/master/CHANGELOG.md"

[project.scripts]
child-project = "ChildProject.cmdline:main"

[tool.setuptools]
include-package-data = true

[tool.setuptools.package-data]
"ChildProject.templates" = ["*.etf", "*.pfsx"]

[tool.setuptools.packages.find]
namespaces = true
include = ["ChildProject*"]
where = ["."]
include = ["ChildProject", "ChildProject.*"]
exclude = ["tests*", "tests.*"]

[tool.setuptools.package-data]
"ChildProject.templates" = ["*.etf", "*.pfsx"]
[tool.mypy]
python_version = "3.8" # set this to the lowest supported version
namespace_packages = true
check_untyped_defs = true

[tool.black]
line-length = 120 # same as flake8
target-version = ["py38", "py39"]

[tool.flake8]
max-line-length = 120 # same as black
2 changes: 2 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-r requirements.txt
tox==4.26.0
28 changes: 28 additions & 0 deletions tox.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
requires = ["tox>=4.26"]
isolated_build = true
envlist = ["test", "lint", "format", "typecheck"]

[env.test]
description = "Run tests under {base_python}"
install_package = true
deps = ["pytest", "pytest-randomly"]
commands = [["pytest", "--randomly-seed=1234", "--strict-markers"]]

[env.lint]
description = "Flake8. Linting + style + unused imports"
deps = ["flake8"]
commands = [["flake8", "ChildProject", "tests"]]

[env.format]
description = "Format check with black, isort, autoflake. Check formatting + fix import order + remove unused imports"
deps = ["black", "isort", "autoflake"]

# employs lesser-known "-" prefix trick to ignore exit codes and let everything run
commands = [["-", "black", "--check", "ChildProject", "tests"],
["-", "isort", "--check-only", "ChildProject", "tests"],
["-", "autoflake", "-r", "--check", "ChildProject", "tests"]]

[env.typecheck]
description = "Type checking with mypy"
deps = ["mypy"]
commands = [["mypy", "ChildProject", "tests"]]
Loading