From a29db9a7ea7a29c88a8c714e63b1983fa001d98a Mon Sep 17 00:00:00 2001 From: Jose Date: Sun, 2 Feb 2025 22:20:09 +0100 Subject: [PATCH 1/5] modified: LICENSE modified: README.md new file: requirements.txt --- LICENSE | 7 ++++++- README.md | 37 +++++++++++++++++++++++++++++++++---- requirements.txt | 18 ++++++++++++++++++ 3 files changed, 57 insertions(+), 5 deletions(-) create mode 100644 requirements.txt diff --git a/LICENSE b/LICENSE index f76c13b..943e11a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,3 +1,8 @@ Copyright (c) 2025 Jose -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index 6ce2244..d3e5fb0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,35 @@ -<<<<<<< HEAD # python_template_repository -======= -# python template repository ->>>>>>> 3cfcee4 (Initial commit) + +This is a template repository for Python projects. It includes basic files and directories such as `setup.py`, `requirements.txt`, and a README file. +To use this template, you can clone the repository to your local machine using the following command: +git clone https://repo.piave7.duckdns.org/Jose/python_template + +Once you have cloned the repository, you can navigate into the project directory and start working on your Python project. You can install the required dependencies by running the following command: + +pip install -r requirements.txt + +You can also create a virtual environment for your project using the following command: + +python -m venv venv + +Once you have created the virtual environment, you can activate it using the appropriate command for your operating system. For example, on Windows, you can run the following command: + +venv\Scripts\activate + +On macOS and Linux, you can run the following command: + +source venv/bin/activate + +You can now start working on your Python project by editing the files in the `src` directory. Once you are done with your work, you can deactivate the virtual environment using the following command: + +deactivate + +To build the project, you can run the following command: + +python setup.py sdist bdist_wheel + +This will create a source distribution and a wheel distribution of your project. +To install the project from the source distribution, you can run the following command: + +pip install dist/python_template-0.1.0.tar.gz diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..4521205 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,18 @@ +# requirements.txt + +# Specify the package name and version +# Format: package==version + +# Example packages +# numpy==1.21.2 +# pandas==1.3.3 +# requests==2.26.0 +# flask==2.0.1 + +# You can also specify a range of versions +# Example: +# Django>=3.2,<4.0 + +# If you have a package that can be any version, just list the name +# Example: +# somepackage \ No newline at end of file From 395e5bf0c51ea05f601a36a28e77dc561d35c794 Mon Sep 17 00:00:00 2001 From: Jose Date: Sun, 2 Feb 2025 22:34:29 +0100 Subject: [PATCH 2/5] modified: script.py --- script.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/script.py b/script.py index 207bbc7..05c6421 100644 --- a/script.py +++ b/script.py @@ -1,2 +1,10 @@ -# script.py -print("Hello User!") +""" +script.py - A simple script to greet the user. +""" + +def greet_user(): + """Function to print a greeting message.""" + print("Hello User!") + +if __name__ == "__main__": + greet_user() \ No newline at end of file From aca4efe1fd9cf1308289d3a25aa3bae6329e4794 Mon Sep 17 00:00:00 2001 From: Jose Date: Mon, 3 Feb 2025 18:51:10 +0100 Subject: [PATCH 3/5] new file: .gitea/workflows/opencommit.yml modified: .gitea/workflows/pylint.yml modified: LICENSE --- .gitea/workflows/opencommit.yml | 44 +++++++++++++++++++++++++++++++++ .gitea/workflows/pylint.yml | 2 +- LICENSE | 2 +- 3 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 .gitea/workflows/opencommit.yml diff --git a/.gitea/workflows/opencommit.yml b/.gitea/workflows/opencommit.yml new file mode 100644 index 0000000..db5f0e9 --- /dev/null +++ b/.gitea/workflows/opencommit.yml @@ -0,0 +1,44 @@ +name: 'OpenCommit Action' + +on: + push: + # this list of branches is often enough, + # but you may still ignore other public branches + branches-ignore: [main master dev development release] + +jobs: + opencommit: + timeout-minutes: 10 + name: OpenCommit + runs-on: ubuntu-latest + permissions: write-all + steps: + - name: Setup Node.js Environment + uses: actions/setup-node@v2 + with: + node-version: '16' + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + github-server-url: ${{ vars.GIT_SERVER_URL }} + - uses: di-sukharev/opencommit@github-action-v1.0.4 + with: + GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + + env: + # set openAI api key in repo actions secrets, + # for openAI keys go to: https://platform.openai.com/account/api-keys + # for repo secret go to: /settings/secrets/actions + OCO_API_KEY: ${{ secrets.AI_API_KEY }} + + # customization + OCO_TOKENS_MAX_INPUT: 4096 + OCO_TOKENS_MAX_OUTPUT: 500 + OCO_OPENAI_BASE_PATH: '' + OCO_DESCRIPTION: false + OCO_EMOJI: true + OCO_AI_PROVIDER: ollama + OCO_API_URL: ${{ vars.OLLAMA_HOST }} + OCO_MODEL: ${{ vars.OLLAMA_MODEL }} + OCO_LANGUAGE: en + OCO_PROMPT_MODULE: conventional-commit \ No newline at end of file diff --git a/.gitea/workflows/pylint.yml b/.gitea/workflows/pylint.yml index af2f1c6..b294c39 100644 --- a/.gitea/workflows/pylint.yml +++ b/.gitea/workflows/pylint.yml @@ -20,7 +20,7 @@ jobs: # https://my-ghes-server.example.com github-server-url: ${{ vars.GIT_SERVER_URL }} - - name: Set up Python ${{ matrix.python-version }} + - name: Set up Python uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} diff --git a/LICENSE b/LICENSE index 943e11a..da9a441 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2025 Jose +Copyright (c) 2025 Jose Alvarez THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR From 9d520581221580a45c66efe32e017593a5f263ac Mon Sep 17 00:00:00 2001 From: Jose Date: Mon, 3 Feb 2025 18:53:40 +0100 Subject: [PATCH 4/5] modified: .gitea/workflows/opencommit.yml --- .gitea/workflows/opencommit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/opencommit.yml b/.gitea/workflows/opencommit.yml index db5f0e9..e284a31 100644 --- a/.gitea/workflows/opencommit.yml +++ b/.gitea/workflows/opencommit.yml @@ -4,7 +4,7 @@ on: push: # this list of branches is often enough, # but you may still ignore other public branches - branches-ignore: [main master dev development release] + branches-ignore: [main master release] jobs: opencommit: From 0ade9eda431ffe54709649432539985dc7cc86ad Mon Sep 17 00:00:00 2001 From: Jose Date: Mon, 3 Feb 2025 20:56:29 +0100 Subject: [PATCH 5/5] modified: .gitea/workflows/opencommit.yml --- .gitea/workflows/opencommit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/opencommit.yml b/.gitea/workflows/opencommit.yml index e284a31..724338f 100644 --- a/.gitea/workflows/opencommit.yml +++ b/.gitea/workflows/opencommit.yml @@ -33,7 +33,7 @@ jobs: # customization OCO_TOKENS_MAX_INPUT: 4096 - OCO_TOKENS_MAX_OUTPUT: 500 + OCO_TOKENS_MAX_OUTPUT: 505 OCO_OPENAI_BASE_PATH: '' OCO_DESCRIPTION: false OCO_EMOJI: true