Skip to content

Commit

Permalink
Update project to use latest build tools and requirements, closes #13
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmezzetti committed Dec 13, 2024
1 parent e27a62b commit 66327c3
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 39 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.9

- name: Install dependencies - Windows
run: choco install wget
Expand All @@ -29,8 +29,11 @@ jobs:
env:
PYTHONUTF8: 1

- uses: pre-commit/[email protected]
if: matrix.os == 'ubuntu-latest'

- name: Test Coverage
run: coveralls --service=github
if: matrix.os == 'ubuntu-latest'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14 changes: 14 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
repos:
- repo: https://github.com/pycqa/pylint
rev: v3.3.1
hooks:
- id: pylint
args:
- -d import-error
- -d duplicate-code
- -d too-many-positional-arguments
- repo: https://github.com/ambv/black
rev: 24.10.0
hooks:
- id: black
language_version: python3
3 changes: 0 additions & 3 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,3 @@ min-public-methods=0

[FORMAT]
max-line-length=150

[MESSAGES CONTROL]
disable=I0011,R0201,W0105,W0108,W0110,W0141,W0621,W0640
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

![demo](https://raw.githubusercontent.com/neuml/txtmarker/master/demo.png)

txtmarker highlights text in documents. txtmarker takes a list of (name, text) pairs, scan an input document and creates a modified version with highlights embedded.
txtmarker highlights text in documents. txtmarker takes a list of (name, text) pairs, scans an input document and creates a modified version with highlights embedded.

Current file formats supported:

Expand All @@ -40,13 +40,19 @@ Current file formats supported:
## Installation
The easiest way to install is via pip and PyPI

pip install txtmarker
```
pip install txtmarker
```

Python 3.9+ is supported. Using a Python [virtual environment](https://docs.python.org/3/library/venv.html) is recommended.

You can also install txtmarker directly from GitHub. Using a Python Virtual Environment is recommended.
txtmarker can also be installed directly from GitHub to access the latest, unreleased features.

pip install git+https://github.com/neuml/txtmarker
```
pip install git+https://github.com/neuml/txtmarker
```

Python 3.8+ is supported
Python 3.9+ is supported

## Examples

Expand Down
57 changes: 28 additions & 29 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,34 +1,33 @@
# pylint: disable = C0111
from setuptools import find_packages, setup

with open("README.md", "r") as f:
with open("README.md", "r", encoding="utf-8") as f:
DESCRIPTION = f.read()

setup(name="txtmarker",
version="1.1.0",
author="NeuML",
description="Finds and highlights text in documents",
long_description=DESCRIPTION,
long_description_content_type="text/markdown",
url="https://github.com/neuml/txtmarker",
project_urls={
"Documentation": "https://github.com/neuml/txtmarker",
"Issue Tracker": "https://github.com/neuml/txtmarker/issues",
"Source Code": "https://github.com/neuml/txtmarker",
},
license="Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0",
packages=find_packages(where="src/python"),
package_dir={"": "src/python"},
keywords="pdf highlight text search",
python_requires=">=3.8",
install_requires=[
"pdfminer.six>=20201018",
"pdf-annotate>=0.11.0"
],
classifiers=[
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Topic :: Software Development",
"Topic :: Utilities"
])
setup(
name="txtmarker",
version="1.1.0",
author="NeuML",
description="Finds and highlights text in documents",
long_description=DESCRIPTION,
long_description_content_type="text/markdown",
url="https://github.com/neuml/txtmarker",
project_urls={
"Documentation": "https://github.com/neuml/txtmarker",
"Issue Tracker": "https://github.com/neuml/txtmarker/issues",
"Source Code": "https://github.com/neuml/txtmarker",
},
license="Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0",
packages=find_packages(where="src/python"),
package_dir={"": "src/python"},
keywords="pdf highlight text search",
python_requires=">=3.9",
install_requires=["pdfminer.six>=20201018", "pdf-annotate>=0.11.0"],
classifiers=[
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Topic :: Software Development",
"Topic :: Utilities",
],
)

0 comments on commit 66327c3

Please sign in to comment.