Skip to content

Commit b7608b6

Browse files
authored
Merge pull request #58 from tcalmant/project-overhaul
Project overhaul
2 parents 29ba909 + 92d0bc3 commit b7608b6

File tree

6 files changed

+116
-12
lines changed

6 files changed

+116
-12
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ indent_size = 4
1313
[*.rst]
1414
indent_size = 3
1515

16-
[.travis.yml]
16+
[*.{yml,yaml,toml}]
1717
indent_size = 2
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33

4-
name: CI Build
4+
name: CI Build - Python 3.4-3.7
55

66
on:
77
push:
8-
branches: '**'
8+
branches: [ "master" ]
99
tags: '**'
1010
pull_request:
11-
branches: '**'
11+
branches: [ "master" ]
1212

1313
jobs:
1414
build:
1515
timeout-minutes: 10
16-
runs-on: ubuntu-latest
16+
runs-on: ubuntu-20.04
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
20+
python-version: ["3.4", "3.5", "3.6", "3.7"]
2121

2222
steps:
23-
- uses: actions/checkout@v2
23+
- uses: actions/checkout@v4
2424
- name: Set up Python ${{ matrix.python-version }}
25-
uses: actions/setup-python@v2
25+
uses: actions/setup-python@v5
2626
with:
2727
python-version: ${{ matrix.python-version }}
2828
- name: Install dependencies
@@ -34,14 +34,14 @@ jobs:
3434
run: |
3535
# stop the build if there are Python syntax errors or undefined names
3636
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
37-
# exit-zero treats all errors as warnings.
38-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=110 --statistics
37+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
38+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
3939
- name: Test
4040
run: |
4141
coverage run -m pytest
4242
- name: Coveralls
4343
env:
44-
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
44+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
4545
run: |
4646
pip install coveralls
4747
coveralls

.github/workflows/build-24.04.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: CI Build - Python 3.8+
5+
6+
on:
7+
push:
8+
branches: [ "master" ]
9+
tags: '**'
10+
pull_request:
11+
branches: [ "master" ]
12+
13+
jobs:
14+
build:
15+
timeout-minutes: 10
16+
runs-on: ubuntu-24.04
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14-dev"]
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Set up Python ${{ matrix.python-version }}
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
- name: Install dependencies
29+
run: |
30+
python -m pip install --upgrade pip
31+
python -m pip install flake8 pytest
32+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
33+
- name: Lint with flake8
34+
run: |
35+
# stop the build if there are Python syntax errors or undefined names
36+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
37+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
38+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
39+
- name: Test
40+
run: |
41+
coverage run -m pytest
42+
- name: Coveralls
43+
env:
44+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
45+
run: |
46+
pip install coveralls
47+
coveralls

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*.so
55

66
# Packages
7+
.eggs/
78
*.egg
89
*.egg-info
910
dist

pyproject.toml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,58 @@
1+
[build-system]
2+
requires = ["hatchling"]
3+
build-backend = "hatchling.build"
4+
5+
[tool.hatch.build.targets.wheel]
6+
packages = ["javaobj"]
7+
8+
[project]
9+
name = "javaobj-py3"
10+
version = "0.4.4"
11+
description = "Module for serializing and de-serializing Java objects."
12+
readme = "README.md"
13+
license = "Apache-2.0"
14+
authors = [
15+
{ name = "Volodymyr Buell", email = "vbuell@gmail.com" }
16+
]
17+
maintainers = [
18+
{ name = "Thomas Calmant", email = "thomas.calmant@gmail.com" }
19+
]
20+
keywords = ["python", "java", "marshalling", "serialization"]
21+
classifiers = [
22+
"Development Status :: 3 - Alpha",
23+
"License :: OSI Approved :: Apache Software License",
24+
"Operating System :: OS Independent",
25+
"Programming Language :: Python :: 2.7",
26+
"Programming Language :: Python :: 3.4",
27+
"Programming Language :: Python :: 3.5",
28+
"Programming Language :: Python :: 3.6",
29+
"Programming Language :: Python :: 3.7",
30+
"Programming Language :: Python :: 3.8",
31+
"Programming Language :: Python :: 3.9",
32+
"Programming Language :: Python :: 3.10",
33+
"Programming Language :: Python :: 3.11",
34+
"Programming Language :: Python :: 3.12",
35+
"Topic :: Software Development :: Libraries :: Python Modules"
36+
]
37+
38+
dependencies = [
39+
"enum34; python_version<='3.4'",
40+
"typing; python_version<='3.4'"
41+
]
42+
43+
[project.optional-dependencies]
44+
test = ["pytest"]
45+
46+
[project.urls]
47+
Homepage = "https://github.com/tcalmant/python-javaobj"
48+
Issues = "http://github.com/tcalmant/python-javaobj/issues"
49+
Source = "http://github.com/tcalmant/python-javaobj/"
50+
51+
[tool.hatch.envs.test]
52+
dependencies = ["pytest"]
53+
54+
[tool.hatch.envs.test.scripts]
55+
run = "pytest tests"
56+
157
[tool.black]
258
line-length = 79

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def read(fname):
7070
license_file="LICENSE",
7171
keywords="python java marshalling serialization",
7272
packages=["javaobj", "javaobj.v1", "javaobj.v2"],
73-
test_suite="tests.test_v1",
73+
test_suite="tests",
7474
install_requires=[
7575
'enum34;python_version<="3.4"',
7676
'typing;python_version<="3.4"',

0 commit comments

Comments
 (0)