Compare commits

...

4 Commits

Author SHA1 Message Date
simon
0b1384279d Ready to clone and code. 2026-03-14 12:58:13 +00:00
44b7f644f8 release: version 0.0.1 🚀
All checks were successful
Upload Python Package / Create Release (push) Successful in 15m23s
Rename the project from template / rename-project (push) Successful in 15m27s
Upload Python Package / deploy (push) Successful in 36m39s
2026-03-14 13:43:00 +01:00
083fe54605 fix: second initial commit refs NOISSUE 2026-03-14 13:42:57 +01:00
17cb2aeb24 chore: initial commit refs NOISSUE 2026-03-14 13:42:20 +01:00
12 changed files with 36 additions and 135 deletions

View File

@@ -86,8 +86,8 @@ start() {
echo "New version: $new_version"
gitchangelog | grep -v "[rR]elease:" > HISTORY.md
echo $new_version > project_name/VERSION
git add project_name/VERSION HISTORY.md
echo $new_version > ai_test/VERSION
git add ai_test/VERSION HISTORY.md
git commit -m "release: version $new_version 🚀"
echo "creating git tag : $new_version"
git tag $new_version

View File

@@ -1,38 +0,0 @@
#!/usr/bin/env bash
while getopts a:n:u:d: flag
do
case "${flag}" in
a) author=${OPTARG};;
n) name=${OPTARG};;
u) urlname=${OPTARG};;
d) description=${OPTARG};;
esac
done
echo "Author: $author";
echo "Project Name: $name";
echo "Project URL name: $urlname";
echo "Description: $description";
echo "Renaming project..."
original_author="author_name"
original_name="project_name"
original_urlname="project_urlname"
original_description="project_description"
# for filename in $(find . -name "*.*")
for filename in $(git ls-files)
do
sed -i "s/$original_author/$author/g" $filename
sed -i "s/$original_name/$name/g" $filename
sed -i "s/$original_urlname/$urlname/g" $filename
sed -i "s/$original_description/$description/g" $filename
echo "Renamed $filename"
done
mv project_name $name
# This command runs only once on GHA!
rm -rf .gitea/template.yml
rm -rf project_name
rm -rf project_name.Tests

View File

@@ -1 +0,0 @@
author: rochacbruno

View File

@@ -41,7 +41,7 @@ jobs:
- name: Check version match
run: |
REPOSITORY_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $2}' | tr '-' '_')
if [ "$(cat project_name/VERSION)" = "${GITHUB_REF_NAME}" ] ; then
if [ "$(cat ai_test/VERSION)" = "${GITHUB_REF_NAME}" ] ; then
echo "Version matches successfully!"
else
echo "Version must match!"
@@ -57,5 +57,5 @@ jobs:
run: |
REPOSITORY_OWNER=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $1}' | tr '[:upper:]' '[:lower:]')
REPOSITORY_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $2}' | tr '-' '_')
docker build -t "git.disi.dev/$REPOSITORY_OWNER/project_name:$(cat project_name/VERSION)" -f Containerfile ./
docker push "git.disi.dev/$REPOSITORY_OWNER/project_name:$(cat project_name/VERSION)"
docker build -t "git.disi.dev/$REPOSITORY_OWNER/ai_test:$(cat ai_test/VERSION)" -f Containerfile ./
docker push "git.disi.dev/$REPOSITORY_OWNER/ai_test:$(cat ai_test/VERSION)"

View File

