Skip to content
This repository was archived by the owner on Jul 2, 2024. It is now read-only.
Closed
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
27 changes: 26 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,27 @@
# virtual environemt
/.venv/
/.env/
/venv/
/env/

# ide configs
/.vscode/
/.idea/
.vscode

# emacs cache and backup files
\#*
*~

# temporary files storage
/temp/
/tmp/

# documentation builds
_builds/
_build/
builds/
build/

# translation object files
*.pot
*.mo
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "problem-sets"]
path = problem-sets
url = https://github.com/edu-python-course/problem-sets
44 changes: 44 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Python training course makefile for builds automation

# Sphinx settings
SPHINX_SRC = src
SPHINX_CONFIG = $(SPHINX_SRC)/conf.py

# Internationalization
SPHINXINTL_LANGUAGE ?= ua
LANGUAGE ?= en

# Sphinx build directories
_SPHINX_OUT_BASE = _build
GETTEXT_DIR = $(_SPHINX_OUT_BASE)/gettext
LATEX_DIR = $(_SPHINX_OUT_BASE)/latex/$(LANGUAGE)
HTML_DIR = $(_SPHINX_OUT_BASE)/html/$(LANGUAGE)

# Sphinx builders
SPHINX_BUILD = sphinx-build -q -D language=$(LANGUAGE)

# Makefile targets
all : clean
@make LANGUAGE=en html pdf
@make LANGUAGE=ua html pdf

clean :
@echo "Cleaning existing builds at $(_SPHINX_OUT_BASE)"
@rm -rf $(_SPHINX_OUT_BASE)

html :
@echo "LANGUAGE=$(LANGUAGE): generating HTML output at $(HTML_DIR)"
@$(SPHINX_BUILD) -b html $(SPHINX_SRC) $(HTML_DIR)

latex :
@echo "LANGUAGE=$(LANGUAGE): generating LaTeX output at $(LATEX_DIR)"
@$(SPHINX_BUILD) -b latex $(SPHINX_SRC) $(LATEX_DIR)

pdf : latex
@make -C "$(LATEX_DIR)"

gettext :
@$(SPHINX_BUILD) -b gettext $(SPHINX_SRC) $(GETTEXT_DIR)

locales : gettext
@sphinx-intl -c $(SPHINX_CONFIG) update -p $(GETTEXT_DIR)
105 changes: 105 additions & 0 deletions PR_explanation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Как сдавать домашки

При помощи пулл-реквеста на GitHub.

## Что должно быть в репозитории??

- Код проекта
- Файл requirements.txt

### Что за файл requirements.txt? Зачем он нужен?

![](https://pbs.twimg.com/media/CvIhqpqWYAA92B9.jpg)

Файл `requirements.txt` необходим для контроля зависимостей.

Вы создавали виртуальное окружение именно для того, что бы несколько ваших проектов, не могли "мешать" друг другу.

Каждое отдельное окружение полностью не зависит от других. Но как другой разработчик должен присоединятся к вашему
проекту? Для этого и используется файл зависимостей.

Предварительно мы должны убедиться, что виртуальное окружение активировано, и что мы находимся на том же самом уровне
вложенности папок, где находится файл `manage.py`.

Что бы создать такой файл используется команда в командной строке:

```
pip freeze > requirements.txt
```

Примерное содержимое такого файла:

```
asgiref==3.6.0
Django==4.1.5
psycopg2==2.9.5
sqlparse==0.4.3
tzdata==2022.7
```

Это список всего, что установленно в вашем виртуальном окружении.

#### Как это может использовать другой разработчик?

После клона вашего проекта и создания своего виртуального окружения достаточно выполнить всего одну команду

```
pip install -r requirements.txt
```

И получить полную копию виртуального окружения, с вашими зависимостями.

## Чего не должно быть в репозитории??

Если коротко, то ничего лишнего.

- Папок `__pycache__` и любого его содержимого.
- Файлов настроек `IDE` например папки `.idea` или аналогов для других `IDE`
- Для маков, файлов `.DS_Store`
- Файла со стандартной базой данных, `db.sqlite3`

Все эти файлы и папки должны быть занесены в `.gitignore`

## Как создать проект и репозиторий корректно (Делается один раз когда нам необходимо создать новый проект)

Действия по пунктам:

1. Создать виртуальное окружение
2. Установить необходимые зависимости
3. Создать проект и приложение при помощи команд консоли
4. Создать файл requirements.txt
5. Создать репозиторий
6. Подключить репозиторий к проекту (git remote ...)
7. Создать и заполнить `.gitignore`
8. Убедиться, что мы работаем в ветке `master`
9. Закоммитить всё что у вас есть в свежем проекте.
10. Запушить пустой проект и пустое приложение в мастер.
11. Добавить меня в колабораторы проекта. Ник на гитхабе (PonomaryovVladyslav)

## Как делать домашку

1. Создать **из мастера** ветку, в названии которой будет информация о том, что это домашка и её номер. Например `hw_3`
2. Выполнить домашнюю работу :) Рекомендуется коммитить изменения после любого осмысленного блока. Добавили кнопку,
коммит. Создали рабочий урл, коммит, итд.
3. Выполнить **пуш** этой ветки на удалённый репозиторий.
4. Создать **пулл-реквест** из ветки с вашей **домашней работы** на **мастер**
5. Добавить меня в раздел `Reviewers`
6. Дождаться моего апрува или коментариев, что нужно изменить

6.1. Если получили коментарии о необходимости изменений, изменения добавляем на ветку **домашней работы** после чего
выполняем **пуш**, пулл реквест сам обновится, и я получу уведомление об этом автоматически.
7. После того как получили апрув, мержим изменения в мастер.

## Что делать если я уже внёс файлы __pycache__ или .idea на гит?

В этом случае вам надо удалить файлы из гита, но сохранить их на локальной версии.

Для этого необходимо выполнить команду:

```
git rm <file Relative path> --cached
```

Для каждого файла или папки.

После чего выполнить коммит и пуш снова.
33 changes: 33 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
###############################################################################
PYTHON TRAINING COURSE
###############################################################################

This is the training course to master the Python programming language. This
includes the very basics programming topics like data types, variables and
object-oriented programming and advanced topics like multithreading and
web-frameworks for Python.

Getting started
===============

Installing dependencies
-----------------------

This project comes with dependencies listed in formats suitable for `pip`_
and `poetry`_ package managers. It's recommended to use virtual environment
while working with this project.

To install dependencies via pip do:

.. code-block::

pip install -r requirements.txt

To do the same using poetry:

.. code-block::

poetry install

.. _pip: https://pip.pypa.io
.. _poetry: https://python-poetry.org
Binary file added assets/favicon.ico
Binary file not shown.
44 changes: 44 additions & 0 deletions assets/img/celebrate.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/cmd-python.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions assets/img/dropbox.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions assets/img/emacs.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions assets/img/facebook.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions assets/img/geany.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading