pylynqa 0.1.0a1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,16 @@
1
+ # An .aiignore file follows the same syntax as a .gitignore file.
2
+ # .gitignore documentation: https://git-scm.com/docs/gitignore
3
+
4
+ # you can ignore files
5
+ .DS_Store
6
+ *.log
7
+ *.tmp
8
+
9
+ # or folders
10
+ dist/
11
+ build/
12
+ out/
13
+
14
+ .env
15
+ venv/
16
+ .venv/
@@ -0,0 +1,105 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: ["main"]
6
+ pull_request:
7
+ workflow_dispatch:
8
+ schedule:
9
+ - cron: '0 23 * * 1-5'
10
+
11
+ jobs:
12
+ quality:
13
+ name: Code quality (Python ${{ matrix.python-version }})
14
+ runs-on: ubuntu-latest
15
+ if: github.event_name != 'schedule'
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ python-version: ["3.9", "3.11", "3.13"]
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+
23
+ - name: Set up Python ${{ matrix.python-version }}
24
+ uses: actions/setup-python@v5
25
+ with:
26
+ python-version: ${{ matrix.python-version }}
27
+ cache: pip
28
+
29
+ - name: Install with dev dependencies
30
+ run: pip install -e ".[dev]"
31
+
32
+ - name: ruff check
33
+ run: ruff check .
34
+
35
+ - name: ruff format
36
+ run: ruff format --check .
37
+
38
+ typecheck:
39
+ name: Type check
40
+ runs-on: ubuntu-latest
41
+ if: github.event_name != 'schedule'
42
+ # Run on the newest Python so `pip` resolves pytest 9 (typed cleanly).
43
+ # ty still targets 3.9 via `python-version` in pyproject.toml.
44
+ # pytest 8 (the only build for 3.9) hides skip()/fail() behind a
45
+ # decorator ty can't introspect, which produces false positives.
46
+ steps:
47
+ - uses: actions/checkout@v4
48
+
49
+ - name: Set up Python
50
+ uses: actions/setup-python@v5
51
+ with:
52
+ python-version: "3.13"
53
+ cache: pip
54
+
55
+ - name: Install with dev dependencies
56
+ run: pip install -e ".[dev]"
57
+
58
+ - name: ty
59
+ run: ty check --output-format github
60
+
61
+ test:
62
+ name: Tests (Python ${{ matrix.python-version }})
63
+ runs-on: ubuntu-latest
64
+ if: github.event_name != 'schedule'
65
+ strategy:
66
+ fail-fast: false
67
+ matrix:
68
+ python-version: ["3.9", "3.11", "3.13"]
69
+
70
+ steps:
71
+ - uses: actions/checkout@v4
72
+
73
+ - name: Set up Python ${{ matrix.python-version }}
74
+ uses: actions/setup-python@v5
75
+ with:
76
+ python-version: ${{ matrix.python-version }}
77
+ cache: pip
78
+
79
+ - name: Install with dev dependencies
80
+ run: pip install -e ".[dev]"
81
+
82
+ - name: Run tests
83
+ run: pytest . -v --tb=short
84
+
85
+ atest:
86
+ name: Acceptance tests
87
+ runs-on: ubuntu-latest
88
+ if: github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'
89
+
90
+ steps:
91
+ - uses: actions/checkout@v4
92
+
93
+ - name: Set up Python
94
+ uses: actions/setup-python@v5
95
+ with:
96
+ python-version: "3.9"
97
+ cache: pip
98
+
99
+ - name: Install with dev dependencies
100
+ run: pip install -e ".[dev]"
101
+
102
+ - name: Run acceptance tests
103
+ env:
104
+ LYNQA_API_KEY: ${{ secrets.LYNQA_API_KEY }}
105
+ run: pytest src/pylynqa/atest -v --tb=short
@@ -0,0 +1,84 @@
1
+ name: Release
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ permissions:
8
+ contents: read
9
+
10
+ jobs:
11
+ build:
12
+ name: Build distribution
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ # Full history + tags are required for setuptools-scm to derive the version.
17
+ with:
18
+ fetch-depth: 0
19
+
20
+ - name: Set up Python
21
+ uses: actions/setup-python@v5
22
+ with:
23
+ python-version: "3.13"
24
+
25
+ - name: Verify tag matches setuptools-scm version
26
+ run: |
27
+ python -m pip install setuptools-scm
28
+ TAG="${GITHUB_REF_NAME#v}"
29
+ VERSION="$(python -m setuptools_scm)"
30
+ echo "Release tag: $TAG | setuptools-scm version: $VERSION"
31
+ if [ "$TAG" != "$VERSION" ]; then
32
+ echo "::error::Release tag ($TAG) does not match SCM version ($VERSION) — is the tagged commit clean?"
33
+ exit 1
34
+ fi
35
+
36
+ - name: Build sdist and wheel
37
+ run: |
38
+ python -m pip install --upgrade build twine
39
+ python -m build
40
+ twine check dist/*
41
+
42
+ - name: Upload build artifacts
43
+ uses: actions/upload-artifact@v4
44
+ with:
45
+ name: dist
46
+ path: dist/
47
+
48
+ github-release:
49
+ name: Attach artifacts to GitHub Release
50
+ needs: build
51
+ runs-on: ubuntu-latest
52
+ permissions:
53
+ contents: write
54
+ steps:
55
+ - name: Download build artifacts
56
+ uses: actions/download-artifact@v4
57
+ with:
58
+ name: dist
59
+ path: dist/
60
+
61
+ - name: Upload artifacts to the release
62
+ env:
63
+ GH_TOKEN: ${{ github.token }}
64
+ run: gh release upload "${GITHUB_REF_NAME}" dist/* --repo "${GITHUB_REPOSITORY}"
65
+
66
+ pypi-publish:
67
+ name: Publish to PyPI
68
+ needs: build
69
+ runs-on: ubuntu-latest
70
+ # Trusted Publishing: PyPI verifies this workflow via OIDC, no secrets.
71
+ environment:
72
+ name: pypi
73
+ url: https://pypi.org/p/pylynqa
74
+ permissions:
75
+ id-token: write
76
+ steps:
77
+ - name: Download build artifacts
78
+ uses: actions/download-artifact@v4
79
+ with:
80
+ name: dist
81
+ path: dist/
82
+
83
+ - name: Publish to PyPI
84
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,37 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.egg-info/
5
+ *.egg
6
+ dist/
7
+ build/
8
+ .eggs/
9
+
10
+ # Virtual environments
11
+ venv/
12
+ .venv/
13
+ env/
14
+ .env/
15
+
16
+ # Environment variables / secrets
17
+ .env
18
+ .env.*
19
+
20
+ # Test results
21
+ results/
22
+ *.xml
23
+ *.html
24
+
25
+ # IDE
26
+ .idea/
27
+ .vscode/
28
+
29
+ # Claude
30
+ .claude/
31
+
32
+ # OS
33
+ .DS_Store
34
+ Thumbs.db
35
+
36
+ # pytest
37
+ .pytest_cache/
@@ -0,0 +1,16 @@
1
+ VENV := .venv/bin
2
+ file := .
3
+
4
+ .PHONY: lint format ty test
5
+
6
+ lint:
7
+ $(VENV)/ruff check $(file)
8
+
9
+ format:
10
+ $(VENV)/ruff format $(file)
11
+
12
+ ty:
13
+ $(VENV)/ty check $(file)
14
+
15
+ test:
16
+ $(VENV)/pytest src/pylynqa/test -v --tb=short $(file)
@@ -0,0 +1,14 @@
1
+ Metadata-Version: 2.4
2
+ Name: pylynqa
3
+ Version: 0.1.0a1
4
+ Summary: Python client for the Lynqa API
5
+ License: Apache-2.0
6
+ Requires-Python: >=3.9
7
+ Requires-Dist: requests>=2.28
8
+ Provides-Extra: dev
9
+ Requires-Dist: pytest>=7; extra == "dev"
10
+ Requires-Dist: pytest-mock>=3; extra == "dev"
11
+ Requires-Dist: pytest-responses>=0.5; extra == "dev"
12
+ Requires-Dist: ruff>=0.15; extra == "dev"
13
+ Requires-Dist: ty>=0.0; extra == "dev"
14
+ Requires-Dist: coverage>=7.10; extra == "dev"