-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Establish new CLI and configuration foundation (#104)
- Loading branch information
1 parent
1e2be3e
commit 09447bd
Showing
346 changed files
with
6,105 additions
and
39,063 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 |
---|---|---|
@@ -1,14 +1,8 @@ | ||
*.db | ||
*.pyc | ||
*~ | ||
.DS_Store | ||
*.egg-info | ||
.env | ||
.env.dev | ||
.env.docker | ||
.env.local | ||
.env.production | ||
.env.* | ||
.idea | ||
conf/config.yml | ||
docs/_build | ||
venv |
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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
app: | ||
name: pda | ||
version: 0.1.0 | ||
cli: | ||
entrypoint: pda | ||
environment: | ||
prefix: PDA | ||
file: .env | ||
server: | ||
address: 0.0.0.0 | ||
port: 8080 | ||
proxy_root: / | ||
type: django # gunicorn, uvicorn, uwsgi, django | ||
auto_reload: true | ||
workers: 3 | ||
threads: 5 | ||
gunicorn: | ||
log_level: info | ||
timeout: 30 | ||
uvicorn: | ||
log_level: info | ||
keep_alive_timeout: 5 | ||
graceful_shutdown_timeout: 5 | ||
uwsgi: | ||
request_timeout: 30 | ||
db: | ||
engine: sqlite | ||
path: pda.db | ||
# engine: mysql | ||
# host: localhost | ||
# port: 3306 | ||
# user: pda | ||
# password: pda | ||
# name: pda | ||
# engine: postgresql | ||
# host: localhost | ||
# port: 5432 | ||
# user: pda | ||
# password: pda | ||
# name: pda | ||
# schema: public | ||
cors: | ||
allow_credentials: true | ||
headers: ['*'] | ||
methods: ['*'] | ||
origins: ['127.0.0.1', 'localhost'] | ||
csrf: | ||
origins: ['http://127.0.0.1', 'http://localhost'] | ||
web: | ||
protocol: https # http, https | ||
host: your-domain.com | ||
port: 443 | ||
paths: | ||
root: $e{PWD} | ||
security: | ||
secret_key: $e{PDA_SECRET_KEY} |
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,56 @@ | ||
app: | ||
name: pda | ||
version: 0.1.0 | ||
cli: | ||
entrypoint: pda | ||
environment: | ||
prefix: PDA | ||
file: .env | ||
server: | ||
address: 0.0.0.0 | ||
port: 8080 | ||
proxy_root: / | ||
type: gunicorn # gunicorn, uvicorn, uwsgi, django | ||
auto_reload: false | ||
workers: 3 | ||
threads: 5 | ||
gunicorn: | ||
log_level: info | ||
timeout: 30 | ||
uvicorn: | ||
log_level: info | ||
keep_alive_timeout: 5 | ||
graceful_shutdown_timeout: 5 | ||
uwsgi: | ||
request_timeout: 30 | ||
db: | ||
engine: sqlite | ||
path: pda.db | ||
# engine: mysql | ||
# host: localhost | ||
# port: 3306 | ||
# user: pda | ||
# password: pda | ||
# name: pda | ||
# engine: postgresql | ||
# host: localhost | ||
# port: 5432 | ||
# user: pda | ||
# password: pda | ||
# name: pda | ||
# schema: public | ||
cors: | ||
allow_credentials: true | ||
headers: ['*'] | ||
methods: ['*'] | ||
origins: ['127.0.0.1', 'localhost'] | ||
csrf: | ||
origins: ['http://127.0.0.1', 'http://localhost'] | ||
web: | ||
protocol: https # http, https | ||
host: your-domain.com | ||
port: 443 | ||
paths: | ||
root: $e{PWD} | ||
security: | ||
secret_key: $e{PDA_SECRET_KEY} |
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,22 @@ | ||
celery==5.3.6 | ||
click==8.1.3 | ||
cryptography==42.0.2 | ||
django==4.2.7 | ||
django-allauth==0.60.1 | ||
django-celery-beat==2.5.0 | ||
django-celery-results==2.5.1 | ||
django-ninja==1.0.1 | ||
docker==7.0.0 | ||
gunicorn==21.2.0 | ||
jinja2==3.1.3 | ||
loguru==0.7.0 | ||
passlib[bcrypt]==1.7.4 | ||
pydantic==2.5.2 | ||
pydantic-settings==2.1.0 | ||
python-dotenv==0.21.0 | ||
python-jose[cryptography]==3.3.0 | ||
pyyaml==6.0.1 | ||
redis==5.0.1 | ||
reflective>=0.2.0 | ||
requests==2.31.0 | ||
uvicorn==0.20.0 |
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,75 +1,49 @@ | ||
import subprocess | ||
import sys | ||
from setuptools import setup | ||
|
||
|
||
def install(package): | ||
try: | ||
return subprocess.check_call([sys.executable, "-m", "pip", "install", package]) | ||
except subprocess.CalledProcessError as e: | ||
return False | ||
|
||
|
||
def install_packages(): | ||
if 'yaml' not in sys.modules: | ||
install('pyyaml') | ||
|
||
|
||
def load_config() -> dict: | ||
import yaml | ||
with open('defaults.yml') as f: | ||
return yaml.load(f, Loader=yaml.FullLoader) | ||
|
||
|
||
def load_requirements() -> list: | ||
with open('requirements.txt') as f: | ||
return f.read().splitlines() | ||
|
||
|
||
def load_readme() -> str: | ||
with open('README.md', 'r', encoding='utf-8') as f: | ||
return f.read() | ||
|
||
|
||
install_packages() | ||
config = load_config() | ||
|
||
setup( | ||
name='pda', | ||
version='0.1.0', | ||
name=config['app']['name'], | ||
version=config['app']['version'], | ||
package_dir={'': 'src'}, | ||
install_requires=[ | ||
'amqp==5.1.1', | ||
'asgiref==3.6.0', | ||
'async-timeout==4.0.2', | ||
'attrs==22.2.0', | ||
'bcrypt==4.0.1', | ||
'billiard==3.6.4.0', | ||
'celery[redis]==5.2.7', | ||
'celery-progress==0.1.3', | ||
'certifi==2022.12.7', | ||
'cffi==1.15.1', | ||
'charset-normalizer==3.0.1', | ||
'click==8.1.3', | ||
'click-didyoumean==0.3.0', | ||
'click-plugins==1.1.1', | ||
'click-repl==0.2.0', | ||
'cryptography==39.0.1', | ||
'defusedxml==0.7.1', | ||
'django==4.1.7', | ||
'django-allauth==0.52.0', | ||
'django-allauth-2fa==0.10.0', | ||
'django-anymail[mailgun]==9.0', | ||
'django-environ==0.9.0', | ||
'django-otp==1.1.4', | ||
'django-waffle==3.0.0', | ||
'djangorestframework==3.14.0', | ||
'djangorestframework-api-key==2.3.0', | ||
'dnspython==2.3.0', | ||
'dotenv-cli==3.1.0', | ||
'drf-spectacular==0.25.1', | ||
'gunicorn==20.1.0', | ||
'idna==3.4', | ||
'inflection==0.5.1', | ||
'jinja2==3.1.2', | ||
'jsonschema==4.17.3', | ||
'kombu==5.2.4', | ||
'mysql==0.0.3', | ||
'oauthlib==3.2.2', | ||
'prompt-toolkit==3.0.38', | ||
'psycopg2-binary==2.9.5', | ||
'pycparser==2.21', | ||
'pydantic==1.10.2', | ||
'pyjwt[crypto]==2.6.0', | ||
'pypng==0.20220715.0', | ||
'pyrsistent==0.19.3', | ||
'python3-openid==3.2.0', | ||
'python-dotenv==0.21.0', | ||
'pytz==2022.7.1', | ||
'pyaml==21.10.1', | ||
'qrcode==7.4.2', | ||
'redis==4.5.1', | ||
'requests==2.28.2', | ||
'requests-oauthlib==1.3.1', | ||
'selenium==4.8.2', | ||
'sentry-sdk==1.15.0', | ||
'six==1.16.0', | ||
'sqlparse==0.4.3', | ||
'typing-extensions==4.5.0', | ||
'uritemplate==4.1.1', | ||
'urllib3==1.26.14', | ||
'vine==5.0.0', | ||
'wcwidth==0.2.6', | ||
], | ||
install_requires=load_requirements(), | ||
entry_points={ | ||
'console_scripts': [ | ||
'pda = lib.cli.app:cli', | ||
config['app']['cli']['entrypoint'] + ' = app.cli.entry:cli', | ||
], | ||
}, | ||
long_description=load_readme(), | ||
long_description_content_type='text/markdown', | ||
) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.