Skip to content

Commit c7c820d

Browse files
committed
added setup files
1 parent 06eae92 commit c7c820d

3 files changed

Lines changed: 105 additions & 0 deletions

File tree

.flake8

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[flake8]
2+
max-line-length = 100
3+
exclude =
4+
.git,
5+
__pycache__,
6+
.venv,
7+
venv,
8+
build,
9+
dist,
10+
*.egg-info,
11+
.pytest_cache,
12+
.mypy_cache
13+
ignore =
14+
E203, # whitespace before ':'
15+
W503, # line break before binary operator
16+
E501 # line too long (handled by max-line-length)
17+
per-file-ignores =
18+
__init__.py:F401,F403

.github/workflows/python.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Python Tests and Linting
2+
3+
on:
4+
push:
5+
branches: [ main, master, develop ]
6+
pull_request:
7+
branches: [ main, master, develop ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.10", "3.11", "3.12"]
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -e .
28+
pip install pytest pytest-cov mypy flake8
29+
30+
- name: Run flake8
31+
run: |
32+
flake8 pystl/ --count --show-source --statistics
33+
34+
- name: Run mypy
35+
run: |
36+
mypy pystl/ --ignore-missing-imports
37+
continue-on-error: true
38+
39+
- name: Run tests with coverage
40+
run: |
41+
pytest tests/ --cov=pystl --cov-report=xml --cov-report=term
42+
43+
- name: Upload coverage reports
44+
uses: codecov/codecov-action@v3
45+
if: matrix.python-version == '3.11'
46+
with:
47+
file: ./coverage.xml
48+
fail_ci_if_error: false

setup.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
"""
2+
Setup configuration for PySTL package.
3+
"""
4+
5+
from setuptools import setup, find_packages
6+
from pathlib import Path
7+
8+
# Read the README file
9+
this_directory = Path(__file__).parent
10+
long_description = (this_directory / "README.md").read_text(encoding='utf-8')
11+
12+
setup(
13+
name="pystl",
14+
version="1.0.0",
15+
author="PySTL Contributors",
16+
author_email="",
17+
description="Python Standard Template Library - C++ STL-style data structures for Python",
18+
long_description=long_description,
19+
long_description_content_type="text/markdown",
20+
url="https://github.com/yourusername/pystl",
21+
packages=find_packages(),
22+
classifiers=[
23+
"Development Status :: 5 - Production/Stable",
24+
"Intended Audience :: Developers",
25+
"Topic :: Software Development :: Libraries :: Python Modules",
26+
"License :: OSI Approved :: MIT License",
27+
"Programming Language :: Python :: 3",
28+
"Programming Language :: Python :: 3.10",
29+
"Programming Language :: Python :: 3.11",
30+
"Programming Language :: Python :: 3.12",
31+
"Operating System :: OS Independent",
32+
],
33+
python_requires=">=3.10",
34+
keywords="stl, data structures, stack, queue, vector, set, map, priority queue, c++",
35+
project_urls={
36+
"Bug Reports": "https://github.com/yourusername/pystl/issues",
37+
"Source": "https://github.com/yourusername/pystl",
38+
},
39+
)

0 commit comments

Comments
 (0)