@@ -26,7 +26,7 @@ Pants commands are called _goals_. You can get a list of goals with
2626# Targets
2727
2828Targets are a way of setting metadata for some part of your code, such as timeouts for tests and
29- entry points for binaries. Targets have types like ` python_binary ` , ` resources ` , and
29+ entry points for binaries. Targets have types like ` python_source ` , ` resources ` , and
3030` pex_binary ` . They are defined in ` BUILD ` files.
3131
3232Pants goals can be invoked on targets or directly on source files (which is often more intuitive and convenient).
@@ -78,12 +78,6 @@ Targets are referenced on the command line using their address, of the form `pat
7878./pants lint helloworld/util:util
7979```
8080
81- You can omit the target name if it is the same as the immediately enclosing directory name, e.g.,
82-
83- ```
84- ./pants lint helloworld/util
85- ```
86-
8781You can glob over all targets in a directory with a single trailing ` : ` , or over all targets in a directory
8882and all its subdirectories with a double trailing ` :: ` , e.g.,
8983
@@ -103,11 +97,6 @@ those, rather than error. So you can safely do things like
10397
10498To run all tests.
10599
106- In some cases trying to run a goal on multiple files or targets will fail due to conflicts. For example, you cannot
107- ` ./pants repl helloworld:: ` because that globs over both Python 2 and Python 3 code, so there is
108- no way to select an interpreter compatible with both both to run the REPL on.
109-
110-
111100# Example Goals
112101
113102Try these out in this repo!
@@ -123,13 +112,13 @@ Try these out in this repo!
123112
124113```
125114./pants lint ::
126- ./pants fmt ' helloworld/**/*.py'
115+ ./pants fmt helloworld/greet::
127116```
128117
129118## Run MyPy
130119
131120```
132- ./pants typecheck ::
121+ ./pants check ::
133122```
134123
135124## Run tests
@@ -157,7 +146,7 @@ Try these out in this repo!
157146
158147```
159148./pants repl helloworld/greet # The REPL will have all relevant code and dependencies on its sys.path.
160- ./pants repl --shell=ipython helloworld/greet
149+ ./pants repl --shell=ipython helloworld/greet --no-pantsd # To use IPython, you must disable Pantsd for now.
161150```
162151
163152## Build a wheel / generate ` setup.py `
@@ -168,11 +157,13 @@ This will build both a `.whl` bdist and a `.tar.gz` sdist.
168157./pants package helloworld/util:dist
169158```
170159
171- We can also remove the ` setup_py_commands ` field from ` helloworld/util/BUILD ` to have Pants instead generate a
172- ` setup.py ` file, with all the relevant code in a chroot.
173-
174160## Count lines of code
175161
176162```
177163./pants count-loc '**/*'
178164```
165+ ## Create virtualenv for IDE integration
166+
167+ ```
168+ ./pants export ::
169+ ```
0 commit comments