lemon-yak-80782
02/19/2023, 6:28 PM./pants test ::
would run all tests except integration tests.brave-hair-402
02/19/2023, 6:49 PMhigh-yak-85899
02/19/2023, 8:29 PMlist
shows this
$ ./pants list path/to/some/module.py
path/to/some/module.py:sources
Now, when I include it as a dependency by name in another target, I get an error like this
$ ./pants dependencies path/to/dependee.py
13:24:45.87 [INFO] Initializing scheduler...
13:24:46.16 [INFO] Scheduler initialized.
13:24:50.01 [ERROR] 1 Exception encountered:
ResolveError: The address path/to/some:some from the `dependencies` field of the target path/to:dependee_target does not exist.
The target name ':some' is not defined in the directory path/to/some. Did you mean one of these target names?
* :sources
It's an easy fix but surprised I have to specify when it's unambiguous.average-balloon-31442
02/19/2023, 8:57 PMkeyring
with keyring-gcp
plugin. I found an open issue on github with a link to the thread discussion (but that thread in slack is not available anymore…)
https://github.com/pantsbuild/pants/issues/14928
If someone remember the context or have any input how to start development or how to make it workable, could you write in the github issue? I see that it works with twine
(publish goal), but no idea how to “reuse” extra_requirements
for generate-lockfiles/export goals.
I might attempt to take the development side, but would like to chat a bit with someone to clarify how to do it better.
Thank you 🙂straight-action-80318
02/19/2023, 11:58 PM./pants generate-lockfiles
on a requirements.txt
that has a link to a Github repo that the hash changes each time you run it? This is causing my repo to fail to run because when pex builds the lockfile the new hash doesn’t match the one in the file.
An example is a requirements file that has this line mosaicml-streaming@ git+<https://github.com/nharada1/streaming@decdc1f64bedcb483ff396ec9d96a1a939386ba7>
happy-kitchen-89482
02/20/2023, 3:13 AMhappy-kitchen-89482
02/20/2023, 3:13 AMhappy-kitchen-89482
02/20/2023, 3:13 AMhappy-kitchen-89482
02/20/2023, 3:13 AMrhythmic-morning-87313
02/20/2023, 3:47 AM./pants check ::
rhythmic-morning-87313
02/20/2023, 3:48 AMrhythmic-morning-87313
02/20/2023, 3:49 AMrhythmic-morning-87313
02/20/2023, 3:49 AMrhythmic-morning-87313
02/20/2023, 3:49 AMtypes-six
rhythmic-morning-87313
02/20/2023, 3:50 AMextra_requirements
of pants.toml
(https://github.com/lablup/backend.ai/blob/main/pants.toml#L113) ?high-yak-85899
02/20/2023, 5:05 AMpython -m <some things it expects to be on path>
. When the test is executing, which python
just points to the system install at /usr/bin/python
.rhythmic-morning-87313
02/20/2023, 7:28 AM./pants check --changed-since=main
via the git pre-push hook) twice makes it disappearing...average-flag-94768
02/20/2023, 11:42 AMError expanding output globs: Permission denied (os error 13)
worried-painter-31382
02/20/2023, 2:05 PMstderr:
Failed to resolve compatible artifacts from lock pants-lockfile.txt for 1 target:
1. cp310-cp310-linux_x86_64:
Failed to resolve all requirements for abbreviated platform cp310-cp310-linux_x86_64 from pants-lockfile.txt:
Configured with:
build: False
use_wheel: True
Dependency on pyqt6-webengine-qt6 not satisfied, 1 incompatible candidate found:
1.) pyqt6-webengine-qt6 6.3.1 (via: pyqt6-webengine==6.3.1 -> PyQt6-WebEngine-Qt6>=6.3.0) does not have any compatible artifacts:
<https://software-repository.ci-cd.aws.amramedical.com/pypi/pyqt6-webengine-qt6/6.3.1/PyQt6_WebEngine_Qt6-6.3.1-py3-none-manylinux_2_28_x86_64.whl>
PyQt6_WebEngine_Qt6-6.3.1-py3-none-manylinux_2_28_x86_64.whl
looks compatible to me?curved-farmer-66180
02/20/2023, 11:32 PMpants --loop run app/to/:manage -- runserver
pants --loop run app/to/:manage -- runserver --noreload
when I run the server. I cannot reload the server when I change the code. Anybody can help?gentle-gigabyte-52115
02/21/2023, 11:08 AMpants test ::
Gives an error:
12:03:57.81 [WARN] The target project1/app/a_test.py:test imports `app.app.test_open_file`, but Pants cannot safely infer a dependency because more than one target owns this module, so it is ambiguous which to use: ['project1/app/app.py', 'project2/app/app.py'].
bored-energy-25252
02/21/2023, 3:56 PMalert-dawn-51425
02/21/2023, 5:38 PM064d5173e29a2933c4e0e6559841bc77e527723e30211b5ebed410c40927acaf
for image `sha256:a037112b1932d8a1e40b606c914630e9517680424b837155ee45a101c1fbb04f`: JsonSerdeError { err: Error("expected value", line: 1, column: 1) }`
I think maybe my docker setup is not correct:
[docker]
env_vars = [
"DOCKER_CONFIG=/pants/.docker",
"DOCKER_CONTEXT=default",
"DOCKER_HOST=/var/run/docker.sock",
"USER=%(user)s",
"HOME=%(homedir)s"
]
tools = [
"dirname",
"readlink",
]
Any ideas on how to get the docker to run. I am running on ubuntu:bioniccurved-manchester-66006
02/21/2023, 8:09 PMdocker
itself that pants could use (we use Kaniko and buildkit today), there are /many/ different ways to configure gitlab runners (we can self host but the docker-in-docker options are not great for us right now) and I'm not sure what the shape of a minimal solution here looks like. Does pants grow multiple backends per tool that all interact with docker_image
? Can each docker_image
target have a set of tools it supports? Buildkit is sort of built in to docker, does it look simpler with that case? Sorry this is vague, my problem is that I'm unsure of both the vocabulary and the possible shape of the solutions.wonderful-boots-93625
02/21/2023, 10:06 PMstderr:
Failed to resolve requirements from PEX environment @ /Users/nasron/.cache/pants/named_caches/pex_root/unzipped_pexes/c54e3603abc410009b9e755a1c64adc47c19231d.
Needed cp39-cp39-macosx_12_0_arm64 compatible dependencies for:
1: cryptography
Required by:
iai-fl-client 2.0.24
But this pex had no ProjectName(raw='cryptography', normalized='cryptography') distributions.
2: ddsketch
Required by:
iai-fl-client 2.0.24
But this pex had no ProjectName(raw='ddsketch', normalized='ddsketch') distributions.
3: diffprivlib
Required by:
iai-fl-client 2.0.24
But this pex had no ProjectName(raw='diffprivlib', normalized='diffprivlib') distributions.
But if i make the distribution wheel=False
test will run fine
Is there some guidance on how to configure a wheel package properly?ancient-vegetable-10556
02/21/2023, 10:21 PMgreen-match-66337
02/22/2023, 12:11 AMsilly-queen-7197
02/22/2023, 12:15 AM./pants package ::
to generate some wheels that I could then install into a venv
in editable mode. This is useful to me as someone trying to incrementally adopt pants in a project while still supporting (development) workflows that depend on venvs, for example the python testing extension in vs code. My current work around is to include a .env
that updates my PYTHONPATH
so vs code can discover tests as we have multiple top level projects in this repository but this is a hack.
Sorry if the question doesn't make sense, I'm still trying to learn more about python packaging and don't have a full grasp of what build backend / frontends are.plain-carpet-73994
02/22/2023, 12:50 AMrequirements.txt
is neptune-client
so I need a module_mapping
to let Pants know it gets imported as just neptune
• The package fails to declare its dependency on setuptools
so I need to add that via a python_requirements
Somehow these two aren't playing nicely together. Here's what I have:
python_requirement(
name="setuptools",
requirements=["setuptools"],
)
python_requirement(
name="neptune-client",
requirements=["neptune-client"],
dependencies=[":setuptools"],
)
# Module mappings, etc.
python_requirements(
name='reqs',
module_mapping={
...
':neptune-client': ['neptune'],
},
)
I've tried a bunch of variations like having the python_requirement
have its requirements
come after the module mapping bit, having the module mapping be from neptune-client
without the leading :
, etc. and every combination ends up with an error, though the errors change as I blindly throw things at the wall hoping something will stick.
Guidance would be much appreciated!rhythmic-morning-87313
02/22/2023, 10:09 AM