Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ __pycache__/
build/
dist/
venv/
.venv/
uv-cache/
32 changes: 31 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,37 @@ Utility scripts to ease management of GitHub projects for ROS / ROS 2

## Installation

This is a `setuptools`-based python package. To install it and all its dependencies:
These are Python command-line tools. The recommended way to install them is with
[`uv`](https://docs.astral.sh/uv/), which puts the commands on your PATH inside an
isolated, uv-managed virtual environment.

After installation you can run the commands directly, without a `uv run` prefix
or manually activating a venv.

```
# Note that this is by _path_, it's not the name of a package on PyPI - so substitute as appropriate for your working directory
uv tool install ./ros-github-scripts
```

To upgrade an existing install after pulling new changes, add `--force`:

```
uv tool install --force ./ros-github-scripts
```

If the commands are not found afterwards, run `uv tool update-shell` and restart
your shell so uv's tool directory is on your PATH.

[`pipx`](https://pipx.pypa.io/) provides the same isolated-venv behavior if you
prefer it:

```
pipx install ./ros-github-scripts
```

Standard `pip install ./ros-github-scripts` also still works, but you are then
responsible for providing the virtual environment yourself.


## ros-ci-for-pr

Expand Down Expand Up @@ -80,3 +104,9 @@ ros-github-contribution-report \
## Developing

Run tests by invoking `tox` in the repository directory.

For an editable install of the commands while developing, use:

```
uv tool install --editable .
```
36 changes: 36 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[build-system]
requires = ["setuptools>=77"]
build-backend = "setuptools.build_meta"

[project]
name = "ros_github_scripts"
version = "0.1.0"
description = "A set of scripts used to manage and report about ROS GitHub repositories."
readme = "README.md"
requires-python = ">=3.9"
license = "Apache-2.0"
maintainers = [
{ name = "ROS Tooling Working Group", email = "ros-tooling@googlegroups.com" },
]
dependencies = [
"markdown2==2.3.7",
# PyGithub >=1.59.1 provides the github.Auth token API used in ci_for_pr;
# capped below 2.0 per #39.
"PyGithub>=1.59.1,<2",
"PyYAML>=5",
"retrying==1.3.3",
"jenkinsapi==0.3.17",
]

[project.scripts]
ros-ci-for-pr = "ros_github_scripts.ci_for_pr:main"
ros-find-restarted-ci = "ros_github_scripts.find_restarted_ci:main"
ros-github-contribution-report = "ros_github_scripts.generate_contribution_report:main"

[tool.setuptools]
packages = ["ros_github_scripts"]

[tool.mypy]
[[tool.mypy.overrides]]
module = ["github", "retrying", "markdown2", "urllib"]
ignore_missing_imports = true
16 changes: 0 additions & 16 deletions setup.cfg

This file was deleted.

36 changes: 0 additions & 36 deletions setup.py

This file was deleted.

7 changes: 6 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
[tox]
envlist = py36
envlist = py39

[flake8]
ignore = D102, D103, D107
import-order-style = google
max-line-length = 100

[testenv]
deps =
Expand Down
Loading