Skip to content

Commit

Permalink
in code review
Browse files Browse the repository at this point in the history
  • Loading branch information
bukzor committed Oct 10, 2023
1 parent 5015984 commit fcbd96e
Show file tree
Hide file tree
Showing 11 changed files with 160 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
repos:
- repo: https://github.com/pycqa/isort
rev: 5.8.0
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/psf/black
rev: 22.3.0
rev: 23.9.1
hooks:
- id: black
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
rev: v4.4.0
hooks:
- id: check-case-conflict
- id: check-merge-conflict
Expand All @@ -22,7 +22,7 @@ repos:
- id: fix-encoding-pragma
args: ["--remove"]
- repo: https://github.com/pycqa/flake8
rev: 3.8.4
rev: 6.1.0
hooks:
- id: flake8
language_version: python3.8
Expand Down
6 changes: 0 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
setup-git:
pip install pre-commit==2.13.0
pre-commit install --install-hooks

venv-binding:
sbin/make-venv binding

venv-tester:
sbin/make-venv tester
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ make
```
make test
```

42 changes: 42 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# TODO

* [ ] goal: allow sentaurs to use jsonnet in a fully-tested manner
* [ ] submit ops/jsonnet integration:
https://github.com/getsentry/ops/pull/7245/files
* [ ] test getsentry deployment
https://github.com/getsentry/getsentry/blob/master/gocd/templates/backend.jsonnet
* [ ] rework tests of application to gocd
https://github.com/getsentry/gocd-jsonnet
* [ ] DRY pyproject.toml, in this repo
* [ ] we're creating three new python libraries
* [ ] sentry-jsonish -- mostly just typing
* [x] pypi packaging exists
* [x] unit testing
* [ ] readme
* [ ] sentry-jsonnet
* [x] pypi packaging exists
* [ ] update to gojsonnet
* [ ] blocked by: figure out why our pypi GHA has no `go`
* [ ] depends on sentry-jsonish
* [ ] readme
* [ ] test harness: jsonnet-tester
* [ ] refactor pytest to a library
* [ ] extract three functions from jsonnet-private-libs make_port_test.py
* [ ] some unit testing of those three functions
* [ ] later: use those three functions in a pytest extension
* [ ] readme
* [ ] depends on sentry-jsonnet
* sentry-jsonnet-lib
* [ ] add it to this repo
* [ ] repo scope:
* [ ] set up autoreleasing
* [ ] GHA "release" action -- prepares assets and creates an issue in github.com/getsentry/publish
* [ ] blocked by: add all three packages to this repo
* [ ] delete the old getsentry/private-jsonnet-libs

# out of scope

* private shared jsonnet functions: getsentry/getsentry-jsonnet-lib.private
* don't need it, for the forseeable future
* anything private can be modeled as parmeters' values in private repos (e.g. ops)
* would need to be a new repo, since this one's public
1 change: 1 addition & 0 deletions sentry_jsonish/.envrc
1 change: 1 addition & 0 deletions sentry_jsonish/Makefile
105 changes: 105 additions & 0 deletions sentry_jsonish/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"

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

[project]
dynamic = ["dependencies"]
name = "sentry_jsonish"
version = "0.0.1"
description = "Sentry wrapper to the go-jsonnet library"
readme = "README.md"
requires-python = ">=3.8"
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
]

[tool.setuptools.dynamic]
dependencies = {file = ["requirements.in"]}

[tool.black]
line-length = 79
target-version = ['py38']
skip-magic-trailing-comma = true

[tool.isort]
profile = "black"
line_length = 79
use_parentheses = true
force_single_line = true
multi_line_output = 3
include_trailing_comma = true
add_imports=[
"from __future__ import annotations",
]

[tool.pytest.ini_options]
minversion = "6.0"
markers = ["slow_integration"]
addopts = "--durations=3 -vv --doctest-modules"
testpaths = ["."]
norecursedirs = [
# runtime-only deps
"**/vendor", # jsonnet-bundle symlinks
"**/venv",

# cache files
"**/__pycache__",
"**/.*",

# dirty hacks
"tmp*",
"*tmp",
"*bak",
"**/trash",
]
python_files = ["*.py"]
python_classes = ["Test", "Describe"]
python_functions = ["test_", "it_"]
enable_assertion_pass_hook = true

[tool.pyright]
include = ["."]
exclude = [
"**/.venv",

# cache files
"**/__pycache__",
"**/.*",

# dirty hacks
"tmp*",
"*tmp",
"*bak",
"**/trash",
]
extraPaths = [
"src",
".venv/lib/*/site-packages/",
]

pythonPlatform = "Linux"
pythonVersion = "3.8"

typeCheckingMode = "strict"

# don't flag arguments as long as its type is known
reportMissingParameterType = "none"
reportUnknownParameterType = "error"

# turn on all the checks not already enabled by "strict":
reportCallInDefaultInitializer = "error"
reportImplicitStringConcatenation = "error"
reportMissingSuperCall = "error"
reportPropertyTypeMismatch = "error"
reportUninitializedInstanceVariable = "error"
reportUnnecessaryTypeIgnoreComment = "error"
reportUnusedCallResult = "none" # too noisy

# enable PEP 484 indication that a function parameter assigned a default value
# of None is implicitly Optional
strictParameterNoneValue = false
File renamed without changes.
6 changes: 6 additions & 0 deletions sentry_jsonish/requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# pip-compile --output-file=requirements-dev.txt --strip-extras requirements-dev.in
#
File renamed without changes.
File renamed without changes.

0 comments on commit fcbd96e

Please sign in to comment.