famous-lock-71490
11/22/2021, 12:30 PMfamous-lock-71490
11/22/2021, 12:36 PMcould not import <http://some.path.in|some.path.in>.internal.library
Errors and would like to have something like "hey pants, list all the python import paths i could use in my monorepo"?brash-baker-91190
11/22/2021, 4:16 PMpex_binary
(see thread)jolly-painter-65388
11/22/2021, 6:40 PMBUILD
go_binary(
name = "bin",
)
docker_image(
name = "image",
dependencies = [":bin"],
)
Dockerfile
FROM alpine:3.11
ENTRYPOINT ["/bin/greeter_en"]
COPY cmd.greeter_en/bin /bin/greeter_en
on MacOS the image will have MacOS binaryplain-carpet-73994
11/22/2021, 9:26 PM.pants/named_caches/
and .pants/lmdb_store/
. That cache grows a lot over time. On the first run the cache was about 1.5G. After just 5 or so runs it's now almost 3G. Any idea why it'd be growing so fast and we could do to keep it's size reasonable?loud-stone-83419
11/22/2021, 9:35 PMambitious-actor-36781
11/23/2021, 6:27 AMplain-fireman-49959
11/23/2021, 2:17 PM./pants dependencies source_root/org/project
?nice-florist-55958
11/23/2021, 2:43 PMbusy-vase-39202
11/23/2021, 3:43 PMmodern-wolf-36228
11/23/2021, 3:44 PM(monorepo) β monorepo git:(main) β ./pants dependencies ::
16:43:13.00 [WARN] DEPRECATED: scope python-setup will be removed in version 2.10.0.dev0.
Use scope python instead (options: interpreter_constraints)
16:43:14.25 [INFO] Completed: Building dockerfile_parser.pex from dockerfile-parser_default_lockfile.txt
16:43:14.25 [ERROR] 1 Exception encountered:
ProcessExecutionFailure: Process 'Building dockerfile_parser.pex from dockerfile-parser_default_lockfile.txt' failed with exit code 1.
stdout:
stderr:
ERROR: Exception:
Traceback (most recent call last):
File "/home/marcelo/.cache/pants/named_caches/pex_root/venvs/s/53f402b6/venv/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 171, in _merge_into_criterion
crit = self.state.criteria[name]
KeyError: 'dockerfile'
On 2.9.0.dev2 I'm having this /\nutritious-hair-72580
11/23/2021, 6:01 PMloud-laptop-17949
11/23/2021, 9:32 PMloud-laptop-17949
11/23/2021, 11:06 PMclean-night-52582
11/24/2021, 5:04 AM--python-path
for the pip
resolver job? I have a remote execution setup and want to allow devs to read but not write to the cache but is different on every system.helpful-ambulance-53940
11/24/2021, 9:20 AMstale-nightfall-29801
11/24/2021, 9:58 AMpython_library
depends on a resource
that I'm hoping the pex_binary
target will package correctly as a package resource during packaging.
If my library reads this resource via pkg_resources
tooling will my python_test
target be able to call the library code that reads the package, or is the code under test not "packaged" at point of testing? This currently isn't working but I'm not sure if it's configuration a error or I'm expecting this to work when it's not going tomodern-wolf-36228
11/24/2021, 12:45 PM13:44:26.59 [WARN] DEPRECATED: scope python-setup will be removed in version 2.10.0.dev0.
What should I use as replacement? π€curved-television-6568
11/24/2021, 2:11 PMOverridesField
meant to always be subclassed?busy-vase-39202
11/24/2021, 6:05 PMJust giving you all a heads up that the Python Developers Survey will be wrapping up in the coming week.Β
Β Β https://surveys.jetbrains.com/s3/python-developers-survey-2021
The more diverse our response base is, the better so help us share the link this week as well to your regional communities. The survey takes about 10-15 minutes to fill out.
Ewa Jodlowska
Executive Director
Python Software Foundation
ewa@python.org
loud-laptop-17949
11/24/2021, 6:28 PMagreeable-shampoo-91351
11/24/2021, 7:02 PMhundreds-father-404
11/24/2021, 8:40 PMpython_tests(timeout=120)
Should the value instead be like this?
"120s"
"10s"
"2m"
"1.5m"
A for the status quo, B for setting the time unit
Update going to accept both styles to avoid breaking BUILD filescurved-wall-59116
11/25/2021, 2:21 PMpants 2.7.2
python 3.8.10
poetry
1. Pathing on a new instance. mlm_training.py can't find dsutils under libs (see folder and our setup script below)
2. Dependency resolving with poetry
- We have an issue where we have 2 different projects that use scikit-learn [0.23.1, 1.0.1].
- In each project folder we have pyproject.toml specifying this.
- Pants either 1. ignores one of the versions or 2. if specified as a dependency in BUILD (for both projects) returns the message "could not resolve constraints"
data-science
|
βββ libs
β |__dsutils
β βββ BUILD
β βββ clean.py
β βββ config.py
β βββ data.py
β βββ init.py
β βββ path.py
β βββ pyproject.toml
β βββ README.md
β βββ tests
β β βββ test_clean.py
β β βββ test_path.py
β β βββ test_tokenizer.py
β βββ tokenizer.py
β βββ utils.py
βββ projects
β |__language_model
β βββ BUILD
β βββ config.py
β βββ data
β βββ data.dvc
β βββ init.py
β βββ mlm_training.py
β βββ models
β βββ models.dvc
β βββ params.yaml
β βββ pyproject.toml
β βββ README.md
β βββ utils.py
βββ constraints.txt
βββ mypy.ini
βββ pants
βββ pants.ci.toml
βββ pants.toml
βββ pyproject.toml
βββ README.md
Relevant contents of pants.toml
[source]
root_patterns = [
'/libs',
'/projects',
]
Contents of relevant setup.sh
script (some steps before this):
echo "Installing pip"
"${PIP}" install pip --upgrade
echo "Installing poetry"
"${PIP}" install poetry
# Install all our requirements.txt, and also any 3rdparty
# dependencies specified outside requirements.txt, e.g. via a
# handwritten python_requirement_library target.
echo "Poetry update"
poetry update
echo "Installing dependencies"
"${PIP}" install -r <(poetry export --dev --without-hashes) -r <(./pants dependencies --type=3rdparty ::)
echo "Remove lockfile"
rm poetry.lock
echo "Generating constraints.txt"
rm constraints.txt
pip uninstall pkg-resources==0.0.0 -y # Have tried commenting this out.
pip list --format freeze >> constraints.txt
adorable-engine-71736
11/25/2021, 4:55 PM./pants check my.package::
where my.package
depends on other.package
and other.package
is in the same repo it pulls in the correct version of other.package
otoh, when i run ./pants check ::
it seems to use the version of other.package
on the filesystem - ie doesnt respect any specified versions or pull in the last published from pypimodern-wolf-36228
11/26/2021, 9:58 AM./pants publish
with twine
π€ does someone have an example?curved-television-6568
11/26/2021, 10:06 AMcurved-television-6568
11/26/2021, 10:06 AMmodern-wolf-36228
11/26/2021, 10:07 AMmodern-wolf-36228
11/26/2021, 10:07 AM