2018-03-08 12:48:46 +00:00
|
|
|
workspace(name = "com_github_google_benchmark")
|
|
|
|
|
2022-12-19 11:12:32 +00:00
|
|
|
load("//:bazel/benchmark_deps.bzl", "benchmark_deps")
|
2019-04-09 12:02:45 +00:00
|
|
|
|
2022-12-19 11:12:32 +00:00
|
|
|
benchmark_deps()
|
2022-10-31 11:03:59 +00:00
|
|
|
|
|
|
|
load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies")
|
2020-06-08 14:21:52 +00:00
|
|
|
|
2022-12-19 11:12:32 +00:00
|
|
|
rules_foreign_cc_dependencies()
|
2020-05-06 16:28:29 +00:00
|
|
|
|
2023-12-07 15:00:43 +00:00
|
|
|
load("@rules_python//python:repositories.bzl", "py_repositories")
|
2022-10-31 11:03:59 +00:00
|
|
|
|
2023-12-07 15:00:43 +00:00
|
|
|
py_repositories()
|
|
|
|
|
|
|
|
load("@rules_python//python:pip.bzl", "pip_parse")
|
|
|
|
|
|
|
|
pip_parse(
|
Add pre-commit config and GitHub Actions job (#1688)
* Add pre-commit config and GitHub Actions job
Contains the following hooks:
* buildifier - for formatting and linting Bazel files.
* mypy, ruff, isort, black - for Python typechecking, import hygiene,
static analysis, and formatting.
The pylint CI job was changed to be a pre-commit CI job, where pre-commit
is bootstrapped via Python.
Pylint is currently no longer part of the
code checks, but can be re-added if requested. The reason to drop was
that it does not play nicely with pre-commit, and lots of its
functionality and responsibilities are actually covered in ruff.
* Add dev extra to pyproject.toml for development installs
* Clarify that pre-commit contains only Python and Bazel hooks
* Add one-line docstrings to Bazel modules
* Apply buildifier pre-commit fixes to Bazel files
* Apply pre-commit fixes to Python files
* Supply --profile=black to isort to prevent conflicts
* Fix nanobind build file formatting
* Add tooling configs to `pyproject.toml`
In particular, set line length 80 for all Python files.
* Reformat all Python files to line length 80, fix return type annotations
Also ignores the `tools/compare.py` and `tools/gbench/report.py` files
for mypy, since they emit a barrage of errors which we can deal with
later. The errors are mostly related to dynamic classmethod definition.
2023-10-30 15:35:37 +00:00
|
|
|
name = "tools_pip_deps",
|
2023-12-07 15:00:43 +00:00
|
|
|
requirements_lock = "//tools:requirements.txt",
|
2020-05-06 16:28:29 +00:00
|
|
|
)
|
|
|
|
|
2023-12-07 15:00:43 +00:00
|
|
|
load("@tools_pip_deps//:requirements.bzl", "install_deps")
|
|
|
|
|
|
|
|
install_deps()
|