Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
46 changes: 28 additions & 18 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,50 @@ on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.6, 3.7, 3.8]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] # Updated to versions compatible with uv
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
shell: bash

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install it
source $HOME/.cargo/env # Ensure uv is in PATH for subsequent steps
uv pip install --system -r requirements.txt
uv pip install --system pytest pytest-cov # For running tests

- name: Install package
run: |
python setup.py install
- name: Lint with flake8
source $HOME/.cargo/env
uv pip install --system .

- name: Lint with black
run: |
pip install flake8
# 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
source $HOME/.cargo/env
uv run black --check .

- name: Run pytest and Generate coverage report
run: |
pip install pytest pytest-cov
python -m pytest --cov=argmark --cov-report=xml
source $HOME/.cargo/env
uv run pytest --cov=argmark --cov-report=xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
name: codecov-umbrella
name: codecov-umbrella # Optional: can be removed if not specifically needed
fail_ci_if_error: true
env: # Ensure environment variables are available if action needs them
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
```
30 changes: 20 additions & 10 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,33 @@ on:

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
python-version: '3.x' # Use a recent Python 3.x, uv will be installed within it

- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
shell: bash

- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
source $HOME/.cargo/env # Ensure uv is in PATH
uv pip install --system build twine

- name: Build package
run: |
source $HOME/.cargo/env
uv run python -m build --sdist --wheel

- name: Publish package
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
source $HOME/.cargo/env # Not strictly necessary for twine if twine is in system PATH after install
twine upload dist/*
```
69 changes: 69 additions & 0 deletions app.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@

app
===

# Description


Main app with subparsers.
# Usage:


```bash
usage: app [-h] [--verbose] {command1,command2} ...

```
# Arguments

|short|long|default|help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|
||`--verbose`||Enable verbose output.|

# Subcommands

## Subcommand: `command1`

# Description


Detailed desc for command1
# Usage:


```bash
usage: app command1 [-h] [--opt1 OPT1] pos1

```
## Arguments

|short|long|default|help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|
||`--opt1`|`10`|Option for command1.|
||`pos1`||Positional arg for command1.|


---
## Subcommand: `command2`

# Epilog


Epilog for command2
# Usage:


```bash
usage: app command2 [-h] [--flag]

```
## Arguments

|short|long|default|help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|
||`--flag`||A boolean flag for command2.|


---
Loading