Skip to content

Commit 18b4541

Browse files
Project import generated by Copybara. (#45)
1 parent 6f23e59 commit 18b4541

File tree

345 files changed

+7120
-4697
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

345 files changed

+7120
-4697
lines changed

.bazelrc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# Make the target platform and the host platform the same
2-
build --platforms //bazel/platforms:extended_conda_env --host_platform //bazel/platforms:extended_conda_env --repo_env=BUILD_CONDA_ENV=build
3-
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
4-
run --platforms //bazel/platforms:extended_conda_env --host_platform //bazel/platforms:extended_conda_env --repo_env=BUILD_CONDA_ENV=extended
5-
cquery --platforms //bazel/platforms:extended_conda_env --host_platform //bazel/platforms:extended_conda_env --repo_env=BUILD_CONDA_ENV=extended
2+
build --platforms //bazel/platforms:snowflake_conda_env --host_platform //bazel/platforms:snowflake_conda_env --repo_env=BUILD_CONDA_ENV=build
3+
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
4+
run --platforms //bazel/platforms:snowflake_conda_env --host_platform //bazel/platforms:snowflake_conda_env --repo_env=BUILD_CONDA_ENV=sf_only
5+
cquery --platforms //bazel/platforms:snowflake_conda_env --host_platform //bazel/platforms:snowflake_conda_env --repo_env=BUILD_CONDA_ENV=sf_only
66

7-
run:pre_build --platforms //bazel/platforms:extended_conda_env --host_platform //bazel/platforms:extended_conda_env --repo_env=BUILD_CONDA_ENV=build
8-
build:typecheck --aspects //bazel/mypy:mypy.bzl%mypy_aspect --output_groups=mypy --repo_env=BUILD_CONDA_ENV=extended
7+
run:pre_build --platforms //bazel/platforms:snowflake_conda_env --host_platform //bazel/platforms:snowflake_conda_env --repo_env=BUILD_CONDA_ENV=build
8+
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
99

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

15-
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
16-
run:sf_only --platforms //bazel/platforms:snowflake_conda_env --host_platform //bazel/platforms:snowflake_conda_env --repo_env=BUILD_CONDA_ENV=sf_only
17-
cquery:sf_only --platforms //bazel/platforms:snowflake_conda_env --host_platform //bazel/platforms:snowflake_conda_env --repo_env=BUILD_CONDA_ENV=sf_only
15+
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
16+
run:extended --platforms //bazel/platforms:extended_conda_env --host_platform //bazel/platforms:extended_conda_env --repo_env=BUILD_CONDA_ENV=extended
17+
cquery:extended --platforms //bazel/platforms:extended_conda_env --host_platform //bazel/platforms:extended_conda_env --repo_env=BUILD_CONDA_ENV=extended

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.0.0
1+
6.3.0

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,4 +386,7 @@ user.bazelrc
386386
.ipynb_checkpoints
387387

388388
# Bazel code coverage html report
389-
genhtml
389+
html_coverage_report/
390+
391+
# VSCode configuration
392+
.vscode/

.pre-commit-config.yaml

Lines changed: 48 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
exclude: '^(.*egg.info.*|docs/.*|.*/parameters.py$|docs/.*|.*\.py_template|.*/experimental/.*)'
1+
---
2+
exclude: ^(.*egg.info.*|docs/.*|.*/parameters.py$|docs/.*|.*\.py_template|.*/experimental/.*)
3+
minimum_pre_commit_version: 3.4.0
24
repos:
35
- repo: https://github.com/asottile/pyupgrade
46
rev: v2.31.1
57
hooks:
68
- id: pyupgrade
7-
args: [--py38-plus, --keep-runtime-typing]
8-
- repo: https://github.com/PyCQA/isort # config: .isort.cfg
9+
args:
10+
- --py38-plus
11+
- --keep-runtime-typing
12+
- repo: https://github.com/PyCQA/isort # config: .isort.cfg
913
rev: 5.12.0
1014
hooks:
1115
- id: isort
@@ -28,33 +32,17 @@ repos:
2832
tests/resources/.*|
2933
)$
3034
- id: check-yaml
31-
# The first two lines of meta.yaml does not work with check-yaml
32-
exclude: >
33-
(?x)^(
34-
ci/conda_recipe/meta.yaml|
35-
.github/repo_meta.yaml|
36-
)$
3735
- id: debug-statements
3836
- id: check-ast
39-
- repo: https://github.com/Lucas-C/pre-commit-hooks.git
40-
rev: v1.1.13
41-
hooks:
42-
- id: insert-license
43-
name: insert-py-license
44-
files: >
45-
(?x)^(
46-
src/snowflake/snowml/.*\.py|
47-
tests/.*\.py|
48-
)$
49-
exclude: >
50-
(?x)^(
51-
src/snowflake/snowml/version.py|
52-
tests/resources/.*\.py|
53-
)$
37+
- id: check-json
38+
exclude: (?x)^(\.vscode\-bootstrap/.*\.json)$
39+
- id: pretty-format-json
5440
args:
55-
- --license-filepath
56-
- license_header.txt
57-
- repo: https://github.com/pycqa/flake8 # config: .flake8
41+
- --autofix
42+
exclude_types:
43+
- jupyter
44+
exclude: (?x)^(\.vscode\-bootstrap/.*\.json)$
45+
- repo: https://github.com/pycqa/flake8 # config: .flake8
5846
rev: 3.9.2
5947
hooks:
6048
- id: flake8
@@ -68,3 +56,36 @@ repos:
6856
language_version: python3
6957
# Exclude test files.
7058
exclude: ^.*(_test.py)$
59+
- repo: https://github.com/igorshubovych/markdownlint-cli # config: .markdownlint.yaml
60+
rev: v0.36.0
61+
hooks:
62+
- id: markdownlint-fix
63+
- repo: https://github.com/keith/pre-commit-buildifier
64+
rev: 6.0.0
65+
hooks:
66+
- id: buildifier
67+
args:
68+
- --warnings=all
69+
# - id: buildifier-lint
70+
# args: *args
71+
- repo: https://github.com/crate-ci/typos # config: _typos.toml
72+
rev: v1.16.10
73+
hooks:
74+
- id: typos
75+
- repo: https://github.com/lyz-code/yamlfix
76+
rev: 1.13.0
77+
hooks:
78+
- id: yamlfix
79+
args:
80+
- --config-file
81+
- yamlfix.toml
82+
- repo: https://github.com/pappasam/toml-sort
83+
rev: v0.23.1
84+
hooks:
85+
- id: toml-sort-fix
86+
- repo: https://github.com/shellcheck-py/shellcheck-py
87+
rev: v0.9.0.5
88+
hooks:
89+
- id: shellcheck
90+
args:
91+
- --severity=warning

0 commit comments

Comments
 (0)