Skip to content

Commit

Permalink
Project import generated by Copybara. (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
snowflake-provisioner authored Sep 14, 2023
1 parent 6f23e59 commit 18b4541
Show file tree
Hide file tree
Showing 345 changed files with 7,120 additions and 4,697 deletions.
18 changes: 9 additions & 9 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Make the target platform and the host platform the same
build --platforms //bazel/platforms:extended_conda_env --host_platform //bazel/platforms:extended_conda_env --repo_env=BUILD_CONDA_ENV=build
test --platforms //bazel/platforms:extended_conda_env --host_platform //bazel/platforms:extended_conda_env --run_under='//bazel:test_wrapper' --repo_env=BUILD_CONDA_ENV=extended
run --platforms //bazel/platforms:extended_conda_env --host_platform //bazel/platforms:extended_conda_env --repo_env=BUILD_CONDA_ENV=extended
cquery --platforms //bazel/platforms:extended_conda_env --host_platform //bazel/platforms:extended_conda_env --repo_env=BUILD_CONDA_ENV=extended
build --platforms //bazel/platforms:snowflake_conda_env --host_platform //bazel/platforms:snowflake_conda_env --repo_env=BUILD_CONDA_ENV=build
test --platforms //bazel/platforms:snowflake_conda_env --host_platform //bazel/platforms:snowflake_conda_env --run_under='//bazel:test_wrapper' --repo_env=BUILD_CONDA_ENV=sf_only
run --platforms //bazel/platforms:snowflake_conda_env --host_platform //bazel/platforms:snowflake_conda_env --repo_env=BUILD_CONDA_ENV=sf_only
cquery --platforms //bazel/platforms:snowflake_conda_env --host_platform //bazel/platforms:snowflake_conda_env --repo_env=BUILD_CONDA_ENV=sf_only

run:pre_build --platforms //bazel/platforms:extended_conda_env --host_platform //bazel/platforms:extended_conda_env --repo_env=BUILD_CONDA_ENV=build
build:typecheck --aspects //bazel/mypy:mypy.bzl%mypy_aspect --output_groups=mypy --repo_env=BUILD_CONDA_ENV=extended
run:pre_build --platforms //bazel/platforms:snowflake_conda_env --host_platform //bazel/platforms:snowflake_conda_env --repo_env=BUILD_CONDA_ENV=build
build:typecheck --aspects //bazel/mypy:mypy.bzl%mypy_aspect --output_groups=mypy --platforms //bazel/platforms:extended_conda_env --host_platform //bazel/platforms:extended_conda_env --repo_env=BUILD_CONDA_ENV=extended

# Since integration tests are located in different packages than code under test,
# the default instrumentation filter would exclude the code under test. This
# makes bazel consider all the source code in our repo for coverage.
coverage --instrumentation_filter="-//tests[/:]"

test:sf_only --platforms //bazel/platforms:snowflake_conda_env --host_platform //bazel/platforms:snowflake_conda_env --run_under='//bazel:test_wrapper' --repo_env=BUILD_CONDA_ENV=sf_only
run:sf_only --platforms //bazel/platforms:snowflake_conda_env --host_platform //bazel/platforms:snowflake_conda_env --repo_env=BUILD_CONDA_ENV=sf_only
cquery:sf_only --platforms //bazel/platforms:snowflake_conda_env --host_platform //bazel/platforms:snowflake_conda_env --repo_env=BUILD_CONDA_ENV=sf_only
test:extended --platforms //bazel/platforms:extended_conda_env --host_platform //bazel/platforms:extended_conda_env --run_under='//bazel:test_wrapper' --repo_env=BUILD_CONDA_ENV=extended
run:extended --platforms //bazel/platforms:extended_conda_env --host_platform //bazel/platforms:extended_conda_env --repo_env=BUILD_CONDA_ENV=extended
cquery:extended --platforms //bazel/platforms:extended_conda_env --host_platform //bazel/platforms:extended_conda_env --repo_env=BUILD_CONDA_ENV=extended
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.0.0
6.3.0
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -386,4 +386,7 @@ user.bazelrc
.ipynb_checkpoints

# Bazel code coverage html report
genhtml
html_coverage_report/

# VSCode configuration
.vscode/
75 changes: 48 additions & 27 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
exclude: '^(.*egg.info.*|docs/.*|.*/parameters.py$|docs/.*|.*\.py_template|.*/experimental/.*)'
---
exclude: ^(.*egg.info.*|docs/.*|.*/parameters.py$|docs/.*|.*\.py_template|.*/experimental/.*)
minimum_pre_commit_version: 3.4.0
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v2.31.1
hooks:
- id: pyupgrade
args: [--py38-plus, --keep-runtime-typing]
- repo: https://github.com/PyCQA/isort # config: .isort.cfg
args:
- --py38-plus
- --keep-runtime-typing
- repo: https://github.com/PyCQA/isort # config: .isort.cfg
rev: 5.12.0
hooks:
- id: isort
Expand All @@ -28,33 +32,17 @@ repos:
tests/resources/.*|
)$
- id: check-yaml
# The first two lines of meta.yaml does not work with check-yaml
exclude: >
(?x)^(
ci/conda_recipe/meta.yaml|
.github/repo_meta.yaml|
)$
- id: debug-statements
- id: check-ast
- repo: https://github.com/Lucas-C/pre-commit-hooks.git
rev: v1.1.13
hooks:
- id: insert-license
name: insert-py-license
files: >
(?x)^(
src/snowflake/snowml/.*\.py|
tests/.*\.py|
)$
exclude: >
(?x)^(
src/snowflake/snowml/version.py|
tests/resources/.*\.py|
)$
- id: check-json
exclude: (?x)^(\.vscode\-bootstrap/.*\.json)$
- id: pretty-format-json
args:
- --license-filepath
- license_header.txt
- repo: https://github.com/pycqa/flake8 # config: .flake8
- --autofix
exclude_types:
- jupyter
exclude: (?x)^(\.vscode\-bootstrap/.*\.json)$
- repo: https://github.com/pycqa/flake8 # config: .flake8
rev: 3.9.2
hooks:
- id: flake8
Expand All @@ -68,3 +56,36 @@ repos:
language_version: python3
# Exclude test files.
exclude: ^.*(_test.py)$
- repo: https://github.com/igorshubovych/markdownlint-cli # config: .markdownlint.yaml
rev: v0.36.0
hooks:
- id: markdownlint-fix
- repo: https://github.com/keith/pre-commit-buildifier
rev: 6.0.0
hooks:
- id: buildifier
args:
- --warnings=all
# - id: buildifier-lint
# args: *args
- repo: https://github.com/crate-ci/typos # config: _typos.toml
rev: v1.16.10
hooks:
- id: typos
- repo: https://github.com/lyz-code/yamlfix
rev: 1.13.0
hooks:
- id: yamlfix
args:
- --config-file
- yamlfix.toml
- repo: https://github.com/pappasam/toml-sort
rev: v0.23.1
hooks:
- id: toml-sort-fix
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.5
hooks:
- id: shellcheck
args:
- --severity=warning
Loading

0 comments on commit 18b4541

Please sign in to comment.