Skip to content

Commit 19661eb

Browse files
committed
Merge branch 'master' into update_irc
2 parents 1acba45 + 016fc93 commit 19661eb

File tree

259 files changed

+9119
-6305
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

259 files changed

+9119
-6305
lines changed

.env.dist

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copy as .env and replace with correct values
2+
TELEGRAM_BOT_TOKEN=xxxx
3+
TELEGRAM_MODERATORS_CHAT_ID=xxx
4+
TELEGRAM_PUBLIC_CHAT_ID=xxx
5+
FACEBOOK_PAGE_ACCESS_TOKEN=xxx
6+
FACEBOOK_PAGE_ID=xxx
7+
TWITTER_ACCESS_TOKEN=xxx
8+
TWITTER_ACCESS_SECRET=xxx
9+
TWITTER_CONSUMER_KEY=xxx
10+
TWITTER_CONSUMER_SECRET=xxx
11+
DISCOURSE_HOST=example.com
12+
DISCOURSE_API_KEY=abcdef1235
13+
DISCOURSE_USERNAME=xxxx
14+
DISCOURSE_CATEGORY=1
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Informe de errores
2+
description: Crea un informe de errores para ayudarnos a mejorar.
3+
body:
4+
- type: markdown
5+
attributes:
6+
value: |
7+
Gracias por tomarse el tiempo de rellenar un informe de error. Recuerde rellenar todos los campos, incluido el título.
8+
- type: textarea
9+
id: current
10+
attributes:
11+
label: Comportamiento actual
12+
description: |
13+
Describa aquí el problema o la cuestión.
14+
validations:
15+
required: true
16+
- type: textarea
17+
id: expected
18+
attributes:
19+
label: Comportamiento esperado
20+
description: |
21+
Díganos qué debería pasar en su lugar.
22+
validations:
23+
required: true
24+
- type: textarea
25+
id: reproduce
26+
attributes:
27+
label: Pasos para reproducir el problema
28+
description: |
29+
¿Qué tiene que hacer alguien más para encontrarse con el mismo fallo?
30+
placeholder: |
31+
1. Paso 1
32+
2. Paso 2
33+
3. Paso 3
34+
4. ...
35+
validations:
36+
required: true
37+
- type: textarea
38+
id: extra
39+
attributes:
40+
label: Notas adicionales
41+
description: |
42+
¿Tiene alguna nota extra que pueda ayudar a resolver el problema y que no encaje en ningún otro campo?
43+
placeholder: |
44+
No
45+
validations:
46+
required: false
47+
- type: textarea
48+
id: commit
49+
attributes:
50+
label: pyAr rev. hash/commit
51+
description: |
52+
¿Qué commit estaba utilizando cuando obtuvo el problema? (en caso de no ser el ultimo)
53+
validations:
54+
required: true
55+
- type: input
56+
id: os
57+
attributes:
58+
label: Sistema operativo
59+
description: |
60+
Sistema operativo, es decir, Windows 10 x64, Debian 10 x64, etc.
61+
validations:
62+
required: true
63+
- type: markdown
64+
attributes:
65+
value: |
66+
Gracias por su contribución.

.github/workflows/test.yaml

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Tests
22

3-
on: [push]
3+
on: [push, pull_request]
44

55
jobs:
66
build:
@@ -11,7 +11,7 @@ jobs:
1111
# Label used to access the service container
1212
postgres2:
1313
# Docker Hub image
14-
image: postgres:9.4
14+
image: postgres:11.5
1515
# Provide the password for postgres
1616
env:
1717
POSTGRES_PASSWORD: somepassword
@@ -26,32 +26,52 @@ jobs:
2626
--health-retries 5
2727
strategy:
2828
matrix:
29-
python-version: [3.6, 3.7]
29+
python-version: [3.9]
3030
env:
31-
DJANGO: 1.8
31+
DJANGO: 3.0
3232
SECRET_KEY: supersecret
33-
DB_PORT: 5432
33+
DB_PORT: 5432
3434
POSTGRES_HOST: localhost
3535
POSTGRES_PASSWORD: somepassword
3636
POSTGRES_USER: postgres
3737
POSTGRES_DB: testing_db
3838
DJANGO_SETTINGS_MODULE: pyarweb.settings.development
3939
steps:
40-
- uses: actions/checkout@v2
40+
- uses: actions/checkout@v4
41+
4142
- name: Set up Python ${{ matrix.python-version }}
42-
uses: actions/setup-python@v2
43+
uses: actions/setup-python@v4
4344
with:
4445
python-version: ${{ matrix.python-version }}
46+
4547
- name: Install system libraries
4648
run: |
4749
sudo apt-get install -y libpq-dev libxml2-dev libxslt1-dev
50+
51+
- name: Cache dependencies
52+
uses: actions/cache@v3
53+
with:
54+
path: ~/.cache/pip
55+
key: ${{ runner.os }}-pip-${{ hashFiles('**/dev_requirements.txt') }}
56+
restore-keys: |
57+
${{ runner.os }}-pip-
58+
4859
- name: Install dependencies
4960
run: |
5061
python -m pip install --upgrade pip
5162
pip install -r dev_requirements.txt
52-
- name: Lint with flake8
63+
64+
- name: Check Code Style
65+
uses: pre-commit/action@v3.0.1
66+
67+
- name: Check for Django migrations
5368
run: |
54-
flake8
69+
python manage.py makemigrations --dry-run --check
70+
71+
- name: Run migrations
72+
run: |
73+
python manage.py migrate
74+
5575
- name: Run tests
5676
run: |
57-
python3 manage.py test -v2 --noinput
77+
pytest -v

.github/workflows/test.yml

