bitter-ability-32190
07/05/2022, 10:49 AMbitter-ability-32190
07/05/2022, 10:49 AM--no-black-export
on the CLIambitious-petabyte-59095
07/05/2022, 12:08 PMpython_distribution
dependency to my tests but I'm encountering errors.
ProcessExecutionFailure: Process 'Building pytest_runner.pex' failed with exit code 1.
stdout:
stderr:
Traceback (most recent call last):
File "/home/rupsi/.cache/pants/named_caches/pex_root/unzipped_pexes/43e6213d762a85cdfe3a5ba8fae598cdd810eb99/.bootstrap/pex/pex.py", line 476, in execute
exit_value = self._wrap_coverage(self._wrap_profiling, self._execute)
...
Required by:
FingerprintedDistribution(distribution=project 2.2.12.dev0 (/home/rupsi/.cache/pants/named_caches/pex_root/installed_wheels/77e8c4120e12fb3aa103bd258ee3da4b130ac3f6/project-2.2.12.dev0-py3-none-any.whl), fingerprint='806ca55729214217ad5f390d7d0ff6733339320b')
But this pex had no 'SQLAlchemy' distributions.
2: alembic>=1.7.6
Required by:
...
but checking with ./pants --tag=e2e dependencies --transitive ::
i can see that everything should be working fine
14:05:07.96 [INFO] Initialization options changed: reinitializing scheduler...
14:05:08.39 [INFO] Scheduler initialized.
//:Jinja2
//:Pillow
//:PyMuPDF
//:PyYAML
//:SQLAlchemy
//:aiofile
...
Thanks for all your help.billions-keyboard-33102
07/05/2022, 12:23 PMhundreds-father-404
07/05/2022, 2:35 PMstraight-action-80318
07/05/2022, 3:05 PM[python-repos]
indexes.add = ["<https://download.pytorch.org/whl/cu116>"]
in my pants.toml
file, but this makes my generate-lockfiles
time much much longer (probably 2-3x). I can’t figure out if there’s a way to only include this repo for the single pytorch
requirement.bland-father-19717
07/05/2022, 3:06 PMrefined-addition-53644
07/05/2022, 4:09 PMhappy-kitchen-89482
07/05/2022, 7:14 PMrhythmic-battery-45198
07/05/2022, 7:41 PMpython_test
targets which I would like to run with additional pytest arguments. python_test
target does not have any fields for pytest arguments, and I think that makes sense to me. I can add pytest arguments via cli args or pants.toml. I would like to codify the mapping between python_test
targets and pytest arguments. I can create a pants.jupyter_tests.toml
and override both tag
and pytest.args
. This works but might lead to a proliferation of .toml
files if we have lots of different sets of tests which require specific arguments. Am I missing another better way to configure my project?straight-action-80318
07/05/2022, 8:58 PMpex_binary
for Python targets. When I run a python_test
, the only files that seem to be visible in the filesystem at runtime are those that I include with files
or similar, but I can see everything when I’m running a Python binary. Is this the expected behavior? I’m not able to get files
or relocate_files
to work here, are there docs about this somewhere I missed?
Specific use case is pointing Flask at a template/static folder, which I’d like to have visible from the root if possible. Other workarounds appear to be passing in a source file path to the executable itself but that complicates the open source release of this code.brash-baker-91190
07/05/2022, 10:35 PMIgnoring '[python_setup].resolve_all_constraints' option.
I understand the source of the warning, but my question is: where is the documentation about this option, or the python_setup
set of options in general? Searching on the website turns up nothing, and I can't seem to find anything in ./pants help
either. What is this thing?modern-stone-88910
07/06/2022, 7:58 AMPython: Run Linting
from the Command Palette works, or Format Document
when right-clicking in the workspace.
I’ve kind of got this working by adding following lines into the devcontainer.json -> "settings" after exporting the virtualenv with those tools through pants export:
"python.defaultInterpreterPath": "./dist/export/python/virtualenvs/default/3.8.13/bin/python",
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.linting.mypyEnabled": true,
"python.formatting.blackEnabled": true,
"python.formatting.provider": "black",
"python.linting.pylintPath": "./dist/export/python/virtualenvs/tools/pylint/bin/pylint",
"python.linting.mypyPath": "./dist/export/python/virtualenvs/tools/mypy/bin/mypy",
"python.formatting.blackPath": "./dist/export/python/virtualenvs/tools/black/bin/black",
From previous experimenting with pants I know I got this working without having to define paths for each tool. Sadly, I forgot what I did then. What do I miss? Having to manually point each tool into one path seems prone to errors when using multiple environments. I need a way that VSCode gets a path to the virtualenvs-directory etc, so that the paths are automatically identified.
Thanks for your help.rhythmic-morning-87313
07/06/2022, 10:07 AM--changed-since
seems to exist on lint
and check
goals but not fmt
. How about adding this? Shall I open a feature request on GitHub?nutritious-hair-72580
07/06/2022, 12:39 PMurl
field on the jvm_artifact. But when I set this, it doesn't seem to do have any impact.
I tried it in the example-jvm repo as well.
I can try to debug this further, but wanted to check I'm on the right path here - does anyone have any experience with custom repositories?enough-analyst-54434
07/06/2022, 1:45 PMenough-analyst-54434
07/06/2022, 1:46 PM[coursier]
repos.add = ["<https://my/repo|https://my/repo>"]
enough-analyst-54434
07/06/2022, 1:48 PM.add
to fully replace the list.nutritious-hair-72580
07/06/2022, 1:54 PMrhythmic-morning-87313
07/06/2022, 3:16 PM./pants fmt
has made actual changes or not? I'd like to use it in the pre-commit hook but I don't want to blindly run git add -u
but just abort the commit when there are changed files.abundant-leather-17386
07/06/2022, 5:06 PM./pants test ::
I get:
19:03:04.06 [ERROR] 1 Exception encountered:
Exception: Failed to read link "<path/to/symlink": Absolute symlink: "path/to/destination"
I’ve made sure that the destination file is not in the .gitignore and also added an exclusion to pants_ignore
. Is there anything that I’m overlooking?flat-zoo-31952
07/06/2022, 5:25 PM./pants --changed-since=HEAD --changed-dependees=transitive list
It's gone from about 1 min to 2 min from 2.11.0 to 2.13.0a0. I can reproduce these times pretty consistently by flipping between branches with the different versions and then killing pantsd and nuking the lmdb_store and named_caches. More details in 🧵polite-garden-50641
07/06/2022, 6:07 PMpex3 lock export --manylinux --output lock_file.txt pex_lockfile.json
?
if so I am getting an error.
What I am trying to do is to have pex generate a lock file for a linux platform, so windows only reqs won't be there.limited-apple-72608
07/06/2022, 7:14 PMpants
have an equivalent workaround? I could not find anything in the docs. (machine is a relatively new macbook pro with m1 chip)
base) ck185129@WUSCK185129-RH6 ~ % ./pants --version
Bootstrapping Pants using /Users/ck185129/miniforge3/bin/python3.9
Creating the virtualenv PEX.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)'))': /simple/virtualenv/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)'))': /simple/virtualenv/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)'))': /simple/virtualenv/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)'))': /simple/virtualenv/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)'))': /simple/virtualenv/
little-zoo-57121
07/06/2022, 8:11 PMloud-laptop-17949
07/06/2022, 8:55 PM./pants run
I get lots of could not import <http://github.com/|github.com/>... (open : no such file or directory)
. While go run .
on the same code works fine.freezing-lamp-12123
07/06/2022, 8:58 PMnarrow-vegetable-37489
07/06/2022, 9:10 PMloud-laptop-17949
07/06/2022, 9:15 PMhappy-kitchen-89482
07/06/2022, 11:09 PM