Skip to content

Commit dbc5462

Browse files
committed
Migrate to Poetry and Makefile-based workflow
Replaces tox and requirements files with Poetry for dependency management and a Makefile for task automation. Updates CI/CD to use GitHub Actions with Poetry and Make, adds Python 3.13 support, and drops support for Python 3.9/3.10. Updates Dockerfile, .gitignore, and documentation to reflect the new workflow. Removes legacy files including setup.py, tox.ini, Travis CI, and requirements files.
1 parent d18097c commit dbc5462

22 files changed

+1211
-340
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
description: Makefile-based development workflow for ssllabs-scan
3+
globs: ["Makefile", "pyproject.toml", "ssllabsscan/**"]
4+
alwaysApply: true
5+
---
6+
7+
# ssllabs-scan Development Workflow
8+
9+
## Build and Test Commands
10+
Use the Makefile for all build and test operations:
11+
12+
### Build Commands
13+
- `make build` - Build the Python package
14+
- `make install-deps` - Install project dependencies
15+
- `make install-test-deps` - Install test dependencies
16+
17+
### Test Commands
18+
- `make test` - Run unit tests without coverage
19+
- `make test-coverage` - Run unit tests with coverage reporting
20+
- `make yamllint` - Run yamllint on GitHub workflow files
21+
22+
### Development Commands
23+
- `make clean` - Clean test artifacts, build artifacts and temporary files
24+
- `make help` - Show all available targets
25+
26+
## Project Structure
27+
- Main package: `ssllabsscan/`
28+
- Tests: `ssllabsscan/tests/`
29+
- CLI entry point: `ssllabs-scan` (defined in pyproject.toml)
30+
- Configuration: `pyproject.toml`
31+
32+
## Development Workflow
33+
1. Install dependencies: `make install-deps`
34+
2. Run tests: `make test` or `make test-coverage`
35+
3. Build package: `make build`
36+
4. Run application: `ssllabs-scan` (after installation)
37+
5. Clean artifacts: `make clean`
38+
39+
## Python Environment
40+
- Python 3.11+ required (uses Python 3.13 via Poetry)
41+
- Uses Poetry for Python package management
42+
- Uses setuptools for building
43+
- Dependencies managed via pyproject.toml
44+
- Test dependencies in optional-dependencies.test
45+
46+
## Code Quality
47+
- Use `make yamllint` for YAML linting
48+
- Use `make test-coverage` for comprehensive testing
49+
- Clean up with `make clean` before commits

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,15 @@ updates:
2222
time: "09:00"
2323
timezone: Australia/Melbourne
2424
open-pull-requests-limit: 1
25+
26+
- package-ecosystem: poetry
27+
directory: "/"
28+
groups:
29+
all-dependencies:
30+
patterns:
31+
- "*"
32+
schedule:
33+
interval: weekly
34+
time: "09:30"
35+
timezone: Australia/Melbourne
36+
open-pull-requests-limit: 1

.github/linters/.yaml-lint.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
extends: default
2+
3+
rules:
4+
# Allow longer lines for GitHub Actions
5+
line-length:
6+
max: 120
7+
level: warning
8+
9+
# Allow comments
10+
comments:
11+
min-spaces-from-content: 1
12+
13+
# Allow trailing spaces in some contexts
14+
trailing-spaces:
15+
level: warning
16+
17+
# Allow different indentation for YAML anchors
18+
indentation:
19+
spaces: 2
20+
indent-sequences: true
21+
check-multi-line-strings: false
22+
23+
# Allow truthy values
24+
truthy:
25+
allowed-values: ['true', 'false', 'on', 'off', 'yes', 'no']
26+
check-keys: false
27+
28+
# Allow document start
29+
document-start:
30+
present: false
31+
32+
# Allow empty lines
33+
empty-lines:
34+
max: 2
35+
max-start: 0
36+
max-end: 1
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Build and Test
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- '**.json'
7+
- '**.md'
8+
9+
defaults:
10+
run:
11+
shell: bash
12+
13+
jobs:
14+
lint:
15+
name: Run yamllint on workflows
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v5
19+
- name: Set up Python
20+
uses: actions/setup-python@v6
21+
with:
22+
python-version: "3.13"
23+
- name: Install Poetry
24+
run: pip install poetry
25+
- name: Install yamllint
26+
run: poetry install --only dev
27+
- name: Run yamllint
28+
run: make yamllint
29+
30+
build:
31+
needs: lint
32+
runs-on: ubuntu-latest
33+
strategy:
34+
matrix:
35+
python-version: ["3.11", "3.12", "3.13"]
36+
37+
steps:
38+
- name: Checkout source
39+
uses: actions/checkout@v5
40+
41+
- name: Set up Python ${{ matrix.python-version }}
42+
uses: actions/setup-python@v6
43+
with:
44+
python-version: ${{ matrix.python-version }}
45+
46+
- name: Install dependencies
47+
run: make install-test-deps
48+
49+
- name: Run tests with coverage
50+
run: make test-coverage
51+
52+
- name: Upload coverage to Codecov
53+
if: matrix.python-version == '3.13'
54+
uses: codecov/codecov-action@v5
55+
with:
56+
file: ./coverage.xml
57+
flags: unittests
58+
name: codecov-umbrella
59+
fail_ci_if_error: false
60+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/ci-workflow.yaml

Lines changed: 0 additions & 54 deletions
This file was deleted.

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: CodeQL
33
on:
44
push:
55
branches: [main]
6+
pull_request:
7+
branches: [main]
68
schedule:
79
- cron: '0 19 * * 5'
810

@@ -14,38 +16,12 @@ jobs:
1416
steps:
1517
- name: Checkout repository
1618
uses: actions/checkout@v5
17-
with:
18-
# We must fetch at least the immediate parents so that if this is
19-
# a pull request then we can checkout the head.
20-
fetch-depth: 2
21-
22-
# If this run was triggered by a pull request event, then checkout
23-
# the head of the pull request instead of the merge commit.
24-
- run: git checkout HEAD^2
25-
if: ${{ github.event_name == 'pull_request' }}
2619

2720
# Initializes the CodeQL tools for scanning.
2821
- name: Initialize CodeQL
2922
uses: github/codeql-action/init@v4
30-
# Override language selection by uncommenting this and choosing your languages
31-
# with:
32-
# languages: go, javascript, csharp, python, cpp, java
33-
34-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
35-
# If this step fails, then you should remove it and run the build manually (see below)
36-
- name: Autobuild
37-
uses: github/codeql-action/autobuild@v4
38-
39-
# ℹ️ Command-line programs to run using the OS shell.
40-
# 📚 https://git.io/JvXDl
41-
42-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
43-
# and modify them (or add more) to build your code if your project
44-
# uses a compiled language
45-
46-
#- run: |
47-
# make bootstrap
48-
# make release
23+
with:
24+
languages: python
4925

5026
- name: Perform CodeQL Analysis
5127
uses: github/codeql-action/analyze@v4

0 commit comments

Comments
 (0)