Lines changed: 0 additions & 57 deletions
This file was deleted.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
# GitHub recommends pinning actions to a commit SHA.
7+
# To get a newer version, you will need to update the SHA.
8+
# You can also reference a tag or branch, but the action may change without warning.
9+
10+
name: Publish Docker image
11+
12+
on:
13+
release:
14+
types: [published]
15+
16+
jobs:
17+
push_to_registry:
18+
name: Push Docker image to Docker Hub
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Check out the repo
22+
uses: actions/checkout@v3
23+
24+
- name: Log in to Docker Hub
25+
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
26+
with:
27+
username: ${{ secrets.DOCKER_USERNAME }}
28+
password: ${{ secrets.DOCKER_PASSWORD }}
29+
30+
- name: Extract metadata (tags, labels) for Docker
31+
id: meta
32+
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
33+
with:
34+
images: my-docker-hub-namespace/my-docker-hub-repository
35+
36+
- name: Build and push Docker image
37+
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
38+
with:
39+
context: .
40+
file: ./Dockerfile.prod
41+
push: true
42+
tags: ${{ steps.meta.outputs.tags }}
43+
labels: ${{ steps.meta.outputs.labels }}

.pre-commit-config.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v5.0.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: check-merge-conflict
7+
- id: debug-statements
8+
9+
- repo: https://github.com/pycqa/flake8
10+
rev: 7.1.1
11+
hooks:
12+
- id: flake8
13+
args:
14+
- '--config=.flake8'
15+
- '--exclude=.venv,**/migrations/*.py'
16+
17+
- repo: https://github.com/asottile/pyupgrade
18+
rev: v3.19.1
19+
hooks:
20+
- id: pyupgrade
21+
args: [--py39-plus]
22+
23+
- repo: https://github.com/adamchainz/django-upgrade
24+
rev: "1.22.2"
25+
hooks:
26+
- id: django-upgrade
27+
args: [--target-version, "3.2"]

CODE_OF_CONDUCT.md

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,3 @@
11
# Código de conducta
22

3-
Valoramos la participación de cada miembro de la comunidad Python y queremos que todos tengan una experiencia agradable y satisfactoria. En consecuencia, se espera que todos los contribuyentes de este proyecto sean respetuosos.
4-
5-
Para no dejar lugar a dudas, lo que se espera es que todos los contribuyentes de este repositorio cumplan el siguiente Código de Conducta. Los administradores serán responsables de fomentar el cumplimiento de este código.
6-
7-
Los administradores estarán encantado de ayudar a los participantes a que se sientan seguros y libres de acoso, por lo que si surgen problemas cubiertos por este código de conducta, por favor póngase en contacto con ellos escribiendo a coc@ac.python.org.ar.
8-
Cualquier queja será confidencial, será tomado en serio, investigada y tratada adecuadamente.
9-
10-
Si un participante se involucra en comportamiento que viola el código de conducta, los administradores pueden tomar cualquier acción que consideren apropiadas, incluyendo advertencia al infractor o la expulsión.
11-
12-
Todos tienen derecho a ser tratados con cortesía, dignidad y respeto y estar libre de cualquier forma de discriminación, victimización, acoso o intimidación; como así también a disfrutar de un ambiente libre de comportamiento no deseado, lenguaje inapropiado e imágenes inadecuadas.
13-
14-
Está terminantemente prohibido el acoso. Entendiendo por éste, la comunicación ofensiva relacionada con el género, la orientación sexual, la discapacidad, la apariencia física, el tamaño corporal, la raza, la religión, las imágenes sexuales en espacios públicos, intimidación deliberada, acecho.
15-
16-
Sea amable con los demás: confiamos en que podrán tratar a los demás de una manera que refleja la opinión generalizada de que la diversidad y la amabilidad son los puntos fuertes de nuestra comunidad que se celebran y fomentan.
17-
18-
Tenga cuidado con las palabras que elija. Recuerde que los chistes de exclusión sexistas, racistas, y otros pueden ser ofensivos para quienes le rodean.
19-
20-
21-
Por cualquier problema contactate con un administrador o escribí a coc@ac.python.org.ar
3+
Este repositorio adhiere a los principios y el Código de Conducta de la Asociación Civil Python Argentina, accesibles online en: https://ac.python.org.ar/#coc. Se espera que todos los contribuyentes de este repositorio lo cumplan, y los mecanismos para reportar problemas son los que ofrece dicha asociación en la misma url. Los administradores serán responsables de fomentar el cumplimiento de este código.

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
FROM python:3.6
1+
FROM python:3.9
22
ENV PYTHONUNBUFFERED 1
33
ENV PYTHONPATH /code:$PYTHONPATH
4-
RUN apt-get update && apt-get -y install flite
4+
RUN apt-get update && apt-get -y install flite=2.2-5
55
RUN mkdir /code
66
WORKDIR /code
77
COPY dev_requirements.txt /code
88
COPY requirements.txt /code
9+
RUN pip install -U pip
910
RUN pip install -r requirements.txt
1011
RUN pip install -r dev_requirements.txt
1112
COPY . /code/

Dockerfile.prod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
FROM python:3.6
1+
FROM python:3.9
22
ENV PYTHONUNBUFFERED 1
33
ENV PYTHONPATH /code:$PYTHONPATH
4-
RUN apt-get update && apt-get -y install flite
54
RUN mkdir /code
65
WORKDIR /code
76
COPY prod_requirements.txt /code
87
COPY requirements.txt /code
8+
RUN pip install -U pip
99
RUN pip install -r prod_requirements.txt
1010
COPY . /code/

INSTALLATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
## Guia de instalación
1+
## Guia de instalación
22

33
Seguí los pasos en nuestra wiki: https://github.com/PyAr/pyarweb/wiki/Instalacion-con-Docker

0 commit comments

Comments
 (0)