mirror of
https://github.com/bndr/pipreqs.git
synced 2025-06-06 03:25:21 +00:00
sync with master
This commit is contained in:
parent
c83d7154c6
commit
e0cfb9abd3
10
.vscode/extensions.json
vendored
10
.vscode/extensions.json
vendored
@ -123,14 +123,20 @@
|
||||
"redhat.vscode-yaml",
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Markdown
|
||||
// Markdown and reStructured Text
|
||||
// -----------------------------------------------------------------------
|
||||
// - Markdown All in One
|
||||
"yzhang.markdown-all-in-one",
|
||||
// - Markdown PDF
|
||||
"yzane.markdown-pdf",
|
||||
// - markdownlint
|
||||
"davidanson.vscode-markdownlint"
|
||||
"davidanson.vscode-markdownlint",
|
||||
// - Esbonio (conflicts with reStructuredText)
|
||||
//"swyddfa.esbonio",
|
||||
// - reStructuredText
|
||||
"lextudio.restructuredtext",
|
||||
// - reStructuredText Syntax highlighting
|
||||
"trond-snekvik.simple-rst",
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CSS
|
||||
|
109
.vscode/launch.json
vendored
109
.vscode/launch.json
vendored
@ -1,13 +1,104 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
// this will only work with a local python environment
|
||||
"name": "L-py-file",
|
||||
"type": "python",
|
||||
"request": "launch",
|
||||
"program": "${file}",
|
||||
"console": "integratedTerminal",
|
||||
"justMyCode": true
|
||||
},
|
||||
{
|
||||
"name": "L-dj-server",
|
||||
"type": "python",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/src/manage.py",
|
||||
"args": [
|
||||
"runserver",
|
||||
],
|
||||
"django": true
|
||||
},
|
||||
{
|
||||
// launch local FastAPI on default port 8000
|
||||
// this will not work with a docker container
|
||||
"name": "L-p8000-api-uvicorn",
|
||||
"type": "python",
|
||||
"request": "launch",
|
||||
"module": "uvicorn",
|
||||
"cwd": "${workspaceFolder}/src/api/",
|
||||
"args": [
|
||||
"startup:app",
|
||||
"--reload",
|
||||
"--port",
|
||||
"8000"
|
||||
],
|
||||
"jinja": true,
|
||||
"justMyCode": false
|
||||
},
|
||||
{
|
||||
//> Set PYDEVD_DISABLE_FILE_VALIDATION=1
|
||||
//> python -m debugpy --listen 8888 --wait-for-client startup.py
|
||||
// then select this script and start debug (F5)
|
||||
// finally, view FastAPI from the browser to hit breakpoints
|
||||
// http://0.0.0.0:8000
|
||||
// http://0.0.0.0:8000/docs
|
||||
// this is the default port 8000
|
||||
"name": "L-p8888-api-debugpy",
|
||||
"type": "python",
|
||||
"request": "attach",
|
||||
"connect": {
|
||||
"host": "localhost",
|
||||
"port": 8888
|
||||
},
|
||||
"pathMappings": [
|
||||
{
|
||||
"name": "Python: Current File",
|
||||
"type": "python",
|
||||
"request": "launch",
|
||||
"program": "${file}",
|
||||
"console": "integratedTerminal",
|
||||
"justMyCode": true
|
||||
"localRoot": "${workspaceFolder}/src/api/",
|
||||
"remoteRoot": "."
|
||||
}
|
||||
]
|
||||
],
|
||||
"justMyCode": false
|
||||
},
|
||||
{
|
||||
"name": "C-p5678-app-debugpy",
|
||||
"type": "python",
|
||||
"request": "attach",
|
||||
"connect": {
|
||||
"host": "localhost",
|
||||
"port": 5678
|
||||
},
|
||||
"pathMappings": [
|
||||
{
|
||||
"localRoot": "${workspaceFolder}/src/app",
|
||||
"remoteRoot": "."
|
||||
}
|
||||
],
|
||||
"justMyCode": false
|
||||
},
|
||||
{
|
||||
//> Set PYDEVD_DISABLE_FILE_VALIDATION=1
|
||||
// run the docker container that has this entrypoint that forwards to our local port 9988
|
||||
// entrypoint: [ "python", "-m", "debugpy", "--listen", "0.0.0.0:$FASTAPI_DOCKER_DEBUG_PORT", "--wait-for-client", "startup.py" ]
|
||||
// then select this script and start debug (F5)
|
||||
// finally, view FastAPI from the browser to hit breakpoints
|
||||
// http://0.0.0.0:8011
|
||||
// http://0.0.0.0:8011/docs
|
||||
// FASTAPI_LOCAL_PORT used to forward to container port to the local port 8011
|
||||
"name": "C-p9988-api-debugpy",
|
||||
"type": "python",
|
||||
"request": "attach",
|
||||
"connect": {
|
||||
"host": "localhost",
|
||||
"port": 9988
|
||||
},
|
||||
"pathMappings": [
|
||||
{
|
||||
"localRoot": "${workspaceFolder}/src/api/",
|
||||
"remoteRoot": "."
|
||||
}
|
||||
],
|
||||
"justMyCode": false
|
||||
},
|
||||
]
|
||||
}
|
||||
|
42
.vscode/settings.json
vendored
42
.vscode/settings.json
vendored
@ -1,25 +1,37 @@
|
||||
{
|
||||
"python.pythonPath": "${workspaceFolder}/.env38/Scripts/python.exe",
|
||||
//
|
||||
"workbench.colorCustomizations": {
|
||||
"activityBar.activeBackground": "#5d98cd",
|
||||
"activityBar.background": "#5d98cd",
|
||||
"activityBar.foreground": "#15202b",
|
||||
"activityBar.inactiveForeground": "#15202b99",
|
||||
"activityBarBadge.background": "#f0cee0",
|
||||
"activityBarBadge.foreground": "#15202b",
|
||||
"activityBar.activeBackground": "#1e535f",
|
||||
"activityBar.background": "#1e535f",
|
||||
"activityBar.foreground": "#e7e7e7",
|
||||
"activityBar.inactiveForeground": "#e7e7e799",
|
||||
"activityBarBadge.background": "#300f2a",
|
||||
"activityBarBadge.foreground": "#e7e7e7",
|
||||
"commandCenter.border": "#e7e7e799",
|
||||
"sash.hoverBorder": "#5d98cd",
|
||||
"statusBar.background": "#3a7fbd",
|
||||
"sash.hoverBorder": "#1e535f",
|
||||
"statusBar.background": "#123138",
|
||||
"statusBar.foreground": "#e7e7e7",
|
||||
"statusBarItem.hoverBackground": "#5d98cd",
|
||||
"statusBarItem.remoteBackground": "#3a7fbd",
|
||||
"statusBarItem.hoverBackground": "#1e535f",
|
||||
"statusBarItem.remoteBackground": "#123138",
|
||||
"statusBarItem.remoteForeground": "#e7e7e7",
|
||||
"titleBar.activeBackground": "#3a7fbd",
|
||||
"titleBar.activeBackground": "#123138",
|
||||
"titleBar.activeForeground": "#e7e7e7",
|
||||
"titleBar.inactiveBackground": "#3a7fbd99",
|
||||
"titleBar.inactiveBackground": "#12313899",
|
||||
"titleBar.inactiveForeground": "#e7e7e799"
|
||||
},
|
||||
"python.testing.unittestArgs": ["-v", "-s", "./tests", "-p", "test_*.py"],
|
||||
"python.testing.pytestEnabled": false,
|
||||
//JWL4-BlueGreen
|
||||
"peacock.color": "#123138",
|
||||
//
|
||||
// reStructuredText, root ReadMe.rst
|
||||
//"esbonio.sphinx.confDir": "",
|
||||
//
|
||||
// test
|
||||
"python.testing.pytestArgs": [
|
||||
"src",
|
||||
"tests",
|
||||
],
|
||||
"python.testing.unittestEnabled": true,
|
||||
"peacock.color": "#3a7fbd"
|
||||
"python.testing.pytestEnabled": false,
|
||||
"esbonio.sphinx.confDir": "",
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ Ready to contribute? Here's how to set up `pipreqs` for local development.
|
||||
5. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox::
|
||||
|
||||
$ flake8 pipreqs tests
|
||||
$ python setup.py test > pipreqs_setup_test_result.txt
|
||||
$ python setup.py test
|
||||
$ tox
|
||||
|
||||
To get flake8 and tox, just pip install them into your virtualenv. (or $pip install -r requirements-dev.txt)
|
||||
@ -85,6 +85,7 @@ Ready to contribute? Here's how to set up `pipreqs` for local development.
|
||||
You may also need to provide `CA_BUNDLE` as an environment variable or parameter in the `tests/.env.test` file.
|
||||
|
||||
$ export CA_BUNDLE="/certs/path/certificates.pem" # for nix OS
|
||||
|
||||
$ set CA_BUNDLE="C:/certs/path/certificates.pem" # for win OS
|
||||
|
||||
6. Commit your changes and push your branch to GitHub::
|
||||
|
@ -17,6 +17,9 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# fix_SSLError tests.settings (optional) use of .env file
|
||||
# alternative would be to set CA_BUNDLE environment variable
|
||||
# $ export CA_BUNDLE="/certs/path/certificates.pem" # for nix OS
|
||||
# $ set CA_BUNDLE="C:/certs/path/certificates.pem" # for win OS
|
||||
|
||||
python-dotenv
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@ -25,8 +28,9 @@ flake8
|
||||
tox # only needed in the environment from which tox is run
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# (optional, personal choice)
|
||||
# (optional)
|
||||
# vscode settings: "python.formatting.provider": "black",
|
||||
#black
|
||||
docutils # reStructured Text support
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -6,6 +6,11 @@ test_pipreqs
|
||||
----------------------------------
|
||||
|
||||
Tests for `pipreqs` module.
|
||||
|
||||
Environment variables used to mock arguments
|
||||
e.g.,
|
||||
$ set CA_BUNDLE="certificates.pem" # for win OS
|
||||
$ export CA_BUNDLE="certificates.pem" # for nix OS
|
||||
"""
|
||||
|
||||
import os
|
||||
|
Loading…
x
Reference in New Issue
Block a user