Skip to content

Modernize project#57

Merged
lord63 merged 3 commits intodevfrom
modernize/ci-uv-py3
Mar 16, 2026
Merged

Modernize project#57
lord63 merged 3 commits intodevfrom
modernize/ci-uv-py3

Conversation

@lord63
Copy link
Copy Markdown
Owner

@lord63 lord63 commented Mar 16, 2026

  1. migrate ci to github action;
  2. migrate to use uv;
  3. drop 2.x, support 3.10+

lord63 added 3 commits March 16, 2026 23:05
Replace .travis.yml with .github/workflows/ci.yml.
Test matrix updated to Python 3.10-3.13.
Replace setup.py, setup.cfg, dev-requirements.txt, tox.ini, Makefile,
and MANIFEST.in with pyproject.toml (hatchling backend) and uv.lock.
Update GitHub Actions CI to use uv for dependency management.
- Remove `from __future__ import absolute_import` from all files
- Remove `# -*- coding: utf-8 -*-` headers (unnecessary in Python 3)
- Replace `io.open` with builtin `open` in source and tests
- Update mock targets from `io.open` to `builtins.open` in tests
- Use `super()` without arguments (Python 3 style)
Copilot AI review requested due to automatic review settings March 16, 2026 15:15
@lord63 lord63 merged commit 2182932 into dev Mar 16, 2026
6 checks passed
@lord63
Copy link
Copy Markdown
Owner Author

lord63 commented Mar 16, 2026

close #52

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Modernizes the project’s packaging and CI to align with a Python 3.10+ baseline, replacing legacy tooling (Travis/tox/setup.py) with a pyproject.toml + uv workflow.

Changes:

  • Migrates packaging to pyproject.toml (hatchling) and introduces uv.lock for dependency locking.
  • Replaces Travis CI with a GitHub Actions workflow using uv.
  • Removes Python 2-era compatibility shims (__future__, io.open, legacy super(...)) across code/tests and drops tox/Makefile/dev requirements files.

Reviewed changes

Copilot reviewed 22 out of 23 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
uv.lock Adds uv lockfile pinning runtime + dev dependencies for reproducible installs.
pyproject.toml Defines project metadata, dependencies, scripts, build backend, and dev dependency group.
.github/workflows/ci.yml New GitHub Actions CI running tests via uv across Python 3.10–3.13.
tldr/parser.py Removes Py2 compatibility imports and switches to built-in open().
tldr/config.py Removes Py2 compatibility imports and switches to built-in open().
tldr/cli.py Switches JSON index read to built-in open() (removes io.open).
tests/*.py Updates mocks to patch builtins.open, modernizes super() usage, removes old headers/imports.
tox.ini, .travis.yml, setup.py, setup.cfg, dev-requirements.txt, Makefile, MANIFEST.in Removes legacy tooling/config now superseded by pyproject.toml + GitHub Actions + uv.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

version = "0.8.0"
description = "A python client for tldr: simplified and community-driven man pages."
readme = "README.rst"
license = "MIT"
Comment on lines +25 to +29
- name: Install dependencies
run: uv sync --python ${{ matrix.python-version }}

- name: Run tests
run: uv run pytest --cov-report term-missing --cov=tldr/ -vs tests/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants