-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replace setup.py with pyproject.toml, add requirements, and github ac…
…tion builds
- Loading branch information
Showing
5 changed files
with
119 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Build unstable | ||
|
||
on: [push] | ||
|
||
concurrency: | ||
group: unstable | ||
|
||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [ 3.6, 3.7, 3.8, 3.9, '3.10', '3.11', '3.12' ] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' | ||
- name: Cleanup more disk space | ||
run: sudo rm -rf /usr/share/dotnet && sudo rm -rf /opt/ghc && sudo rm -rf "/usr/local/share/boost" && sudo rm -rf "$AGENT_TOOLSDIRECTORY" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install --upgrade flake8 pytest pycodestyle pytest-cov | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
# - name: Test with pytest | ||
# run: | | ||
# pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Build release | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
concurrency: | ||
group: docker | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.9" | ||
cache: 'pip' | ||
- name: Cleanup more disk space | ||
run: sudo rm -rf /usr/share/dotnet && sudo rm -rf /opt/ghc && sudo rm -rf "/usr/local/share/boost" && sudo rm -rf "$AGENT_TOOLSDIRECTORY" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install --upgrade flake8 pytest pycodestyle | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
# - name: Test with pytest | ||
# run: | | ||
# pytest | ||
|
||
- name: Build and Publish to PyPI | ||
uses: conchylicultor/pypi-build-publish@v1 | ||
with: | ||
pypi-token: ${{ secrets.PYPI_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[build-system] | ||
requires = ["setuptools", "setuptools-scm"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.bumpversion] | ||
current_version = "0.0.8" | ||
commit = "true" | ||
tag = "true" | ||
tag_name = "v{new_version}" | ||
|
||
[project] | ||
name = "grobid-client-python" | ||
license = { file = "LICENSE" } | ||
authors = [ | ||
{ name = "Patrice Lopez", email = "[email protected]" }, | ||
] | ||
maintainers = [ | ||
{ name = "Patrice Lopez", email = "[email protected]" }, | ||
{ name = "Luca Foppiano", email = "[email protected]" } | ||
] | ||
description = "Simple python client for GROBID REST services" | ||
readme = "Readme.md" | ||
|
||
dynamic = ['version', "dependencies"] | ||
|
||
[tool.setuptools.dynamic] | ||
dependencies = {file = ["requirements.txt"]} | ||
|
||
[tool.setuptools_scm] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/kermitt2/grobid_client_python" | ||
Repository = "https://github.com/kermitt2/grobid_client_python" | ||
Changelog = "https://github.com/kermitt2/grobid_client_python" | ||
|
||
[project.scripts] | ||
hello-world = "grobid_client=grobid_client.grobid_client" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
requests |