Skip to content

Commit

Permalink
Adapt app for dockerization
Browse files Browse the repository at this point in the history
  • Loading branch information
skasberger committed Oct 8, 2020
1 parent 6a0ba7e commit f9aed00
Show file tree
Hide file tree
Showing 14 changed files with 157 additions and 139 deletions.
60 changes: 43 additions & 17 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,39 +1,65 @@
data/
app/static/import/*
app/static/export/*
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*.so
venv/
venv_home/

# Misc
*~
.*.sw?
.env/

# Distribution / packaging
build/
dist/
.eggs/
*.egg-info/
*.egg
*.py[cod]
__pycache__/
*.so
*~
MANIFEST

# Documentation
/docs
src/fhe-collector/docs/build
src/fhe-collector/docs/Makefile

# Unit test / coverage reports
.tox
.coverage
.coverage.*
.*cache
coverage.xml
*.cover
pip-wheel-metadata
pytest.ini

# Personal
notes*.md
stash*.*
setup.sh
.pypirc
data/
dev/
app/static/import/*
app/static/export/*
settings_production.py
settings_testing.py
settings_development.py
settings_user.py
snippets.md
fhe.log*
.pytest_cache/
.cache
app.db
*.sqlite3
.coverage
docs/source/settings_user.rst
docs/source/settings_development.rst
docs/source/settings_production.rst
docs/coverage_html_report/
intern/
.pytest_cache/
migrations/script.py.mako
migrations/README
migrations/env.py
migrations/alembic.ini
stash*.*
.tox/
coverage.xml
core
docs/source/settings_user.rst
docs/source/settings_development.rst
docs/source/settings_production.rst
docs/coverage_html
docs/coverage_html_report/
intern/
28 changes: 28 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
default_language_version:
python: python3
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
exclude: _pytest/(debugging|hookspec).py
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-docstring-first
- id: check-json
- id: check-symlinks
- id: check-xml
- id: check-yaml
- id: detect-private-key
- id: end-of-file-fixer
- id: pretty-format-json
args: [--autofix,--no-sort-keys]
- repo: https://github.com/psf/black
rev: 19.10b0
hooks:
- id: black
language_version: python3.6
- repo: https://github.com/asottile/blacken-docs
rev: v1.7.0
hooks:
- id: blacken-docs
additional_dependencies: [black==19.10b0]
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: python
cache: pip
dist: xenial
language: python
cache: pip
dist: xenial

sudo: false

Expand Down Expand Up @@ -39,9 +39,10 @@ install:
- pip --version
- tox --version
- "pip install -r requirements.txt"
- "pip install -r deps/tests-requirements.txt"

before_script:
- export FLASK_APP="$TRAVIS_BUILD_DIR/fhe.py"
- export FLASK_APP="$TRAVIS_BUILD_DIR/main.py"
- psql -c "CREATE DATABASE travis_ci_test;" -U postgres
- export FLASK_DEBUG=1

Expand Down
55 changes: 30 additions & 25 deletions code-of-conduct.md → CODE_OF_CONDUCT.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,31 @@
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Expand All @@ -45,17 +45,17 @@ threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
This Code of Conduct applies within all project spaces, and it also applies when
an individual is representing the project or its community in public spaces.
Examples of representing a project or community include using an official
project e-mail address, posting via an official social media account, or acting
as an appointed representative at an online or offline event. Representation of
a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
reported by contacting the project lead at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Expand All @@ -67,5 +67,10 @@ members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][https://www.contributor-covenant.org/], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
<https://www.contributor-covenant.org/faq>
8 changes: 0 additions & 8 deletions LICENSE

This file was deleted.

25 changes: 25 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
The MIT License (MIT)
=====================

Copyright © 2018 Stefan Kasberger

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the “Software”), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://travis-ci.org/ScholCommLab/fhe-collector.svg?branch=master)](https://travis-ci.org/ScholCommLab/fhe-collector) [![Coverage Status](https://coveralls.io/repos/github/ScholCommLab/fhe-collector/badge.svg?branch=master)](https://coveralls.io/github/ScholCommLab/fhe-collector?branch=master) [![Documentation Status](https://readthedocs.org/projects/fhe-collector/badge/?version=latest)](https://fhe-collector.readthedocs.io/en/latest/)
[![Build Status](https://travis-ci.org/ScholCommLab/fhe-collector.svg?branch=master)](https://travis-ci.org/ScholCommLab/fhe-collector) [![Coverage Status](https://coveralls.io/repos/github/ScholCommLab/fhe-collector/badge.svg?branch=master)](https://coveralls.io/github/ScholCommLab/fhe-collector?branch=master) [![Documentation Status](https://readthedocs.org/projects/fhe-collector/badge/?version=latest)](https://fhe-collector.readthedocs.io/en/latest/) [![GitHub](https://img.shields.io/github/license/ScholCommLab/fhe-collector.svg)](https://opensource.org/licenses/MIT) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

# Facebook Hidden Engagement Microservice

Expand Down
75 changes: 0 additions & 75 deletions code-of-conduct.txt

This file was deleted.

5 changes: 5 additions & 0 deletions deps/dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Requirements for development.
tox
wheel
pre-commit
Flask-DebugToolbar==0.10.1
8 changes: 4 additions & 4 deletions deps/docs-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Requirements for documentation test (tox)
sphinx==1.7.*
git+https://github.com/python/python-docs-theme.git#egg=python-docs-theme
git+https://github.com/pypa/pypa-docs-theme.git#egg=pypa-docs-theme

# `docs.pipext` uses pip's internals to generate documentation. So, we install
# the current directory to make it work.
.
pydocstyle
restructuredtext_lint
pygments
19 changes: 16 additions & 3 deletions deps/lint-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
flake8 == 3.7.4
isort == 4.3.4
autopep8
# Requirements for linting tests (tox)
black==19.10b0
flake8==3.7.4
flake8-docstrings==1.5.0
flake8-rst-docstrings==v0.0.13
flake8-blind-except==v0.1.1
flake8-builtins==1.5.3
flake8-bandit==v2.1.0
flake8-breakpoint==v1.1.0
flake8-bugbear==20.1.4
flake8-comprehensions==3.2.3
flake8-requirements==v1.3.2
flake8-return==0.3.0
flake8-pytest-style==v1.2.1
pylint
radon
1 change: 0 additions & 1 deletion deps/packaging-requirements.txt

This file was deleted.

File renamed without changes.
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ psycopg2==2.7.5
click
pandas==0.25.2
tqdm
Flask-DebugToolbar==0.10.1
facebook-sdk

0 comments on commit f9aed00

Please sign in to comment.