Skip to content

Commit 9fb575d

Browse files
Merge pull request #1 from caffeine-addictt/setup
Setup
2 parents 047b5ac + f415d1c commit 9fb575d

File tree

10 files changed

+119
-1
lines changed

10 files changed

+119
-1
lines changed

.github/CODEOWNERS.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/workflows/release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Upload Python Package
2+
3+
4+
on:
5+
release:
6+
types: [ published ]
7+
8+
9+
permissions:
10+
contents: read
11+
12+
13+
jobs:
14+
pypi-publish:
15+
name: Upload release to PyPI
16+
runs-on: ubuntu-latest
17+
18+
# Specifying a GitHub environment is optional, but strongly encouraged
19+
environment: release
20+
permissions:
21+
# IMPORTANT: this permission is mandatory for trusted publishing
22+
id-token: write
23+
24+
steps:
25+
- name: Build distribution
26+
run: |
27+
python -m pip install -U pip
28+
python -m pip install -U build
29+
python -m build
30+
31+
- name: Publish package distributions to PyPI
32+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/test-worker.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Run Python tests
2+
3+
on: [ push, pull_request ]
4+
5+
jobs:
6+
build:
7+
8+
name: Run tests
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.x"]
13+
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install -U pip
26+
python -m pip install -U coverage pytest pytest-cov
27+
python -m pip install -r requirements.txt
28+
29+
- name: Lint with Ruff
30+
run: |
31+
python -m pip install -U ruff
32+
ruff -v .
33+
continue-on-error: true
34+
35+
- name: Test with pytest
36+
run: |
37+
coverage run -m pytest -v -s
38+
39+
- name: Generate Coverage Report
40+
run: |
41+
coverage report -m

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Python stuff
22
venv/
3+
*.pytest_cache
34
__pycache__/
5+
46
*.py[cod]
57
*$py.class
8+
9+
*.ruff_cache
10+
11+
# Build
12+
dist/
13+
*.egg-info/

README.md

Whitespace-only changes.

setup.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
from setuptools import setup, find_packages
2+
3+
with open('README.md', 'r') as f:
4+
long_description = f.read()
5+
6+
VERSION = '0.0.1'
7+
DESCRIPTION = 'Threading module extension'
8+
9+
# Setting up
10+
setup(
11+
name = 'threads',
12+
version = VERSION,
13+
author = 'caffeine-addictt (Jun Xiang)',
14+
author_email = '<junxiangng63@gmail.com>',
15+
description = DESCRIPTION,
16+
long_description_content_type = 'text/markdown',
17+
long_description = long_description,
18+
packages = find_packages(where = 'src'),
19+
install_requires = [],
20+
keywords = ['python', 'threading', 'multiprocessing'],
21+
classifiers = [
22+
'Development Status :: 1 - Planning',
23+
'Intended Audience :: Developers',
24+
'Programming Language :: Python :: 3',
25+
'Operating System :: Unix',
26+
'Operating System :: MacOS :: MacOS X',
27+
'Operating System :: Microsoft :: Windows',
28+
],
29+
python_requires = '>=3.10'
30+
)

src/thread/__about__.py

Whitespace-only changes.

src/thread/__init__.py

Whitespace-only changes.

src/thread/thread.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
from multiprocessing import Process
3+
4+

tests/test_placeholder.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
def test_palceholder():
3+
assert 1 == 1
4+

0 commit comments

Comments
 (0)