enough-analyst-54434
11/15/2021, 8:17 PM--sources-directory
was just added for Pants and it was probably a mistake. Any non-Pants usage will probably always want to use setup.py
or `pyproject.toml`; ie the requirement of .
(i.e.: the path of the directory containing setup.py
or `pyproject.toml`for the local project).hundreds-father-404
11/15/2021, 10:08 PMpython_tests
generating python_test
targets)
Any feedback would be welcomed! https://www.pantsbuild.org/v2.8/docs/targetshundreds-father-404
11/15/2021, 10:08 PMwitty-crayon-22786
11/15/2021, 10:14 PMwitty-crayon-22786
11/15/2021, 10:14 PMwitty-crayon-22786
11/15/2021, 10:14 PMwitty-crayon-22786
11/15/2021, 10:15 PMsources
argument rather than the source
argumenthundreds-father-404
11/15/2021, 10:22 PMhundreds-father-404
11/15/2021, 10:23 PMpex_binary
rather than python_test
? The reason I didn't do that is it is more abstractwitty-crayon-22786
11/15/2021, 10:24 PMwitty-crayon-22786
11/15/2021, 10:25 PMhundreds-father-404
11/15/2021, 10:34 PMwitty-crayon-22786
11/15/2021, 10:37 PMwitty-crayon-22786
11/15/2021, 10:39 PMtailor
is that ~everything renders as a file address, except tests⦠so particularly for new folks, i expect that theyāll think that ātargetā means āa file, most of the timeāhundreds-father-404
11/15/2021, 10:40 PMhundreds-father-404
11/15/2021, 11:47 PMskip_tests
field with this nifty query, then pipe the output into your original test runner:
./pants filter --target-type=python_test :: | \
xargs ./pants peek | \
jq -r '.[] | select(.skip_tests== true) | .["sources"][]'
Now documented at https://www.pantsbuild.org/v2.8/docs/existing-repositories#3-set-up-testsdazzling-diamond-4749
11/16/2021, 4:40 AMambitious-actor-36781
11/16/2021, 8:52 AM./pants --loop test check fmt lint
is amazing. thank you.stale-nightfall-29801
11/16/2021, 9:57 AMextra_env_vars
in pants.toml
that includes ==
(e.g public and private keys)
I can add multiline values with '''
or """
but if I add one that contains (or maybe just ends) in ==
then I get the following errors (see thread)dazzling-diamond-4749
11/16/2021, 8:02 PMpython>3.7, python<=3.7.1
(I'm on a different brach right now; I'll post repro and full error message later)adorable-engine-71736
11/16/2021, 8:19 PMpython_tests
target. I would like to add some regression tests that make use of data files (eg json)
is there a way to have these included in the test run ? I tried adding `files`/`resources` but python_tests
doesnt have these params, and if i try to add a non-py file to sources
that also failshappy-pizza-30507
11/17/2021, 8:00 AMpants publish
returned an error "_denied: requested access to the resource is denied_" from docker-cli. Meanwhile a plain docker push
worked just fine. My Jenkinsfile wraps the pants publish
step inside withDockerRegistry. The urls specified in withDockerRegistry and in [docker.registry.private_name].address
are identical (though Pipeline plugin requires a protocol prefix whereas pants doesn't). In our Pipeline, we use a separate credentials to login and push the image and that account is different from the pipeline runner, i.e. $USER
. The last thing worth mentioning is that the docker images were built prior to entering withDockerRegistry, meaning that they were built under the name of $USER
. Am I doing something wrong perhaps?stale-nightfall-29801
11/17/2021, 2:28 PMrequirements.txt
the python_requirements()
uses?
Here's how my requirements are set up (see image)
It looks like there was an issue around this but it looks like it's been merged (https://github.com/pantsbuild/pants/pull/9946)curved-television-6568
11/17/2021, 4:29 PMhappy-kitchen-89482
11/17/2021, 4:48 PMcurved-television-6568
11/17/2021, 6:43 PMPermissionDenied
error?curved-television-6568
11/17/2021, 6:55 PMfreezing-vegetable-92896
11/17/2021, 9:45 PMambitious-actor-36781
11/17/2021, 10:16 PM--changed-since
āāxlevus@xd1 ~/Projects/_mono ā¹feat/isortāŗ
ā°ā⤠./pants check --changed-since=origin/master 1 āµ
11:15:00.85 [INFO] Completed: Extracting 3 requirements to build requirements.pex from repository.pex: docker, requests, six
11:15:02.36 [INFO] Completed: Building requirements_venv.pex
11:15:04.27 [ERROR] Completed: Typecheck using MyPy - MyPy failed (exit code 1).
build-support/deploy/docker_.py:3: error: Skipping analyzing "docker": found module but no type hints or library stubs
build-support/deploy/docker_.py:3: note: See <https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports>
build-support/deploy/docker_.py:4: error: Skipping analyzing "docker.errors": found module but no type hints or library stubs
build-support/deploy/docker_.py:5: error: Skipping analyzing "docker.models.images": found module but no type hints or library stubs
Found 3 errors in 1 file (checked 6 source files)
š MyPy failed.
āāxlevus@xd1 ~/Projects/_mono ā¹feat/isortāŗ
ā°ā⤠./pants check :: 1 āµ
11:15:13.10 [INFO] Completed: Typecheck using MyPy - MyPy succeeded.
Success: no issues found in 18 source files
ā MyPy succeeded.
āāxlevus@xd1 ~/Projects/_mono ā¹feat/isortāŗ
ā°ā⤠./pants --version
2.8.0rc6
clean-night-52582
11/17/2021, 11:15 PM2.8.0
excited to use the new features. Running into this issue when building any python target that depends on proto.
Exception: Client error (404) downloading file grpc_python_plugin from <https://binaries.pantsbuild.org/bin/grpc_python_plugin/1.32.0/macos/grpc_python_plugin>