runem 0.0.9__py3-none-any.whl → 0.0.11__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
runem/runem.py CHANGED
@@ -615,6 +615,7 @@ def _run_job(
615
615
 
616
616
  if not file_list:
617
617
  # no files to work on
618
+ print(f"WARNING: skipping job '{label}', no files for job")
618
619
  return (f"{label}: no files!", timedelta(0))
619
620
  if job_config["ctx"]["cwd"]:
620
621
  os.chdir(root_path / job_config["ctx"]["cwd"])
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: runem
3
- Version: 0.0.9
3
+ Version: 0.0.11
4
4
  Summary: Awesome runem created by lursight
5
5
  Home-page: https://github.com/lursight/runem/
6
6
  Author: lursight
@@ -47,6 +47,7 @@ The name "runem" is derived from the fusion of "run" and "them," encapsulating t
47
47
  - [4.1. Tag filters](#41-tag-filters)
48
48
  - [4.1.1. Run jobs only with the 'lint' tag:](#411-run-jobs-only-with-the-lint-tag)
49
49
  - [4.1.2. If you want to lint all code _except_ nodejs code (and you have the apprpriate tags):](#412-if-you-want-to-lint-all-code-except-nodejs-code-and-you-have-the-apprpriate-tags)
50
+ - [4.1.3. Run fast checks on `pre-commit`](#413-run-fast-checks-on-pre-commit)
50
51
  - [4.2. phase filters](#42-phase-filters)
51
52
  - [4.2.1 Focus on a phase](#421-focus-on-a-phase)
52
53
  - [4.2.2 Exclude slow phases temporarily](#422-exclude-slow-phases-temporarily)
@@ -86,14 +87,22 @@ $ python -m runem [--tags tag1,tag2,tag3] [--not-tags tag1,tag2,tag3] \
86
87
  ```
87
88
 
88
89
  ### 4.1. Tag filters
89
- You can control which types of jobs to run via tag. Just tag the job in the config and then from the command-line you can add `--tags` or `--not-tags` to refine exactly which jobs will be run.
90
+ Jobs are tagged in the .runem.yml config file. Each unique tags is made available on the command-line. To see which tags are available use `--help`. To add a new tag extend the `tags` field in the `job` config.
90
91
 
91
- To run only run jobs that have the `python` tag (for example, you define the tags) you would do the following:
92
+ You can control which types of jobs to run via tags. Just tag the job in the config and then from the command-line you can add `--tags` or `--not-tags` to refine exactly which jobs will be run.
93
+
94
+ To debug why a job is not selected pass `--verbose`.
95
+
96
+ For example, if you have a `python` tagged job or jobs, to run only run those jobs you would do the following:
92
97
 
93
98
  ```bash
94
99
  runem --tags python
95
100
  ```
96
101
 
102
+ `--tags` are exclusive filter in, that is the tags passed in replace are the only tags that are run. This allows one to focus on running just a subset of tags.
103
+
104
+ `--not-tags` are subtractive filter out, that is any job with these tags are not run, even if they have tags set via the `--tags` switch. Meaning you can choose to run `python` tagged jobed but not run the `lint` jobs with `--tags python --not-tags lint`, and so on.
105
+
97
106
  #### 4.1.1. Run jobs only with the 'lint' tag:
98
107
 
99
108
  ```bash
@@ -106,13 +115,26 @@ runem --tags lint
106
115
  runem --tags lint --not-tags deprecated
107
116
  ```
108
117
 
118
+ #### 4.1.3. Run fast checks on `pre-commit`
119
+
120
+ If you have fast jobs that tagged as appropriate for pre-commit hooks.
121
+
122
+ ```bash
123
+ mkdir scripts/git-hooks
124
+ echo "runem --tags pre-commit" > scripts/git-hooks/pre-commit
125
+ # add the following to .git/config
126
+ # [core]
127
+ # # ... existing config ...
128
+ # hooksPath = ./scripts/git-hooks/husky/
129
+ ```
130
+
109
131
  ### 4.2. phase filters
110
132
 
111
- Sometimes you know you just want to run a specific phase to iterate quickly within that phase-context.
133
+ Sometimes just want to run a specific phase, so you can focus on it and iterate quickly, within that context.
112
134
 
113
135
  #### 4.2.1 Focus on a phase
114
136
 
115
- For example you might want to run the 'reformat' phase as you're preparing a commit and are just made cosmetic changes e.g. updating the docs.
137
+ For example, if you have a `reformat` phase, you might want to run just `reformat` jobs phase whilst preparing a commit and are just preparing cosmetic changes e.g. updating comments, syntax, or docs.
116
138
 
117
139
  ```bash
118
140
  runem --phase reformat
@@ -120,7 +142,7 @@ runem --phase reformat
120
142
 
121
143
  #### 4.2.2 Exclude slow phases temporarily
122
144
 
123
- Or you are tightly iterating on the 'test' phase coverage and do not care about formating as long as you can see your coverage results ASAP, but everything that comes after that stage. So if you have 4 stages `bootstrap`, `pre-run`, `reformat`, `test` and `verify` you can exlude the slower reformat-stage with the following and everything else will run
145
+ If you have 4 stages `bootstrap`, `pre-run`, `reformat`, `test` and `verify` phase, and are tightly iterating and focusing on the 'test-coverage' aspect of the test-phase, then you do not care about formating as long as you can see your coverage results ASAP. However if your test-coverage starts passing then you will care about subsequent stages, so you can exlude the slower reformat-stage with the following and everything else will run.
124
146
 
125
147
  ```bash
126
148
  runem --not-phase pre-run reformat
@@ -147,8 +169,8 @@ usage: runem.py [-h] [--jobs JOBS [JOBS ...]] [--not-jobs JOBS_EXCLUDED [JOBS_EX
147
169
  [--black] [--no-black] [--check-only] [--no-check-only] [--coverage] [--no-coverage] [--docformatter] [--no-docformatter]
148
170
  [--generate-call-graphs] [--no-generate-call-graphs] [--install-deps] [--no-install-deps] [--isort] [--no-isort] [--profile]
149
171
  [--no-profile] [--update-snapshots] [--no-update-snapshots] [--unit-test] [--no-unit-test] [--unit-test-firebase-data]
150
- [--no-unit-test-firebase-data] [--unit-test-python] [--no-unit-test-python] [--call-graphs | --no-call-graphs] [--procs PROCS]
151
- [--root ROOT_DIR] [--verbose | --no-verbose | -v]
172
+ [--no-unit-test-firebase-data] [--unit-test-python] [--no-unit-test-python] [--call-graphs | --no-call-graphs]
173
+ [--procs PROCS] [--root ROOT_DIR] [--verbose | --no-verbose | -v]
152
174
 
153
175
  Runs the Lursight Lang test-suite
154
176
 
@@ -162,27 +184,25 @@ options:
162
184
 
163
185
  jobs:
164
186
  --jobs JOBS [JOBS ...]
165
- List of job-names to run the given jobs. Other filters will modify this list. Defaults to '['cspell app', 'eslint app',
166
- 'eslint fb_funcs', 'flake8 py', 'install python requirements', 'jest app', 'jest fb_funcs', 'json validate', 'mypy py',
167
- 'pretty app', 'pretty fb_funcs', 'pylint py', 'reformat py', 'typescript app', 'typescript fb_funcs']'
187
+ List of job-names to run the given jobs. Other filters will modify this list. Defaults to '['flake8 py', 'install
188
+ python requirements', 'json validate', 'mypy py', 'pylint py', 'reformat py', 'spell check']'
168
189
  --not-jobs JOBS_EXCLUDED [JOBS_EXCLUDED ...]
169
- List of job-names to NOT run. Defaults to empty. Available options are: '['cspell app', 'eslint app', 'eslint fb_funcs',
170
- 'flake8 py', 'install python requirements', 'jest app', 'jest fb_funcs', 'json validate', 'mypy py', 'pretty app',
171
- 'pretty fb_funcs', 'pylint py', 'reformat py', 'typescript app', 'typescript fb_funcs']'
190
+ List of job-names to NOT run. Defaults to empty. Available options are: '['flake8 py', 'install python requirements',
191
+ 'json validate', 'mypy py', 'pylint py', 'reformat py', 'spell check']'
172
192
 
173
193
  phases:
174
194
  --phases PHASES [PHASES ...]
175
- Run only the phases passed in, and can be used to change the phase order. Phases are run in the order given. Defaults to
176
- '{'analysis', 'edit', 'pre-run'}'.
195
+ Run only the phases passed in, and can be used to change the phase order. Phases are run in the order given. Defaults
196
+ to '{'edit', 'pre-run', 'analysis'}'.
177
197
  --not-phases PHASES_EXCLUDED [PHASES_EXCLUDED ...]
178
- List of phases to NOT run. This option does not change the phase run order. Options are '['analysis', 'edit', 'pre-run']'.
198
+ List of phases to NOT run. This option does not change the phase run order. Options are '['analysis', 'edit', 'pre-
199
+ run']'.
179
200
 
180
201
  tags:
181
202
  --tags TAGS [TAGS ...]
182
- Only jobs with the given tags. Defaults to '['app', 'data', 'json', 'lint', 'py', 'type']'.
203
+ Only jobs with the given tags. Defaults to '['json', 'lint', 'py', 'spell', 'type']'.
183
204
  --not-tags TAGS_EXCLUDED [TAGS_EXCLUDED ...]
184
- Removes one or more tags from the list of job tags to be run. Options are '['app', 'data', 'json', 'lint', 'py',
185
- 'type']'.
205
+ Removes one or more tags from the list of job tags to be run. Options are '['json', 'lint', 'py', 'spell', 'type']'.
186
206
 
187
207
  job-param overrides:
188
208
  --black allow/disallows py-black from running
@@ -0,0 +1,14 @@
1
+ runem/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ runem/__main__.py,sha256=dsOiVZegpfK9JOs5n7UmbX5iwwbj7iFkEbLoVeEgAn4,136
3
+ runem/base.py,sha256=EZfR7FIlwEdU9Vfe47Wk2DOO8GQqpKxxLNKp6YHueZ4,316
4
+ runem/cli.py,sha256=YFwon1P7uSpAYNuJxe2f0wo0HpI3OYTQ-UBWx6xU1iY,145
5
+ runem/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ runem/run_command.py,sha256=SWFUxCwjkpeFjds9G7spR4Zu_DHDCAGHYPLaH5a5qWs,3671
7
+ runem/runem.py,sha256=yTmL8fUMh70gLMAYDlFU-KV2lp8kZM9r3Huo8sCeu8E,34852
8
+ scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
+ runem-0.0.11.dist-info/LICENSE,sha256=awOCsWJ58m_2kBQwBUGWejVqZm6wuRtCL2hi9rfa0X4,1211
10
+ runem-0.0.11.dist-info/METADATA,sha256=r-hsbTKM7Swzuy2_hSCnT86htXew084ZNRmwnkU-7w4,15909
11
+ runem-0.0.11.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
12
+ runem-0.0.11.dist-info/entry_points.txt,sha256=nu0g_vBeuPihYtimbtlNusxWovylMppvJ8UxdJlJfvM,46
13
+ runem-0.0.11.dist-info/top_level.txt,sha256=rd8MZEjuPdjwXuLZlbdZEg8_WGxrY1c8M36uHjNjbNk,14
14
+ runem-0.0.11.dist-info/RECORD,,
@@ -1,14 +0,0 @@
1
- runem/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- runem/__main__.py,sha256=dsOiVZegpfK9JOs5n7UmbX5iwwbj7iFkEbLoVeEgAn4,136
3
- runem/base.py,sha256=EZfR7FIlwEdU9Vfe47Wk2DOO8GQqpKxxLNKp6YHueZ4,316
4
- runem/cli.py,sha256=YFwon1P7uSpAYNuJxe2f0wo0HpI3OYTQ-UBWx6xU1iY,145
5
- runem/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- runem/run_command.py,sha256=SWFUxCwjkpeFjds9G7spR4Zu_DHDCAGHYPLaH5a5qWs,3671
7
- runem/runem.py,sha256=wmpTzbaVHGpKvg6m3CSxArrQ2pn_EovnGv-dvHGbB2c,34784
8
- scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
- runem-0.0.9.dist-info/LICENSE,sha256=awOCsWJ58m_2kBQwBUGWejVqZm6wuRtCL2hi9rfa0X4,1211
10
- runem-0.0.9.dist-info/METADATA,sha256=VsWMWKwkqJalZKHTsuSDkj5m8bxRS-_s49iAltD_jgs,14970
11
- runem-0.0.9.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
12
- runem-0.0.9.dist-info/entry_points.txt,sha256=nu0g_vBeuPihYtimbtlNusxWovylMppvJ8UxdJlJfvM,46
13
- runem-0.0.9.dist-info/top_level.txt,sha256=rd8MZEjuPdjwXuLZlbdZEg8_WGxrY1c8M36uHjNjbNk,14
14
- runem-0.0.9.dist-info/RECORD,,
File without changes