From 35bef706f1fea6981237f9fcf6de3fddb6212de3 Mon Sep 17 00:00:00 2001 From: Christophe VG Date: Wed, 17 Jan 2024 10:26:56 +0100 Subject: [PATCH] pypi-template upgrade + redesign env mgmt --- .github/README.md | 2 +- .readthedocs.yaml | 1 - LICENSE.txt | 2 +- Makefile.mak | 27 +++++---- ...irements.base.txt => requirements.demo.txt | 5 +- requirements.docs.txt | 1 + requirements.local.txt | 41 ++++---------- requirements.test.txt | 16 ++++++ requirements.txt | 56 +++++++++---------- 9 files changed, 76 insertions(+), 75 deletions(-) rename requirements.base.txt => requirements.demo.txt (85%) create mode 120000 requirements.docs.txt create mode 100644 requirements.test.txt diff --git a/.github/README.md b/.github/README.md index 925e498..7eac807 100644 --- a/.github/README.md +++ b/.github/README.md @@ -7,7 +7,7 @@ ![Build Status](https://github.com/christophevg/baseweb/actions/workflows/test.yaml/badge.svg) [![Documentation Status](https://readthedocs.org/projects/baseweb/badge/?version=latest)](https://baseweb.readthedocs.io/en/latest/?badge=latest) [![Coverage Status](https://coveralls.io/repos/github/christophevg/baseweb/badge.svg?branch=master)](https://coveralls.io/github/christophevg/baseweb?branch=master) -[![Built with PyPi Template](https://img.shields.io/badge/PyPi_Template-v0.4.6-blue.svg)](https://github.com/christophevg/pypi-template) +[![Built with PyPi Template](https://img.shields.io/badge/PyPi_Template-v0.4.7-blue.svg)](https://github.com/christophevg/pypi-template) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index d7a4e64..e48a08e 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -20,4 +20,3 @@ sphinx: python: install: - requirements: requirements.txt - - requirements: requirements.local.txt diff --git a/LICENSE.txt b/LICENSE.txt index 82cff61..0fdfc98 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) 2020-2023 Christophe Van Ginneken +Copyright (c) 2020-2024 Christophe Van Ginneken Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Makefile.mak b/Makefile.mak index 44132e6..639873f 100644 --- a/Makefile.mak +++ b/Makefile.mak @@ -1,15 +1,18 @@ -requirements.local.txt: - pip freeze > req.local.txt - cat requirements.txt | cut -d"=" -f1 > req.txt - grep -f req.txt -v req.local.txt > $@ - rm req.local.txt req.txt +run: env-demo + gunicorn -k eventlet -w 1 baseweb-demo:server -.PHONY: requirements.local.txt +env-%: local-env-% clean-env + pip install -r requirements.$*.txt -clean-requirements: - pip freeze | cut -d'=' -f1 | xargs pip uninstall -y - pip install -r requirements.txt - pip install -r requirements.base.txt +local-env-%: + pyenv local baseweb-$* -run: - gunicorn -k eventlet -w 1 baseweb-demo:server +clean-env: + pip freeze | cut -d"@" -f1 | cut -d'=' -f1 | xargs pip uninstall -y + +pypi: + pyenv local baseweb + +test-docs: env-docs docs + +test-test: env-test test diff --git a/requirements.base.txt b/requirements.demo.txt similarity index 85% rename from requirements.base.txt rename to requirements.demo.txt index 5af61cb..eeadf8c 100644 --- a/requirements.base.txt +++ b/requirements.demo.txt @@ -1,3 +1,4 @@ +# baseweb Flask Flask-RESTful Flask-SocketIO @@ -7,6 +8,8 @@ python-engineio python-socketio dotmap pyfiglet + +# demo gunicorn eventlet -pypi-template +oatk diff --git a/requirements.docs.txt b/requirements.docs.txt new file mode 120000 index 0000000..d54bfb5 --- /dev/null +++ b/requirements.docs.txt @@ -0,0 +1 @@ +requirements.txt \ No newline at end of file diff --git a/requirements.local.txt b/requirements.local.txt index 8484826..11e887f 100644 --- a/requirements.local.txt +++ b/requirements.local.txt @@ -1,31 +1,10 @@ -aniso8601==9.0.1 -Authlib==1.2.1 -bidict==0.22.1 -blinker==1.7.0 -cffi==1.16.0 -click==8.1.7 -cryptography==41.0.5 -dnspython==2.4.2 -dotmap==1.3.30 -eventlet==0.33.3 -Flask==3.0.0 -Flask-Cors==4.0.0 -Flask-RESTful==0.3.10 -Flask-SocketIO==5.3.6 -greenlet==3.0.1 -gunicorn==21.2.0 -h11==0.14.0 -itsdangerous==2.1.2 -oatk==0.0.11 -pycparser==2.21 -pyfiglet==0.8.post1 -PyJWT==2.8.0 -pymongo==4.6.0 -pypi-template==0.4.6 -python-dotenv==1.0.0 -python-engineio==4.8.0 -python-socketio==5.10.0 -simple-websocket==1.0.0 -websocket-client==1.6.4 -Werkzeug==3.0.1 -wsproto==1.2.0 +# baseweb +Flask +Flask-RESTful +Flask-SocketIO +python-dotenv +websocket-client +python-engineio +python-socketio +dotmap +pyfiglet diff --git a/requirements.test.txt b/requirements.test.txt new file mode 100644 index 0000000..c541eb2 --- /dev/null +++ b/requirements.test.txt @@ -0,0 +1,16 @@ +# baseweb +Flask +Flask-RESTful +Flask-SocketIO +python-dotenv +websocket-client +python-engineio +python-socketio +dotmap +pyfiglet + +# testing +pytest +tox +coverage +ruff diff --git a/requirements.txt b/requirements.txt index 0c7c92a..ade0c3c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,55 +1,55 @@ alabaster==0.7.13 -astroid==2.15.6 -Babel==2.13.1 +astroid==3.0.2 +Babel==2.14.0 cachetools==5.3.2 -certifi==2023.7.22 +certifi==2023.11.17 chardet==5.2.0 charset-normalizer==3.3.2 colorama==0.4.6 -coverage==7.3.2 -distlib==0.3.7 +coverage==7.4.0 +distlib==0.3.8 docopt==0.6.2 -docutils==0.18.1 -exceptiongroup==1.1.3 +docutils==0.20.1 +exceptiongroup==1.2.0 filelock==3.13.1 fire==0.5.0 -idna==3.4 +idna==3.6 imagesize==1.4.1 -importlib-metadata==6.8.0 +importlib-metadata==7.0.1 importlib-resources==6.1.1 iniconfig==2.0.0 jaraco.classes==3.3.0 -Jinja2==3.1.2 -keyring==24.2.0 -lazy-object-proxy==1.9.0 +Jinja2==3.1.3 +keyring==24.3.0 +lazy-object-proxy==1.10.0 markdown-it-py==3.0.0 MarkupSafe==2.1.3 mdit-py-plugins==0.4.0 mdurl==0.1.2 -more-itertools==10.1.0 +more-itertools==10.2.0 myst-parser==2.0.0 -nh3==0.2.14 +nh3==0.2.15 packaging==23.2 pkginfo==1.9.6 -platformdirs==3.11.0 +platformdirs==4.1.0 pluggy==1.3.0 -prompt-toolkit==3.0.40 -Pygments==2.16.1 +prompt-toolkit==3.0.43 +Pygments==2.17.2 pyproject-api==1.6.1 -pytest==7.4.3 +pytest==7.4.4 pytz==2023.3.post1 PyYAML==6.0.1 readme-renderer==42.0 requests==2.31.0 requests-toolbelt==1.0.0 rfc3986==2.0.0 -rich==13.6.0 -ruff==0.1.5 +rich==13.7.0 +ruff==0.1.13 six==1.16.0 snowballstemmer==2.2.0 Sphinx==7.1.2 -sphinx-autodoc2==0.4.2 -sphinx-rtd-theme==1.3.0 +sphinx-autodoc2==0.5.0 +sphinx-rtd-theme==2.0.0 sphinxcontrib-applehelp==1.0.4 sphinxcontrib-devhelp==1.0.2 sphinxcontrib-htmlhelp==2.0.1 @@ -57,13 +57,13 @@ sphinxcontrib-jquery==4.1 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 -termcolor==2.3.0 +termcolor==2.4.0 tomli==2.0.1 -tox==4.11.3 +tox==4.12.0 twine==4.0.2 -typing_extensions==4.8.0 -urllib3==2.0.7 -virtualenv==20.24.6 -wcwidth==0.2.9 +typing_extensions==4.9.0 +urllib3==2.1.0 +virtualenv==20.25.0 +wcwidth==0.2.13 wrapt==1.16.0 zipp==3.17.0