-
-
Notifications
You must be signed in to change notification settings - Fork 4
feat(py-client): Set up testing, formatters, linters, CI #152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
eb22f80
d37032c
86c75cb
8f932f2
987c9c6
1e9388c
ac5bc03
a29e932
58d5309
daca135
ca248cb
1c93543
33ff8b4
1f5d760
790e69a
e209b31
ad1a998
25c4df6
5296238
41c5edf
5c2305e
7a6d503
e0c1a52
1ac9c9c
5c0e09f
b7ebd66
75c6065
06d8d11
074da70
e1b78e9
0bbe63b
b592a34
10d6c92
114e0d4
96c25d5
664e211
76c8943
395963c
0bb4a6f
2e19ec3
088fd48
7d1d979
6f6a046
5389be3
10fb7cd
28f41b4
93ada0e
e861c49
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,3 +11,4 @@ profile.json.gz | |
| .*.sw* | ||
|
|
||
| **/__pycache__ | ||
| /dist | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # This pre-commit config is mainly aimed at formatting and linting the Python files in python-objectstore-client. | ||
| # However, pre-commit requires this file to be placed at the root of the repository. | ||
|
|
||
| repos: | ||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: v6.0.0 | ||
| hooks: | ||
| - id: trailing-whitespace | ||
| - id: end-of-file-fixer | ||
| - id: check-merge-conflict | ||
|
|
||
| - repo: local | ||
| hooks: | ||
| - id: ruff-check | ||
| name: ruff check | ||
| entry: ruff check | ||
| language: system | ||
| types_or: [python, pyi] | ||
| - id: ruff-format | ||
| name: ruff format | ||
| entry: ruff format | ||
| language: system | ||
| types_or: [python, pyi] | ||
| - id: mypy | ||
| name: mypy | ||
| entry: .venv/bin/mypy | ||
| language: system | ||
| types: [python] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,33 @@ | ||
| [project] | ||
| name = "objectstore" | ||
| version = "0.1.0" | ||
| requires-python = ">=3.13" | ||
| requires-python = ">=3.13.1" | ||
|
|
||
| [[tool.uv.index]] | ||
| url = "https://pypi.devinfra.sentry.io/simple" | ||
| default = true | ||
| [tool.uv] | ||
| required-version = "==0.9.3" # keep in sync with devenv/config.ini | ||
|
|
||
| [tool.uv.workspace] | ||
| members = [ | ||
| "python-objectstore-client", | ||
| ] | ||
|
|
||
| [dependency-groups] | ||
| dev = ["devservices>=1.2.2"] | ||
| dev = [ | ||
| "devservices>=1.2.2", | ||
| "pytest>=8.3.3", | ||
| "mypy>=1.17.1", | ||
| "ruff>=0.14.2", | ||
|
Comment on lines
+17
to
+19
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These could be moved to the subdir with no problem as our |
||
| "pre-commit>=4.2.0", | ||
| ] | ||
|
|
||
| [tool.ruff.lint] | ||
| select = ["E", "F", "I", "UP"] # pycodestyle, pyflakes, isort, pyupgrade | ||
|
|
||
| [tool.mypy] | ||
| no_implicit_reexport = true | ||
| warn_unreachable = true | ||
| warn_redundant_casts = true | ||
| local_partial_types = true | ||
| disallow_any_generics = true | ||
| disallow_untyped_defs = true | ||
| warn_unused_configs = true | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,22 @@ | ||
| # objectstore-client | ||
| # Objectstore Client | ||
|
|
||
| ## Usage | ||
|
|
||
| TODO | ||
|
|
||
| ## Development | ||
|
|
||
| ### Environment Setup | ||
|
|
||
| The considerations for setting up the development environment that can be found in the main [README](../README.md) apply for this package as well. | ||
|
|
||
| ### Pre-commit hook | ||
|
|
||
| A configuration to set up a git pre-commit hook using [pre-commit](https://github.com/pre-commit/pre-commit) is available at the root of the repository. | ||
|
|
||
| To install it, run | ||
| ```sh | ||
| pre-commit install | ||
| ``` | ||
|
|
||
| The hook will automatically run some checks before every commit, including the linters and formatters we run in CI. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| def test_imports() -> None: | ||
| import objectstore_client | ||
|
|
||
| _ = objectstore_client |
Large diffs are not rendered by default.
Uh oh!
There was an error while loading. Please reload this page.