Skip to content

Commit

Permalink
Use pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzalocasas committed Jun 23, 2024
1 parent 2183a71 commit 2d8e451
Show file tree
Hide file tree
Showing 7 changed files with 129 additions and 121 deletions.
21 changes: 0 additions & 21 deletions .bumpversion.cfg

This file was deleted.

2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ insert_final_newline = true
indent_style = space
indent_size = 4
charset = utf-8
max_line_length = 120
max_line_length = 179

[*.{bat,cmd,ps1}]
end_of_line = crlf
Expand Down
2 changes: 1 addition & 1 deletion AUTHORS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Authors

- Joseph Kenny <<[email protected]>> [@jckenny59](https://github.com/jckenny59)
- Daniela Mitterberger <<mitterberger@arch.ethz.ch>> [@dmitterberger](https://github.com/dmitterberger)
- Daniela Mitterberger <<mitterberger@princeton.edu>> [@dmitterberger](https://github.com/dmitterberger)
148 changes: 127 additions & 21 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,27 +1,133 @@
[tool.black]
line-length = 120
[build-system]
requires = ["setuptools>=66.0"]
build-backend = "setuptools.build_meta"

# ============================================================================
# project info
# ============================================================================

[project]
name = "compas_xr"
description = "COMPAS XR streamlines extended reality workflows to ease the implementation of human-machine collaborative applications in architectural research and educational environments."
keywords = ["compas", "xr", "aec", "robotic", "human-machine"]
authors = [{ name = "Joseph Kenny", email = "[email protected]" }, { name = "Daniela Mitterberger", email = "[email protected]" }]
license = { file = "LICENSE" }
readme = "README.md"
requires-python = ">=3.9"
dynamic = ['dependencies', 'optional-dependencies', 'version']
classifiers = [
"Development Status :: 4 - Beta",
"Topic :: Scientific/Engineering",
"Operating System :: Unix",
"Operating System :: POSIX",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]

[project.urls]
Homepage = "https://github.com/gramaziokohler/compas_xr"
Documentation = "https://gramaziokohler.github.io/compas_xr/"
Repository = "https://github.com/gramaziokohler/compas_xr.git"
Changelog = "https://github.com/gramaziokohler/compas_xr/blob/main/CHANGELOG.md"
Issues = "https://github.com/gramaziokohler/compas_xr/issues"
Forum = "https://forum.compas-framework.org/"

# ============================================================================
# setuptools config
# ============================================================================

[tool.setuptools]
package-dir = { "" = "src" }
include-package-data = true
zip-safe = false

[tool.setuptools.dynamic]
version = { attr = "compas_xr.__version__" }
dependencies = { file = "requirements.txt" }
optional-dependencies = { dev = { file = "requirements-dev.txt" } }

[tool.setuptools.packages.find]
where = ["src"]

[tool.setuptools.package-data]

# ============================================================================
# replace pytest.ini
# ============================================================================
[tool.pytest.ini_options]
minversion = "6.0"
testpaths = ["tests", "src/compas_xr"]
python_files = [
"test_*.py",
"tests.py"
python_files = ["test_*.py", "tests.py"]
addopts = ["-ra", "--strict-markers", "--doctest-glob=*.rst", "--tb=short"]
doctest_optionflags = [
"NORMALIZE_WHITESPACE",
"IGNORE_EXCEPTION_DETAIL",
"ALLOW_UNICODE",
"ALLOW_BYTES",
"NUMBER",
]
addopts = "-ra --strict --doctest-modules --doctest-glob=*.rst --tb=short"
doctest_optionflags= "NORMALIZE_WHITESPACE IGNORE_EXCEPTION_DETAIL ALLOW_UNICODE ALLOW_BYTES NUMBER"
filterwarnings = "ignore::DeprecationWarning"

[tool.isort]
line_length = 120
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
force_single_line = true
ensure_newline_before_comments = true
known_first_party = "compas_xr"
default_section = "THIRDPARTY"
forced_separate = "test_compas_xr"
skip = ["__init__.py"]

# ============================================================================
# replace bumpversion.cfg
# ============================================================================

[tool.bumpversion]
current_version = "0.8.0"
message = "Bump version to {new_version}"
commit = true
tag = true

[[tool.bumpversion.files]]
filename = "src/compas_xr/__init__.py"
search = "{current_version}"
replace = "{new_version}"

[[tool.bumpversion.files]]
filename = "CHANGELOG.md"
search = "Unreleased"
replace = "[{new_version}] {now:%Y-%m-%d}"

[[tool.bumpversion.files]]
glob = "src/compas_xr/ghpython/components/**/code.py"
search = "v{current_version}"
replace = "v{new_version}"

# ============================================================================
# replace setup.cfg
# ============================================================================

[tool.black]
line-length = 179

[tool.ruff]
line-length = 179
indent-width = 4
target-version = "py39"

[tool.ruff.lint]
select = ["E", "F", "I"]

[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["I001"]
"tests/*" = ["I001"]
"tasks.py" = ["I001"]

[tool.ruff.lint.isort]
force-single-line = true
known-first-party = [
"compas_xr",
]

[tool.ruff.lint.pydocstyle]
convention = "numpy"

[tool.ruff.lint.pycodestyle]
max-doc-length = 179

[tool.ruff.format]
docstring-code-format = true
docstring-code-line-length = "dynamic"
1 change: 0 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ ruff
sphinx_compas2_theme
twine
wheel
-e .
13 changes: 0 additions & 13 deletions setup.cfg

This file was deleted.

63 changes: 0 additions & 63 deletions setup.py

This file was deleted.

0 comments on commit 2d8e451

Please sign in to comment.