Skip to content

Commit 8c20b58

Browse files
authored
Merge pull request #2 from 4teamwork/jch/TI-3219
Modernise lexwork repository
2 parents c30a818 + e3e80dd commit 8c20b58

File tree

16 files changed

+1581
-24
lines changed

16 files changed

+1581
-24
lines changed

.flake8

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[flake8]
2+
# From https://github.com/4teamwork/ftw-buildouts/blob/master/pycodestyle.cfg
3+
ignore = E121,E122,E123,E125,E126,E127,E128,E203,E301,W503,W606
4+
max-line-length = 125
5+
exclude = .git,__pycache__,venv,.tox,manage.py,include,lib,javascript,lib,node_modules,scss,bin,.eggs,wsgi.py,wsgi.py,src,migrations,docs,gever,bootstrap.py

.github/pull_request_template.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## Description
2+
3+
4+
5+
6+
Belongs to PBI [TI-xxx].
7+
8+
## Checklist
9+
10+
The following checklist should help us to stick to our "definition of done":
11+
12+
- [ ] Proposed changes include tests.
13+
- [ ] Good error handling with useful messages
14+
- [ ] Changelog added
15+
- [ ] Readme has been updated if changes interfere with the setup process.

.github/workflows/tests.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Linting
2+
3+
on:
4+
- push
5+
6+
concurrency:
7+
group: ${{ github.ref }}
8+
cancel-in-progress: true
9+
10+
jobs:
11+
lint:
12+
runs-on: self-hosted
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
- name: Setup python
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: 3.13
20+
- name: Install poetry
21+
uses: abatilo/actions-poetry@v2
22+
with:
23+
poetry-version: 2.1
24+
- name: Install dependencies
25+
run: poetry install
26+
- name: isort
27+
run: poetry run isort --check-only --quiet --settings pyproject.toml .
28+
- name: flake8
29+
run: poetry run flake8
30+
- name: black
31+
run: poetry run black --check --config pyproject.toml .

CHANGELOG.md

Whitespace-only changes.

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# We don't release this package. This dummy MANIFEST.in stops zest.releaser
2+
# from complaining.

bin/release

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env sh
2+
3+
set -euo pipefail
4+
5+
git pull
6+
poetry run fullrelease
7+
poetry publish --build

changes/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!.gitignore

changes/TI-3219.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Modernise the GitHub Repository and add the lexwork client to pip. (`TI-3219 <https://4teamwork.atlassian.net/browse/TI-3219>`_)

lexwork/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
__all__ = ["APIClient"]
2+
13
from .client import APIClient

lexwork/client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ def sign_pdf(self, file_like, reason, file_name=None):
4545
return response.json().get("result", {"signed_data": ""}).get("signed_data")
4646

4747
def _make_request(self, path, method="get", **kwargs):
48-
response = getattr(self.session, method)(urljoin(self.url, self.base_api_path, path), **kwargs)
48+
response = getattr(self.session, method)(
49+
urljoin(self.url, self.base_api_path, path), **kwargs
50+
)
4951
response.raise_for_status()
5052
return response

0 commit comments

Comments
 (0)