Skip to content

Commit

Permalink
Merge pull request #209 from lsst-sqre/tickets/DM-38339
Browse files Browse the repository at this point in the history
DM-38339: Convert to pyproject.toml
  • Loading branch information
rra authored Mar 16, 2023
2 parents 7bca60c + 318529b commit ac9a9a5
Show file tree
Hide file tree
Showing 8 changed files with 72 additions and 82 deletions.
7 changes: 7 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[flake8]
max-line-length = 79
# E203: whitespace before :, flake8 disagrees with PEP-8
# W503: line break after binary operator, flake8 disagrees with PEP-8
ignore = E203, W503
exclude =
docs/conf.py
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020-2022 Association of Universities for Research in Astronomy, Inc. (AURA)
Copyright (c) 2020-2023 Association of Universities for Research in Astronomy, Inc. (AURA)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# mobu

mobu (short for "monkey business") is a test framework for the [Rubin Science Platform](https://phalanx.lsst.io/).
It attempts to simulate user interactions with Science Platform services continuously, recording successes and failures and optionally reporting failures to a Slack channel via a Slack incoming webhook.
It can be used for both monitoring and synthetic load testing.

mobu is developed with the [Safir](https://safir.lsst.io/) framework.
8 changes: 0 additions & 8 deletions README.rst

This file was deleted.

69 changes: 56 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,37 @@
[build-system]
requires = [
"setuptools>=42",
"wheel",
"setuptools_scm[toml]>=3.4"
[project]
# https://packaging.python.org/en/latest/specifications/declaring-project-metadata/
name = "mobu"
description = "Simulate user load for Science Platform testing"
license = { file = "LICENSE" }
readme = "README.md"
keywords = ["rubin", "lsst"]
# https://pypi.org/classifiers/
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Intended Audience :: Developers",
"Natural Language :: English",
"Operating System :: POSIX",
"Typing :: Typed",
]
build-backend = 'setuptools.build_meta'
requires-python = ">=3.11"
# Use requirements/main.in for runtime dependencies instead.
dependencies = []
dynamic = ["version"]

[project.scripts]
monkeyflocker = "monkeyflocker.cli:main"

[project.urls]
Homepage = "https://github.com/lsst-sqre/mobu"
Source = "https://github.com/lsst-sqre/mobu"

[build-system]
requires = ["setuptools>=61", "wheel", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]

Expand Down Expand Up @@ -32,7 +59,7 @@ exclude_lines = [

[tool.black]
line-length = 79
target-version = ['py38']
target-version = ['py311']
exclude = '''
/(
\.eggs
Expand All @@ -49,8 +76,8 @@ exclude = '''
# Multi-line strings are implicitly treated by black as regular expressions

[tool.isort]
include_trailing_comma = true
multi_line_output = 3
profile = "black"
line_length = 79
known_first_party = ["mobu", "tests"]
skip = ["docs/conf.py"]

Expand All @@ -60,7 +87,23 @@ filterwarnings = [
# Bug in aiojobs
"ignore:with timeout\\(\\) is deprecated:DeprecationWarning"
]
python_files = [
"tests/*.py",
"tests/*/*.py"
]
# The python_files setting is not for test detection (pytest will pick up any
# test files named *_test.py without this setting) but to enable special
# assert processing in any non-test supporting files under tests. We
# conventionally put test support functions under tests.support and may
# sometimes use assert in test fixtures in conftest.py, and pytest only
# enables magical assert processing (showing a full diff on assert failures
# with complex data structures rather than only the assert message) in files
# listed in python_files.
python_files = ["tests/*.py", "tests/*/*.py"]

[tool.mypy]
disallow_untyped_defs = true
disallow_incomplete_defs = true
ignore_missing_imports = true
plugins = ["pydantic.mypy"]
show_error_codes = true
strict_equality = true
warn_redundant_casts = true
warn_unreachable = true
warn_unused_ignores = true
56 changes: 0 additions & 56 deletions setup.cfg

This file was deleted.

3 changes: 0 additions & 3 deletions setup.py

This file was deleted.

2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ commands = coverage report
[testenv:typing]
description = Run mypy.
commands =
mypy src/mobu tests setup.py
mypy src/mobu tests

[testenv:lint]
description = Lint codebase by running pre-commit (Black, isort, Flake8).
Expand Down

0 comments on commit ac9a9a5

Please sign in to comment.