GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - eclipse-score/bazel-tools-python: Repository for python static code checker

BranchesTags
Open more actions menu

Latest commit

 

History

15 Commits
15 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
bazel
bazel
 
 
docs
docs
 
 
quality
quality
 
 
scripts
scripts
 
 
test
test
 
 
third_party
third_party
 
 
.bazelignore
.bazelignore
 
 
.bazelrc
.bazelrc
 
 
.bazelversion
.bazelversion
 
 
.gitignore
.gitignore
 
 
.gitlint
.gitlint
 
 
.yamlfmt
.yamlfmt
 
 
BUILD
BUILD
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
MODULE.bazel
MODULE.bazel
 
 
NOTICE
NOTICE
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
WORKSPACE
WORKSPACE
 
 
WORKSPACE.bzlmod
WORKSPACE.bzlmod
 
 
project_config.bzl
project_config.bzl
 
 
pyproject.toml
pyproject.toml
 
 

Repository files navigation

DISCLAIMER

This repository is not longer actively maintained due to the unwillingness of the eclipse governing body to grant the maintainers with the permissions needed to approve and merge pull requests of one another. As a consequence security vulnerabilities in the repository and its dependencies will not be fixed.

Bazel Rules Quality Python (bazel_tools_python)

This repository contains bazel integrations for python quality tools.

  • Offered Tools
  • How to use bazel_tools_python
    • Requirements
    • Select python pip hub version
    • Using WORKSPACE
    • Using bzlmod
  • Contributing

Offered Tools

Each offered tool has it own README document and can be independently activated and configured.

Tool Tool Type Bazel Type Supported Languages Workspace Bzlmod
pylint Code linter aspect Python yes no
ruff-check Code linter aspect Python yes yes
mypy Code type linter aspect Python yes yes
black Code formatter aspect Python yes yes
ruff-format Code formatter aspect Python yes yes
isort Import formatter aspect Python yes yes
pytest Test Framework aspect Python yes yes
pycoverage Code coverage tool aspect Python yes yes
pip_audit Vulnerability checker rule Python yes yes

How to use bazel_tools_python

The next sections explain the steps to achieve a proper config for each Bazel dependency manager. For a fully working setup, take a look at the test workspace as an example.

Requirements

It's important to note that this repository does not supply python toolchains but only its pip dependencies. Therefore one must set up its own python toolchain. This repository support major python versions from 3.8 to 3.12.

Additionaly, one must have the following bazel repositories already in place:

  • bazel_skylib >= 1.7.1
  • rules_python >= 1.4.1

Select python pip hub version

To select the correct python dependency version one only needs to set a string_flag under one's .bazelrc file.

For example if one is using python 3.10, one should select our python 3.10 dependencies by adding the following lines to the respective .bazelrc file.

# .bazelrc

common --flag_alias=python=@rules_python//python/config_settings:python_version
common --python=3.10

Using WORKSPACE

Add this to your WORKSPACE file.

# WORKSPACE

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "bazel_tools_python",
    sha256 = "<omitted>",
    urls = ["<domain>/bazel-tools-python/<version>/bazel-tools-python-<version>.tar.gz"],
)

load("@bazel_tools_python//third_party:python_toolchains.bzl", bazel_tools_python_python_toolchains = "python_toolchains")

bazel_tools_python_python_toolchains()

load("@bazel_tools_python//third_party:python_pip_parse.bzl", bazel_tools_python_python_pip_parse = "python_pip_parse")

bazel_tools_python_python_pip_parse()

load("@bazel_tools_python//third_party:python_pip_hub.bzl", bazel_tools_python_python_pip_hub = "python_pip_hub")

bazel_tools_python_python_pip_hub()

Using bzlmod

Add this to your MODULE.bazel file.

# MODULE.bazel

bazel_dep(name = "score_bazel_tools_python", version = "<version>", repo_name = "bazel_tools_python")

To generate Bazel integrity value, one can use the following command:

openssl dgst -sha256 -binary bazel-tools-python-<version>.tar.gz | openssl base64 -A | sed 's/^/sha256-/'

Contributing

Please check our contributing guide.

About

Repository for python static code checker

Resources

Readme
Apache-2.0 license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

0 stars

Watchers

1 watching

Forks

4 forks
Report repository

Releases

Packages

Contributors

Languages

Generated from eclipse-score/module_template
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.