runem 0.0.31__tar.gz → 0.0.32__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.
- {runem-0.0.31 → runem-0.0.32}/HISTORY.md +121 -0
- {runem-0.0.31 → runem-0.0.32}/MANIFEST.in +2 -0
- runem-0.0.32/PKG-INFO +154 -0
- runem-0.0.32/README.md +120 -0
- runem-0.0.32/requirements-test.txt +23 -0
- runem-0.0.32/requirements.txt +3 -0
- runem-0.0.32/runem/VERSION +1 -0
- {runem-0.0.31 → runem-0.0.32}/runem/command_line.py +44 -2
- {runem-0.0.31 → runem-0.0.32}/runem/files.py +26 -0
- runem-0.0.32/runem.egg-info/PKG-INFO +154 -0
- {runem-0.0.31 → runem-0.0.32}/runem.egg-info/SOURCES.txt +2 -0
- {runem-0.0.31 → runem-0.0.32}/runem.egg-info/requires.txt +2 -1
- {runem-0.0.31 → runem-0.0.32}/setup.py +1 -1
- runem-0.0.32/tests/data/help_output.3.10.txt +79 -0
- runem-0.0.32/tests/data/help_output.3.11.txt +78 -0
- {runem-0.0.31 → runem-0.0.32}/tests/test_files.py +76 -4
- {runem-0.0.31 → runem-0.0.32}/tests/test_runem.py +51 -8
- runem-0.0.31/PKG-INFO +0 -689
- runem-0.0.31/README.md +0 -655
- runem-0.0.31/runem/VERSION +0 -1
- runem-0.0.31/runem.egg-info/PKG-INFO +0 -689
- runem-0.0.31/tests/data/help_output.3.10.txt +0 -77
- runem-0.0.31/tests/data/help_output.3.11.txt +0 -77
- {runem-0.0.31 → runem-0.0.32}/Containerfile +0 -0
- {runem-0.0.31 → runem-0.0.32}/LICENSE +0 -0
- {runem-0.0.31 → runem-0.0.32}/runem/__init__.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/runem/__main__.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/runem/base.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/runem/blocking_print.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/runem/cli/initialise_options.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/runem/cli.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/runem/config.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/runem/config_metadata.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/runem/config_parse.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/runem/hook_manager.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/runem/informative_dict.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/runem/job.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/runem/job_execute.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/runem/job_filter.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/runem/job_runner_simple_command.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/runem/job_wrapper.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/runem/job_wrapper_python.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/runem/log.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/runem/py.typed +0 -0
- {runem-0.0.31 → runem-0.0.32}/runem/report.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/runem/run_command.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/runem/runem.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/runem/runem_version.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/runem/types.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/runem/utils.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/runem.egg-info/dependency_links.txt +0 -0
- {runem-0.0.31 → runem-0.0.32}/runem.egg-info/entry_points.txt +0 -0
- {runem-0.0.31 → runem-0.0.32}/runem.egg-info/top_level.txt +0 -0
- {runem-0.0.31 → runem-0.0.32}/setup.cfg +0 -0
- {runem-0.0.31 → runem-0.0.32}/tests/__init__.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/tests/cli/test_initialise_options.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/tests/conftest.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/tests/intentional_test_error.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/tests/sanitise_reports_footer.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/tests/test_base.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/tests/test_blocking_print.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/tests/test_cli.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/tests/test_config.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/tests/test_config_parse.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/tests/test_hook_manager.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/tests/test_informative_dict.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/tests/test_job.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/tests/test_job_execute.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/tests/test_job_filter.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/tests/test_job_runner_simple_command.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/tests/test_job_wrapper.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/tests/test_job_wrapper_python.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/tests/test_report.py +0 -0
- {runem-0.0.31 → runem-0.0.32}/tests/test_run_command.py +0 -0
@@ -4,6 +4,127 @@ Changelog
|
|
4
4
|
|
5
5
|
(unreleased)
|
6
6
|
------------
|
7
|
+
- Merge pull request #54 from lursight/chore/use_tox_on_release. [Frank
|
8
|
+
Harrison]
|
9
|
+
|
10
|
+
chore(release): use tox on 'make release'
|
11
|
+
- Chore(release): use tox on 'make release' [Frank Harrison]
|
12
|
+
|
13
|
+
This will run the checks across all versions, hopefully making
|
14
|
+
everything more solid.
|
15
|
+
- Merge pull request #53 from lursight/dependabot/npm_and_yarn/cross-
|
16
|
+
spawn-7.0.5. [Frank Harrison]
|
17
|
+
|
18
|
+
chore(deps): bump cross-spawn from 7.0.3 to 7.0.5
|
19
|
+
- Chore(deps): bump cross-spawn from 7.0.3 to 7.0.5. [dependabot[bot]]
|
20
|
+
|
21
|
+
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.5.
|
22
|
+
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
|
23
|
+
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.5)
|
24
|
+
|
25
|
+
---
|
26
|
+
updated-dependencies:
|
27
|
+
- dependency-name: cross-spawn
|
28
|
+
dependency-type: indirect
|
29
|
+
...
|
30
|
+
- Merge pull request #49 from
|
31
|
+
lursight/feat/allow_additional_files_to_be_checked. [Frank Harrison]
|
32
|
+
|
33
|
+
Feat/allow additional files to be checked
|
34
|
+
- Feat(file-controls): adds way to get files changed between branches.
|
35
|
+
[Frank Harrison]
|
36
|
+
|
37
|
+
This is useful if we want to do quick checks only on code that has
|
38
|
+
changed since 'main' when pushing, or on a sibling branch or similar.
|
39
|
+
|
40
|
+
For example, if we are using `--exec` in a rebase, we can start running
|
41
|
+
check half-way through the list of commits, instead of every commit, but
|
42
|
+
have the code check all files that have changes - meaning we can see the
|
43
|
+
impact of changes throughout the branch, without working on *every*
|
44
|
+
commit - sometimes this is very useful.
|
45
|
+
- Feat(file-controls): adds --always-files switch to force files to be
|
46
|
+
checked. [Frank Harrison]
|
47
|
+
|
48
|
+
Because of how we apply filters, filters for the files are applied
|
49
|
+
before they're passed to the relevant jobs.
|
50
|
+
|
51
|
+
This means that runem can now always check a subset of files, even if
|
52
|
+
they're not in the HEAD or staged files, meaning we can verify if some
|
53
|
+
files that we care about for a rebase or similar are copecetic.
|
54
|
+
- Merge pull request #52 from lursight/chore/pre-push_checks. [Frank
|
55
|
+
Harrison]
|
56
|
+
|
57
|
+
Chore/pre push checks
|
58
|
+
- Chore(tox): adds tox to run against multiple version of python on pre-
|
59
|
+
push. [Frank Harrison]
|
60
|
+
- Chore(pre-push-checks): adds a clean-checkout pre-push git hook.
|
61
|
+
[Frank Harrison]
|
62
|
+
- Chore(pre-push-checks): renames setup.py extras test -> tests. [Frank
|
63
|
+
Harrison]
|
64
|
+
- Chore(pre-push-checks): adds option to get the root-path from the cli.
|
65
|
+
[Frank Harrison]
|
66
|
+
|
67
|
+
This will support pre-push hooks amongst other things, replacing
|
68
|
+
ENV-variable that other projects I work on use.
|
69
|
+
- Chore(help-tests): fixes the tests when dirs are long. [Frank
|
70
|
+
Harrison]
|
71
|
+
|
72
|
+
If the dir-path was too long it would wrap and we could do a simple replace on it.
|
73
|
+
- Chore(help-tests): shows the failing output when the help comparrisons
|
74
|
+
fail. [Frank Harrison]
|
75
|
+
- Chore(help-tests): stops the help files being overwritten
|
76
|
+
unexpectedly. [Frank Harrison]
|
77
|
+
- Chore(typo): fixes argsparse -> argparse. [Frank Harrison]
|
78
|
+
- Chore(tox): runs checks against multiple targets of python using tox.
|
79
|
+
[Frank Harrison]
|
80
|
+
- Chore(yarn): unconditionally installs yarn deps, at least once, in
|
81
|
+
clean checkouts. [Frank Harrison]
|
82
|
+
|
83
|
+
Reminder that we use yarn because it's simpler and better for
|
84
|
+
spell-checking and git-hooks, mainly because the hooks get
|
85
|
+
auto-installed when the yarn deps are installed.
|
86
|
+
- Chore(pretty): updates docs config file missed formatting after
|
87
|
+
pervious PR. [Frank Harrison]
|
88
|
+
- Merge pull request #51 from lursight/chore/docs. [Frank Harrison]
|
89
|
+
|
90
|
+
Chore/docs
|
91
|
+
- Chore(better-docs): make links in README.md absolute to docs. [Frank
|
92
|
+
Harrison]
|
93
|
+
- Chore(better-docs): change label in docs badge to emoticon. [Frank
|
94
|
+
Harrison]
|
95
|
+
- Chore(better-docs): adds docs badge and moves others to top. [Frank
|
96
|
+
Harrison]
|
97
|
+
- Chore(better-docs): rewrites and restructures the docs. [Frank
|
98
|
+
Harrison]
|
99
|
+
|
100
|
+
We split README into multiple mark-down files in docs/ allowing github
|
101
|
+
pages to publish them via Jekyll.
|
102
|
+
- Chore(better-docs): configures Jekyll theme ahead of publish docs as
|
103
|
+
pages. [Frank Harrison]
|
104
|
+
|
105
|
+
We configure the docs in the root-dir so that the index of the Docs site
|
106
|
+
is the same-same as the README.md at the root of the checkout.
|
107
|
+
- Merge pull request #50 from
|
108
|
+
lursight/dependabot/npm_and_yarn/micromatch-4.0.8. [Frank Harrison]
|
109
|
+
|
110
|
+
chore(deps): bump micromatch from 4.0.5 to 4.0.8
|
111
|
+
- Chore(deps): bump micromatch from 4.0.5 to 4.0.8. [dependabot[bot]]
|
112
|
+
|
113
|
+
Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.5 to 4.0.8.
|
114
|
+
- [Release notes](https://github.com/micromatch/micromatch/releases)
|
115
|
+
- [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md)
|
116
|
+
- [Commits](https://github.com/micromatch/micromatch/compare/4.0.5...4.0.8)
|
117
|
+
|
118
|
+
---
|
119
|
+
updated-dependencies:
|
120
|
+
- dependency-name: micromatch
|
121
|
+
dependency-type: indirect
|
122
|
+
...
|
123
|
+
|
124
|
+
|
125
|
+
0.0.31 (2024-04-20)
|
126
|
+
-------------------
|
127
|
+
- Release: version 0.0.31 🚀 [Frank Harrison]
|
7
128
|
- Merge pull request #48 from
|
8
129
|
lursight/feat/merge_head_and_modified_files_in_git. [Frank Harrison]
|
9
130
|
|
runem-0.0.32/PKG-INFO
ADDED
@@ -0,0 +1,154 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: runem
|
3
|
+
Version: 0.0.32
|
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: halo
|
10
|
+
Requires-Dist: packaging
|
11
|
+
Requires-Dist: PyYAML
|
12
|
+
Provides-Extra: tests
|
13
|
+
Requires-Dist: black==24.3.0; extra == "tests"
|
14
|
+
Requires-Dist: coverage==7.4.4; extra == "tests"
|
15
|
+
Requires-Dist: docformatter==1.7.5; extra == "tests"
|
16
|
+
Requires-Dist: flake8-bugbear==24.2.6; extra == "tests"
|
17
|
+
Requires-Dist: flake8==7.0.0; extra == "tests"
|
18
|
+
Requires-Dist: gitchangelog==3.0.4; extra == "tests"
|
19
|
+
Requires-Dist: isort==5.13.2; extra == "tests"
|
20
|
+
Requires-Dist: mkdocs==1.5.3; extra == "tests"
|
21
|
+
Requires-Dist: mypy==1.9.0; extra == "tests"
|
22
|
+
Requires-Dist: pydocstyle==6.3.0; extra == "tests"
|
23
|
+
Requires-Dist: pylint==3.1.0; extra == "tests"
|
24
|
+
Requires-Dist: pylama==8.4.1; extra == "tests"
|
25
|
+
Requires-Dist: pytest-cov==4.1.0; extra == "tests"
|
26
|
+
Requires-Dist: pytest-profiling==1.7.0; extra == "tests"
|
27
|
+
Requires-Dist: pytest-xdist==3.5.0; extra == "tests"
|
28
|
+
Requires-Dist: pytest==8.1.1; extra == "tests"
|
29
|
+
Requires-Dist: setuptools; extra == "tests"
|
30
|
+
Requires-Dist: termplotlib==0.3.9; extra == "tests"
|
31
|
+
Requires-Dist: tox; extra == "tests"
|
32
|
+
Requires-Dist: types-PyYAML==6.0.12.20240311; extra == "tests"
|
33
|
+
Requires-Dist: requests-mock==1.11.0; extra == "tests"
|
34
|
+
Requires-Dist: types-setuptools; extra == "tests"
|
35
|
+
|
36
|
+
<!-- [](https://codecov.io/gh/lursight/runem) -->
|
37
|
+
[](https://github.com/lursight/runem/actions/workflows/main.yml)
|
38
|
+
[](https://lursight.github.io/runem/)
|
39
|
+
|
40
|
+
# Run'em: Accelerate Your Development Workflow
|
41
|
+
**Boost Efficiency and Save Time**
|
42
|
+
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.
|
43
|
+
|
44
|
+
## Why Choose Run'em?
|
45
|
+
- **Streamlined Task Management**: Configure tasks with ease using declarative .runem.yml files.
|
46
|
+
- **Multiprocess Execution**: Run multiple tasks simultaneously, minimizing wall-clock time.
|
47
|
+
- **Optimized for Monorepos**: Supports multiple projects and task types, with easy filtering and configuration.
|
48
|
+
- **Detailed Reporting**: Get insights into task execution time and efficiency gains.
|
49
|
+
|
50
|
+
## Contents
|
51
|
+
- [Run'em: Accelerate Your Development Workflow](#runem-accelerate-your-development-workflow)
|
52
|
+
- [Why Choose Run'em?](#why-choose-runem)
|
53
|
+
- [Contents](#contents)
|
54
|
+
- [Features At A Glance:](#features-at-a-glance)
|
55
|
+
- [Using Run'em](#using-runem)
|
56
|
+
- [Installation](#installation)
|
57
|
+
- [Quick-start](#quick-start)
|
58
|
+
- [Basic quick-start](#basic-quick-start)
|
59
|
+
- [A more complete quick-start](#a-more-complete-quick-start)
|
60
|
+
- [Basic Use](#basic-use)
|
61
|
+
- [Advanced Use](#advanced-use)
|
62
|
+
- [Advanced configuration options](#advanced-configuration-options)
|
63
|
+
- [Custom reports](#custom-reports)
|
64
|
+
- [Help and job discovery](#help-and-job-discovery)
|
65
|
+
- [Troubleshooting](#troubleshooting)
|
66
|
+
- [Contributing to and supporting runem](#contributing-to-and-supporting-runem)
|
67
|
+
- [Development](#development)
|
68
|
+
- [Sponsor](#sponsor)
|
69
|
+
- [About runem](#about-runem)
|
70
|
+
|
71
|
+
|
72
|
+
# Features At A Glance:
|
73
|
+
- **Tagging**: Easily run specific job groups (e.g., lint, test, python).
|
74
|
+
- **Phases**: Organize tasks by phase (e.g., edit, test, deploy).
|
75
|
+
- **Configurable Options**: Customize how jobs are executed using simple options.
|
76
|
+
- **Declarative**: Jobs are define using simple YAML in [.runem.yml](https://lursight.github.io/runem/docs/configuration.html) .
|
77
|
+
|
78
|
+
# Using Run'em
|
79
|
+
|
80
|
+
## Installation
|
81
|
+
|
82
|
+
```bash
|
83
|
+
pip install runem
|
84
|
+
```
|
85
|
+
|
86
|
+
## Quick-start
|
87
|
+
|
88
|
+
## Basic quick-start
|
89
|
+
Create the following `.runem.yml` file at the root of your project:
|
90
|
+
|
91
|
+
```yml
|
92
|
+
- job:
|
93
|
+
command: echo "hello world!"
|
94
|
+
```
|
95
|
+
|
96
|
+
Then anywhere in your project run `runem` to see how and when that task is run, and how long it took:
|
97
|
+
```bash
|
98
|
+
runem
|
99
|
+
```
|
100
|
+
|
101
|
+
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.
|
102
|
+
```bash
|
103
|
+
# Or, to see "hello world!", use --verbose
|
104
|
+
runem --verbose # add --verbose to see the actual output
|
105
|
+
```
|
106
|
+
|
107
|
+
To see how you can control your job use `--help`:
|
108
|
+
```bash
|
109
|
+
runem --help
|
110
|
+
```
|
111
|
+
|
112
|
+
### A more complete quick-start
|
113
|
+
|
114
|
+
See [quick-start docs](https://lursight.github.io/runem/docs/quick_start.html) for more quick-start tips.
|
115
|
+
|
116
|
+
## Basic Use
|
117
|
+
|
118
|
+
See [docs on basic use and use-cases](https://lursight.github.io/runem/docs/basic_use.html) for a comprehensive introduction.
|
119
|
+
|
120
|
+
## Advanced Use
|
121
|
+
|
122
|
+
### Advanced configuration options
|
123
|
+
See [configuration docs](https://lursight.github.io/runem/docs/configuration.html) for advanced configuration and use.
|
124
|
+
|
125
|
+
### Custom reports
|
126
|
+
See [reporting docs](https://lursight.github.io/runem/docs/reports.html) for more information on how reporting works.
|
127
|
+
|
128
|
+
|
129
|
+
# Help and job discovery
|
130
|
+
|
131
|
+
`--help` is designed to help your team discover what jobs and tasks they can automated. Read more at
|
132
|
+
[help and discovery docs](https://lursight.github.io/runem/docs/help_and_job_discovery.html).
|
133
|
+
|
134
|
+
# Troubleshooting
|
135
|
+
|
136
|
+
See [troubleshooting and known issues docs](https://lursight.github.io/runem/docs/troubleshooting_known_issues.html).
|
137
|
+
|
138
|
+
---
|
139
|
+
# Contributing to and supporting runem
|
140
|
+
|
141
|
+
Awesome runem created by lursight
|
142
|
+
|
143
|
+
## Development
|
144
|
+
|
145
|
+
Read the [CONTRIBUTING.md](CONTRIBUTING.md) file.
|
146
|
+
|
147
|
+
## Sponsor
|
148
|
+
|
149
|
+
[❤️ Sponsor this project](https://github.com/sponsors/lursight/)
|
150
|
+
|
151
|
+
# About runem
|
152
|
+
The runem mission is to improve developer velocity at
|
153
|
+
[Lursight Ltd.](https://lursight.com), read more about the runem
|
154
|
+
[mission](https://lursight.github.io/runem/docs/mission.html).
|
runem-0.0.32/README.md
ADDED
@@ -0,0 +1,120 @@
|
|
1
|
+
<!-- [](https://codecov.io/gh/lursight/runem) -->
|
2
|
+
[](https://github.com/lursight/runem/actions/workflows/main.yml)
|
3
|
+
[](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.3.0
|
3
|
+
coverage==7.4.4
|
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==4.1.0
|
15
|
+
pytest-profiling==1.7.0
|
16
|
+
pytest-xdist==3.5.0
|
17
|
+
pytest==8.1.1
|
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 @@
|
|
1
|
+
0.0.32
|
@@ -136,6 +136,29 @@ def parse_args(
|
|
136
136
|
default=False,
|
137
137
|
required=False,
|
138
138
|
)
|
139
|
+
parser.add_argument(
|
140
|
+
"--always-files",
|
141
|
+
dest="always_files",
|
142
|
+
help=(
|
143
|
+
"list of paths/files to always check (overriding -f/-h), if the path "
|
144
|
+
"matches the filter regex and if file-paths exist"
|
145
|
+
),
|
146
|
+
nargs="+",
|
147
|
+
default=None,
|
148
|
+
required=False,
|
149
|
+
)
|
150
|
+
|
151
|
+
parser.add_argument(
|
152
|
+
"--git-files-since-branch",
|
153
|
+
dest="git_since_branch",
|
154
|
+
help=(
|
155
|
+
"Get the list of paths/files changed between a branch, e.g., since "
|
156
|
+
"'origin/main'. Useful for checking files changed before pushing."
|
157
|
+
),
|
158
|
+
default=None, # Default to None if no branch is specified
|
159
|
+
required=False, # Not required, users may not want to specify a branch
|
160
|
+
type=str, # Accepts a string input representing the branch name
|
161
|
+
)
|
139
162
|
|
140
163
|
parser.add_argument(
|
141
164
|
"--procs",
|
@@ -151,7 +174,7 @@ def parse_args(
|
|
151
174
|
type=int,
|
152
175
|
)
|
153
176
|
|
154
|
-
config_dir: pathlib.Path = config_metadata
|
177
|
+
config_dir: pathlib.Path = _get_config_dir(config_metadata)
|
155
178
|
parser.add_argument(
|
156
179
|
"--root",
|
157
180
|
dest="root_dir",
|
@@ -163,6 +186,15 @@ def parse_args(
|
|
163
186
|
required=False,
|
164
187
|
)
|
165
188
|
|
189
|
+
parser.add_argument(
|
190
|
+
"--root-show",
|
191
|
+
dest="show_root_path_and_exit",
|
192
|
+
help="show the root-path of runem and exit",
|
193
|
+
action=argparse.BooleanOptionalAction,
|
194
|
+
default=False,
|
195
|
+
required=False,
|
196
|
+
)
|
197
|
+
|
166
198
|
parser.add_argument(
|
167
199
|
"--spinner",
|
168
200
|
dest="show_spinner",
|
@@ -196,6 +228,11 @@ def parse_args(
|
|
196
228
|
|
197
229
|
args = parser.parse_args(argv[1:])
|
198
230
|
|
231
|
+
if args.show_root_path_and_exit:
|
232
|
+
log(str(config_metadata.cfg_filepath.parent), decorate=False)
|
233
|
+
# cleanly exit
|
234
|
+
sys.exit(0)
|
235
|
+
|
199
236
|
if args.show_version_and_exit:
|
200
237
|
log(str(get_runem_version()), decorate=False)
|
201
238
|
# cleanly exit
|
@@ -219,6 +256,11 @@ def parse_args(
|
|
219
256
|
return config_metadata
|
220
257
|
|
221
258
|
|
259
|
+
def _get_config_dir(config_metadata: ConfigMetadata) -> pathlib.Path:
|
260
|
+
"""A function to get the path, that we can mock in tests."""
|
261
|
+
return config_metadata.cfg_filepath.parent
|
262
|
+
|
263
|
+
|
222
264
|
def _validate_filters(
|
223
265
|
config_metadata: ConfigMetadata,
|
224
266
|
args: argparse.Namespace,
|
@@ -338,7 +380,7 @@ def _define_option_args(
|
|
338
380
|
|
339
381
|
|
340
382
|
def _alias_to_switch(switch_name_alias: str, negatise: bool = False) -> str:
|
341
|
-
"""Util function to generate a alias switch for
|
383
|
+
"""Util function to generate a alias switch for argparse."""
|
342
384
|
single_letter_variant = not negatise and len(switch_name_alias) == 1
|
343
385
|
if single_letter_variant:
|
344
386
|
return f"-{switch_name_alias}"
|
@@ -29,6 +29,7 @@ def find_files(config_metadata: ConfigMetadata) -> FilePathListLookup:
|
|
29
29
|
if (
|
30
30
|
config_metadata.args.check_modified_files
|
31
31
|
or config_metadata.args.check_head_files
|
32
|
+
or (config_metadata.args.git_since_branch is not None)
|
32
33
|
):
|
33
34
|
if config_metadata.args.check_modified_files:
|
34
35
|
# get modified, un-staged files first
|
@@ -60,10 +61,25 @@ def find_files(config_metadata: ConfigMetadata) -> FilePathListLookup:
|
|
60
61
|
.decode("utf-8")
|
61
62
|
.splitlines()
|
62
63
|
)
|
64
|
+
|
65
|
+
if config_metadata.args.git_since_branch is not None:
|
66
|
+
# Add all files changed since a particular branch e..g `origin/main`
|
67
|
+
# Useful for quickly checking branches before pushing.
|
68
|
+
# NOTE: without dependency checking this might report false-positives.
|
69
|
+
target_branch: str = config_metadata.args.git_since_branch
|
70
|
+
file_paths.extend(
|
71
|
+
subprocess_check_output(
|
72
|
+
f"git diff --name-only {target_branch}...HEAD",
|
73
|
+
shell=True,
|
74
|
+
)
|
75
|
+
.decode("utf-8")
|
76
|
+
.splitlines()
|
77
|
+
)
|
63
78
|
# ensure files are unique, and still on disk i.e. filter-out deleted files
|
64
79
|
file_paths = list(
|
65
80
|
{file_path for file_path in file_paths if Path(file_path).exists()}
|
66
81
|
)
|
82
|
+
|
67
83
|
else:
|
68
84
|
# fall-back to all files
|
69
85
|
file_paths = (
|
@@ -74,6 +90,16 @@ def find_files(config_metadata: ConfigMetadata) -> FilePathListLookup:
|
|
74
90
|
.decode("utf-8")
|
75
91
|
.splitlines()
|
76
92
|
)
|
93
|
+
|
94
|
+
if config_metadata.args.always_files is not None:
|
95
|
+
# a poor-man's version of adding path-regex's
|
96
|
+
existent_files = [
|
97
|
+
filepath
|
98
|
+
for filepath in config_metadata.args.always_files
|
99
|
+
if Path(filepath).exists()
|
100
|
+
]
|
101
|
+
file_paths.extend(existent_files)
|
102
|
+
|
77
103
|
_bucket_file_by_tag(
|
78
104
|
file_paths,
|
79
105
|
config_metadata,
|