-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #561 from coders4help/release/4.0.0
Release 4.0.0
- Loading branch information
Showing
395 changed files
with
43,642 additions
and
8,402 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.git | ||
.idea | ||
.tx | ||
.env | ||
*.yml | ||
.*ignore | ||
*.log | ||
|
||
**/*.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,7 @@ indent_size = 4 | |
|
||
[**.{yml,yaml}] | ||
indent_size = 2 | ||
|
||
[**.sh] | ||
indent_size = 4 | ||
trim_trailing_whitespace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
DJANGO_SETTINGS_MODULE=volunteer_planner.settings.production | ||
|
||
DATABASE_ENGINE=django.db.backends.postgresql_psycopg2 | ||
DATABASE_NAME=volunteer_planner | ||
DATABASE_USER=vp | ||
DATABASE_PW=volunteer_planner | ||
|
||
ALLOWED_HOSTS=localhost | ||
SECRET_KEY= | ||
|
||
ADMIN_EMAIL= | ||
SENDER_EMAIL= | ||
FROM_EMAIL= | ||
SERVER_EMAIL= | ||
CONTACT_EMAIL= | ||
|
||
EMAIL_BACKEND=django.core.mail.backends.console.EmailBackend | ||
SMTP_HOST=localhost | ||
SMTP_PORT=8025 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[flake8] | ||
per-file-ignores = | ||
volunteer_planner/settings/*.py: F401, F403, F405, | ||
|
||
max-line-length = 88 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# To permanently auto-ignore the revs in this file during `git blame`: | ||
# $ git config blame.ignoreRevsFile .git-blame-ignore-revs | ||
|
||
# initial re-formatting with black | ||
d7a57193f9e8c9cd4c6ed00d2f1e960ef5a5042c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: Idea / Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your idea or feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "pip" # See documentation for possible values | ||
directory: "/requirements" # Location of package manifests | ||
schedule: | ||
interval: "daily" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
name: Check & Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
- main | ||
- master | ||
- release/* | ||
pull_request: | ||
|
||
jobs: | ||
check-migrations: | ||
name: Check Migrations | ||
runs-on: ubuntu-latest | ||
env: | ||
DJANGO_SETTINGS_MODULE: volunteer_planner.settings.tests | ||
steps: | ||
# Checkout the GitHub repo | ||
- uses: actions/checkout@v2 | ||
|
||
# Install Python 3.9.6 | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.9.6" | ||
cache: "pip" | ||
cache-dependency-path: 'requirements/base.txt' | ||
|
||
# Pip install project dependencies | ||
- name: Install python packages with pip | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements/base.txt | ||
# Check for missing Django migrations | ||
- name: Check for missing Django migrations | ||
run: python manage.py makemigrations --check | ||
|
||
check-messages: | ||
name: Check Translations | ||
runs-on: ubuntu-latest | ||
env: | ||
DJANGO_SETTINGS_MODULE: volunteer_planner.settings.tests | ||
steps: | ||
# Checkout the GitHub repo | ||
- uses: actions/checkout@v2 | ||
|
||
# Install Python 3.9.6 | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.9.6" | ||
cache: "pip" | ||
cache-dependency-path: 'requirements/base.txt' | ||
|
||
# apt install system dependencies | ||
- name: Install apt packages | ||
run: | | ||
sudo apt install -y gettext | ||
# Pip install project dependencies | ||
- name: Install python packages with pip | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements/base.txt | ||
# makemessages | ||
- name: Run Django management command `makemessages` | ||
run: ./scripts/makemessages.sh --all | ||
|
||
# checkdiffs | ||
- name: Check for uncommitted changes (in .po files) | ||
run: ./scripts/checkdiffs.sh | ||
|
||
# Check for fuzzy translations in .po files | ||
- name: Check for fuzzy translations in .po files | ||
run: ./scripts/checkfuzzy.sh | ||
|
||
# compilemessages | ||
- name: Run Django management command `compilemessages` | ||
run: ./scripts/compilemessages.sh | ||
|
||
black: | ||
name: Check Code Style (black) | ||
runs-on: ubuntu-latest | ||
env: | ||
DJANGO_SETTINGS_MODULE: volunteer_planner.settings.tests | ||
steps: | ||
# Checkout the GitHub repo | ||
- uses: actions/checkout@v2 | ||
|
||
# Run black | ||
- uses: psf/black@stable | ||
with: | ||
options: "--check --target-version py39" | ||
|
||
flake8: | ||
runs-on: ubuntu-latest | ||
name: Lint with flake8 | ||
steps: | ||
- name: Check out source repository | ||
uses: actions/checkout@v2 | ||
- name: flake8 Lint | ||
uses: py-actions/flake8@v2 | ||
|
||
pytest: | ||
name: Unit Tests | ||
needs: | ||
- check-migrations | ||
- check-messages | ||
# Run on a Ubuntu VM | ||
runs-on: ubuntu-latest | ||
env: | ||
DJANGO_SETTINGS_MODULE: volunteer_planner.settings.tests | ||
steps: | ||
# Checkout the GitHub repo | ||
- uses: actions/checkout@v2 | ||
|
||
# Install Python 3.9.6 | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.9.6" | ||
cache: "pip" | ||
cache-dependency-path: 'requirements/base.txt' | ||
|
||
# Pip install project dependencies | ||
- name: Install python packages with pip | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements/tests.txt | ||
# Run pytest | ||
- name: Test with pytest | ||
run: pytest -vv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,5 +13,9 @@ db.sqlite3 | |
/.coverage | ||
*.log | ||
.cache | ||
fabfile.py | ||
/var | ||
.env | ||
.ash_history | ||
.python_history | ||
.venv | ||
.python-version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,61 @@ | ||
FROM python:2.7-alpine | ||
ENV PYTHONUNBUFFERED=1 user=vp vpbasedir=/opt/vpcode/ | ||
#FROM python:3.6-alpine3.7 | ||
FROM alpine:3.14 | ||
ARG vpbasedir=/opt/vp/ | ||
ARG DJANGO_SETTINGS_MODULE=volunteer_planner.settings.production | ||
ARG SECRET_KEY=local | ||
ARG DATABASE_ENGINE=django.db.backends.postgresql | ||
ARG BETA="" | ||
ARG django_static_root=${vpbasedir}/static | ||
|
||
ENV PYTHONUNBUFFERED=1 user=vp | ||
ENV STATIC_ROOT=${django_static_root} | ||
|
||
WORKDIR ${vpbasedir} | ||
|
||
RUN addgroup -g 1000 ${user} && \ | ||
adduser -G vp -u 1000 -D -h ${vpbasedir} ${user} && \ | ||
chown ${user}:${user} ${vpbasedir} | ||
adduser -G ${user} -u 1000 -D -h ${vpbasedir} ${user} && \ | ||
chown ${user}:${user} ${vpbasedir} && \ | ||
mkdir -p /run/vp ${STATIC_ROOT} && \ | ||
chown -R vp:vp /run/vp ${vpbasedir} ${STATIC_ROOT} | ||
|
||
ADD requirements/*.txt ${vpbasedir} | ||
ADD ./requirements ${vpbasedir}/requirements | ||
|
||
RUN apk update && apk add musl-dev mariadb mariadb-client-libs mariadb-libs mariadb-dev postgresql postgresql-dev gcc && \ | ||
pip install -r dev_mysql.txt -r dev_postgres.txt && \ | ||
apk del --purge gcc mariadb-dev mariadb musl-dev && \ | ||
/bin/rm -rf /var/cache/apk/* | ||
RUN apk update && \ | ||
apk add --virtual .build-deps \ | ||
gcc \ | ||
jpeg-dev \ | ||
musl-dev \ | ||
postgresql-dev \ | ||
python3-dev \ | ||
zlib-dev \ | ||
&& \ | ||
apk add \ | ||
gettext \ | ||
gettext-lang \ | ||
jpeg \ | ||
jq \ | ||
git \ | ||
postgresql \ | ||
libffi-dev \ | ||
py3-pip \ | ||
uwsgi \ | ||
uwsgi-cache \ | ||
uwsgi-http \ | ||
uwsgi-python3 \ | ||
&& \ | ||
pip3 install --upgrade --quiet pip setuptools uwsgitop && \ | ||
pip3 install -r requirements/postgres.txt ${BETA:+-r requirements/dev.txt} && \ | ||
apk del --purge .build-deps && \ | ||
/bin/rm -rf /var/cache/apk/* /root/.cache | ||
|
||
ADD django-entrypoint.sh / | ||
RUN chmod 0755 /django-entrypoint.sh | ||
|
||
USER ${user} | ||
CMD ["/bin/sh"] | ||
ADD --chown=1000:1000 ./ ${vpbasedir} | ||
RUN python3 manage.py compilemessages --use-fuzzy --no-color --traceback && \ | ||
echo "Translations compiled" && \ | ||
python3 manage.py collectstatic --clear --no-input --traceback --verbosity 0 && \ | ||
echo "Static files collected" | ||
|
||
ENTRYPOINT [ "/django-entrypoint.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.