Skip to content

Commit 6c3c66c

Browse files
committed
Initial commit
0 parents  commit 6c3c66c

File tree

17 files changed

+2222
-0
lines changed

17 files changed

+2222
-0
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

.github/workflows/publish.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Publish Python Package
2+
3+
on:
4+
release:
5+
types: [published]
6+
push:
7+
tags:
8+
- 'v*.*.*'
9+
workflow_dispatch:
10+
11+
jobs:
12+
build-and-publish:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
id-token: write
16+
contents: read
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: '3.11'
26+
27+
- name: Install build dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install build twine
31+
32+
- name: Build package
33+
run: python -m build
34+
35+
- name: Check package
36+
run: twine check dist/*
37+
38+
- name: Publish to PyPI
39+
uses: pypa/gh-action-pypi-publish@release/v1
40+
with:
41+
skip-existing: true
42+
# Option 1: Use trusted publishing (recommended - no token needed)
43+
# Configure at: https://pypi.org/manage/account/publishing/
44+
45+
# Option 2: Use API token (uncomment if using token instead)
46+
# password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/test.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Test Package
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest, windows-latest, macos-latest]
15+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
26+
- name: Install package
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install -e .
30+
31+
- name: Test CLI
32+
run: |
33+
hixbe-time --help
34+
hixbe-time --json
35+
36+
- name: Test import
37+
run: python -c "from hixbe_time import NTPClient; client = NTPClient(); print('Import successful')"
38+
39+
- name: Run showcase
40+
run: python SHOWCASE.py
41+
continue-on-error: true

.gitignore

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
pip-wheel-metadata/
24+
share/python-wheels/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
MANIFEST
29+
30+
# PyInstaller
31+
*.manifest
32+
*.spec
33+
34+
# Unit test / coverage reports
35+
htmlcov/
36+
.tox/
37+
.nox/
38+
.coverage
39+
.coverage.*
40+
.cache
41+
nosetests.xml
42+
coverage.xml
43+
*.cover
44+
*.py,cover
45+
.hypothesis/
46+
.pytest_cache/
47+
48+
# Virtual environments
49+
venv/
50+
env/
51+
ENV/
52+
env.bak/
53+
venv.bak/
54+
55+
# IDEs
56+
.vscode/
57+
.idea/
58+
*.swp
59+
*.swo
60+
*~
61+
62+
# OS
63+
.DS_Store
64+
Thumbs.db
65+
66+
# Type checking
67+
.mypy_cache/
68+
.dmypy.json
69+
dmypy.json
70+
.pytype/
71+
72+
# Project specific
73+
*.log

0 commit comments

Comments
 (0)