fresh-cat-90827
07/21/2021, 2:08 PMcommons.py
under the tests
directory along with test_*.py
files containing tests.happy-kitchen-89482
07/21/2021, 8:44 PMquaint-gold-40000
07/22/2021, 9:31 AMpoetry install
for all packages that specify package A as a path dependency so that their poetry.lock is updated.
I learned about Pants in a comment on an issue about monorepos on the Poetry issue tracker. I was hoping Pants would be able to solve the problem above. Does it? It's not clear to me what "Poetry support" in Pants encompasses. From, early experiments with Pants 2.6 it doesn't seem that Pants considers the Poetry lock files. I'm hoping someone can shed some light on this here. Thanks! 🙏quaint-gold-40000
07/22/2021, 2:30 PMproud-dentist-22844
07/22/2021, 4:08 PMdisambiguate
target. If there are multiple source roots that each contain a tests.fixtures
package, for example, maybe we could do something like disambiguate(packages={"tests.fixtures": "./fixtures/"})
. Or even, add another arg to python_library
like python_library(disambiguate={"tests.fixtures": "./fixtures/"})
so that anything in that target that imports something from tests.fixtures
would use the ./fixtures/
as the dependency. And any files that do not depend on tests.fixtures
would not get a hard-coded dependency on it (as with python_library(dependencies=…)
).
Basically, an extra knob to tune dependency inference without requiring hard-coded dependencies.user
07/22/2021, 5:37 PMuser
07/22/2021, 10:47 PMuser
07/22/2021, 10:47 PMuser
07/23/2021, 12:40 AMuser
07/23/2021, 3:20 AMcurved-television-6568
07/23/2021, 11:58 AMplatforms
, does it not matter if it is a hyphen or underscore between system and arch?
https://www.pantsbuild.org/v2.7/docs/reference-pex_binary#codeplatformscode
The examples shown use both..
Platforms should be in the format defined by Pex (https://pex.readthedocs.io/en/latest/buildingpex.html#platform), i.e. PLATFORM-IMPL-PYVER-ABI (e.g. “linux_x86_64-cp-27-cp27mu”, “macosx_10.12_x86_64-cp-36-cp36m”):
PLATFORM: the host platform, e.g. “linux-x86_64”, “macosx-10.12-x86_64".
user
07/23/2021, 12:37 PMproud-dentist-22844
07/23/2021, 4:43 PMfmt
, lint
, package
, repl
, run
, test
, and typecheck
(and friends: https://www.pantsbuild.org/docs/reference-all-goals) For instance there are a bunch of scripts here: https://github.com/pantsbuild/pants/tree/main/build-support/bin
And other projects will have their own set of ad-hoc tasks that need to be done (regen constraints, or build a venv for external tooling, or version bumping, or ...)
With a Makefile
, these tasks get added as additional custom make targets. We could use pants plugins to add more goals, but a pants-plugin feels like overkill for some of these tasks that are not meant to ever pass through remote caching & execution.
But I really want ./pants
to be the single point of entry for developer tasks.
So, what if there was a lighter weight way to extend pants? Maybe an invoke
pants-plugin (or call it a do
plugin?) that allowed for running tasks written for http://www.pyinvoke.org/ ? Essentially, a way to have a collection of plain (or nearly plain) python scripts that pants can run locally? Maybe the plugin would be able to dynamically create --help
for all of the available scripts so that it's a bit more structured than ./pants run
, but still extremely flexible.user
07/25/2021, 3:28 PMpowerful-boots-1234
07/25/2021, 5:35 PMquaint-gold-40000
07/26/2021, 1:13 PM...
ResolveError: No owning targets could be found for the file `dir/package-a/tests/conftest.py`.
Please check that there is a BUILD file in the parent directory dir/package-a/tests with a target whose `sources` field includes the file. See <https://www.pantsbuild.org/v2.6/docs/targets> for more information on target definitions.
user
07/26/2021, 11:36 PM> brew install python-launcher
> man py
Announcing Python Launcher for Unix v1.0.0!
And thanks to Homebrew… https://twitter.com/i/web/status/1419800935639912458
Twitterquaint-gold-40000
07/27/2021, 12:31 PMaverage-vr-56795
07/27/2021, 11:25 PMfresh-cat-90827
07/28/2021, 9:45 AMrun
goal mentions running an executable like this:
$ ./pants run project/app.py
I am confused — if there is a file app.py
in the project
directory, one wouldn’t be able to run it with the command above.clean-night-52582
07/28/2021, 10:36 PMuser
07/29/2021, 10:26 PMpowerful-florist-1807
07/29/2021, 11:53 PMuser
07/30/2021, 1:38 AMuser
07/30/2021, 1:45 AMjolly-midnight-72759
07/30/2021, 3:04 PMnever
for pytest runs. Is there a way to show skipped and failed by default? When I try ./pants test --output=failed a/tests/python:: -- -rs
I only get failed. When I try --output=all
I also get the "passed" output.jolly-midnight-72759
07/30/2021, 3:25 PM./pants repl
? Does extra_env
work everywhere or is it just a test
thing?user
07/30/2021, 11:23 PMproud-dentist-22844
08/02/2021, 3:05 PMpoetry_requirements
macro? https://python-poetry.org/blog/announcing-poetry-1.2.0a2/#dependency-groupsuser
08/02/2021, 10:17 PM