You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you want Pants itself to expand the globs (which is sometimes necessary), you must quote them in the shell:
56
56
57
57
```
58
-
./pants lint 'helloworld/util/*.py'
58
+
./pants lint 'helloworld/greet/*.py'
59
59
```
60
60
61
61
You can run on all changed files:
@@ -75,7 +75,7 @@ You can run on all changed files, and any of their "dependees":
75
75
Targets are referenced on the command line using their address, of the form `path/to/dir:name`, e.g.,
76
76
77
77
```
78
-
./pants lint helloworld/util:util
78
+
./pants lint helloworld/greet:lib
79
79
```
80
80
81
81
You can glob over all targets in a directory with a single trailing `:`, or over all targets in a directory
@@ -125,9 +125,10 @@ Try these out in this repo!
125
125
126
126
```
127
127
./pants test :: # Run all tests in the repo.
128
-
./pants test helloworld/util:test # Run all the tests in this target.
129
-
./pants test helloworld/util/lang_test.py # Run just the tests in this file.
130
-
./pants test helloworld/util/lang_test.py -- -k test_language_translator # Run just this one test.
128
+
./pants test --output=all :: # Run all tests in the repo and view pytest output even for tests that passed (you can set this permanently in pants.toml).
129
+
./pants test helloworld/translator:tests # Run all the tests in this target.
130
+
./pants test helloworld/translator/translator_test.py # Run just the tests in this file.
131
+
./pants test helloworld/translator/translator_test.py -- -k test_unknown_phrase # Run just this one test by passing through pytest args.
131
132
```
132
133
133
134
## Create a PEX binary
@@ -136,7 +137,7 @@ Try these out in this repo!
136
137
./pants package helloworld/main.py
137
138
```
138
139
139
-
## Run a binary
140
+
## Run a binary directly
140
141
141
142
```
142
143
./pants run helloworld/main.py
@@ -145,16 +146,16 @@ Try these out in this repo!
145
146
## Open a REPL
146
147
147
148
```
148
-
./pants repl helloworld/greet # The REPL will have all relevant code and dependencies on its sys.path.
149
-
./pants repl --shell=ipython helloworld/greet --no-pantsd # To use IPython, you must disable Pantsd for now.
149
+
./pants repl helloworld/greet:lib # The REPL will have all relevant code and dependencies on its sys.path.
150
+
./pants repl --shell=ipython helloworld/greet:lib --no-pantsd # To use IPython, you must disable Pantsd for now.
150
151
```
151
152
152
153
## Build a wheel / generate `setup.py`
153
154
154
155
This will build both a `.whl` bdist and a `.tar.gz` sdist.
0 commit comments