Skip to content
Open
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
5 changes: 0 additions & 5 deletions .coveragerc

This file was deleted.

92 changes: 92 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools>=64"]

[project]
name = "ymmsl"
version = "0.15.1-dev"
description = "Python bindings for the YAML version of the Multiscale Modeling and Simulation Language"
readme = "README.rst"
authors = [
{name = "Lourens Veen", email = "[email protected]"},
]
license = "Apache-2.0"
license-files = ["LICENSE"]
keywords = ["yMMSL", "multiscale", "modeling", "simulation", "YAML"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
requires-python = ">=3.9, <4"
dependencies = [
"click>=6.5",
"yatiml>=0.12.0,<0.13.0",
# "yatiml @ git+https://github.com/yatiml/yatiml@develop#egg=yatiml",
]

[project.urls]
homepage = "https://github.com/multiscale/ymmsl-python"
documentation = "https://ymmsl-python.readthedocs.io/"

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

[tool.setuptools.packages.find]
include = ["ymmsl", "ymmsl.*"]

[project.scripts]
ymmsl = "ymmsl.command_line:ymmsl"

[tool.coverage.run]
branch = true
source = ["ymmsl"]

[tool.coverage.xml]
output = "cobertura.xml"

[tool.pytest]
addopts = [
"--cov", "--cov-report", "xml", "--cov-report", "term-missing", "-vv",
]
testpaths = ["ymmsl"]

[tool.mypy]
files = "ymmsl/**/*.py"
# mypy_path = ymmsl
disallow_incomplete_defs = true
disallow_untyped_defs = true

[tool.ruff]
exclude = [
"docs",
".git",
]
include = ["pyproject.toml", "ymmsl/**/*.py"]
# Same as Black
indent-width = 4
line-length = 88

[tool.ruff.lint]
select = [
# pycodestyle
"E",
# Pyflakes
"F",
# TODO: enable these at some point?
# pyupgrade
# "UP",
# flake8-bugbear
#"B",
# flake8-simplify
#"SIM",
# isort
# "I",
]
26 changes: 0 additions & 26 deletions setup.cfg

This file was deleted.

45 changes: 0 additions & 45 deletions setup.py

This file was deleted.

4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ skip_missing_interpreters = true
[testenv]
deps =
mypy
flake8
ruff
pytest
pytest-cov
types-PyYAML

commands =
ruff check
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had flake8 at the end because when I'm debugging, I often comment things out in not quite the right way or end up with an overly long line with a debug print statement, and it's quite annoying if the tests then don't run because tox already quits on the linting step.

I guess that doesn't happen if you run an autoformatter in your editor, but is there a reason to put it first?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My reasoning was: ruff is the fastest of the three, so putting it first will give feedback sooner (and waste less time and resources on the more expensive tests).

Though I don't mind putting it at the end if that helps your workflow :)

mypy
pytest {posargs}
flake8 ymmsl

[gh-actions]
python =
Expand Down
Loading