witty-crayon-22786
01/11/2021, 11:14 PMloud-stone-83419
01/11/2021, 11:18 PMwitty-crayon-22786
01/11/2021, 11:19 PMloud-stone-83419
01/11/2021, 11:19 PMenough-postman-51783
01/12/2021, 3:51 PMrequirements.txt
files in separated folders for separated packages and with the same dependency (3rd part)? Because when I want to add the same dependency in second requirements.txt
I lose the first one. I saw in docs Dependency inference will no-op if >2 targets refer to the same file
section.loud-stone-83419
01/12/2021, 4:51 PM--output-as-cobertura"
flag describes as Export cobertura formats which would allow users to merge with cobertura coverage for java targets.
The question thus is the following, historically how have you been solving this? Do you have a tool that can do merges of reports that would prevent the batches from being a problem?
thank youechoing-nightfall-72095
01/13/2021, 11:39 AMapps
and for now a single app in a subdirectory sample
in this a app.py
When executing ./pants run apps/sample/app.py
pants. build as expected but,
I'm not able to run flask in debug mode.
if __name__ == "__main__":
app.run(host='localhost', port=7002, debug=True)
Then, I get the following error message:
No module named apps.__main__; 'apps' is a package and cannot be directly executed
It runs without errors when:
if __name__ == "__main__":
app.run(host='localhost', port=7002)
I've tried googling for this issue, but with no luck. Hence now reaching out. It would be nice not having to ctr-c
and re-run whenever changes are made to the app when developing.
Hope to hear from you!
BR Alexpolite-vase-75369
01/13/2021, 5:26 PMpolite-vase-75369
01/13/2021, 5:28 PMFile "job-scheduler.pex/.bootstrap/pex/bootstrap.py", line 68, in imported_from_bootstrap
File "//home/ubuntu/.pyenv/versions/2.7.14/lib/python2.7/email/__init__.py", line 79, in __getattr__
__import__(self.__name__)
File "/home/ubuntu/.pyenv/versions/2.7.14/envs/pants_1_16/lib/python2.7/site-packages/_virtualenv.py", line 112, in find_module
if fullname in _DISTUTILS_PATCH:
TypeError: argument of type 'NoneType' is not iterable
polite-vase-75369
01/13/2021, 5:36 PM_DISTUTILS_PATCH
enough-analyst-54434
01/13/2021, 5:48 PMpolite-vase-75369
01/13/2021, 5:53 PMpolite-vase-75369
01/13/2021, 5:53 PMenough-analyst-54434
01/13/2021, 5:55 PMpolite-vase-75369
01/13/2021, 6:00 PMpolite-vase-75369
01/13/2021, 6:00 PMERROR: Cannot install pantsbuild-pants==1.27.0 and pex==2.1.22 because these package versions have conflicting dependencies.
The conflict is caused by:
The user requested pex==2.1.22
pantsbuild-pants 1.27.0 depends on pex==2.1.9
enough-analyst-54434
01/13/2021, 6:37 PMpolite-vase-75369
01/13/2021, 6:37 PMpolite-vase-75369
01/13/2021, 6:40 PMloud-stone-83419
01/13/2021, 6:44 PMenough-analyst-54434
01/13/2021, 7:30 PMenough-analyst-54434
01/13/2021, 7:31 PMpolite-vase-75369
01/13/2021, 7:34 PMenough-analyst-54434
01/13/2021, 8:10 PMpolite-vase-75369
01/13/2021, 8:12 PMpolite-vase-75369
01/13/2021, 8:13 PMenough-analyst-54434
01/13/2021, 8:14 PMsquare-oxygen-75288
01/14/2021, 10:05 AM11:01:39 00:12 [run]
Auto-detected 32 processors, using -parallel-threads=32
.E.E.E.E
Time: 0.021
There were 4 failures:
1) initializationError
java.lang.NullPointerException
at __shaded_by_pants__.org.pantsbuild.tools.junit.impl.ScalaTestUtil.getJUnitRunner(ScalaTestUtil.java:62)
at __shaded_by_pants__.org.pantsbuild.tools.junit.impl.CustomAnnotationBuilder$ScalaTestAnnotatedBuilder.runnerForClass(CustomAnnotationBuilder.java:52)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at __shaded_by_pants__.org.pantsbuild.tools.junit.impl.AnnotatedClassRequest.getRunner(AnnotatedClassRequest.java:41)
at __shaded_by_pants__.org.pantsbuild.tools.junit.impl.CompositeRequestRunner.runChild(CompositeRequestRunner.java:53)
at __shaded_by_pants__.org.pantsbuild.tools.junit.impl.ConcurrentCompositeRequestRunner$1$1.run(ConcurrentCompositeRequestRunner.java:37)
at __shaded_by_pants__.org.pantsbuild.tools.junit.impl.ConcurrentRunnerScheduler.finished(ConcurrentRunnerScheduler.java:89)
at __shaded_by_pants__.org.pantsbuild.tools.junit.impl.ConcurrentCompositeRequestRunner$1.evaluate(ConcurrentCompositeRequestRunner.java:46)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at __shaded_by_pants__.org.pantsbuild.tools.junit.impl.ConsoleRunnerImpl.runLegacy(ConsoleRunnerImpl.java:613)
at __shaded_by_pants__.org.pantsbuild.tools.junit.impl.ConsoleRunnerImpl.run(ConsoleRunnerImpl.java:503)
at __shaded_by_pants__.org.pantsbuild.tools.junit.impl.ConsoleRunnerImpl.main(ConsoleRunnerImpl.java:790)
is it something that just needs some additional configuration which we are missing currently?echoing-nightfall-72095
01/14/2021, 1:39 PMpants.toml
i’ve defined roots
[source]
root_patterns = [
"/apps/*",
"/libs"
]
I can run my apps with:
./pants run apps/a
However, all imports cannot be found using linting (IDE is not happy either).
I have include in dependencies
python_library(
dependencies=[
"3rdparty/python:flask",,
"libs/z",
"libs/y",
"libs/x"
],
)
I import as:
from z import something
and
from sublib import somthingelse
where the sublib is defined in a BUILD
file using python_library()
Everything runs great but I would like full support.
When I look at the documentation I can see an example of multiple top level project https://www.pantsbuild.org/docs/source-roots#multiple-top-level-projects.
Is there a way to make project subtop level and still have linters finding imports and stuff?
BR Alexhundreds-father-404
01/14/2021, 3:42 PMpython_library
, e.g. thinking it's more meaningful than it really is like that it corresponds to a Python distribution (setup.py).
Proposal to fix this by renaming some targets https://docs.google.com/document/d/1afm8NhCuE19YyNZHJCrig9EnaV0eJrSsIVWXL7eDflA/edit#. tl;dr:
- python_library
-> python_sources
- protobuf_library
-> protobuf_sources
- python_requirement_library
-> python_requirement
Ack that this is disruptive; we'd provide a snippet to fix this automatically, like when we renamed python_binary
-> pex_binary
.
Feedback appreciated!