purple-plastic-57801
12/01/2023, 10:16 PMexperimental_wrap_as_python_sources
to work. I have an adhoc tool that is outputing dist/codegen/blah. Where blah is a python package.
Blah is generated with the openapi-generator. The code looks good.
I have set the experimental_wrap_as_python_sources
target as a dependency to the python_sources.. but I'm seeing
NoSourceRootError: No source root found for blah
Any advice to debug this?purple-plastic-57801
12/01/2023, 10:18 PMadhoc_tool(
name="observatory-api-py-bindings",
runnable="//third_party/jvm:openapi-generator",
args=[
"generate",
"--input-spec=observatory.yaml",
"--generator-name=python-experimental",
"--output=observatory_api",
"--package-name=observatory_api",
],
execution_dependencies=[
":openapi",
],
output_directories=[
"observatory_api/observatory_api",
],
root_output_directory="./observatory_api",
)
experimental_wrap_as_python_sources(
name="observatory-api-py",
inputs=[
":observatory-api-py-bindings",
],
)
purple-plastic-57801
12/01/2023, 10:22 PMls dist/codegen/observatory_api/
api api_client.py apis configuration.py exceptions.py __init__.py model models rest.py schemas.py
purple-plastic-57801
12/01/2023, 10:30 PM* observatory_api.ApiClient (line: 6)
* observatory_api.exceptions.ApiException (line: 7)
If you do not expect an import to be inferrable, add `# pants: no-infer-dep` to the import line. Otherwise, see <https://www.pantsbuild.org/v2.18/docs/troubleshooting#import-errors-and-missing-dependencies> for common problems.
purple-plastic-57801
12/01/2023, 10:30 PMpurple-plastic-57801
12/01/2023, 10:50 PMbroad-processor-92400
12/01/2023, 11:39 PMpants.toml
? Is it similar to that example?purple-plastic-57801
12/01/2023, 11:50 PMpurple-plastic-57801
12/01/2023, 11:50 PM[source]
root_patterns = [
"/enclosure",
"/teletom_shared/src",
"/teletom/",
# "/observatory_api",
]
I have removed the observatory_api. In the past I was generating this and checking it in.purple-plastic-57801
12/01/2023, 11:54 PMpurple-plastic-57801
12/02/2023, 12:05 AMexpr_parser/*.py
this doesn't have a __init__.py
purple-plastic-57801
12/02/2023, 12:06 AM15:57:23.48 [WARN] Pants cannot infer owners for the following imports in the target antlr:antlr_demo:
* expr_parser.ExprLexer (line: 10)
* expr_parser.ExprListener (line: 11)
* expr_parser.ExprParser (line: 12)
purple-plastic-57801
12/02/2023, 12:07 AMobservatory-api-py
is a dependency of the python_source in questionpurple-plastic-57801
12/02/2023, 12:13 AMpurple-plastic-57801
12/02/2023, 12:15 AMpurple-plastic-57801
12/02/2023, 12:37 AMbroad-processor-92400
12/02/2023, 1:04 AMhappy-kitchen-89482
12/02/2023, 1:13 AM/
as a source roothappy-kitchen-89482
12/02/2023, 1:13 AMpurple-plastic-57801
12/02/2023, 1:19 AMpurple-plastic-57801
12/02/2023, 1:19 AMhappy-kitchen-89482
12/02/2023, 2:11 AMpurple-plastic-57801
12/02/2023, 2:13 AMopenapi
openapi.yaml
BUILD
observatory_api <- this use to be checked in
I then generate the openapi python bindings via an adhoc tool and the java backend.
I deleted the observatory_api.
If I have a source root at /openapi... would the generated python module be at openapi.observatory_api?happy-kitchen-89482
12/02/2023, 10:19 PM