Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(jans-tent): add Jans Tent product #3647

Merged
merged 10 commits into from
Jan 27, 2023
Merged
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
43 changes: 43 additions & 0 deletions .github/workflows/flake8-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Flake lint Python
on:
push:
branches:
- main
paths:
#TODO: add all python projects paths below "jans-pycloudlib", "jans-cli-tui", "jans-linux-setup"
- 'demos/jans-tent/**'
pull_request:
branches:
- main
paths:
#TODO: add all python projects paths below "jans-pycloudlib", "jans-cli-tui", "jans-linux-setup"
- 'demos/jans-tent/**'

jobs:
lint:
runs-on: ubuntu-latest
strategy:
#max-parallel: 1
fail-fast: false
matrix:
#TODO: add all python projects paths below "jans-pycloudlib", "jans-cli-tui", "jans-linux-setup"
python-projects: ["demos/jans-tent"]
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
working-directory: ${{ matrix.python-projects }}
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
working-directory: ${{ matrix.python-projects }}
8 changes: 7 additions & 1 deletion demos/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
## Overview
This folder holds different demos for different applications with janssen authorization server.
This folder holds different demos for different applications with janssen authorization server.

## [Benchmarking](benchmarking)
Holds a docker load test image packaging for Janssen. This image can load test users to a janssen environment and can execute jmeter tests.

## [Jans-tent](jans-tent)
A Flask based auth/identity app based on test-first, made to encourage and learn BDD and TDD.
2 changes: 2 additions & 0 deletions demos/jans-tent/.flaskenv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#.flaskenv
FLASK_APP=clientapp
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you mean to commit this file ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's to be used with flask or python -m flask command, when stable "production" is needed.

146 changes: 146 additions & 0 deletions demos/jans-tent/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
#auth-client-tdd-specific
clientapp/config.py
clientapp/client_secrets.json

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

.vscode/
.scannerwork

Loading