runem 0.0.31__tar.gz → 0.1.0__tar.gz

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.
Files changed (74) hide show
  1. {runem-0.0.31 → runem-0.1.0}/HISTORY.md +188 -0
  2. {runem-0.0.31 → runem-0.1.0}/MANIFEST.in +2 -0
  3. runem-0.1.0/PKG-INFO +155 -0
  4. runem-0.1.0/README.md +120 -0
  5. runem-0.1.0/requirements-test.txt +23 -0
  6. runem-0.1.0/requirements.txt +9 -0
  7. runem-0.1.0/runem/VERSION +1 -0
  8. {runem-0.0.31 → runem-0.1.0}/runem/command_line.py +86 -3
  9. {runem-0.0.31 → runem-0.1.0}/runem/files.py +26 -0
  10. {runem-0.0.31 → runem-0.1.0}/runem/hook_manager.py +4 -1
  11. {runem-0.0.31 → runem-0.1.0}/runem/job_execute.py +10 -6
  12. {runem-0.0.31 → runem-0.1.0}/runem/job_wrapper.py +1 -1
  13. {runem-0.0.31 → runem-0.1.0}/runem/runem.py +73 -35
  14. {runem-0.0.31 → runem-0.1.0}/runem/types.py +112 -7
  15. runem-0.1.0/runem.egg-info/PKG-INFO +155 -0
  16. {runem-0.0.31 → runem-0.1.0}/runem.egg-info/SOURCES.txt +2 -0
  17. {runem-0.0.31 → runem-0.1.0}/runem.egg-info/requires.txt +9 -7
  18. {runem-0.0.31 → runem-0.1.0}/setup.py +1 -1
  19. runem-0.1.0/tests/data/help_output.3.10.txt +79 -0
  20. runem-0.1.0/tests/data/help_output.3.11.txt +78 -0
  21. {runem-0.0.31 → runem-0.1.0}/tests/test_files.py +76 -4
  22. {runem-0.0.31 → runem-0.1.0}/tests/test_runem.py +53 -8
  23. runem-0.0.31/PKG-INFO +0 -689
  24. runem-0.0.31/README.md +0 -655
  25. runem-0.0.31/runem/VERSION +0 -1
  26. runem-0.0.31/runem.egg-info/PKG-INFO +0 -689
  27. runem-0.0.31/tests/data/help_output.3.10.txt +0 -77
  28. runem-0.0.31/tests/data/help_output.3.11.txt +0 -77
  29. {runem-0.0.31 → runem-0.1.0}/Containerfile +0 -0
  30. {runem-0.0.31 → runem-0.1.0}/LICENSE +0 -0
  31. {runem-0.0.31 → runem-0.1.0}/runem/__init__.py +0 -0
  32. {runem-0.0.31 → runem-0.1.0}/runem/__main__.py +0 -0
  33. {runem-0.0.31 → runem-0.1.0}/runem/base.py +0 -0
  34. {runem-0.0.31 → runem-0.1.0}/runem/blocking_print.py +0 -0
  35. {runem-0.0.31 → runem-0.1.0}/runem/cli/initialise_options.py +0 -0
  36. {runem-0.0.31 → runem-0.1.0}/runem/cli.py +0 -0
  37. {runem-0.0.31 → runem-0.1.0}/runem/config.py +0 -0
  38. {runem-0.0.31 → runem-0.1.0}/runem/config_metadata.py +0 -0
  39. {runem-0.0.31 → runem-0.1.0}/runem/config_parse.py +0 -0
  40. {runem-0.0.31 → runem-0.1.0}/runem/informative_dict.py +0 -0
  41. {runem-0.0.31 → runem-0.1.0}/runem/job.py +0 -0
  42. {runem-0.0.31 → runem-0.1.0}/runem/job_filter.py +0 -0
  43. {runem-0.0.31 → runem-0.1.0}/runem/job_runner_simple_command.py +0 -0
  44. {runem-0.0.31 → runem-0.1.0}/runem/job_wrapper_python.py +0 -0
  45. {runem-0.0.31 → runem-0.1.0}/runem/log.py +0 -0
  46. {runem-0.0.31 → runem-0.1.0}/runem/py.typed +0 -0
  47. {runem-0.0.31 → runem-0.1.0}/runem/report.py +0 -0
  48. {runem-0.0.31 → runem-0.1.0}/runem/run_command.py +0 -0
  49. {runem-0.0.31 → runem-0.1.0}/runem/runem_version.py +0 -0
  50. {runem-0.0.31 → runem-0.1.0}/runem/utils.py +0 -0
  51. {runem-0.0.31 → runem-0.1.0}/runem.egg-info/dependency_links.txt +0 -0
  52. {runem-0.0.31 → runem-0.1.0}/runem.egg-info/entry_points.txt +0 -0
  53. {runem-0.0.31 → runem-0.1.0}/runem.egg-info/top_level.txt +0 -0
  54. {runem-0.0.31 → runem-0.1.0}/setup.cfg +0 -0
  55. {runem-0.0.31 → runem-0.1.0}/tests/__init__.py +0 -0
  56. {runem-0.0.31 → runem-0.1.0}/tests/cli/test_initialise_options.py +0 -0
  57. {runem-0.0.31 → runem-0.1.0}/tests/conftest.py +0 -0
  58. {runem-0.0.31 → runem-0.1.0}/tests/intentional_test_error.py +0 -0
  59. {runem-0.0.31 → runem-0.1.0}/tests/sanitise_reports_footer.py +0 -0
  60. {runem-0.0.31 → runem-0.1.0}/tests/test_base.py +0 -0
  61. {runem-0.0.31 → runem-0.1.0}/tests/test_blocking_print.py +0 -0
  62. {runem-0.0.31 → runem-0.1.0}/tests/test_cli.py +0 -0
  63. {runem-0.0.31 → runem-0.1.0}/tests/test_config.py +0 -0
  64. {runem-0.0.31 → runem-0.1.0}/tests/test_config_parse.py +0 -0
  65. {runem-0.0.31 → runem-0.1.0}/tests/test_hook_manager.py +0 -0
  66. {runem-0.0.31 → runem-0.1.0}/tests/test_informative_dict.py +0 -0
  67. {runem-0.0.31 → runem-0.1.0}/tests/test_job.py +0 -0
  68. {runem-0.0.31 → runem-0.1.0}/tests/test_job_execute.py +0 -0
  69. {runem-0.0.31 → runem-0.1.0}/tests/test_job_filter.py +0 -0
  70. {runem-0.0.31 → runem-0.1.0}/tests/test_job_runner_simple_command.py +0 -0
  71. {runem-0.0.31 → runem-0.1.0}/tests/test_job_wrapper.py +0 -0
  72. {runem-0.0.31 → runem-0.1.0}/tests/test_job_wrapper_python.py +0 -0
  73. {runem-0.0.31 → runem-0.1.0}/tests/test_report.py +0 -0
  74. {runem-0.0.31 → runem-0.1.0}/tests/test_run_command.py +0 -0
