Skip to content

Commit aaead43

Browse files
feat: pyproject-tui v0.1.0
0 parents  commit aaead43

41 files changed

Lines changed: 5235 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.go]
12+
indent_style = tab
13+
indent_size = 4
14+
15+
[Makefile]
16+
indent_style = tab
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Bug Report
2+
description: File a bug report
3+
title: "[Bug]: "
4+
labels: ["bug", "triage"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: Thanks for taking the time to report a bug.
9+
- type: input
10+
id: version
11+
attributes:
12+
label: pyproject-tui version
13+
placeholder: "v0.1.0"
14+
validations:
15+
required: true
16+
- type: input
17+
id: os
18+
attributes:
19+
label: Operating System
20+
placeholder: "Ubuntu 24.04 / macOS 15 / Windows 11"
21+
validations:
22+
required: true
23+
- type: textarea
24+
id: description
25+
attributes:
26+
label: Describe the bug
27+
validations:
28+
required: true
29+
- type: textarea
30+
id: steps
31+
attributes:
32+
label: Steps to reproduce
33+
validations:
34+
required: true
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Feature Request
2+
description: Suggest a new feature or improvement
3+
title: "[Feat]: "
4+
labels: ["enhancement"]
5+
body:
6+
- type: textarea
7+
id: problem
8+
attributes:
9+
label: Problem / motivation
10+
validations:
11+
required: true
12+
- type: textarea
13+
id: solution
14+
attributes:
15+
label: Proposed solution
16+
validations:
17+
required: true

.github/pull_request_template.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## Summary
2+
<!-- What does this PR do? -->
3+
4+
## Type
5+
- [ ] Bug fix
6+
- [ ] New feature
7+
- [ ] Breaking change
8+
- [ ] Docs / tooling
9+
10+
## Checklist
11+
- [ ] Tests pass (`make test`)
12+
- [ ] Lint passes (`make lint`)
13+
- [ ] `CHANGELOG.md` updated if needed
14+
- [ ] `README.md` updated if needed

.github/workflows/ci.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
paths:
7+
- "VERSION"
8+
- "**/*.go"
9+
- "go.mod"
10+
- "go.sum"
11+
- ".github/workflows/ci.yml"
12+
pull_request:
13+
branches: [main, master]
14+
paths:
15+
- "VERSION"
16+
- "**/*.go"
17+
- "go.mod"
18+
- "go.sum"
19+
- ".github/workflows/ci.yml"
20+
workflow_dispatch:
21+
22+
permissions:
23+
contents: read
24+
25+
jobs:
26+
test:
27+
name: Test
28+
runs-on: ${{ matrix.os }}
29+
strategy:
30+
matrix:
31+
os: [ubuntu-latest, macos-latest, windows-latest]
32+
steps:
33+
- uses: actions/checkout@v4
34+
- uses: actions/setup-go@v5
35+
with:
36+
go-version-file: go.mod
37+
cache: true
38+
- name: Verify version file
39+
shell: bash
40+
run: test -s VERSION
41+
- name: Run tests
42+
run: go test ./...
43+
44+
build:
45+
name: Build
46+
runs-on: ubuntu-latest
47+
needs: [test]
48+
steps:
49+
- uses: actions/checkout@v4
50+
- uses: actions/setup-go@v5
51+
with:
52+
go-version-file: go.mod
53+
cache: true
54+
- name: Build binary
55+
run: make build

.github/workflows/release.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
snapshot:
7+
description: "Build a snapshot instead of publishing a release"
8+
required: false
9+
default: "false"
10+
version:
11+
description: "Version to publish from VERSION"
12+
required: false
13+
default: ""
14+
15+
permissions:
16+
contents: write
17+
packages: write
18+
19+
jobs:
20+
release:
21+
name: GoReleaser
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
- uses: actions/setup-go@v5
28+
with:
29+
go-version-file: go.mod
30+
cache: true
31+
- name: Load version
32+
shell: bash
33+
run: echo "VERSION=$(tr -d '\r\n' < VERSION)" >> "$GITHUB_ENV"
34+
- name: Verify version override
35+
shell: bash
36+
run: |
37+
if [ -n "${{ inputs.version }}" ] && [ "${{ inputs.version }}" != "$VERSION" ]; then
38+
echo "VERSION file does not match the requested release version." >&2
39+
exit 1
40+
fi
41+
- name: Create release tag
42+
if: ${{ inputs.snapshot != 'true' }}
43+
shell: bash
44+
run: |
45+
git config user.name "github-actions[bot]"
46+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
47+
TAG="v${VERSION}"
48+
if git rev-parse -q --verify "refs/tags/${TAG}" >/dev/null; then
49+
echo "Tag ${TAG} already exists." >&2
50+
exit 1
51+
fi
52+
git tag -a "${TAG}" -m "Release ${TAG}"
53+
git push origin "${TAG}"
54+
- name: Run GoReleaser snapshot
55+
if: ${{ inputs.snapshot == 'true' }}
56+
uses: goreleaser/goreleaser-action@v6
57+
with:
58+
distribution: goreleaser
59+
version: latest
60+
args: release --snapshot --clean
61+
env:
62+
VERSION: ${{ env.VERSION }}
63+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64+
- name: Run GoReleaser release
65+
if: ${{ inputs.snapshot != 'true' }}
66+
uses: goreleaser/goreleaser-action@v6
67+
with:
68+
distribution: goreleaser
69+
version: latest
70+
args: release --clean
71+
env:
72+
VERSION: ${{ env.VERSION }}
73+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Binaries
2+
dist/
3+
*.exe
4+
*.exe~
5+
*.dll
6+
*.so
7+
*.dylib
8+
pyproject-tui
9+
10+
# Test artifacts
11+
*.test
12+
*.out
13+
coverage.out
14+
coverage.html
15+
16+
# Build cache
17+
vendor/
18+
19+
# Editor
20+
.idea/
21+
.vscode/
22+
*.swp
23+
*.swo
24+
*~
25+
.DS_Store
26+
27+
# GoReleaser
28+
dist/
29+
30+
# App-related artifacts
31+
.pyproject-tui.toml
32+
pyproject.toml

.golangci.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
version: "2"
2+
3+
run:
4+
timeout: 5m
5+
tests: true
6+
modules-download-mode: readonly
7+
8+
linters:
9+
default: none
10+
enable:
11+
- errcheck
12+
- gocritic
13+
- gocyclo
14+
- govet
15+
- ineffassign
16+
- misspell
17+
- revive
18+
- staticcheck
19+
- unused
20+
settings:
21+
gocyclo:
22+
min-complexity: 90
23+
goimports:
24+
local-prefixes: github.com/programmersd21/pyproject-tui
25+
govet:
26+
enable:
27+
- shadow
28+
misspell:
29+
locale: US
30+
revive:
31+
rules:
32+
- name: blank-imports
33+
- name: context-as-argument
34+
- name: context-keys-type
35+
- name: error-return
36+
- name: error-strings
37+
- name: error-naming
38+
- name: exported
39+
- name: if-return
40+
- name: increment-decrement
41+
- name: package-comments
42+
- name: range
43+
- name: receiver-naming
44+
- name: time-naming
45+
- name: unexported-return
46+
- name: indent-error-flow
47+
- name: errorf
48+
- name: empty-block
49+
- name: superfluous-else
50+
- name: unused-parameter
51+
- name: unreachable-code
52+
53+
formatters:
54+
enable:
55+
- gofmt
56+
- goimports
57+
58+
issues:
59+
exclude-rules:
60+
- path: _test\.go
61+
linters:
62+
- gocyclo
63+
- path: cmd/
64+
linters:
65+
- revive
66+
max-issues-per-linter: 0
67+
max-same-issues: 0

0 commit comments

Comments
 (0)