nightlies 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.
- nightlies-0.1.0/LICENSE +21 -0
- nightlies-0.1.0/PKG-INFO +144 -0
- nightlies-0.1.0/README.md +123 -0
- nightlies-0.1.0/cli.py +838 -0
- nightlies-0.1.0/nightlies.egg-info/PKG-INFO +144 -0
- nightlies-0.1.0/nightlies.egg-info/SOURCES.txt +12 -0
- nightlies-0.1.0/nightlies.egg-info/dependency_links.txt +1 -0
- nightlies-0.1.0/nightlies.egg-info/entry_points.txt +2 -0
- nightlies-0.1.0/nightlies.egg-info/top_level.txt +1 -0
- nightlies-0.1.0/pyproject.toml +39 -0
- nightlies-0.1.0/setup.cfg +18 -0
- nightlies-0.1.0/test/test_apt.py +88 -0
- nightlies-0.1.0/test/test_nightlies.py +1365 -0
nightlies-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Pavel Panchekha
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
nightlies-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: nightlies
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: CLI for querying nightly logs and reports
|
|
5
|
+
Author-email: Pavel Panchekha <me@pavpanchekha.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/pavpanchekha/nightlies
|
|
8
|
+
Project-URL: Repository, https://github.com/pavpanchekha/nightlies
|
|
9
|
+
Project-URL: Issues, https://github.com/pavpanchekha/nightlies/issues
|
|
10
|
+
Keywords: nightlies,cli,logs,reports
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Topic :: Utilities
|
|
17
|
+
Requires-Python: >=3.12
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE
|
|
20
|
+
Dynamic: license-file
|
|
21
|
+
|
|
22
|
+
Nightlies
|
|
23
|
+
=========
|
|
24
|
+
|
|
25
|
+
This repository runs nightly integration tests for a set of repositories,
|
|
26
|
+
and it also publishes a small `nightlies` CLI for browsing the resulting logs
|
|
27
|
+
and reports on `nightly.cs.washington.edu`.
|
|
28
|
+
|
|
29
|
+
## CLI
|
|
30
|
+
|
|
31
|
+
The published CLI is meant for one-shot use with `uvx`:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
uvx nightlies setup https://nightly.cs.washington.edu/
|
|
35
|
+
uvx nightlies --help
|
|
36
|
+
uvx nightlies list
|
|
37
|
+
uvx nightlies log main
|
|
38
|
+
uvx nightlies status main
|
|
39
|
+
uvx nightlies download main
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Run these commands from a Git checkout for a nightly-enabled repository; the
|
|
43
|
+
CLI infers the repo name from the GitHub remote. If you are somewhere else,
|
|
44
|
+
use `-C` to point the CLI at the checkout:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
uvx nightlies -C ~/src/herbie list
|
|
48
|
+
uvx nightlies -C ~/src/herbie log main
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
To install it persistently instead of using `uvx`:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
uv tool install nightlies
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Before you can use `list`, `log`, `status`, or `download`, run
|
|
58
|
+
`nightlies setup <url>`. The setup command prompts for a username and
|
|
59
|
+
password, then saves the nightly URL and credentials in an OS-appropriate
|
|
60
|
+
data directory so later commands can reuse them.
|
|
61
|
+
|
|
62
|
+
## Server
|
|
63
|
+
|
|
64
|
+
The rest of this repository is the nightly test runner and web server.
|
|
65
|
+
|
|
66
|
+
## Usage
|
|
67
|
+
|
|
68
|
+
Start with a Github project, say `$ORG/$PROJ`. The nightly runner will:
|
|
69
|
+
|
|
70
|
+
+ Download each branch with new commits
|
|
71
|
+
+ Run `make nightly`
|
|
72
|
+
|
|
73
|
+
So, to use this nightly runner, you will need to add a `make` rule
|
|
74
|
+
called `nightly` to your project. It should probably:
|
|
75
|
+
|
|
76
|
+
+ Run your project on all its tests
|
|
77
|
+
+ Upload the results somewhere
|
|
78
|
+
|
|
79
|
+
There's also Slack integration, so optionally your nightly run can post its results to your Slack channel.
|
|
80
|
+
|
|
81
|
+
## Features
|
|
82
|
+
|
|
83
|
+
+ *Logs*: The log directory `log/` has per-nightly and
|
|
84
|
+
per-branch logs
|
|
85
|
+
+ *Dedup*: A branch's nightly won't be run if no commit has happened
|
|
86
|
+
since the last run.
|
|
87
|
+
+ *Baselines*: The runner can be configured to run a nightly for the
|
|
88
|
+
`master` branch if any other branch is being run.
|
|
89
|
+
+ *Slack support*: The runner can be configured to report each run to
|
|
90
|
+
a Slack channel, and even to include a custom URL, image, or data.
|
|
91
|
+
|
|
92
|
+
## Installing
|
|
93
|
+
|
|
94
|
+
Clone the repository somewhere and create a file named
|
|
95
|
+
`nightlies.conf`. It should be formatted like this:
|
|
96
|
+
|
|
97
|
+
[pavpanchekha/nightly-test]
|
|
98
|
+
slack = uw/herbie
|
|
99
|
+
master = main
|
|
100
|
+
|
|
101
|
+
Each heading corresponds to one repository to test. Under each heading
|
|
102
|
+
are key-value pairs in INI format. The supported configuration options
|
|
103
|
+
are:
|
|
104
|
+
|
|
105
|
+
+ `url`: the URL of the git repository. This overrides the section
|
|
106
|
+
name and the `github` key.
|
|
107
|
+
+ `github`: the Github repository name, in `user/repo` format. This
|
|
108
|
+
overrides the section name.
|
|
109
|
+
+ `master`: change default branch, for example to `main`.
|
|
110
|
+
+ `slack`: post after nightly runs; it's a Slack and channel name.
|
|
111
|
+
The Slack is defined in the secrets file, the channel must be public.
|
|
112
|
+
+ `baseline`: a branch to always run if any others are being run
|
|
113
|
+
+ `run`: When to run a branch. One of `baseline`, `always`, or `commit`
|
|
114
|
+
|
|
115
|
+
Once things are configured, run:
|
|
116
|
+
|
|
117
|
+
``` {.bash}
|
|
118
|
+
sudo systemctl link nightlies.service
|
|
119
|
+
sudo systemctl link nightlies.timer
|
|
120
|
+
sudo systemctl enable nightlies.timer
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
That will run the nightly daemon every night.
|
|
124
|
+
|
|
125
|
+
Slack secrets are stored separately. For a `slack = uw/herbie` entry,
|
|
126
|
+
ensure the secrets file has a matching section like:
|
|
127
|
+
|
|
128
|
+
[uw]
|
|
129
|
+
token = xoxb-...
|
|
130
|
+
|
|
131
|
+
## Releasing The CLI
|
|
132
|
+
|
|
133
|
+
The PyPI package is also named `nightlies`, so users can run it directly with
|
|
134
|
+
`uvx nightlies`.
|
|
135
|
+
|
|
136
|
+
Build artifacts locally with:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
uv build --no-sources
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Publishing is handled by GitHub Actions via PyPI Trusted Publishing. Configure
|
|
143
|
+
PyPI to trust `.github/workflows/publish.yml`, then publish a GitHub release to
|
|
144
|
+
upload the new version to PyPI.
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
Nightlies
|
|
2
|
+
=========
|
|
3
|
+
|
|
4
|
+
This repository runs nightly integration tests for a set of repositories,
|
|
5
|
+
and it also publishes a small `nightlies` CLI for browsing the resulting logs
|
|
6
|
+
and reports on `nightly.cs.washington.edu`.
|
|
7
|
+
|
|
8
|
+
## CLI
|
|
9
|
+
|
|
10
|
+
The published CLI is meant for one-shot use with `uvx`:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
uvx nightlies setup https://nightly.cs.washington.edu/
|
|
14
|
+
uvx nightlies --help
|
|
15
|
+
uvx nightlies list
|
|
16
|
+
uvx nightlies log main
|
|
17
|
+
uvx nightlies status main
|
|
18
|
+
uvx nightlies download main
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Run these commands from a Git checkout for a nightly-enabled repository; the
|
|
22
|
+
CLI infers the repo name from the GitHub remote. If you are somewhere else,
|
|
23
|
+
use `-C` to point the CLI at the checkout:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
uvx nightlies -C ~/src/herbie list
|
|
27
|
+
uvx nightlies -C ~/src/herbie log main
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
To install it persistently instead of using `uvx`:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
uv tool install nightlies
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Before you can use `list`, `log`, `status`, or `download`, run
|
|
37
|
+
`nightlies setup <url>`. The setup command prompts for a username and
|
|
38
|
+
password, then saves the nightly URL and credentials in an OS-appropriate
|
|
39
|
+
data directory so later commands can reuse them.
|
|
40
|
+
|
|
41
|
+
## Server
|
|
42
|
+
|
|
43
|
+
The rest of this repository is the nightly test runner and web server.
|
|
44
|
+
|
|
45
|
+
## Usage
|
|
46
|
+
|
|
47
|
+
Start with a Github project, say `$ORG/$PROJ`. The nightly runner will:
|
|
48
|
+
|
|
49
|
+
+ Download each branch with new commits
|
|
50
|
+
+ Run `make nightly`
|
|
51
|
+
|
|
52
|
+
So, to use this nightly runner, you will need to add a `make` rule
|
|
53
|
+
called `nightly` to your project. It should probably:
|
|
54
|
+
|
|
55
|
+
+ Run your project on all its tests
|
|
56
|
+
+ Upload the results somewhere
|
|
57
|
+
|
|
58
|
+
There's also Slack integration, so optionally your nightly run can post its results to your Slack channel.
|
|
59
|
+
|
|
60
|
+
## Features
|
|
61
|
+
|
|
62
|
+
+ *Logs*: The log directory `log/` has per-nightly and
|
|
63
|
+
per-branch logs
|
|
64
|
+
+ *Dedup*: A branch's nightly won't be run if no commit has happened
|
|
65
|
+
since the last run.
|
|
66
|
+
+ *Baselines*: The runner can be configured to run a nightly for the
|
|
67
|
+
`master` branch if any other branch is being run.
|
|
68
|
+
+ *Slack support*: The runner can be configured to report each run to
|
|
69
|
+
a Slack channel, and even to include a custom URL, image, or data.
|
|
70
|
+
|
|
71
|
+
## Installing
|
|
72
|
+
|
|
73
|
+
Clone the repository somewhere and create a file named
|
|
74
|
+
`nightlies.conf`. It should be formatted like this:
|
|
75
|
+
|
|
76
|
+
[pavpanchekha/nightly-test]
|
|
77
|
+
slack = uw/herbie
|
|
78
|
+
master = main
|
|
79
|
+
|
|
80
|
+
Each heading corresponds to one repository to test. Under each heading
|
|
81
|
+
are key-value pairs in INI format. The supported configuration options
|
|
82
|
+
are:
|
|
83
|
+
|
|
84
|
+
+ `url`: the URL of the git repository. This overrides the section
|
|
85
|
+
name and the `github` key.
|
|
86
|
+
+ `github`: the Github repository name, in `user/repo` format. This
|
|
87
|
+
overrides the section name.
|
|
88
|
+
+ `master`: change default branch, for example to `main`.
|
|
89
|
+
+ `slack`: post after nightly runs; it's a Slack and channel name.
|
|
90
|
+
The Slack is defined in the secrets file, the channel must be public.
|
|
91
|
+
+ `baseline`: a branch to always run if any others are being run
|
|
92
|
+
+ `run`: When to run a branch. One of `baseline`, `always`, or `commit`
|
|
93
|
+
|
|
94
|
+
Once things are configured, run:
|
|
95
|
+
|
|
96
|
+
``` {.bash}
|
|
97
|
+
sudo systemctl link nightlies.service
|
|
98
|
+
sudo systemctl link nightlies.timer
|
|
99
|
+
sudo systemctl enable nightlies.timer
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
That will run the nightly daemon every night.
|
|
103
|
+
|
|
104
|
+
Slack secrets are stored separately. For a `slack = uw/herbie` entry,
|
|
105
|
+
ensure the secrets file has a matching section like:
|
|
106
|
+
|
|
107
|
+
[uw]
|
|
108
|
+
token = xoxb-...
|
|
109
|
+
|
|
110
|
+
## Releasing The CLI
|
|
111
|
+
|
|
112
|
+
The PyPI package is also named `nightlies`, so users can run it directly with
|
|
113
|
+
`uvx nightlies`.
|
|
114
|
+
|
|
115
|
+
Build artifacts locally with:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
uv build --no-sources
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Publishing is handled by GitHub Actions via PyPI Trusted Publishing. Configure
|
|
122
|
+
PyPI to trust `.github/workflows/publish.yml`, then publish a GitHub release to
|
|
123
|
+
upload the new version to PyPI.
|