Skip to content

Commit 3713652

Browse files
quick fix format-cmd for CI/CD (#20)
1 parent 2b46204 commit 3713652

5 files changed

Lines changed: 21 additions & 7 deletions

File tree

.github/workflows/format.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@ jobs:
2727
uses: bazel-contrib/setup-bazel@0.9.1
2828
- name: Run formatting checks
2929
run: |
30+
bazel run //src:ide_support
3031
bazel test //src:format.check

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,5 @@ jobs:
2323
uses: actions/checkout@v4.2.2
2424
- name: Run test targets
2525
run: |
26+
bazel run //src:ide_support
2627
bazel test ...

docs.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@
3838
# For user-facing documentation, refer to `/README.md`.
3939

4040
load("@aspect_rules_py//py:defs.bzl", "py_binary", "py_library")
41-
load("@score_docs_as_code//src/extensions/score_source_code_linker:collect_source_files.bzl", "parse_source_files_for_needs_links")
4241
load("@pip_process//:requirements.bzl", "all_requirements", "requirement")
4342
load("@rules_java//java:java_binary.bzl", "java_binary")
4443
load("@rules_python//sphinxdocs:sphinx.bzl", "sphinx_build_binary", "sphinx_docs")
4544
load("@rules_python//sphinxdocs:sphinx_docs_library.bzl", "sphinx_docs_library")
45+
load("@score_docs_as_code//src/extensions/score_source_code_linker:collect_source_files.bzl", "parse_source_files_for_needs_links")
4646
load("@score_python_basics//:defs.bzl", "score_virtualenv")
4747

4848
sphinx_requirements = all_requirements + [
@@ -158,7 +158,7 @@ def _ide_support():
158158
reqs = sphinx_requirements,
159159
)
160160

161-
def _docs(name = "docs", format = "html", external_needs_deps = list(), external_needs_def = dict()):
161+
def _docs(name = "docs", format = "html", external_needs_deps = list(), external_needs_def = list()):
162162
ext_needs_arg = "--define=external_needs_source=" + json.encode(external_needs_def)
163163

164164
sphinx_docs(

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This file is at the root level, as it applies to all Python code,
22
# not only to docs or to tools.
33
[tool.pyright]
4-
extends = "bazel-bin/examples/simple/ide_support.runfiles/score_python_basics~/pyproject.toml"
4+
extends = "bazel-bin/src/ide_support.runfiles/score_python_basics~/pyproject.toml"
55

66
exclude = [
77
"**/__pycache__",
@@ -11,7 +11,7 @@ exclude = [
1111
]
1212

1313
[tool.ruff]
14-
extend = "bazel-bin/examples/simple/ide_support.runfiles/score_python_basics~/pyproject.toml"
14+
extend = "bazel-bin/src/ide_support.runfiles/score_python_basics~/pyproject.toml"
1515

1616
extend-exclude = [
1717
"**/__pycache__",

src/BUILD

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#
1111
# SPDX-License-Identifier: Apache-2.0
1212
# *******************************************************************************
13-
1413
load("@aspect_rules_lint//format:defs.bzl", "format_multirun", "format_test")
1514
load("@aspect_rules_py//py:defs.bzl", "py_binary", "py_library")
1615
load("@pip_process//:requirements.bzl", "all_requirements", "requirement")
@@ -19,7 +18,20 @@ load("@rules_pkg//pkg:tar.bzl", "pkg_tar")
1918
load("@rules_python//python:pip.bzl", "compile_pip_requirements")
2019
load("@rules_python//sphinxdocs:sphinx.bzl", "sphinx_build_binary")
2120
load("@score_dash_license_checker//:dash.bzl", "dash_license_checker")
22-
21+
load("@score_python_basics//:defs.bzl", "score_virtualenv")
22+
23+
score_virtualenv(
24+
reqs = [
25+
"@score_docs_as_code//src:plantuml_for_python",
26+
"@score_docs_as_code//src/extensions:score_plantuml",
27+
"@score_docs_as_code//src/find_runfiles:find_runfiles",
28+
"@score_docs_as_code//src/extensions/score_draw_uml_funcs:score_draw_uml_funcs",
29+
"@score_docs_as_code//src/extensions/score_header_service:score_header_service",
30+
"@score_docs_as_code//src/extensions/score_layout:score_layout",
31+
"@score_docs_as_code//src/extensions/score_metamodel:score_metamodel",
32+
"@score_docs_as_code//src/extensions/score_source_code_linker:score_source_code_linker",
33+
],
34+
)
2335
# These are only exported because they're passed as files to the //docs.bzl
2436
# macros, and thus must be visible to other packages. They should only be
2537
# referenced by the //docs.bzl macros.
@@ -135,7 +147,7 @@ filegroup(
135147

136148
dash_license_checker(
137149
src = ":requirements_lock",
138-
file_type = "requirements", # let it auto-detect based on project_config
150+
file_type = "requirements",
139151
visibility = ["//visibility:public"],
140152
)
141153

0 commit comments

Comments
 (0)