bitter-ability-3219004/12/2022, 3:12 PM
wide-zoo-8607004/12/2022, 3:16 PM
bitter-ability-3219004/12/2022, 3:17 PM
don't require any of your dependencies to run. linters/checkers like
do require dependencies, so you just happen to be executing your first command which requires deps.
wide-zoo-8607004/12/2022, 3:40 PM
wide-zoo-8607004/12/2022, 3:46 PM
bitter-ability-3219004/12/2022, 3:52 PM
just contains mypy and friends (and not your deps)._
bitter-ability-3219004/12/2022, 3:53 PM
containing all of your deps. Yes that'll only rebuild when your lockfile changes
hundreds-father-40404/12/2022, 4:54 PM
high-yak-8589904/12/2022, 5:13 PM
rapid-bird-7930004/12/2022, 5:30 PM
and want to prevent
from ever depending on
we can use a feature/plugin to do this. Does something like this already exists?
high-yak-8589904/12/2022, 8:39 PM
loud-laptop-1794904/13/2022, 12:56 AM
high-yak-8589904/13/2022, 12:58 AM
? I'm seeing my module specified as
somehow end up in a traceback like
ambitious-actor-3678104/13/2022, 2:07 AM
salmon-hydrogen-6290304/13/2022, 5:30 AM
happy-kitchen-8948204/13/2022, 8:50 AM
bitter-tiger-5393304/13/2022, 10:44 AM
-- pants.toml -- helloworld1 -- src -- functions -- BUILD -- plus.py -- helloworld2 -- src -- functions -- BUILD -- plus.py -- helloworld3 --src -- functions -- BUILD -- plus.py -- multiply.py -- function_tests -- BUILD --test_plus.py
I need this import to be from the
from src.functions.plus import foo
path. When i run the test file test_plus.py I get this error
I'm also getting warnings like `The target helloworld3/src/function_tests/test_plus:tests imports
ModuleNotFoundError: No module named 'src.functions'
, but Pants cannot safely infer a dependency because more than one target owns this module, so it is ambiguous which to use:`
I have a pants.toml in the root folder which has
['helloworld3/src/functions/core/plus.py', 'helloworld2/src/functions/core/plus.py', 'helloworld1/src/functions/core/plus.py'].
Is this the correct way of setting things up? What am I doing wrong? I think my understanding of pants targets and sources hasn't 'clicked' yet, hopefully you can also help to make that right 🙂 Thanks in advance! Obviously i've replaced the real filenames with fake names. If that is not enough then please do shout and I'll look into creating a stripped down example monorepo with this error on github.
[source] root_patterns = [ '/helloworld1/', '/helloworld2/', '/helloworld3/', ]
rich-optician-5163304/13/2022, 11:12 AM
refined-addition-5364404/13/2022, 4:07 PM
? Please check 🧵 for the
./pants lint ::
./pants lint :: 18:05:08.06 [INFO] Completed: Lint with Flake8 - flake8 succeeded. 18:05:08.06 [INFO] Completed: Lint with Flake8 - flake8 succeeded. 18:05:08.06 [INFO] Completed: Lint with Black - black succeeded. All done! ✨ 🍰 ✨ 8 files would be left unchanged. 18:05:08.06 [INFO] Completed: Lint with docformatter - docformatter succeeded. 18:05:08.06 [INFO] Completed: Lint with Black - black succeeded. All done! ✨ 🍰 ✨ 69 files would be left unchanged. 18:05:08.06 [INFO] Completed: Lint with autoflake - autoflake succeeded. 18:05:08.06 [INFO] Completed: Lint with docformatter - docformatter succeeded. 18:05:08.06 [INFO] Completed: Lint with autoflake - autoflake succeeded. 18:05:08.06 [INFO] Completed: Lint with isort - isort succeeded. 18:05:08.06 [INFO] Completed: Lint with isort - isort succeeded. ✓ autoflake succeeded. ✓ black succeeded. ✓ docformatter succeeded. ✓ flake8 succeeded. ✓ isort succeeded.
high-yak-8589904/13/2022, 6:08 PM
bitter-ability-3219004/13/2022, 7:01 PM
incalculable-yacht-7585104/13/2022, 8:03 PM
to deploy a cloudformation template? Is that possible? I'm looking into using
for bundling a lambda function.
eager-dress-6640504/13/2022, 8:41 PM
loud-laptop-1794904/13/2022, 11:48 PM
in pants.toml and then start setting
on each target that is ready. When I do this it seems that the pants.toml config is a global setting and always wins, rather than the default value I was hoping for. The alternative is to use tags, which we did for tests and lint, but that requires more complex filtering logic on every run.
freezing-area-9713104/14/2022, 1:23 AM
. I got a lot of errors like this:
What should I change them to?
Name 'python_library' is not defined.
melodic-wolf-3186004/14/2022, 9:53 AM
Is it advisable to have a
- src - dir1 - subdir1 - script1.py - subdir2 - script2.py - BUILD - dir2 - subdir3 - script3.py - subdir4 - script4.py - BUILD
file for each subdir as well? Given that we never intend to package/test the different subdirs separately? I feel that having a
file at each subdir is unnecessary given we are happy with the defaults, and can be added later if we ever do intend to package/test/etc. those subdirs separately.
full-student-9182504/14/2022, 3:41 PM
on its own and comparing it with
? For example, when I run
./pants lint ::
, I get:
However, when I run
file1.py:17:21: ANN201 Missing return type annotation for public function file2.py:10:32: ANN201 Missing return type annotation for public function
, I get:
./pants lint ::
Is there a way to get more verbose output of
11:38:23.22 [INFO] Completed: Lint with Flake8 - flake8 succeeded. ... ✓ flake8 succeeded.
? So as to see what files are linted, what flake8 config, etc.
./pants lint ::
full-student-9182504/14/2022, 7:16 PM
require Pants version 2.11? I am getting the following error:
151429.26 [ERROR] Invalid option ‘extra-requirements’ under [flake8] in /path/to/project/pants.toml
151429.26 [ERROR] Invalid config entries detected. See log for details on which entries to update or remove.
(Specify --no-verify-config to disable this check.)And my
has the following flake8 config:
Pants version is
[flake8] config = ".flake8" extra-requirements.add = [ "flake8-bandit>=3.0.0", "flake8-black>=0.3.2", ]
freezing-area-9713104/14/2022, 7:59 PM
How do I update it? What does
jar_library( name='hadoop', jars=[ jar('org.apache.hadoop', 'hadoop-client', 2.6.0), ], scope='compile', )
change into now?