Skip to content

Modernize package #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Apr 30, 2023
Merged
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
35 changes: 26 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,45 @@ on:
pull_request:

jobs:
aiosqlite:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: [2.7, 3.5, 3.6, 3.7, 3.8]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
os: [macOS-latest, ubuntu-latest, windows-latest]

steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v3
- name: Set Up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
cache: pip
cache-dependency-path: pyproject.toml
python-version: ${{ matrix.python-version }}
- name: Install
run: |
python -m pip install --upgrade pip
make setup
pip install -U .
- name: Test
run: make test

lint:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.10"]
os: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Set Up Python
uses: actions/setup-python@v4
with:
cache: pip
cache-dependency-path: pyproject.toml
python-version: ${{ matrix.python-version }}
- name: Install
run: |
pip install -U .[dev]
- name: Lint
run: make lint
if: ${{ matrix.python-version != 2.7 && matrix.python-version != 3.5 }}
run: make lint
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Amethyst Reese <[email protected]> <[email protected]>
80 changes: 80 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
diff-match-patch
================

[![Generated by attribution][attribution-badge]][attribution-url]


v20200713
---------

Maintenance release

- Pulls in upstream change to use raw strings for regex
- Updates to how the package builds, tests, and runs lint
- Uses PEP 517/518 metadata for build requirements/backend
- Formatting improvements, including use of isort

```text
$ git shortlog -s v20181111...v20200713
15 Amethyst Reese
1 Stuart Prescott
```


v20181111
---------

Version v20181111:

- Rename module to diff-match-patch to supercede existing PyPI module
- Match existing module version scheme
- Update readme, tests, etc for import names

```text
$ git shortlog -s v2018.11.06.1...v20181111
3 Amethyst Reese
```


v2018.11.06.1
-------------

Bug fix v2018.11.06.1:

- Remove pathlib import from setup.py to fix py2 builds

```text
$ git shortlog -s v2018.11.06...v2018.11.06.1
2 Amethyst Reese
```


v2018.11.06
-----------

Release v2018.11.06:

- Add support for Python 2.7 using conditional imports.
Includes the upstream python2 implementation and tests,
and selects them at import time as appropriate.

```text
$ git shortlog -s v2018.11.05...v2018.11.06
5 Amethyst Reese
```


v2018.11.05
-----------

Initial release v2018.11.05

```text
$ git shortlog -s v2018.11.05
3 Amethyst Reese
```

[attribution-badge]:
https://img.shields.io/badge/generated%20by-attribution-informational
[attribution-url]: https://attribution.omnilib.dev

2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ This Code of Conduct applies both within project spaces and in public spaces whe

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Contributing to dmp
# Contributing to diff-match-patch

## Setup

Once in your development environment, create a virtualenv
and install the appropriate linting tools and dependencies:

$ cd <path/to/dmp>
$ make dev
$ cd <path/to/diff-match-patch>
$ make venv
$ source .venv/bin/activate


## Notes

dmp is a partial fork of [diff-match-patch][],
This is a partial fork of [diff-match-patch][],
with extra bits to make this a modern, friendly
member of the Python packaging ecosystem. The
library will be periodically updated with changes
Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Google's [Diff Match and Patch][DMP] library, packaged for modern Python.

## Install

diff-match-patch is supported on Python 2.7 or Python 3.4 or newer.
diff-match-patch is supported on Python 3.7 or newer.
You can install it from PyPI:

```shell
Expand Down
15 changes: 8 additions & 7 deletions diff_match_patch/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import sys
"""
Repackaging of Google's Diff Match and Patch libraries.

if sys.version_info >= (3, 0):
from .diff_match_patch import __author__, __doc__, diff_match_patch, patch_obj
else:
from .diff_match_patch_py2 import __author__, __doc__, diff_match_patch, patch_obj
Offers robust algorithms to perform the operations required for synchronizing plain text.
"""

__version__ = "20200713"
__packager__ = "John Reese ([email protected])"
from .__version__ import __version__
from .diff_match_patch import __author__, __doc__, diff_match_patch, patch_obj

__packager__ = "Amethyst Reese ([email protected])"
7 changes: 7 additions & 0 deletions diff_match_patch/__version__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"""
This file is automatically generated by attribution.

Do not edit manually. Get more info at https://attribution.omnilib.dev
"""

__version__ = "20200713"
Loading