Skip to content

Commit c00872b

Browse files
committed
sync dev work
1 parent 611faea commit c00872b

9 files changed

Lines changed: 998 additions & 43 deletions

BUILD.bazel

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
load("@bazel_gazelle//:def.bzl", "gazelle")
22
load("@pypi//:requirements.bzl", "all_whl_requirements")
33
load("@rules_python//python:pip.bzl", "compile_pip_requirements")
4+
load("@rules_python//python:packaging.bzl", "py_package", "py_wheel")
45
load("@rules_python_gazelle_plugin//manifest:defs.bzl", "gazelle_python_manifest")
56
load("@rules_python_gazelle_plugin//modules_mapping:def.bzl", "modules_mapping")
67

78
compile_pip_requirements(
89
name = "requirements",
910
srcs = ["pyproject.toml"],
11+
requirements_darwin="requirements_darwin.txt",
12+
requirements_linux="requirements_linux.txt",
1013
)
1114

1215
# This rule fetches the metadata for python packages we depend on. That data is
@@ -63,3 +66,17 @@ gazelle(
6366
# gazelle:resolve py lxml.etree @pypi//lxml
6467
# gazelle:python_binary_naming_convention $package_name$
6568
# gazelle:python_library_naming_convention $package_name$
69+
70+
71+
# Publishing
72+
73+
py_wheel(
74+
name = "wheel",
75+
distribution = "tableaudocumentapi_ntnx",
76+
homepage = "https://github.com/nutanix-corp/ng-common-utilities/tree/tableaudocumentapi_ntnx/tableaudocumentapi_ntnx",
77+
version = '0.11.1',
78+
deps = ["//tableaudocumentapi:tableaudocumentapi"],
79+
requires = [
80+
"lxml"
81+
],
82+
)

MODULE.bazel

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
bazel_dep(name = "rules_python", version = "1.1.0")
22
bazel_dep(name = "rules_python_gazelle_plugin", version = "1.1.0")
33
bazel_dep(name = "gazelle", version = "0.42.0", repo_name = "bazel_gazelle")
4-
4+
bazel_dep(name = "platforms", version = "0.0.11")
55
# # Import the python repositories generated by the given module extension into the scope of the current module.
66
# use_repo(python, "python3_9")
77
# use_repo(python, "python3_9_toolchains")
@@ -17,6 +17,8 @@ pip.parse(
1717
hub_name = "pypi",
1818
python_version = "3.11",
1919
requirements_lock = "//:requirements.txt",
20+
requirements_darwin = "//:requirements_darwin.txt",
21+
requirements_linux = "//:requirements_linux.txt",
2022
)
2123
use_repo(pip, "pypi")
2224

MODULE.bazel.lock

Lines changed: 249 additions & 40 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name = "document-api-python"
33
version = "0.0.0"
44
dependencies = [
5+
"ipython",
56
"lxml",
6-
"ipython"
7+
"twine",
78
]

requirements.txt

Lines changed: 219 additions & 1 deletion
Large diffs are not rendered by default.

requirements_darwin.txt

Lines changed: 430 additions & 0 deletions
Large diffs are not rendered by default.

requirements_linux.txt

Whitespace-only changes.

test/BUILD.bazel

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
2+
3+
py_binary(
4+
name = "bvt",
5+
srcs = ["bvt.py"],
6+
visibility = ["//:__subpackages__"],
7+
deps = [
8+
"//tableaudocumentapi",
9+
"//test/assets",
10+
"@pypi//lxml",
11+
],
12+
)
13+
14+
py_library(
15+
name = "test",
16+
srcs = [
17+
"__init__.py",
18+
"bvt.py",
19+
],
20+
visibility = ["//:__subpackages__"],
21+
deps = [
22+
"//tableaudocumentapi",
23+
"//test/assets",
24+
"@pypi//lxml",
25+
],
26+
)
27+
28+
py_test(
29+
name = "test_datasource",
30+
srcs = ["test_datasource.py"],
31+
deps = ["//tableaudocumentapi"],
32+
)
33+
34+
py_test(
35+
name = "test_field",
36+
srcs = ["test_field.py"],
37+
deps = ["//tableaudocumentapi"],
38+
)
39+
40+
py_test(
41+
name = "test_field_change",
42+
srcs = ["test_field_change.py"],
43+
deps = [
44+
"//tableaudocumentapi",
45+
"@pypi//lxml",
46+
],
47+
)
48+
49+
py_test(
50+
name = "test_multidict",
51+
srcs = ["test_multidict.py"],
52+
deps = ["//tableaudocumentapi"],
53+
)
54+
55+
py_test(
56+
name = "test_workbook",
57+
srcs = ["test_workbook.py"],
58+
deps = ["//tableaudocumentapi"],
59+
)
60+
61+
py_test(
62+
name = "test_xfile",
63+
srcs = ["test_xfile.py"],
64+
deps = [
65+
"//tableaudocumentapi",
66+
"//test/assets",
67+
],
68+
)

test/assets/BUILD.bazel

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
load("@rules_python//python:defs.bzl", "py_library")
2+
3+
py_library(
4+
name = "assets",
5+
srcs = [
6+
"__init__.py",
7+
"index.py",
8+
],
9+
visibility = ["//:__subpackages__"],
10+
)

0 commit comments

Comments
 (0)