Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

Commit

Permalink
Merge branch 'develop' into 536
Browse files Browse the repository at this point in the history
  • Loading branch information
LaibaBasit008 committed Jul 25, 2020
2 parents 7961c1c + 8110f63 commit c1bf420
Show file tree
Hide file tree
Showing 141 changed files with 2,563 additions and 4,392 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This action uses commitlint to lint commit messages and check for the required guidelines
# as given by the config file commitlint.config.js

name: Check Commit Messages

on:
pull_request:
branches: [ develop ]

jobs:
check-commits:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0
- uses: actions/[email protected]
- run: yarn add @commitlint/{config-conventional,cli}
- run: yarn run commitlint --from HEAD~${{ github.event.pull_request.commits }} --to HEAD
8 changes: 7 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
sudo: true
language: python
dist: bionic
env:
- MOZ_HEADLESS=1

Expand All @@ -11,6 +12,8 @@ services:

python:
- "3.6"
- "3.7"

before_install:
- wget https://github.com/mozilla/geckodriver/releases/download/v0.20.1/geckodriver-v0.20.1-linux64.tar.gz
- tar -xzvf geckodriver-v0.20.1-linux64.tar.gz
Expand All @@ -20,7 +23,10 @@ install:
- pip install coveralls==0.4.4
- sudo apt-get install python-gdal
before_script:
- export GOOGLE_MAPS_API_KEY=$GOOGLE_MAPS_API_KEY
- export SECRET_KEY=foobarbaz
# - curl -o ipdb.tar.gz https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key=$MAXMIND_LICENSE_KEY&suffix=tar.gz
# - tar -xzf ipdb.tar.gz -C systers_portal/
- psql -c "CREATE DATABASE systersdb;" -U postgres
script:
- coverage run systers_portal/manage.py test --settings=systers_portal.settings.testing
Expand All @@ -41,4 +47,4 @@ notifications:
on_failure: always
on_start: false
after_success:
coveralls --rcfile=.coveragerc
coveralls --rcfile=.coveragerc
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ Setup for developers (Unix)
$ pip install -r requirements/dev.txt
$ sudo apt-get install python-gdal
```

7. Create `systersdb` database, where `systersdb` might be any suitable name.

1. Create `systersdb` database, where `systersdb` might be any suitable name [Password should not be empty].

```
$ sudo -i -u postgres
$ createuser <any name e.g. alice> --pwprompt
Expand Down Expand Up @@ -183,3 +187,9 @@ For more information on semantics and builds, please refer to the Sphinx
[official documentation](http://sphinx-doc.org/contents.html).
You can view the requirements document [here](docs/requirements/Systers_GSoC14_Portal_Requirements.pdf).
Contact
-------
You can reach the maintainers and our community on [AnitaB.org Open Source Zulip](https://anitab-org.zulipchat.com/). If you are interested in contributing to portal, we have a dedicated stream for this project [#portal](https://anitab-org.zulipchat.com/#narrow/stream/222540-portal), where you can ask questions and interact with the community, join with us!
37 changes: 37 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
module.exports = {
parserPreset: 'conventional-changelog-conventionalcommits',
rules: {
'body-leading-blank': [1, 'always'],
'body-max-line-length': [2, 'always', 100],
'footer-leading-blank': [1, 'always'],
'footer-max-line-length': [2, 'always', 100],
'header-max-length': [2, 'always', 100],
'scope-case': [2, 'always', 'lower-case'],
'subject-case': [
2,
'always',
['sentence-case', 'upper-case']
],
'subject-empty': [2, 'never'],
'subject-full-stop': [2, 'never', '.'],
'type-case': [2, 'always', 'lower-case'],
'type-empty': [2, 'never'],
'type-enum': [
2,
'always',
[
'build',
'chore',
'ci',
'docs',
'feat',
'fix',
'perf',
'refactor',
'revert',
'style',
'test'
]
]
}
};
28 changes: 14 additions & 14 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
-r prod.txt
Sphinx==1.6.5
coverage==4.4.1
django-nose==1.4.5
flake8==2.4.1
sphinx-rtd-theme==0.2.4
pylint==1.9.0
pytest==3.5.1
pytest-cov==2.5.1
pytest-django==3.2.1
pytest-pylint==0.9.0
selenium==3.12.0
djangorestframework==3.8.2
geopy==1.15.0
pinax-notifications==5.0.3
Sphinx==3.1.2
coverage==5.2
django-nose==1.4.6
flake8==3.8.3
sphinx-rtd-theme==0.5.0
pylint==2.5.3
pytest==5.4.3
pytest-cov==2.10.0
pytest-django==3.9.0
pytest-pylint==0.17.0
selenium==3.141.0
djangorestframework==3.11.0
geopy==2.0.0
pinax-notifications==6.0.0
23 changes: 12 additions & 11 deletions requirements/prod.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
Django==1.11.6
Pillow==4.3.0
django-allauth==0.33.0
django-braces==1.11.0
django-cities-light==3.3.0
django-ckeditor==5.3.1
django-crispy-forms==1.7.0
django-guardian==1.4.9
django-imagekit==4.0.1
djangocms-admin-style==1.2.7
Django==3.0.8
Pillow==7.2.0
django-allauth==0.42.0
django-braces==1.14.0
django-cities-light==3.6.0
django-ckeditor==5.9.0
django-crispy-forms==1.9.2
django-guardian==2.3.0
django-imagekit==4.0.2
psycopg2==2.7.3.2
python3-openid==3.1.0
python3-openid==3.2.0
geoip2==3.0.0
django-ipware==3.0.0
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[flake8]
ignore = F403
ignore = F403, F405
exclude = .git,docs/*,systers_portal/manage.py,wsgi.py,migrations
max-line-length = 100
1 change: 1 addition & 0 deletions systers_portal/GeoLite2-City_20200616/COPYRIGHT.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Database and Contents Copyright (c) 2020 MaxMind, Inc.
Binary file not shown.
3 changes: 3 additions & 0 deletions systers_portal/GeoLite2-City_20200616/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Use of this MaxMind product is governed by MaxMind's GeoLite2 End User License Agreement, which can be viewed at https://www.maxmind.com/en/geolite2/eula.

This database incorporates GeoNames [https://www.geonames.org] geographical data, which is made available under the Creative Commons Attribution 4.0 License. To view a copy of this license, visit https://creativecommons.org/licenses/by/4.0/.
1 change: 1 addition & 0 deletions systers_portal/GeoLite2-City_20200616/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Latitude and longitude are not precise and should not be used to identify a particular street address or household.
83 changes: 25 additions & 58 deletions systers_portal/blog/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,91 +1,58 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
# Generated by Django 3.0.8 on 2020-07-24 20:45

from django.db import models, migrations
import ckeditor.fields
from django.db import migrations, models


class Migration(migrations.Migration):

initial = True

dependencies = [
('community', '0001_initial'),
('users', '0001_squashed_0003_auto_20160207_1550'),
]

operations = [
migrations.CreateModel(
name='News',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('slug', models.SlugField(unique=True, max_length=150, verbose_name=b'Slug')),
('title', models.CharField(max_length=255, verbose_name=b'Title')),
('date_created', models.DateField(auto_now_add=True, verbose_name=b'Date published')),
('date_modified', models.DateField(auto_now=True, verbose_name=b'Date last modified')),
('content', models.TextField(verbose_name=b'Content')),
('is_public', models.BooleanField(default=True, verbose_name=b'Is public')),
('is_monitored', models.BooleanField(default=False, verbose_name=b'Is monitored')),
('author', models.ForeignKey(verbose_name=b'Author', to='users.SystersUser')),
('community', models.ForeignKey(verbose_name=b'Community', to='community.Community')),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('slug', models.SlugField(max_length=150, verbose_name='Slug')),
('title', models.CharField(max_length=255, verbose_name='Title')),
('date_created', models.DateField(auto_now_add=True, verbose_name='Date published')),
('date_modified', models.DateField(auto_now=True, verbose_name='Date last modified')),
('content', ckeditor.fields.RichTextField(verbose_name='Content')),
('is_public', models.BooleanField(default=True, verbose_name='Is public')),
('is_monitored', models.BooleanField(default=False, verbose_name='Is monitored')),
],
options={
'verbose_name_plural': 'News',
},
bases=(models.Model,),
),
migrations.CreateModel(
name='Resource',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('slug', models.SlugField(unique=True, max_length=150, verbose_name=b'Slug')),
('title', models.CharField(max_length=255, verbose_name=b'Title')),
('date_created', models.DateField(auto_now_add=True, verbose_name=b'Date published')),
('date_modified', models.DateField(auto_now=True, verbose_name=b'Date last modified')),
('content', models.TextField(verbose_name=b'Content')),
('is_public', models.BooleanField(default=True, verbose_name=b'Is public')),
('is_monitored', models.BooleanField(default=False, verbose_name=b'Is monitored')),
('author', models.ForeignKey(verbose_name=b'Author', to='users.SystersUser')),
('community', models.ForeignKey(verbose_name=b'Community', to='community.Community')),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('slug', models.SlugField(max_length=150, verbose_name='Slug')),
('title', models.CharField(max_length=255, verbose_name='Title')),
('date_created', models.DateField(auto_now_add=True, verbose_name='Date published')),
('date_modified', models.DateField(auto_now=True, verbose_name='Date last modified')),
('content', ckeditor.fields.RichTextField(verbose_name='Content')),
('is_public', models.BooleanField(default=True, verbose_name='Is public')),
('is_monitored', models.BooleanField(default=False, verbose_name='Is monitored')),
],
options={
'abstract': False,
},
bases=(models.Model,),
),
migrations.CreateModel(
name='ResourceType',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.CharField(max_length=255)),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255, unique=True)),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='Tag',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.CharField(max_length=255)),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255, unique=True)),
],
options={
},
bases=(models.Model,),
),
migrations.AddField(
model_name='resource',
name='resource_type',
field=models.ForeignKey(verbose_name=b'Resource type', blank=True, to='blog.ResourceType', null=True),
preserve_default=True,
),
migrations.AddField(
model_name='resource',
name='tags',
field=models.ManyToManyField(to='blog.Tag', null=True, verbose_name=b'Tags', blank=True),
preserve_default=True,
),
migrations.AddField(
model_name='news',
name='tags',
field=models.ManyToManyField(to='blog.Tag', null=True, verbose_name=b'Tags', blank=True),
preserve_default=True,
),
]
25 changes: 0 additions & 25 deletions systers_portal/blog/migrations/0002_auto_20140928_2034.py

This file was deleted.

61 changes: 61 additions & 0 deletions systers_portal/blog/migrations/0002_auto_20200724_2045.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Generated by Django 3.0.8 on 2020-07-24 20:45

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

initial = True

dependencies = [
('blog', '0001_initial'),
('users', '0001_initial'),
('community', '0001_initial'),
]

operations = [
migrations.AddField(
model_name='resource',
name='author',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='users.SystersUser', verbose_name='Author'),
),
migrations.AddField(
model_name='resource',
name='community',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='community.Community', verbose_name='Community'),
),
migrations.AddField(
model_name='resource',
name='resource_type',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='blog.ResourceType', verbose_name='Resource type'),
),
migrations.AddField(
model_name='resource',
name='tags',
field=models.ManyToManyField(blank=True, to='blog.Tag', verbose_name='Tags'),
),
migrations.AddField(
model_name='news',
name='author',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='users.SystersUser', verbose_name='Author'),
),
migrations.AddField(
model_name='news',
name='community',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='community.Community', verbose_name='Community'),
),
migrations.AddField(
model_name='news',
name='tags',
field=models.ManyToManyField(blank=True, to='blog.Tag', verbose_name='Tags'),
),
migrations.AlterUniqueTogether(
name='resource',
unique_together={('community', 'slug')},
),
migrations.AlterUniqueTogether(
name='news',
unique_together={('community', 'slug')},
),
]
Loading

0 comments on commit c1bf420

Please sign in to comment.