@@ -4,6 +4,194 @@ Changelog
4
4
 
5
5
  (unreleased)
6
6
  ------------
7
+ - Merge pull request #57 from lursight/feat/replace_halo_with_rich.
8
+ [Frank Harrison]
9
+
10
+ feat(rich): moves to using rich instead of halo for spinners
11
+ - Feat(rich): moves to using rich instead of halo for spinners. [Frank
12
+ Harrison]
13
+ - Merge pull request #56 from lursight/feat/better_job_function_typing.
14
+ [Frank Harrison]
15
+
16
+ feat(better-job-function-typing): adds stronger typing for job and hook tasks
17
+ - Feat(better-job-function-typing): adds stronger typing for job and
18
+ hook tasks. [Frank Harrison]
19
+
20
+ We do this by typing the kwargs convenience variable, for which we need
21
+ to use `Unpack` (for back compatibility), and `type_extensions` for
22
+ cross-python-version compatibility (i.e. something that work for all
23
+ targeted version of python).
24
+
25
+ As a side-effect of this we get the benefit of seeing when and where we
26
+ add extra data into the call-stack for `job_execute()` and it emerges
27
+ that we only extend the key-word args when we are calling hooks in a
28
+ non-threaded way, which makes sense.
29
+
30
+ We do several things to achieve this:
31
+ 1. We have common parameters passed to both hooks and job-tasks
32
+ - These common parameters make the hooks and job-task feel similar
33
+ to develop.
34
+ 2. We put all hook-specific kwargs in one place, and mark each as
35
+ optional.
36
+ - this, for now, is mainly because we only have one hook, so this
37
+ will likely change.
38
+ 3. We share and combine kwargs in a range of inheritance types, mainly
39
+ to work with(/around?) python-typing, which isn't great in this
40
+ type of situation.
41
+ - Chore(ignores): adds the tox/ dir to the ignores. [Frank Harrison]
42
+ - Chore(ignores): update git ignore for coverage files and docs gen.
43
+ [Frank Harrison]
44
+
45
+ The docs are recent additions.
46
+ - Merge pull request #55 from lursight/chore/test_improvements. [Frank
47
+ Harrison]
48
+
49
+ Chore/test improvements
50
+ - Chore(coverage): reduce false-positives by deleteing old
51
+ coverage_report files. [Frank Harrison]
52
+
53
+ Sometimes we would have stale .coverage_report.* files left behind where
54
+ from the multi-distributed pytest runs. These would lead more lines
55
+ being reported as coverage than actual - aka false-positive test passes
56
+ for coverage.
57
+ - Chore(help-tests): fixes the help output width in tests. [Frank
58
+ Harrison]
59
+
60
+ This reduces false-negative test results where we get word-splits in
61
+ directories or between process counters or other dynamic content.
62
+
63
+ This was due to the width of the terminal when the test was being run
64
+ being variant with developer-machine. This uses a fixed-width output,
65
+ reducing, if not stopping issues.
66
+ - Chore(deps): updates black 24.3.0 -> 24.10.0. [Frank Harrison]
67
+ - Chore(deps): updates to latest pytest 8.1.1 -> 8.3.3 + plugins. [Frank
68
+ Harrison]
69
+
70
+
71
+ 0.0.32 (2024-11-17)
72
+ -------------------
73
+ - Release: version 0.0.32 🚀 [Frank Harrison]
74
+ - Merge pull request #54 from lursight/chore/use_tox_on_release. [Frank
75
+ Harrison]
76
+
77
+ chore(release): use tox on 'make release'
78
+ - Chore(release): use tox on 'make release' [Frank Harrison]
79
+
80
+ This will run the checks across all versions, hopefully making
81
+ everything more solid.
82
+ - Merge pull request #53 from lursight/dependabot/npm_and_yarn/cross-
83
+ spawn-7.0.5. [Frank Harrison]
84
+
85
+ chore(deps): bump cross-spawn from 7.0.3 to 7.0.5
86
+ - Chore(deps): bump cross-spawn from 7.0.3 to 7.0.5. [dependabot[bot]]
87
+
88
+ Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.5.
89
+ - [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
90
+ - [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.5)
91
+
92
+ ---
93
+ updated-dependencies:
94
+ - dependency-name: cross-spawn
95
+ dependency-type: indirect
96
+ ...
97
+ - Merge pull request #49 from
98
+ lursight/feat/allow_additional_files_to_be_checked. [Frank Harrison]
99
+
100
+ Feat/allow additional files to be checked
101
+ - Feat(file-controls): adds way to get files changed between branches.
102
+ [Frank Harrison]
103
+
104
+ This is useful if we want to do quick checks only on code that has
105
+ changed since 'main' when pushing, or on a sibling branch or similar.
106
+
107
+ For example, if we are using `--exec` in a rebase, we can start running
108
+ check half-way through the list of commits, instead of every commit, but
109
+ have the code check all files that have changes - meaning we can see the
110
+ impact of changes throughout the branch, without working on *every*
111
+ commit - sometimes this is very useful.
112
+ - Feat(file-controls): adds --always-files switch to force files to be
113
+ checked. [Frank Harrison]
114
+
115
+ Because of how we apply filters, filters for the files are applied
116
+ before they're passed to the relevant jobs.
117
+
118
+ This means that runem can now always check a subset of files, even if
119
+ they're not in the HEAD or staged files, meaning we can verify if some
120
+ files that we care about for a rebase or similar are copecetic.
121
+ - Merge pull request #52 from lursight/chore/pre-push_checks. [Frank
122
+ Harrison]
123
+
124
+ Chore/pre push checks
125
+ - Chore(tox): adds tox to run against multiple version of python on pre-
126
+ push. [Frank Harrison]
127
+ - Chore(pre-push-checks): adds a clean-checkout pre-push git hook.
128
+ [Frank Harrison]
129
+ - Chore(pre-push-checks): renames setup.py extras test -> tests. [Frank
130
+ Harrison]
131
+ - Chore(pre-push-checks): adds option to get the root-path from the cli.
132
+ [Frank Harrison]
133
+
134
+ This will support pre-push hooks amongst other things, replacing
135
+ ENV-variable that other projects I work on use.
136
+ - Chore(help-tests): fixes the tests when dirs are long. [Frank
137
+ Harrison]
138
+
139
+ If the dir-path was too long it would wrap and we could do a simple replace on it.
140
+ - Chore(help-tests): shows the failing output when the help comparrisons
141
+ fail. [Frank Harrison]
142
+ - Chore(help-tests): stops the help files being overwritten
143
+ unexpectedly. [Frank Harrison]
144
+ - Chore(typo): fixes argsparse -> argparse. [Frank Harrison]
145
+ - Chore(tox): runs checks against multiple targets of python using tox.
146
+ [Frank Harrison]
147
+ - Chore(yarn): unconditionally installs yarn deps, at least once, in
148
+ clean checkouts. [Frank Harrison]
149
+
150
+ Reminder that we use yarn because it's simpler and better for
151
+ spell-checking and git-hooks, mainly because the hooks get
152
+ auto-installed when the yarn deps are installed.
153
+ - Chore(pretty): updates docs config file missed formatting after
154
+ pervious PR. [Frank Harrison]
155
+ - Merge pull request #51 from lursight/chore/docs. [Frank Harrison]
156
+
157
+ Chore/docs
158
+ - Chore(better-docs): make links in README.md absolute to docs. [Frank
159
+ Harrison]
160
+ - Chore(better-docs): change label in docs badge to emoticon. [Frank
161
+ Harrison]
162
+ - Chore(better-docs): adds docs badge and moves others to top. [Frank
163
+ Harrison]
164
+ - Chore(better-docs): rewrites and restructures the docs. [Frank
165
+ Harrison]
166
+
167
+ We split README into multiple mark-down files in docs/ allowing github
168
+ pages to publish them via Jekyll.
169
+ - Chore(better-docs): configures Jekyll theme ahead of publish docs as
170
+ pages. [Frank Harrison]
171
+
172
+ We configure the docs in the root-dir so that the index of the Docs site
173
+ is the same-same as the README.md at the root of the checkout.
174
+ - Merge pull request #50 from
175
+ lursight/dependabot/npm_and_yarn/micromatch-4.0.8. [Frank Harrison]
176
+
177
+ chore(deps): bump micromatch from 4.0.5 to 4.0.8
178
+ - Chore(deps): bump micromatch from 4.0.5 to 4.0.8. [dependabot[bot]]
179
+
180
+ Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.5 to 4.0.8.
181
+ - [Release notes](https://github.com/micromatch/micromatch/releases)
182
+ - [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md)
183
+ - [Commits](https://github.com/micromatch/micromatch/compare/4.0.5...4.0.8)
184
+
185
+ ---
186
+ updated-dependencies:
187
+ - dependency-name: micromatch
188
+ dependency-type: indirect
189
+ ...
190
+
191
+
192
+ 0.0.31 (2024-04-20)
193
+ -------------------
194
+ - Release: version 0.0.31 🚀 [Frank Harrison]
7
195
  - Merge pull request #48 from
8
196
  lursight/feat/merge_head_and_modified_files_in_git. [Frank Harrison]
9
197
 
@@ -1,3 +1,5 @@
1
+ include requirements.txt
2
+ include requirements-test.txt
1
3
  include LICENSE
2
4
  include HISTORY.md
3
5
  include Containerfile
runem-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,155 @@
1
+ Metadata-Version: 2.1
2
+ Name: runem
3
+ Version: 0.1.0
4
+ Summary: Awesome runem created by lursight
5
+ Home-page: https://github.com/lursight/runem/
6
+ Author: lursight
7
+ Description-Content-Type: text/markdown
8
+ License-File: LICENSE
9
+ Requires-Dist: packaging
10
+ Requires-Dist: PyYAML
11
+ Requires-Dist: rich
12
+ Requires-Dist: typing_extensions
13
+ Provides-Extra: tests
14
+ Requires-Dist: black==24.10.0; extra == "tests"
15
+ Requires-Dist: coverage==7.5; extra == "tests"
16
+ Requires-Dist: docformatter==1.7.5; extra == "tests"
17
+ Requires-Dist: flake8-bugbear==24.2.6; extra == "tests"
18
+ Requires-Dist: flake8==7.0.0; extra == "tests"
19
+ Requires-Dist: gitchangelog==3.0.4; extra == "tests"
20
+ Requires-Dist: isort==5.13.2; extra == "tests"
21
+ Requires-Dist: mkdocs==1.5.3; extra == "tests"
22
+ Requires-Dist: mypy==1.9.0; extra == "tests"
23
+ Requires-Dist: pydocstyle==6.3.0; extra == "tests"
24
+ Requires-Dist: pylint==3.1.0; extra == "tests"
25
+ Requires-Dist: pylama==8.4.1; extra == "tests"
26
+ Requires-Dist: pytest-cov==6.0.0; extra == "tests"
27
+ Requires-Dist: pytest-profiling==1.7.0; extra == "tests"
28
+ Requires-Dist: pytest-xdist==3.6.1; extra == "tests"
29
+ Requires-Dist: pytest==8.3.3; extra == "tests"
30
+ Requires-Dist: setuptools; extra == "tests"
31
+ Requires-Dist: termplotlib==0.3.9; extra == "tests"
32
+ Requires-Dist: tox; extra == "tests"
33
+ Requires-Dist: types-PyYAML==6.0.12.20240311; extra == "tests"
34
+ Requires-Dist: requests-mock==1.11.0; extra == "tests"
35
+ Requires-Dist: types-setuptools; extra == "tests"
36
+
37
+ <!-- [![codecov](https://codecov.io/gh/lursight/runem/branch/main/graph/badge.svg?token=run-test_token_here)](https://codecov.io/gh/lursight/runem) -->
38
+ [![CI](https://github.com/lursight/runem/actions/workflows/main.yml/badge.svg)](https://github.com/lursight/runem/actions/workflows/main.yml)
39
+ [![DOCS](https://lursight.github.io/runem/docs/VIEW-DOCS-31c553.svg)](https://lursight.github.io/runem/)
40
+
41
+ # Run'em: Accelerate Your Development Workflow
42
+ **Boost Efficiency and Save Time**
43
+ Runem is a flexible, multi-process tool designed to speed up your everyday tasks by running them in parallel. Whether you're testing, linting, or deploying, runem helps you work smarter and faster.
44
+
45
+ ## Why Choose Run'em?
46
+ - **Streamlined Task Management**: Configure tasks with ease using declarative .runem.yml files.
47
+ - **Multiprocess Execution**: Run multiple tasks simultaneously, minimizing wall-clock time.
48
+ - **Optimized for Monorepos**: Supports multiple projects and task types, with easy filtering and configuration.
49
+ - **Detailed Reporting**: Get insights into task execution time and efficiency gains.
50
+
51
+ ## Contents
52
+ - [Run'em: Accelerate Your Development Workflow](#runem-accelerate-your-development-workflow)
53
+ - [Why Choose Run'em?](#why-choose-runem)
54
+ - [Contents](#contents)
55
+ - [Features At A Glance:](#features-at-a-glance)
56
+ - [Using Run'em](#using-runem)
57
+ - [Installation](#installation)
58
+ - [Quick-start](#quick-start)
59
+ - [Basic quick-start](#basic-quick-start)
60
+ - [A more complete quick-start](#a-more-complete-quick-start)
61
+ - [Basic Use](#basic-use)
62
+ - [Advanced Use](#advanced-use)
63
+ - [Advanced configuration options](#advanced-configuration-options)
64
+ - [Custom reports](#custom-reports)
65
+ - [Help and job discovery](#help-and-job-discovery)
66
+ - [Troubleshooting](#troubleshooting)
67
+ - [Contributing to and supporting runem](#contributing-to-and-supporting-runem)
68
+ - [Development](#development)
69
+ - [Sponsor](#sponsor)
70
+ - [About runem](#about-runem)
71
+
72
+
73
+ # Features At A Glance:
74
+ - **Tagging**: Easily run specific job groups (e.g., lint, test, python).
75
+ - **Phases**: Organize tasks by phase (e.g., edit, test, deploy).
76
+ - **Configurable Options**: Customize how jobs are executed using simple options.
77
+ - **Declarative**: Jobs are define using simple YAML in [.runem.yml](https://lursight.github.io/runem/docs/configuration.html) .
78
+
79
+ # Using Run'em
80
+
81
+ ## Installation
82
+
83
+ ```bash
84
+ pip install runem
85
+ ```
86
+
87
+ ## Quick-start
88
+
89
+ ## Basic quick-start
90
+ Create the following `.runem.yml` file at the root of your project:
91
+
92
+ ```yml
93
+ - job:
94
+ command: echo "hello world!"
95
+ ```
96
+
97
+ Then anywhere in your project run `runem` to see how and when that task is run, and how long it took:
98
+ ```bash
99
+ runem
100
+ ```
101
+
102
+ To see the actual log output you will need to use `--verbose` as `runem` hides anything that isn't important. Only failures and reports are considered important.
103
+ ```bash
104
+ # Or, to see "hello world!", use --verbose
105
+ runem --verbose # add --verbose to see the actual output
106
+ ```
107
+
108
+ To see how you can control your job use `--help`:
109
+ ```bash
110
+ runem --help
111
+ ```
112
+
113
+ ### A more complete quick-start
114
+
115
+ See [quick-start docs](https://lursight.github.io/runem/docs/quick_start.html) for more quick-start tips.
116
+
117
+ ## Basic Use
118
+
119
+ See [docs on basic use and use-cases](https://lursight.github.io/runem/docs/basic_use.html) for a comprehensive introduction.
120
+
121
+ ## Advanced Use
122
+
123
+ ### Advanced configuration options
124
+ See [configuration docs](https://lursight.github.io/runem/docs/configuration.html) for advanced configuration and use.
125
+
126
+ ### Custom reports
127
+ See [reporting docs](https://lursight.github.io/runem/docs/reports.html) for more information on how reporting works.
128
+
129
+
130
+ # Help and job discovery
131
+
132
+ `--help` is designed to help your team discover what jobs and tasks they can automated. Read more at
133
+ [help and discovery docs](https://lursight.github.io/runem/docs/help_and_job_discovery.html).
134
+
135
+ # Troubleshooting
136
+
137
+ See [troubleshooting and known issues docs](https://lursight.github.io/runem/docs/troubleshooting_known_issues.html).
138
+
139
+ ---
140
+ # Contributing to and supporting runem
141
+
142
+ Awesome runem created by lursight
143
+
144
+ ## Development
145
+
146
+ Read the [CONTRIBUTING.md](CONTRIBUTING.md) file.
147
+
148
+ ## Sponsor
149
+
150
+ [❤️ Sponsor this project](https://github.com/sponsors/lursight/)
151
+
152
+ # About runem
153
+ The runem mission is to improve developer velocity at
154
+ [Lursight Ltd.](https://lursight.com), read more about the runem
155
+ [mission](https://lursight.github.io/runem/docs/mission.html).
runem-0.1.0/README.md ADDED
@@ -0,0 +1,120 @@
1
+ <!-- [![codecov](https://codecov.io/gh/lursight/runem/branch/main/graph/badge.svg?token=run-test_token_here)](https://codecov.io/gh/lursight/runem) -->
2
+ [![CI](https://github.com/lursight/runem/actions/workflows/main.yml/badge.svg)](https://github.com/lursight/runem/actions/workflows/main.yml)
3
+ [![DOCS](https://lursight.github.io/runem/docs/VIEW-DOCS-31c553.svg)](https://lursight.github.io/runem/)
4
+
5
+ # Run'em: Accelerate Your Development Workflow
6
+ **Boost Efficiency and Save Time**
7
+ Runem is a flexible, multi-process tool designed to speed up your everyday tasks by running them in parallel. Whether you're testing, linting, or deploying, runem helps you work smarter and faster.
8
+
9
+ ## Why Choose Run'em?
10
+ - **Streamlined Task Management**: Configure tasks with ease using declarative .runem.yml files.
11
+ - **Multiprocess Execution**: Run multiple tasks simultaneously, minimizing wall-clock time.
12
+ - **Optimized for Monorepos**: Supports multiple projects and task types, with easy filtering and configuration.
13
+ - **Detailed Reporting**: Get insights into task execution time and efficiency gains.
14
+
15
+ ## Contents
16
+ - [Run'em: Accelerate Your Development Workflow](#runem-accelerate-your-development-workflow)
17
+ - [Why Choose Run'em?](#why-choose-runem)
18
+ - [Contents](#contents)
19
+ - [Features At A Glance:](#features-at-a-glance)
20
+ - [Using Run'em](#using-runem)
21
+ - [Installation](#installation)
22
+ - [Quick-start](#quick-start)
23
+ - [Basic quick-start](#basic-quick-start)
24
+ - [A more complete quick-start](#a-more-complete-quick-start)
25
+ - [Basic Use](#basic-use)
26
+ - [Advanced Use](#advanced-use)
27
+ - [Advanced configuration options](#advanced-configuration-options)
28
+ - [Custom reports](#custom-reports)
29
+ - [Help and job discovery](#help-and-job-discovery)
30
+ - [Troubleshooting](#troubleshooting)
31
+ - [Contributing to and supporting runem](#contributing-to-and-supporting-runem)
32
+ - [Development](#development)
33
+ - [Sponsor](#sponsor)
34
+ - [About runem](#about-runem)
35
+
36
+
37
+ # Features At A Glance:
38
+ - **Tagging**: Easily run specific job groups (e.g., lint, test, python).
39
+ - **Phases**: Organize tasks by phase (e.g., edit, test, deploy).
40
+ - **Configurable Options**: Customize how jobs are executed using simple options.
41
+ - **Declarative**: Jobs are define using simple YAML in [.runem.yml](https://lursight.github.io/runem/docs/configuration.html) .
42
+
43
+ # Using Run'em
44
+
45
+ ## Installation
46
+
47
+ ```bash
48
+ pip install runem
49
+ ```
50
+
51
+ ## Quick-start
52
+
53
+ ## Basic quick-start
54
+ Create the following `.runem.yml` file at the root of your project:
55
+
56
+ ```yml
57
+ - job:
58
+ command: echo "hello world!"
59
+ ```
60
+
61
+ Then anywhere in your project run `runem` to see how and when that task is run, and how long it took:
62
+ ```bash
63
+ runem
64
+ ```
65
+
66
+ To see the actual log output you will need to use `--verbose` as `runem` hides anything that isn't important. Only failures and reports are considered important.
67
+ ```bash
68
+ # Or, to see "hello world!", use --verbose
69
+ runem --verbose # add --verbose to see the actual output
70
+ ```
71
+
72
+ To see how you can control your job use `--help`:
73
+ ```bash
74
+ runem --help
75
+ ```
76
+
77
+ ### A more complete quick-start
78
+
79
+ See [quick-start docs](https://lursight.github.io/runem/docs/quick_start.html) for more quick-start tips.
80
+
81
+ ## Basic Use
82
+
83
+ See [docs on basic use and use-cases](https://lursight.github.io/runem/docs/basic_use.html) for a comprehensive introduction.
84
+
85
+ ## Advanced Use
86
+
87
+ ### Advanced configuration options
88
+ See [configuration docs](https://lursight.github.io/runem/docs/configuration.html) for advanced configuration and use.
89
+
90
+ ### Custom reports
91
+ See [reporting docs](https://lursight.github.io/runem/docs/reports.html) for more information on how reporting works.
92
+
93
+
94
+ # Help and job discovery
95
+
96
+ `--help` is designed to help your team discover what jobs and tasks they can automated. Read more at
97
+ [help and discovery docs](https://lursight.github.io/runem/docs/help_and_job_discovery.html).
98
+
99
+ # Troubleshooting
100
+
101
+ See [troubleshooting and known issues docs](https://lursight.github.io/runem/docs/troubleshooting_known_issues.html).
102
+
103
+ ---
104
+ # Contributing to and supporting runem
105
+
106
+ Awesome runem created by lursight
107
+
108
+ ## Development
109
+
110
+ Read the [CONTRIBUTING.md](CONTRIBUTING.md) file.
111
+
112
+ ## Sponsor
113
+
114
+ [❤️ Sponsor this project](https://github.com/sponsors/lursight/)
115
+
116
+ # About runem
117
+ The runem mission is to improve developer velocity at
118
+ [Lursight Ltd.](https://lursight.com), read more about the runem
119
+ [mission](https://lursight.github.io/runem/docs/mission.html).
120
+
@@ -0,0 +1,23 @@
1
+ # This requirements are for development and testing only, not for production.
2
+ black==24.10.0
3
+ coverage==7.5
4
+ docformatter==1.7.5
5
+ flake8-bugbear==24.2.6
6
+ flake8==7.0.0
7
+ gitchangelog==3.0.4
8
+ isort==5.13.2
9
+ mkdocs==1.5.3
10
+ mypy==1.9.0
11
+ pydocstyle==6.3.0
12
+ pylint==3.1.0
13
+ pylama==8.4.1
14
+ pytest-cov==6.0.0
15
+ pytest-profiling==1.7.0
16
+ pytest-xdist==3.6.1
17
+ pytest==8.3.3
18
+ setuptools
19
+ termplotlib==0.3.9
20
+ tox
21
+ types-PyYAML==6.0.12.20240311
22
+ requests-mock==1.11.0
23
+ types-setuptools
@@ -0,0 +1,9 @@
1
+ packaging
2
+ PyYAML
3
+
4
+ # For UI Elements
5
+ rich
6
+
7
+ # For pre python3.12 Unpack features we need the `typing_extensions` module to
8
+ # be installed.
9
+ typing_extensions
@@ -0,0 +1 @@
1
+ 0.1.0
@@ -12,6 +12,45 @@ from runem.types import JobNames, OptionConfig, OptionsWritable
12
12
  from runem.utils import printable_set
13
13
 
14
14
 
15
+ class HelpFormatterFixedWidth(argparse.HelpFormatter):
16
+ """This works around test issues via constant width helo output.
17
+
18
+ This ensures that we get more constant for help-text by fixing the width to
19
+ something reasonable.
20
+ """
21
+
22
+ def __init__(self, prog: typing.Any) -> None:
23
+ # Override the default width with a fixed width, for tests.
24
+ super().__init__(
25
+ prog,
26
+ # Pretty wide so we do not get wrapping on directories
27
+ # or process-count output.
28
+ width=1000,
29
+ )
30
+
31
+
32
+ def _get_argparse_help_formatter() -> typing.Any:
33
+ """Returns a help-formatter for argparse.
34
+
35
+ This is for tests only to fake terminals of a constant with when rendering help
36
+ output.
37
+ """
38
+ # Check environment variable to see if we're in tests and need a fixed width
39
+ # help output.
40
+ use_fixed_width = os.getenv("RUNEM_FIXED_HELP_WIDTH", None)
41
+
42
+ if use_fixed_width:
43
+ # Use custom formatter with the width specified in the environment variable
44
+ return (
45
+ lambda prog: HelpFormatterFixedWidth( # pylint: disable=unnecessary-lambda
46
+ prog
47
+ )
48
+ )
49
+
50
+ # Use default formatter
51
+ return argparse.HelpFormatter
52
+
53
+
15
54
  def parse_args(
16
55
  config_metadata: ConfigMetadata, argv: typing.List[str]
17
56
  ) -> ConfigMetadata:
@@ -23,7 +62,9 @@ def parse_args(
23
62
  Returns the parsed args, the jobs_names_to_run, job_phases_to_run, job_tags_to_run
24
63
  """
25
64
  parser = argparse.ArgumentParser(
26
- add_help=False, description="Runs the Lursight Lang test-suite"
65
+ add_help=False,
66
+ description="Runs the Lursight Lang test-suite",
67
+ formatter_class=_get_argparse_help_formatter(),
27
68
  )
28
69
  parser.add_argument(
29
70
  "-H", "--help", action="help", help="show this help message and exit"
@@ -136,6 +177,29 @@ def parse_args(
136
177
  default=False,
137
178
  required=False,
138
179
  )
180
+ parser.add_argument(
181
+ "--always-files",
182
+ dest="always_files",
183
+ help=(
184
+ "list of paths/files to always check (overriding -f/-h), if the path "
185
+ "matches the filter regex and if file-paths exist"
186
+ ),
187
+ nargs="+",
188
+ default=None,
189
+ required=False,
190
+ )
191
+
192
+ parser.add_argument(
193
+ "--git-files-since-branch",
194
+ dest="git_since_branch",
195
+ help=(
196
+ "Get the list of paths/files changed between a branch, e.g., since "
197
+ "'origin/main'. Useful for checking files changed before pushing."
198
+ ),
199
+ default=None, # Default to None if no branch is specified
200
+ required=False, # Not required, users may not want to specify a branch
201
+ type=str, # Accepts a string input representing the branch name
202
+ )
139
203
 
140
204
  parser.add_argument(
141
205
  "--procs",
@@ -151,7 +215,7 @@ def parse_args(
151
215
  type=int,
152
216
  )
153
217
 
154
- config_dir: pathlib.Path = config_metadata.cfg_filepath.parent
218
+ config_dir: pathlib.Path = _get_config_dir(config_metadata)
155
219
  parser.add_argument(
156
220
  "--root",
157
221
  dest="root_dir",
@@ -163,6 +227,15 @@ def parse_args(
163
227
  required=False,
164
228
  )
165
229
 
230
+ parser.add_argument(
231
+ "--root-show",
232
+ dest="show_root_path_and_exit",
233
+ help="show the root-path of runem and exit",
234
+ action=argparse.BooleanOptionalAction,
235
+ default=False,
236
+ required=False,
237
+ )
238
+
166
239
  parser.add_argument(
167
240
  "--spinner",
168
241
  dest="show_spinner",
@@ -196,6 +269,11 @@ def parse_args(
196
269
 
197
270
  args = parser.parse_args(argv[1:])
198
271
 
272
+ if args.show_root_path_and_exit:
273
+ log(str(config_metadata.cfg_filepath.parent), decorate=False)
274
+ # cleanly exit
275
+ sys.exit(0)
276
+
199
277
  if args.show_version_and_exit:
200
278
  log(str(get_runem_version()), decorate=False)
201
279
  # cleanly exit
@@ -219,6 +297,11 @@ def parse_args(
219
297
  return config_metadata
220
298
 
221
299
 
300
+ def _get_config_dir(config_metadata: ConfigMetadata) -> pathlib.Path:
301
+ """A function to get the path, that we can mock in tests."""
302
+ return config_metadata.cfg_filepath.parent
303
+
304
+
222
305
  def _validate_filters(
223
306
  config_metadata: ConfigMetadata,
224
307
  args: argparse.Namespace,
@@ -338,7 +421,7 @@ def _define_option_args(
338
421
 
339
422
 
340
423
  def _alias_to_switch(switch_name_alias: str, negatise: bool = False) -> str:
341
- """Util function to generate a alias switch for argsparse."""
424
+ """Util function to generate a alias switch for argparse."""
342
425
  single_letter_variant = not negatise and len(switch_name_alias) == 1
343
426
  if single_letter_variant:
344
427
  return f"-{switch_name_alias}"