Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
dd8be61
Refactor README generation workflow and improve GlInet class document…
Oct 11, 2025
9b08d15
Fix GitHub Actions workflow to specify branch for README.md push
Oct 11, 2025
4808bd7
Refactor README generation workflow to skip commit if no changes are …
Oct 11, 2025
4967545
Fix checkout reference in README generation workflow to use head_ref
Oct 11, 2025
f8b3226
Fix typo in keep_alive_interval parameter and related documentation i…
Oct 11, 2025
7c74085
Fix resource path typos in documentation and update image reference
Oct 11, 2025
19b6512
Add pre-commit configuration for Ruff linter and formatter
Oct 11, 2025
a553d27
Refactor code structure for improved readability and maintainability
Oct 11, 2025
019fd18
Remove setup.py file as part of project restructuring
Oct 11, 2025
41e3a0e
Update .gitignore to include additional cache and build artifacts
Oct 11, 2025
e3c22cb
Update workflows and dependencies to use 'uv' for package management …
Oct 11, 2025
546a0d0
Add pre-commit installation step in CI workflow
Oct 11, 2025
4ed0e12
Activate virtual environment before installing pre-commit in CI workflow
Oct 11, 2025
09e52f7
Ensure virtual environment is activated before running pre-commit lin…
Oct 11, 2025
72dc0bd
Activate virtual environment before running tests in CI workflow
Oct 11, 2025
573b159
Activate virtual environment in CI workflows for dependency installat…
Oct 11, 2025
5455786
Ensure virtual environment is activated for linting and testing in CI…
Oct 11, 2025
269e633
Fix virtual environment activation for cross-platform compatibility i…
Oct 11, 2025
65211c0
Refactor virtual environment activation for consistency in CI workflow
Oct 11, 2025
22b38f4
Fix virtual environment activation for cross-platform compatibility i…
Oct 11, 2025
b80a59d
Fix path separator for virtual environment activation in CI workflow
Oct 11, 2025
6a3780c
Bump version to 0.8.1 in pyproject.toml
Oct 11, 2025
bd125c3
replace chinease api desciption with english translation
Oct 11, 2025
4a6ddcc
Refactor README.md for clarity and consistency; update API documentat…
Oct 11, 2025
48b83a8
Add development dependencies and configure workspace settings in pypr…
Oct 11, 2025
b5f336a
Remove outdated documentation dependencies from requirements.txt
Oct 11, 2025
1c0ca4d
Refactor README.rst for improved clarity and structure; update introd…
Oct 11, 2025
bacf219
Refactor README.rst to remove reference to Chinese documentation; upd…
Oct 11, 2025
24f6c33
Refactor conversion_filter.py for improved readability; adjust import…
Oct 11, 2025
3d6de02
Refactor conversion_filter.py for improved readability; adjust import…
Oct 11, 2025
9f74e82
Fix commit command in generate_readme.yml to ensure README.md updates…
Oct 11, 2025
8d3df74
Remove alignment from image in README.rst for cleaner presentation
Oct 11, 2025
cd5f455
Auto-update README.md
Oct 11, 2025
32290dd
Remove unnecessary blank line in python-publish.yml for cleaner workf…
Oct 11, 2025
bd9b5fd
Merge branch 'feature/add_english_api_fix_docu' of https://github.com…
Oct 11, 2025
f9188de
Add local hook to generate README.md from README.rst using pandoc
Oct 11, 2025
55369ac
Change exit code to 0 for pandoc installation warning in README gener…
Oct 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions .github/workflows/build_deploy_pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,16 @@ jobs:
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update; sudo apt-get install python3 python3-venv;\
python -m venv venv;source venv/bin/activate;\
pip install -r docs/requirements.txt
pip install .
sudo apt-get update; sudo apt-get install python3
pip install uv
uv sync
- name: Sphinx Build
# You may pin to the exact commit or the version.
# uses: ammaraskar/sphinx-action@8b4f60114d7fd1faeba1a712269168508d4750d2
#uses: ammaraskar/sphinx-action@0.4
run: source venv/bin/activate; cd docs; make html; cd ..
- name: Move ressources to html folder
run: echo "$(ls -l docs/_build/html)";echo "Current user is $(id)";cp -r ressources docs/_build/html
run: source .venv/bin/activate; cd docs; make html; cd ..
- name: Move resources to html folder
run: echo "$(ls -l docs/_build/html)";echo "Current user is $(id)";cp -r resources docs/_build/html
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/generate_readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ name: Generate Markdown Readme
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
branches: [ "main" ]
pull_request:
branches: [ "main" ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -23,6 +25,8 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: Convert to Markdown
run: |
sudo apt-get install pandoc
Expand All @@ -33,6 +37,10 @@ jobs:
git config --global user.name 'GH Action'
git config --global user.email 'python@tomtana.net'
git add README.md
git diff-index --quiet HEAD || git commit -m "auto README.md generation"
git push
git commit -m "Auto-update README.md" || echo "No changes to commit"
if [ "${{ github.event_name }}" = "pull_request" ]; then
git push origin HEAD:${{ github.head_ref }}
else
git push origin HEAD:${GITHUB_REF#refs/heads/}
fi

6 changes: 3 additions & 3 deletions .github/workflows/python-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
if [ -f tests/requirements.txt ]; then pip install -r tests/requirements.txt; fi
if [ -f setup.py ]; then pip install .; fi
python -m pip install uv
uv sync
- name: Generate coverage report
run: |
source .venv/bin/activate
echo "$(ls -la)"
echo "$(pwd)"
cd tests
Expand Down
25 changes: 14 additions & 11 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
os: [ubuntu-latest, macos-latest, windows-latest]
exclude:
- os: macos-latest
python-version: ["3.8", "3.9"]
python-version: ["3.9"]
- os: windows-latest
python-version: ["3.8", "3.9"]
python-version: ["3.9"]

steps:
- uses: actions/checkout@v3
Expand All @@ -32,18 +32,20 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
pip install -r tests/requirements.txt;
pip install .
- name: Lint with flake8
python -m pip install uv
uv sync
source .venv/bin/activate || source .venv/Scripts/activate
echo PATH=$PATH >> $GITHUB_ENV
pre-commit install
- name: Lint with ruff
shell: bash
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
pre-commit run -a || exit 1
- name: Test with pytest
shell: bash
run: |
pytest
buildall:
Expand All @@ -54,4 +56,5 @@ jobs:
steps:
- name: Check build matrix status
if: ${{ needs.build.result != 'success' }}
shell: bash
run: exit 1
8 changes: 6 additions & 2 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
deploy:
name: publish_pip
runs-on: ubuntu-latest


steps:
- uses: actions/checkout@v3
Expand All @@ -29,9 +30,12 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
pip install uv
uv sync
- name: Build package
run: python -m build
run: |
source .venv/bin/activate
python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
/venv/
.venv/
.mypy_cache/
.ruff_cache/
.pytest_cache/
*.egg-info/
*.egg
.idea
__*/
/python_glinet.egg-info/*
Expand Down
24 changes: 24 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.14.0
hooks:
# Run the linter.
- id: ruff-check
args: [ --fix ]
# Run the formatter.
- id: ruff-format
- repo: local
hooks:
- id: generate-readme
name: Generate README.md from README.rst
entry: |
bash -c '
if ! command -v pandoc >/dev/null 2>&1; then
echo "WARNING: pandoc is not installed. Please install it with: sudo apt-get install pandoc"
exit 0
fi
pandoc -s --filter docs/conversion_filter.py docs/README.rst -o README.md && git add README.md
'
language: system
files: ^docs/README\.rst$
Loading