Skip to content

Commit

Permalink
chore: migrate prechecks from riot (#6640)
Browse files Browse the repository at this point in the history
## Checklist

- [x] Change(s) are motivated and described in the PR description.
- [x] Testing strategy is described if automated tests are not included
in the PR.
- [x] Risk is outlined (performance impact, potential for breakage,
maintainability, etc).
- [x] Change is maintainable (easy to change, telemetry, documentation).
- [x] [Library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
are followed. If no release note is required, add label
`changelog/no-changelog`.
- [x] Documentation is included (in-code, generated user docs, [public
corp docs](https://github.com/DataDog/documentation/)).
- [x] Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist

- [x] Title is accurate.
- [x] No unnecessary changes are introduced.
- [x] Description motivates each change.
- [x] Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes unless absolutely necessary.
- [x] Testing strategy adequately addresses listed risk(s).
- [x] Change is maintainable (easy to change, telemetry, documentation).
- [x] Release note makes sense to a user of the library.
- [x] Reviewer has explicitly acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment.
- [x] Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

Co-authored-by: Emmett Butler <[email protected]>
  • Loading branch information
majorgreys and emmettbutler authored Aug 12, 2023
1 parent 193c554 commit 7d80bd5
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 13 deletions.
1 change: 0 additions & 1 deletion .circleci/config.templ.yml
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@ jobs:
executor: python310
steps:
- checkout
- setup_riot
- setup_hatch
- run:
name: "Spelling"
Expand Down
27 changes: 27 additions & 0 deletions hatch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,30 @@ build = [
env.CIRCLECI.type = [
{ value = "virtual", if = ["true"] },
]


[envs.slotscheck]
template = "slotscheck"
python = "3.10"
features = ["opentracing"]
extra-dependencies = [
"slotscheck==0.17.0",
]

[envs.slotscheck.scripts]
_ = [
"python -m slotscheck -v ddtrace/",
]


[envs.scripts]
detached = true
python = "3.10"
extra-dependencies = [
"packaging==23.1",
]

[envs.scripts.scripts]
test = [
"python -m doctest {args} scripts/get-target-milestone.py scripts/needs_testrun.py tests/suitespec.py",
]
10 changes: 0 additions & 10 deletions riotfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,6 @@ def select_pys(min_version=MIN_PYTHON_VERSION, max_version=MAX_PYTHON_VERSION):
"DD_CIVISIBILITY_ITR_ENABLED": "1",
},
venvs=[
Venv(
pys=["3"],
pkgs={"slotscheck": latest},
venvs=[
Venv(
name="slotscheck",
command="python -m slotscheck -v ddtrace/",
),
],
),
Venv(
pys=["3"],
name="scripts",
Expand Down
4 changes: 2 additions & 2 deletions scripts/gen_circleci_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ def check(name: str, command: str, paths: t.Set[str]) -> None:
)
check(
name="Slots check",
command="riot -v run slotscheck",
command="hatch run slotscheck:_",
paths={"ddtrace/*.py", "hatch.toml"},
)
check(
name="Run scripts/*.py tests",
command="riot -v run -s scripts",
command="hatch run scripts:test",
paths={"scripts/*.py"},
)
check(
Expand Down

0 comments on commit 7d80bd5

Please sign in to comment.