Skip to content

Commit 6ef937c

Browse files
authored
Merge pull request #20 from HappyHackingSpace/refactor/project-structure
Refactor/project structure
2 parents e42afd4 + 4a1e1dd commit 6ef937c

49 files changed

Lines changed: 9341 additions & 344 deletions

Some content is hidden

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

.editorconfig

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
root=true
2+
3+
[*]
4+
charset=utf-8
5+
end_of_line=lf
6+
insert_final_newline=false
7+
indent_style=space
8+
indent_size=2
9+
trim_trailing_whitespace=true
10+
11+
[*.py]
12+
indent_size=4
13+
14+
[{*.ng,*.sht,*.html,*.shtm,*.shtml,*.htm}]
15+
indent_style=space
16+
indent_size=2
17+
18+
[{*.jhm,*.xslt,*.xul,*.rng,*.xsl,*.xsd,*.ant,*.tld,*.fxml,*.jrxml,*.xml,*.jnlp,*.wsdl}]
19+
indent_style=space
20+
indent_size=2
21+
22+
[{.babelrc,.stylelintrc,jest.config,.eslintrc,.prettierrc,*.json,*.jsb3,*.jsb2,*.bowerrc}]
23+
indent_style=space
24+
indent_size=2
25+
26+
[*.svg]
27+
indent_style=space
28+
indent_size=2
29+
30+
[*.js.map]
31+
indent_style=space
32+
indent_size=2
33+
34+
[*.less]
35+
indent_style=space
36+
indent_size=2
37+
38+
[*.vue]
39+
indent_style=space
40+
indent_size=2
41+
42+
[{.analysis_options,*.yml,*.yaml}]
43+
indent_style=space
44+
indent_size=2

.env.example

Lines changed: 0 additions & 1 deletion
This file was deleted.

.env.template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
GEMINI_API_KEY=foo

.github/workflows/ci.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
python-version: ["3.13"]
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
22+
- name: Install uv
23+
uses: astral-sh/setup-uv@v4
24+
with:
25+
version: "latest"
26+
27+
- name: Install dependencies
28+
run: |
29+
uv sync
30+
31+
- name: Set up test environment
32+
run: |
33+
cp .env.template .env
34+
35+
- name: Run linting
36+
run: |
37+
uv run ruff check ./levelup/
38+
uv run ruff format --check ./levelup/
39+
40+
- name: Run type checking
41+
run: |
42+
uv run mypy ./levelup/
43+
44+
- name: Run tests
45+
run: |
46+
uv run pytest

.github/workflows/ci.yml

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

.github/workflows/docs.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
deploy:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0 # Needed for gh-deploy
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: '3.13'
24+
25+
- name: Install uv
26+
uses: astral-sh/setup-uv@v4
27+
with:
28+
version: "latest"
29+
30+
- name: Install dependencies
31+
run: |
32+
uv sync
33+
34+
- name: Test MkDocs build
35+
run: |
36+
uv run mkdocs build --verbose
37+
38+
- name: Configure Git
39+
run: |
40+
git config --global user.name "github-actions[bot]"
41+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
42+
43+
- name: Deploy to GitHub Pages
44+
run: |
45+
uv run mkdocs gh-deploy --force

.github/workflows/release.yaml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
workflow_dispatch:
8+
9+
jobs:
10+
build-and-release:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
id-token: write
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Set up Python
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: '3.10'
25+
26+
- name: Install uv
27+
uses: astral-sh/setup-uv@v4
28+
with:
29+
version: "latest"
30+
31+
- name: Install dependencies
32+
run: |
33+
uv sync --dev
34+
35+
- name: Get package version
36+
id: get_version
37+
run: |
38+
VERSION=$(grep -m1 'version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
39+
echo "VERSION=$VERSION" >> $GITHUB_ENV
40+
echo "Package version: $VERSION"
41+
42+
- name: Build package
43+
run: uv build
44+
45+
- name: Run tests
46+
run: |
47+
uv run pytest
48+
49+
- name: Run linting
50+
run: |
51+
uv run ruff check
52+
uv run ruff format --check
53+
54+
- name: Create Release
55+
id: create_release
56+
uses: actions/create-release@v1
57+
env:
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59+
with:
60+
tag_name: v${{ env.VERSION }}
61+
release_name: Release v${{ env.VERSION }}
62+
draft: false
63+
prerelease: false
64+
65+
- name: Upload Wheel
66+
uses: actions/upload-release-asset@v1
67+
env:
68+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69+
with:
70+
upload_url: ${{ steps.create_release.outputs.upload_url }}
71+
asset_path: ./dist/privacy_policy-${{ env.VERSION }}-py3-none-any.whl
72+
asset_name: privacy_policy-${{ env.VERSION }}-py3-none-any.whl
73+
asset_content_type: application/octet-stream
74+
75+
- name: Upload Source
76+
uses: actions/upload-release-asset@v1
77+
env:
78+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
79+
with:
80+
upload_url: ${{ steps.create_release.outputs.upload_url }}
81+
asset_path: ./dist/levelup-${{ env.VERSION }}.tar.gz
82+
asset_name: levelup-${{ env.VERSION }}.tar.gz
83+
asset_content_type: application/gzip

0 commit comments

Comments
 (0)