Compare commits
4 Commits
cursor/aut
...
655cbd6fbf
| Author | SHA1 | Date | |
|---|---|---|---|
| 655cbd6fbf | |||
| 2d90ec53b2 | |||
| 871ceee051 | |||
| e6e8261ed7 |
75
.github/workflows/bump-version.yml
vendored
75
.github/workflows/bump-version.yml
vendored
@@ -1,75 +0,0 @@
|
||||
# Manually bump package version and open a PR to main.
|
||||
# Actions → Bump version → Run workflow → choose patch / minor / major.
|
||||
name: Bump version
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
part:
|
||||
description: Version part to bump
|
||||
required: true
|
||||
type: choice
|
||||
options:
|
||||
- patch
|
||||
- minor
|
||||
- major
|
||||
default: patch
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
concurrency:
|
||||
group: bump-version
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
bump:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout main
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: main
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@v5
|
||||
|
||||
- name: Bump version
|
||||
id: bump
|
||||
run: |
|
||||
set -euo pipefail
|
||||
OLD=$(uvx --from bump-my-version bump-my-version show current_version)
|
||||
uvx --from bump-my-version bump-my-version bump "${{ inputs.part }}" --no-commit --no-tag
|
||||
NEW=$(uvx --from bump-my-version bump-my-version show current_version)
|
||||
echo "old=${OLD}" >> "$GITHUB_OUTPUT"
|
||||
echo "new=${NEW}" >> "$GITHUB_OUTPUT"
|
||||
echo "Bumped ${OLD} → ${NEW} (${{ inputs.part }})"
|
||||
|
||||
- name: Create pull request
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
OLD="${{ steps.bump.outputs.old }}"
|
||||
NEW="${{ steps.bump.outputs.new }}"
|
||||
BRANCH="chore/bump-version-${NEW}"
|
||||
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
git checkout -b "$BRANCH"
|
||||
git add pyproject.toml
|
||||
git commit -m "Bump version: ${OLD} → ${NEW}"
|
||||
git push -u origin "$BRANCH"
|
||||
|
||||
gh pr create \
|
||||
--base main \
|
||||
--head "$BRANCH" \
|
||||
--title "Bump version to ${NEW}" \
|
||||
--body "## Summary
|
||||
|
||||
Automated \`${{ inputs.part }}\` bump: \`${OLD}\` → \`${NEW}\`.
|
||||
|
||||
Source: \`[project].version\` in \`pyproject.toml\` (via bump-my-version)."
|
||||
42
.github/workflows/mirror-to-gitea.yml
vendored
42
.github/workflows/mirror-to-gitea.yml
vendored
@@ -1,42 +0,0 @@
|
||||
# Mirror all branches and tags from GitHub → Gitea after every ref change.
|
||||
# Requires repo secret GITEA_TOKEN (Gitea PAT with write:repository on rhino/xlsx-clean).
|
||||
name: Mirror to Gitea
|
||||
|
||||
on:
|
||||
push:
|
||||
delete:
|
||||
create:
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: mirror-to-gitea
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
mirror:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Mirror repository to Gitea
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if [ -z "${GITEA_TOKEN:-}" ]; then
|
||||
echo "Missing secret GITEA_TOKEN (Gitea PAT with write:repository)." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
git clone --mirror \
|
||||
"https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" \
|
||||
mirror.git
|
||||
cd mirror.git
|
||||
|
||||
# Push only branches/tags. Never push GitHub refs/pull/* — Gitea
|
||||
# rejects those with "hook declined" and fails the whole mirror.
|
||||
git push --prune \
|
||||
"https://rhino:${GITEA_TOKEN}@git.faryad.top/rhino/xlsx-clean.git" \
|
||||
"+refs/heads/*:refs/heads/*" \
|
||||
"+refs/tags/*:refs/tags/*"
|
||||
0
desktop/setup_linux.sh
Executable file → Normal file
0
desktop/setup_linux.sh
Executable file → Normal file
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "xlsx-clean"
|
||||
version = "0.2.0"
|
||||
version = "0.1.0"
|
||||
description = "Create a new QC datasheet from the latest matching workbook"
|
||||
authors = [
|
||||
{ name = "Diaco Soltanpour", email = "dyaco8464@yahoo.com" }
|
||||
@@ -41,19 +41,3 @@ packages = ["src/xlsx_clean"]
|
||||
|
||||
[tool.uv]
|
||||
package = true
|
||||
|
||||
# Version bumps: `uvx bump-my-version bump patch|minor|major`
|
||||
# current_version falls back to [project].version above.
|
||||
[tool.bumpversion]
|
||||
commit = false
|
||||
tag = false
|
||||
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
|
||||
serialize = ["{major}.{minor}.{patch}"]
|
||||
message = "Bump version: {current_version} → {new_version}"
|
||||
tag_name = "v{new_version}"
|
||||
tag_message = "Bump version: {current_version} → {new_version}"
|
||||
|
||||
[[tool.bumpversion.files]]
|
||||
filename = "pyproject.toml"
|
||||
search = 'version = "{current_version}"'
|
||||
replace = 'version = "{new_version}"'
|
||||
|
||||
@@ -6,8 +6,8 @@ dir,pattern,set_name,cells_to_clear,serial_cell,notes_cell
|
||||
"D:\OpenCloud\Kimia Razi\Production\QC Datasheet\1403\KRBR1201T Brown","KRBR1201T Brown [SERIAL].xlsx","Kimia Razi","Batch!F2:F3,Batch!E12:G12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11","Batch!D3","Batch!D25"
|
||||
"D:\OpenCloud\Kimia Razi\Production\QC Datasheet\1403\KRYL1400T Yellow","KRYL1400T Yellow [SERIAL].xlsx","Kimia Razi","Batch!F2:F3,Batch!G12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D7:D8,Milling!D11","Batch!D3","Batch!D25"
|
||||
"D:\OpenCloud\Kimia Razi\Production\QC Datasheet\1403\KRYL1401T Yellow","KRYL1401T Yellow [SERIAL].xlsx","Kimia Razi","Batch!F2:F3,Batch!E12:G12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11","Batch!D3","Batch!D25"
|
||||
"D:\OpenCloud\Kimia Razi\Production\QC Datasheet\1403\KRBG1600T Beige","KRBG1600T Beige [SERIAL].xlsx","Kimia Razi","Batch!F2:F3,Batch!F12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D7:D8,Milling!D11","Batch!D3","Batch!D25"
|
||||
"D:\OpenCloud\Kimia Razi\Production\QC Datasheet\1403\KRPK1500T Pink","KRPK1500T Pink [SERIAL].xlsx","Kimia Razi","Batch!F2:F3,Batch!G12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D7:D8,Milling!D11","Batch!D3","Batch!D25"
|
||||
"D:\OpenCloud\Kimia Razi\Production\QC Datasheet\1403\KRBG1600T Beige","KRBG1600T Beige [SERIAL].xlsx","Kimia Razi","Batch!F2:F3,Batch!G12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D7:D8,Milling!D11","Batch!D3","Batch!D25"
|
||||
"D:\OpenCloud\Kimia Razi\Production\QC Datasheet\1403\KRPK1500T Pink","KRPK1500T Pink [SERIAL].xlsx","Kimia Razi","Batch!F2:F3,Batch!F12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D7:D8,Milling!D11","Batch!D3","Batch!D25"
|
||||
"D:\OpenCloud\Kimia Razi\Production\QC Datasheet\1403\KRHN1700T Honey","KRHN1700T Honey [SERIAL].xlsx","Kimia Razi","Batch!F2:F3,Batch!G12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D7:D8,Milling!D11","Batch!D3","Batch!D25"
|
||||
"D:\OpenCloud\inco\Quality control data sheet\2025\ICJ108 Beige","ICJ_108 op. [SERIAL].xlsx","inco","Batch!F2:F3,Batch!E12:F12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11","Batch!D3","Batch!D25"
|
||||
"D:\OpenCloud\inco\Quality control data sheet\2026\ICJ610 Black","ICJ_610 op. [SERIAL].xlsx","inco","Batch!F2:F3,Batch!E12:F12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11","Batch!D3","Batch!D25"
|
||||
|
||||
|
@@ -26,7 +26,7 @@ def _app_version() -> str:
|
||||
try:
|
||||
return package_version(_PACKAGE_NAME)
|
||||
except PackageNotFoundError:
|
||||
return "dev"
|
||||
return "0.1.0"
|
||||
|
||||
|
||||
def _app_title(version: str | None = None) -> str:
|
||||
|
||||
Reference in New Issue
Block a user