From 13a0b3507994338af9ee7be02a269187e1c7e777 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 2 Oct 2025 08:24:36 +0000 Subject: [PATCH 1/2] Initial plan From d1bca1ad27b0ebb4db6ccf2287b28ab1b9115adf Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 2 Oct 2025 08:29:05 +0000 Subject: [PATCH 2/2] Add Python developer guide documentation section Co-authored-by: popondr <5571882+popondr@users.noreply.github.com> --- docs/Python_tutorials/_index.md | 22 ++++++++ docs/Python_tutorials/azure_openai.md | 4 ++ docs/Python_tutorials/development.md | 11 ++++ docs/Python_tutorials/getting_started.md | 55 ++++++++++++++++++++ docs/Python_tutorials/release_new_version.md | 50 ++++++++++++++++++ docs/Python_tutorials/useful_links.md | 11 ++++ toc.json | 34 ++++++++++++ 7 files changed, 187 insertions(+) create mode 100644 docs/Python_tutorials/_index.md create mode 100644 docs/Python_tutorials/azure_openai.md create mode 100644 docs/Python_tutorials/development.md create mode 100644 docs/Python_tutorials/getting_started.md create mode 100644 docs/Python_tutorials/release_new_version.md create mode 100644 docs/Python_tutorials/useful_links.md diff --git a/docs/Python_tutorials/_index.md b/docs/Python_tutorials/_index.md new file mode 100644 index 0000000..50e2616 --- /dev/null +++ b/docs/Python_tutorials/_index.md @@ -0,0 +1,22 @@ +# Python Developer Guide + +Welcome to the team! This guide will help you get started with the tools, workflows, and best practices for contributing +effectively to our projects. + +--- + +## Table of contents + +1. [Getting Started](./getting_started.md) + 1. [SSH Key Setup](./getting_started.md#ssh-key-setup) + 2. [IDE setup](./getting_started.md#ide-setup) +2. [Development](./development.md) +3. [TODO: Code Repository and Version Control](#code-repository-and-version-control) +4. [TODO: Code Standards and Best Practices](#code-standards-and-best-practices) +5. [TODO: Common Libraries and Frameworks](#common-libraries-and-frameworks) +6. [TODO: Testing and Debugging](#testing-and-debugging) +7. [Deployments and code delivery](./release_new_version.md) + 1. [Release new version](./release_new_version.md#release-new-version-using-release-script) +8. [Useful links](./useful_links.md) +9. [Azure OpenAI](./azure_openai.md) +10. [TODO: FAQs](#faqs) diff --git a/docs/Python_tutorials/azure_openai.md b/docs/Python_tutorials/azure_openai.md new file mode 100644 index 0000000..d0057fc --- /dev/null +++ b/docs/Python_tutorials/azure_openai.md @@ -0,0 +1,4 @@ +# Azure OpenAI +[Back to index](./_index.md) + +*This section is currently under development and will be added soon.* diff --git a/docs/Python_tutorials/development.md b/docs/Python_tutorials/development.md new file mode 100644 index 0000000..21364fa --- /dev/null +++ b/docs/Python_tutorials/development.md @@ -0,0 +1,11 @@ +# Development +[Back to index](./_index.md) + +### Activate virtualenv +```shell +source venv/bin/activate +``` +### Start the application in development mode +```shell + fastapi dev src/main.py +``` diff --git a/docs/Python_tutorials/getting_started.md b/docs/Python_tutorials/getting_started.md new file mode 100644 index 0000000..e872882 --- /dev/null +++ b/docs/Python_tutorials/getting_started.md @@ -0,0 +1,55 @@ +# Getting started + +### Welcome to the team! + +This guide will help you get started with the tools, workflows, and best practices for contributing effectively to our +projects. [Back to index](./_index.md) + +### ToC + +- [Prerequisites](#prerequisites) +- [SSH key setup](#ssh-key-setup) +- [IDE setup](#ide-setup) + - [PyCharm](#pycharm) + - [Installation](#installation) + - [Configuration](#configuration) + - [VSCode](#vscode) + +## Prerequisites + +### List of things that are expected to be done by the time you are reading this document + +- Teams account +- ESko account + +## SSH key setup + +Use your existing ssh key https://docs.gitlab.com/ee/user/ssh.html#see-if-you-have-an-existing-ssh-key-pair \ +or create generate a new one https://docs.gitlab.com/ee/user/ssh.html#generate-an-ssh-key-pair + +Add the public key to your gitlab profile https://docs.gitlab.com/ee/user/ssh.html#generate-an-ssh-key-pair + +Add the public key to your ESko profile https://es.easyproject.com/my/account. \ +This key will be used to access servers in our cloud. + +## IDE setup + +### PyCharm + +#### Installation + +- Install PyCharm directly from the JetBrains website, or you can use Jetbrains toolbox Community Edition + Should be enough for development. But we are open to professional edition as well. + - [Link to direct download](https://www.jetbrains.com/pycharm/download/). + - [Link to download JetBrains Toolbox App](https://www.jetbrains.com/toolbox-app/). + +#### Configuration + +- Pylint + - install pylint plugin in PyCharm + - go to `Settings` -> `Plugins` -> `Marketplace` -> `Pylint` -> `Install` + - we use this plugin https://plugins.jetbrains.com/plugin/11084-pylint but install it from the IDE + +### VSCode + +- To be added diff --git a/docs/Python_tutorials/release_new_version.md b/docs/Python_tutorials/release_new_version.md new file mode 100644 index 0000000..1dbd9c1 --- /dev/null +++ b/docs/Python_tutorials/release_new_version.md @@ -0,0 +1,50 @@ +# Deployments and code delivery +[Back to index](./_index.md) + +#ToC: +1. [Release new version using a script](#release-new-version-using-release-script) +2. [Release new version manually](#release-new-version-manually) +3. [Continue releasing in gitlab](#release-in-gitlab) + +## Release new version using release script +run `python x_release.py` from this file directory +`python cli/x_release.py` from GIT root directory +continue with [Release in Gitlab](#release-in-gitlab) section + +## Release new version manually +### Create branch X.Y.Z + +```shell +# Check out master +git fetch master +# Create a new branch release/X_Y_Z +git checkout -b release/0_8_3 origin/master +``` + +### Change changelog.md + +In changelog.md file, we should add a line with version under `## [Unreleased]`. + +```markdown +## [Unreleased] + +## 0.8.3 - 2024-10-22 +``` + +### Change version.txt + +Update version number in `version.txt` file + +### Release in Gitlab + +1. Create a new merge request with name `chore(release): 0.8.3`. This name will be used as a name of the commit to + master. +2. Merge the Merge request +3. Go to `Branches` -> `master` +4. On the top of the sources, there is a link to the latest pipeline on the `master` branch +5. Run the `integration_tests` job +6. Run the `build_production_docker_image` job + +A new task in esko is automatically created.\ +You can see the task id at the end of the pipeline log.\ +For example this one: https://es.easyproject.com/issues/636174 diff --git a/docs/Python_tutorials/useful_links.md b/docs/Python_tutorials/useful_links.md new file mode 100644 index 0000000..810ddbd --- /dev/null +++ b/docs/Python_tutorials/useful_links.md @@ -0,0 +1,11 @@ +# Useful links +List of links one might find useful from time to time.\ +[Back to index](./_index.md) + +--- + +Easy AI chain repo: https://git.easy.cz/devel/ai/easy_ai_chain + +Falcon project: https://es.easyproject.com/projects/falcon + +Falcon team scrum board: https://es.easyproject.com/easy_team_sprint_boards/8 diff --git a/toc.json b/toc.json index c2455f3..a3e77f7 100644 --- a/toc.json +++ b/toc.json @@ -257,6 +257,40 @@ "title": "Connection to GitlabCI", "uri": "docs/e2e_tutorials/Gitlab-CI.md" }, + { + "type": "divider", + "title": "Python Developer Guide" + }, + { + "type": "item", + "title": "Python Developer Guide", + "uri": "docs/Python_tutorials/_index.md" + }, + { + "type": "item", + "title": "Getting Started", + "uri": "docs/Python_tutorials/getting_started.md" + }, + { + "type": "item", + "title": "Development", + "uri": "docs/Python_tutorials/development.md" + }, + { + "type": "item", + "title": "Release new version", + "uri": "docs/Python_tutorials/release_new_version.md" + }, + { + "type": "item", + "title": "Useful links", + "uri": "docs/Python_tutorials/useful_links.md" + }, + { + "type": "item", + "title": "Azure OpenAI", + "uri": "docs/Python_tutorials/azure_openai.md" + }, { "type": "divider", "title": "Release guides"