Skip to content

Commit ab65ee0

Browse files
authored
feat: add github test ci (#7)
1 parent f753fcc commit ab65ee0

File tree

6 files changed

+121
-13
lines changed

6 files changed

+121
-13
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## Expected Behavior
2+
3+
4+
## Actual Behavior
5+
6+
7+
## Steps to Reproduce the Problem
8+
9+
1.
10+
1.
11+
1.
12+
13+
## Specifications
14+
15+
- Version:
16+
- Platform:
17+
- Subsystem:
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## Feature Request
2+
3+
**Is your feature request related to a problem? Please describe.**
4+
A clear and concise description of what the problem is. Ex. I have an issue when [...]
5+
6+
**Describe the solution you'd like**
7+
A clear and concise description of what you want to happen. Add any considered drawbacks.
8+
9+
**Describe alternatives you've considered**
10+
A clear and concise description of any alternative solutions or features you've considered.
11+
12+
**Teachability, Documentation, Adoption, Migration Strategy**
13+
If you can, explain how users will be able to use this and possibly write out a version the docs.
14+
Maybe a screenshot or design?

.github/workflows/test-suite.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Test Suite
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
pull_request:
8+
branches:
9+
- "main"
10+
11+
# Allows you to run this workflow manually from the Actions tab
12+
workflow_dispatch:
13+
14+
jobs:
15+
tests:
16+
name: "Python ${{ matrix.python-version }} ${{ matrix.os }}"
17+
runs-on: "${{ matrix.os }}"
18+
strategy:
19+
matrix:
20+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
21+
os: [windows-latest, ubuntu-latest, macos-latest]
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- uses: actions/setup-python@v5
26+
with:
27+
python-version: "${{ matrix.python-version }}"
28+
29+
- uses: pdm-project/setup-pdm@v4
30+
with:
31+
python-version: "${{ matrix.python-version }}"
32+
33+
- name: Install dependencies
34+
run: pdm add -d nox rtoml
35+
36+
- name: Run tests
37+
run: pdm run nox -s test_for_ci

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# Fluentmap
22

3+
[![Testing](https://github.com/leavers/fluentmap/actions/workflows/test-suite.yml/badge.svg)](https://github.com/leavers/fluentmap/actions/workflows/test-suite.yml)
4+
[![Package version](https://img.shields.io/pypi/v/fluentmap.svg)](https://pypi.org/project/fluentmap/)
5+
[![Python](https://img.shields.io/pypi/pyversions/fluentmap.svg)](https://pypi.org/project/fluentmap/)
6+
37
Drop-in replacement for Python map with concurrency support.
48

noxfile.py

+14-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def get_dev_dependencies() -> Dict[str, str]:
7979
pyproject = get_pyproject_toml()
8080
pat = re.compile(r"[ <>~=]")
8181
dev_deps: Dict[str, str] = {}
82-
for dep in pyproject["tool"]["pdm"]["dev-dependencies"]["dev"]:
82+
for dep in pyproject["dependency-groups"]["dev"]:
8383
sep = -1
8484
for m in pat.finditer(dep):
8585
sep = m.span()[0]
@@ -190,3 +190,16 @@ def mypy(session: Session, mypy: str):
190190
@nox.session(python=False)
191191
def test(session: Session):
192192
session.run("pytest", "tests")
193+
194+
195+
@nox.session(reuse_venv=True)
196+
def test_for_ci(session: Session):
197+
session.install(
198+
"coverage[toml]",
199+
"pytest",
200+
"pytest-asyncio",
201+
"pytest-cov",
202+
"pytest-mock",
203+
"pytest-timeout",
204+
)
205+
test(session)

pyproject.toml

+35-12
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,25 @@
11
[project]
22
name = "fluentmap"
3-
description = "Drop-in replacement for Python map with concurrency support"
4-
authors = [{ name = "Leavers", email = "[email protected]" }]
3+
description = "A drop-in Python map replacement featuring parallel and batch processing."
4+
authors = [
5+
{ name = "leavers" },
6+
{ name = "Leavers", email = "[email protected]" },
7+
]
8+
classifiers = [
9+
"Intended Audience :: Developers",
10+
"License :: OSI Approved :: MIT License",
11+
"Operating System :: OS Independent",
12+
"Programming Language :: Python",
13+
"Programming Language :: Python :: 3",
14+
"Programming Language :: Python :: 3.8",
15+
"Programming Language :: Python :: 3.9",
16+
"Programming Language :: Python :: 3.10",
17+
"Programming Language :: Python :: 3.11",
18+
"Programming Language :: Python :: 3.12",
19+
"Topic :: Software Development",
20+
"Topic :: Software Development :: Libraries :: Python Modules",
21+
"Topic :: Utilities",
22+
]
523
dependencies = []
624
requires-python = ">=3.8"
725
readme = "README.md"
@@ -23,16 +41,6 @@ excludes = ["tests"]
2341
source = "file"
2442
path = "fluentmap.py"
2543

26-
[tool.pdm.dev-dependencies]
27-
dev = [
28-
"autoflake>=2.3.1",
29-
"mypy>=1.11.1",
30-
"nox>=2024.4.15",
31-
"pytest>=8.3.2",
32-
"ruff>=0.6.1",
33-
"rtoml>=0.11.0",
34-
]
35-
3644
[tool.autoflake]
3745
in-place = true
3846
recursive = true
@@ -62,3 +70,18 @@ warn_unused_configs = true
6270

6371
[tool.pytest.ini_options]
6472
asyncio_mode = "strict"
73+
74+
[dependency-groups]
75+
dev = [
76+
"autoflake>=2.3.1",
77+
"coverage[toml]>=7.6.1",
78+
"mypy>=1.11.1",
79+
"nox>=2024.4.15",
80+
"pytest>=8.3.2",
81+
"pytest-asyncio>=0.23.8",
82+
"pytest-cov>=5.0.0",
83+
"pytest-mock>=3.14.0",
84+
"pytest-timeout>=2.3.1",
85+
"ruff>=0.6.1",
86+
"rtoml>=0.11.0",
87+
]

0 commit comments

Comments
 (0)