Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions docs/Python_tutorials/_index.md
Original file line number Diff line number Diff line change
@@ -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)
4 changes: 4 additions & 0 deletions docs/Python_tutorials/azure_openai.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Azure OpenAI
[Back to index](./_index.md)

*This section is currently under development and will be added soon.*
11 changes: 11 additions & 0 deletions docs/Python_tutorials/development.md
Original file line number Diff line number Diff line change
@@ -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
```
55 changes: 55 additions & 0 deletions docs/Python_tutorials/getting_started.md
Original file line number Diff line number Diff line change
@@ -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
50 changes: 50 additions & 0 deletions docs/Python_tutorials/release_new_version.md
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions docs/Python_tutorials/useful_links.md
Original file line number Diff line number Diff line change
@@ -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
34 changes: 34 additions & 0 deletions toc.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down