gentle-sugar-5237910/29/2022, 3:10 PM
on pants itself after i cloned it from github main? atm some tests fail.
./pants test ::
calm-intern-160910/29/2022, 5:57 PM
to execute maven to build a jar, works perfectly. then, that jar needs to go inside of a
(because I then need my python code to upload it somewhere on demand). pants says I should use a
for that. But the
target only accepts source files. Is there any way I can make the outputs of a previous target into the inputs of the
cool-yacht-3712810/29/2022, 11:28 PM
option on the
target but I can't get it to store a first-party module on the file system. How should I be referencing it?
boundless-zebra-7955610/31/2022, 1:45 PM
But if I put
pip install dgllife@ <https://github.com/awslabs/dgl-lifesci/archive/54649fb.zip#subdirectory=python>
in requirements.txt, pants doesn't seem to recognize options after
. Is there a way to make it work?
brash-baker-9119010/31/2022, 2:40 PM
list, and another is for a type that is included in
, whose import is gated behind an
guard in the test file. This worked without issue in 2.13; is this a bug, or a legitimate new change in behavior? If the latter, what would be the recommended way to fix this? Thanks.
bright-pilot-8530510/31/2022, 6:27 PM
curved-television-656810/31/2022, 7:19 PM
proud-dentist-2284410/31/2022, 7:42 PM
default from ignore to warn). But, in at least some of the cases, the indicated lines already have
, so how should I add
# pylint: disable=import-error
when there is already a disable comment for other tools?
# pants: no-infer-dep
proud-dentist-2284410/31/2022, 9:27 PM
import (I'm getting "Pants cannot infer owner" warning): https://github.com/st2sandbox/st2/blob/pants/pylint_plugins/api_models_test.py#L25 Here
is a source root, and
is using a relative import for
Does the dep inference not like relative imports?
from . import api_models
gorgeous-winter-9929610/31/2022, 9:40 PM
from a dep+name of entrypoint in the dep, but it doesn't seem like I can run a
. Context: Want to https://github.com/kubernetes-sigs/controller-tools to generate code.
plain-summer-7272710/31/2022, 11:29 PM
I just want to confirm that I have 2.15.0a0 set up properly, since it looks like my pex_binary target isn't accepting
raise InvalidFieldException( pants.engine.target.InvalidFieldException: Unrecognized field `environment=local_docker` in target src/database:funstuff. Valid fields for the target type `pex_binary`: ['complete_platforms', 'dependencies', 'description', 'emit_warnings', 'entry_point', 'execution_mode', 'ignore_errors', 'include_requirements', 'include_sources', 'include_tools', 'inherit_path', 'interpreter_constraints', 'layout', 'output_path', 'platforms', 'resolve', 'resolve_local_platforms', 'restartable', 'script', 'shebang', 'strip_pex_env', 'tags', 'venv_site_packages_copies'].
as a field: • I set
to 2.15.0a0 • In pants.toml, I set
• In my topmost BUILD file I added:
• Lastly, in src/database/BUILD I added:
docker_environment( name="local_docker", platform="linux_x86_64", image="python:3.9-bullseye", )
(funstuff.py is just a hello-world Python script). Definitely understand that this is an alpha build but I figured this is likely a basic error w/ something I'm msising. Help would be appreciated - thank you!
pex_binary( name="funstuff", entry_point="funstuff.py", environment="local_docker", ) docker_image( name="docker_image", instructions=[ "FROM python:3.9-bullseye", 'ENTRYPOINT ["/main"]', "COPY examples/main.pex /main", ], )
refined-addition-5364411/01/2022, 7:49 AM
I get this error
./pants run <path_to_main.py>
ERROR: Error loading ASGI app. Could not import module "main".
This is because fastapi looks for app in the current directory as mentioned here. Even after providing the complete path from pants, it still complains. The only thing which works is when I modify “main:app” to just
app = FastAPI(title=PROJECT_NAME, debug=DEBUG, version="0.1.0") app.include_router(v1_router, prefix="/v1") if __name__ == "__main__": uvicorn.run("main:app", host="0.0.0.0", port=9000, reload=True)
and remove the reload option completely. It won’t allow just using
app = FastAPI(title=PROJECT_NAME, debug=DEBUG, version="0.1.0") app.include_router(v1_router, prefix="/v1") if __name__ == "__main__": uvicorn.run(app, host="0.0.0.0", port=9000, reload=True)
busy-vase-3920211/01/2022, 8:38 AM
freezing-lamp-1212311/01/2022, 1:54 PM
download details? .. i’ve looked at the documentation and according to my own local tools i have entered the proper values for checksum + size, but … pants does not really like me: all i get is (with debug logging as well):
output from running checks on my local system:
14:51:39.58 [DEBUG] (workunit_store) Completed: Downloading: <https://github.com/google/go-jsonnet/releases/download/v0.19.1/go-jsonnet_0.19.1_Darwin_arm64.tar.gz> (2.87 MB) 14:51:39.58 [ERROR] (pants.bin.local_pants_runner) 1 Exception encountered: Exception: Error hashing/capturing URL fetch response: Downloaded file was larger than expected digest
❯ shasum -a 256 ~/Downloads/go-jsonnet_0.19.1_Darwin_arm64.tar.gz c7a98187b4b167e9e885dba52138ed802d4db4635b47b95af6a82448ff9d7ba1 /Users/dreuss/Downloads/go-jsonnet_0.19.1_Darwin_arm64.tar.gz
external tool known versions config:
❯ wc -c /Users/dreuss/Downloads/go-jsonnet_0.19.1_Darwin_arm64.tar.gz 3004958 /Users/dreuss/Downloads/go-jsonnet_0.19.1_Darwin_arm64.tar.gz
default_known_versions = [ "v0.19.1|macos_arm64|c7a98187b4b167e9e885dba52138ed802d4db4635b47b95af6a82448ff9d7ba1|3004948", ]
freezing-lamp-1212311/01/2022, 2:21 PM
which has a
types … but, what is the easiest way to get the full digest to pass to a
rhythmic-battery-4519811/01/2022, 3:44 PM
which is not not specified either using
. Is there any pants mechanism to patch this type of undeclared dependency? https://www.pantsbuild.org/docs/python-third-party-dependencies#requirements-with-undeclared-dependencies addresses a similar issue, but not for build-dependencies.
PEP-518 build-system requires
boundless-zebra-7955611/01/2022, 5:23 PM
ever fail? I'm getting error when exporting to venv, just says ensurepip ended with non zero exit. When I check venv out I actually see there's pip module missing so there's that. It doesn't give any other useful error message to check what's going wrong. I can do
ambitious-xylophone-577211/01/2022, 6:03 PM
option. I’ve set it to be true in
, but I’m not exactly sure if my tests are being run in parallel underneath. Checking
isn’t really giving me an indication
incalculable-hydrogen-4400311/01/2022, 7:47 PM
to preserve the files, but it is tedious to copy the files out of the pex sandbox. Anybody dealt with this and have a good solution?
plain-summer-7272711/01/2022, 8:39 PM
ambitious-actor-3678111/02/2022, 12:35 AM
freezing-lamp-1212311/02/2022, 9:10 AM
… and i’m looking at
— but after digging a little bit i’ve not found what i need — i think i need to do something like this … but there’s something i’m not fully understanding yet here i think in terms of how the sausage is made …
bitter-orange-1699711/02/2022, 1:36 PM
some-match-1497011/02/2022, 3:02 PM
freezing-lamp-1212311/02/2022, 3:05 PM
— i’m not being able to auto import and manage the imports for it … — while if i reference symbols from my local plugin it works just fine — when i do import by hand, vscode knows where the source can be found and i can jump directly into definitions … anyway to make that include detection smarter?
calm-ambulance-6537111/02/2022, 3:30 PM
little-train-2837111/02/2022, 4:13 PM
ambitious-xylophone-577211/02/2022, 5:48 PM
run. We haven’t seem this happen before but we seem to be hitting:
./pants tailor --check
No valid Python interpreter found. For `pants_version = "2.13.0"`, Pants requires Python 3.7, 3.8, or 3.9 to run. Please check that a valid interpreter is installed and on your $PATH.
chilly-tailor-7506311/02/2022, 6:34 PM