Skip to content

Commit e1ad9b7

Browse files
committed
add some of #21
1 parent 54968f1 commit e1ad9b7

File tree

13 files changed

+176
-120
lines changed

13 files changed

+176
-120
lines changed

.github/workflows/lint.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
concurrency: lint-${{ github.sha }}
9+
10+
jobs:
11+
lint:
12+
runs-on: ubuntu-latest
13+
14+
env:
15+
PYTHON_VERSION: "3.10"
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v3
20+
21+
- name: Set up Python ${{ env.PYTHON_VERSION }}
22+
uses: actions/setup-python@v3
23+
with:
24+
python-version: ${{ env.PYTHON_VERSION }}
25+
26+
- name: Pre-commit hooks
27+
uses: pre-commit/action@v3.0.0

.github/workflows/tests.yml

Lines changed: 36 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,41 @@
11
name: Tests
22

33
on:
4-
- push
5-
- pull_request
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
concurrency:
12+
group: test-${{ github.head_ref }}
13+
cancel-in-progress: true
14+
15+
env:
16+
PYTHONUNBUFFERED: "1"
17+
FORCE_COLOR: "1"
618

719
jobs:
8-
test:
9-
runs-on: ${{ matrix.os }}
10-
strategy:
11-
matrix:
12-
os: [ubuntu-latest]
13-
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
14-
15-
steps:
16-
- uses: actions/checkout@v2
17-
- name: Set up Python ${{ matrix.python-version }}
18-
uses: actions/setup-python@v2
19-
with:
20-
python-version: ${{ matrix.python-version }}
21-
- name: Install dependencies
22-
run: |
23-
python -m pip install --upgrade pip
24-
pip install tox tox-gh-actions
25-
- name: Test with tox
26-
run: tox
20+
run:
21+
name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
22+
runs-on: ${{ matrix.os }}
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
os: [ubuntu-latest, windows-latest, macos-latest]
27+
python-version: ["3.7", "3.8", "3.9", "3.10"]
28+
29+
steps:
30+
- uses: actions/checkout@v2
31+
32+
- name: Set up Python ${{ matrix.python-version }}
33+
uses: actions/setup-python@v2
34+
with:
35+
python-version: ${{ matrix.python-version }}
36+
37+
- name: Install Hatch
38+
run: pip install --upgrade --pre hatch
39+
40+
- name: Run tests
41+
run: hatch run tests

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ site/
88
.pytest_cache/
99
test.py
1010
.vscode/
11-
vgcore.*
11+
vgcore.*
12+
.venv/

.pre-commit-config.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v2.5.0
4+
hooks:
5+
- id: check-toml
6+
- id: check-yaml
7+
- id: end-of-file-fixer
8+
- id: trailing-whitespace
9+
args: [--markdown-linebreak-ext=md]
10+
11+
- repo: https://github.com/PyCQA/isort
12+
rev: 5.10.1
13+
hooks:
14+
- id: isort
15+
16+
- repo: https://github.com/pycqa/flake8
17+
rev: 4.0.1
18+
hooks:
19+
- id: flake8
20+
exclude: ^tests/
21+
additional_dependencies:
22+
- flake8-docstrings~=1.6.0
23+
24+
- repo: https://github.com/pre-commit/mirrors-mypy
25+
rev: v0.971
26+
hooks:
27+
- id: mypy

hatch.toml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[version]
2+
path = "src/pointers/version.py"
3+
4+
[envs.default]
5+
dependencies = [
6+
"pytest",
7+
]
8+
[envs.default.scripts]
9+
tests = "pytest"
10+
11+
[envs.docs]
12+
dependencies = [
13+
"mkdocs",
14+
]
15+
[envs.docs.scripts]
16+
build = "mkdocs build --clean"
17+
serve = "mkdocs serve --dev-addr localhost:8000"
18+
19+
[[envs.test.matrix]]
20+
python = ["37", "38", "39", "310"]

pyproject.toml

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
11
[build-system]
2-
requires = ["setuptools>=42", "wheel"]
3-
build-backend = "setuptools.build_meta"
2+
requires = ["setuptools", "wheel"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "pointers.py"
7+
description = 'Bringing the hell of pointers to Python.'
8+
readme = "README.md"
9+
requires-python = ">=3.6"
10+
keywords = ["python", "pointers"]
11+
authors = [
12+
{ name = "ZeroIntensity", email = "zintensitydev@gmail.com" },
13+
]
14+
classifiers = [
15+
"Programming Language :: Python",
16+
"Programming Language :: Python :: 3.6",
17+
"Programming Language :: Python :: 3.7",
18+
"Programming Language :: Python :: 3.8",
19+
"Programming Language :: Python :: 3.9",
20+
"Programming Language :: Python :: 3.10",
21+
"Programming Language :: Python :: Implementation :: CPython",
22+
]
23+
dependencies = [
24+
"typing_extensions",
25+
]
26+
dynamic = ["version"]
27+
28+
[project.urls]
29+
Documentation = "https://pointers.zintensity.dev"
30+
Issues = "https://github.com/ZeroIntensity/pointers.py/issues"
31+
Source = "https://github.com/ZeroIntensity/pointers.py"

requirements_dev.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
flake8==4.0.1
2-
tox==3.24.5
3-
pytest==7.0.1
4-
pytest-cov==3.0.0
5-
mypy===0.931
1+
flake8~=4.0.1
2+
isort~=5.10.1
3+
pre-commit~=2.17.0
4+
mypy~=0.971
5+
flake8-docstrings~=1.6.0

setup.cfg

Lines changed: 0 additions & 5 deletions
This file was deleted.

setup.py

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,7 @@
1-
from setuptools import setup, Extension
2-
3-
with open("./README.md") as f:
4-
long_desc: str = f.read()
1+
from setuptools import Extension, setup
52

63
if __name__ == "__main__":
74
setup(
8-
name="pointers.py",
9-
version="1.4.0",
10-
author="ZeroIntensity",
11-
author_email="<zintensitydev@gmail.com>",
12-
description="Bringing the hell of pointers to Python.",
13-
long_description_content_type="text/markdown",
14-
long_description=long_desc,
15-
packages=["pointers"],
16-
keywords=["python", "pointers"],
17-
install_requires=["typing_extensions"],
18-
classifiers=[
19-
"Programming Language :: Python :: 3.6",
20-
"Programming Language :: Python :: 3.7",
21-
"Programming Language :: Python :: 3.8",
22-
"Programming Language :: Python :: 3.9",
23-
"Programming Language :: Python :: 3.10",
24-
"Programming Language :: Python :: 3.11",
25-
"Programming Language :: Python :: Implementation :: CPython",
26-
],
27-
license="MIT",
28-
project_urls={
29-
"Source": "https://github.com/ZeroIntensity/pointers.py",
30-
"Documentation": "https://pointerspy.netlify.app/",
31-
},
32-
package_dir={"": "src"},
335
ext_modules=[Extension("_pointers", ["./src/mod.c"])],
6+
license="MIT",
347
)
26.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)