@@ -1,48 +0,0 @@
name: Rename the project from template
on: [push]
permissions: write-all
jobs:
rename-project:
if: ${{ !endsWith (gitea.repository, 'Templates/Docker_Image') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# by default, it uses a depth of 1
# this fetches all history so that we can read each commit
fetch-depth: 0
ref: ${{ gitea.head_ref }}
- run: echo "REPOSITORY_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $2}' | tr '-' '_')" >> $GITHUB_ENV
shell: bash
- run: echo "REPOSITORY_URLNAME=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $2}')" >> $GITHUB_ENV
shell: bash
- run: echo "REPOSITORY_OWNER=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $1}')" >> $GITHUB_ENV
shell: bash
- name: Is this still a template
id: is_template
run: echo "::set-output name=is_template::$(ls .gitea/template.yml &> /dev/null && echo true || echo false)"
- name: Rename the project
if: steps.is_template.outputs.is_template == 'true'
run: |
echo "Renaming the project with -a(author) ${{ env.REPOSITORY_OWNER }} -n(name) ${{ env.REPOSITORY_NAME }} -u(urlname) ${{ env.REPOSITORY_URLNAME }}"
.gitea/rename_project.sh -a ${{ env.REPOSITORY_OWNER }} -n ${{ env.REPOSITORY_NAME }} -u ${{ env.REPOSITORY_URLNAME }} -d "Awesome ${{ env.REPOSITORY_NAME }} created by ${{ env.REPOSITORY_OWNER }}"
- name: Remove renaming workflow
if: steps.is_template.outputs.is_template == 'true'
run: |
rm .gitea/workflows/rename_project.yml
rm .gitea/rename_project.sh
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "✅ Ready to clone and code."
# commit_options: '--amend --no-edit'
push_options: --force

View File

@@ -1,15 +1,15 @@
# How to develop on this project
project_name welcomes contributions from the community.
ai_test welcomes contributions from the community.
This instructions are for linux base systems. (Linux, MacOS, BSD, etc.)
## Setting up your own fork of this repo.
- On gitea interface click on `Fork` button.
- Clone your fork of this repo. `git clone git@git.disi.dev:YOUR_GIT_USERNAME/project_urlname.git`
- Enter the directory `cd project_urlname`
- Add upstream repo `git remote add upstream https://git.disi.dev/author_name/project_urlname`
- Clone your fork of this repo. `git clone git@git.disi.dev:YOUR_GIT_USERNAME/ai-test.git`
- Enter the directory `cd ai-test`
- Add upstream repo `git remote add upstream https://git.disi.dev/Projects/ai-test`
- initialize repository for use `make setup`
## Install the project in develop mode

View File

@@ -1,6 +1,6 @@
FROM alpine
WORKDIR /app
COPY ./project_name/* /app
COPY ./ai_test/* /app
CMD ["sh", "/app/hello_world.sh"]

17
HISTORY.md Normal file
View File

@@ -0,0 +1,17 @@
Changelog
=========
(unreleased)
------------
Fix
~~~
- Second initial commit refs NOISSUE. [Simon Diesenreiter]
Other
~~~~~
- Chore: initial commit refs NOISSUE. [Simon Diesenreiter]
- Initial commit. [Projects <>]

View File

@@ -17,16 +17,16 @@ help: ## Show the help.
.PHONY: fmt
fmt: issetup ## Format code using black & isort.
$(ENV_PREFIX)isort project_name/
$(ENV_PREFIX)black -l 79 project_name/
$(ENV_PREFIX)isort ai_test/
$(ENV_PREFIX)black -l 79 ai_test/
$(ENV_PREFIX)black -l 79 tests/
.PHONY: lint
lint: issetup ## Run pep8, black, mypy linters.
$(ENV_PREFIX)flake8 project_name/
$(ENV_PREFIX)black -l 79 --check project_name/
$(ENV_PREFIX)flake8 ai_test/
$(ENV_PREFIX)black -l 79 --check ai_test/
$(ENV_PREFIX)black -l 79 --check tests/
$(ENV_PREFIX)mypy --ignore-missing-imports project_name/
$(ENV_PREFIX)mypy --ignore-missing-imports ai_test/
.PHONY: release
release: issetup ## Create a new tag for release.
@@ -34,7 +34,7 @@ release: issetup ## Create a new tag for release.
.PHONY: build
build: issetup ## Create a new tag for release.
@docker build -t project_name:$(cat project_name/VERSION) -f Containerfile .
@docker build -t ai_test:$(cat ai_test/VERSION) -f Containerfile .
# This project has been generated from rochacbruno/python-project-template
# __author__ = 'rochacbruno'

View File

@@ -1,36 +1,6 @@
# Docker Image Project Template
# ai_test
A low dependency and really simple to start project template for Docker Images.
Partly based on/see also
- [Flask-Project-Template](https://git.disi.dev/Templates/Flask/) for a full feature Flask project including database, API, admin interface, etc.
### HOW TO USE THIS TEMPLATE
1. Create a new repository from this template and choose a name for your project
(e.g. `my_awesome_project` - recommendation is to use all lowercase and underscores separation for repo names.)
2. Wait until the first run of CI finishes (Gitea Actions will process the template and commit to your new repo)
3. Read the file [CONTRIBUTING.md](CONTRIBUTING.md)
4. Then clone your new project and happy coding!
> **NOTE**: **WAIT** until first CI run on gitea actions before cloning your new project.
### What is included on this template?
- 🖼️ Templates for starting multiple application types:
**Run `make init` after cloning to generate a new project based on a template.**
- 🤖 A [Makefile](Makefile) with the most useful commands to install, test, lint, format and release your project.
- 💬 Auto generation of change log using **gitchangelog** to keep a HISTORY.md file automatically based on your commit history on every release.
- 🐋 A simple [Containerfile](Containerfile) to build a container image for your project.
`Containerfile` is a more open standard for building container images than Dockerfile, you can use buildah or docker with this file.
- 🔄 Continuous integration using [Gitea Actions](.gitea/workflows/) with jobs to lint, test and release your project on Linux, Mac and Windows environments.
<!-- DELETE THE LINES ABOVE THIS AND WRITE YOUR PROJECT README BELOW -->
---
# project_name
project_description
Project description goes here.
## Usage

1
ai_test/VERSION Normal file
View File

@@ -0,0 +1 @@
0.0.1