Browse Source

Ansible adaptions

test_without_lockfile
Dirk Alders 1 year ago
parent
commit
2540e1536a
3 changed files with 16 additions and 8 deletions
  1. 3
    3
      .vscode/settings.json
  2. 5
    5
      config_example/config.py
  3. 8
    0
      init_venv

+ 3
- 3
.vscode/settings.json View File

1
 {
1
 {
2
-  "editor.formatOnSave": true,
2
+  "python.defaultInterpreterPath": "./venv/bin/python",
3
   "autopep8.args": ["--max-line-length=150"],
3
   "autopep8.args": ["--max-line-length=150"],
4
-  "python.formatting.provider": "none",
5
   "[python]": {
4
   "[python]": {
5
+    "python.formatting.provider": "none",
6
     "editor.defaultFormatter": "ms-python.autopep8",
6
     "editor.defaultFormatter": "ms-python.autopep8",
7
     "editor.formatOnSave": true
7
     "editor.formatOnSave": true
8
   },
8
   },
9
-  "editor.fontSize": 16,
9
+  "editor.fontSize": 14,
10
   "emmet.includeLanguages": { "django-html": "html" },
10
   "emmet.includeLanguages": { "django-html": "html" },
11
   "python.testing.pytestArgs": ["-v", "--cov", "--cov-report=xml", "__test__"],
11
   "python.testing.pytestArgs": ["-v", "--cov", "--cov-report=xml", "__test__"],
12
   "python.testing.unittestEnabled": false,
12
   "python.testing.unittestEnabled": false,

+ 5
- 5
config_example/config.py View File

1
 # Folder to be monitored for new files
1
 # Folder to be monitored for new files
2
-TARGET_FOLDER = "/home/scan"
2
+TARGET_FOLDER = "<target_folder>"
3
 
3
 
4
 # Recipiant for the files found in TARGET_PATH
4
 # Recipiant for the files found in TARGET_PATH
5
 SEND_TO = "scan@mount-mockery.de"
5
 SEND_TO = "scan@mount-mockery.de"
6
 
6
 
7
 # Sender
7
 # Sender
8
-SEND_FROM = "Scanner-Buchen <scan@mount-mockery.de>"
9
-SMTP_SERVER = "mount-mockery.de"
10
-SMTP_USER = "smtp-sendmail"
11
-SMTP_PASSWORD = "----XXX----"
8
+SEND_FROM = "Scanner <scan@<smtp_server>>"
9
+SMTP_SERVER = "<smtp_server>"
10
+SMTP_USER = "<smtp_user>"
11
+SMTP_PASSWORD = "<smtp_password>"
12
 
12
 
13
 # Possible log-levels: DEBUG, INFO, WARNING, ERROR
13
 # Possible log-levels: DEBUG, INFO, WARNING, ERROR
14
 LOG_LEVEL = "INFO"
14
 LOG_LEVEL = "INFO"

+ 8
- 0
init_venv View File

1
+#!/bin/sh
2
+#
3
+BASEPATH=`realpath $(dirname $0)`
4
+
5
+python3 -m venv $BASEPATH/venv
6
+$BASEPATH/venv/bin/pip install --upgrade pip
7
+find $BASEPATH -name requirements.txt | xargs -L 1 $BASEPATH/venv/bin/pip install -r
8
+$BASEPATH/venv/bin/pip list --outdated --format=json | jq -r '.[] | .name'|xargs -n1 $BASEPATH/venv/bin/pip install -U

Loading…
Cancel
Save