Skip to content

Commit 943e487

Browse files
authored
Merge pull request #212 from ComputerScienceHouse/cole-dev
bump: lots of deps, fixes here and there
2 parents 23f1abc + c874a72 commit 943e487

File tree

17 files changed

+132
-110
lines changed

17 files changed

+132
-110
lines changed

.github/workflows/python-app.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ jobs:
1919
- name: Install ldap dependencies
2020
run: sudo apt-get install libldap2-dev libsasl2-dev
2121
- uses: actions/checkout@v2
22-
- name: Set up Python 3.8
22+
- name: Set up Python 3.13
2323
uses: actions/setup-python@v2
2424
with:
25-
python-version: 3.8
25+
python-version: 3.13
2626
- name: Install dependencies
2727
run: |
2828
python -m pip install --upgrade pip

.pylintrc

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[MASTER]
22
ignore = ,input
33
persistent = yes
4-
load-plugins = pylint_quotes
54

65
[MESSAGES CONTROL]
76
disable =
@@ -10,7 +9,6 @@ disable =
109
duplicate-code,
1110
no-member,
1211
parse-error,
13-
bad-continuation,
1412
too-few-public-methods,
1513
global-statement,
1614
cyclic-import,
@@ -28,23 +26,21 @@ disable =
2826
consider-iterating-dictionary,
2927
inconsistent-return-statements,
3028
consider-using-dict-items,
31-
modified-iterating-dict
29+
modified-iterating-dict,
30+
too-many-arguments,
31+
too-many-positional-arguments,
32+
broad-exception-caught,
33+
check-quote-consistency=yes
3234

3335
[REPORTS]
3436
output-format = text
35-
files-output = no
3637
reports = no
3738

3839
[FORMAT]
3940
max-line-length = 120
40-
max-statement-lines = 75
4141
single-line-if-stmt = no
42-
no-space-check = trailing-comma,dict-separator
4342
max-module-lines = 1000
4443
indent-string = ' '
45-
string-quote=single-avoid-escape
46-
triple-quote=single
47-
docstring-quote=double
4844

4945
[MISCELLANEOUS]
5046
notes = FIXME,XXX,TODO
@@ -91,7 +87,6 @@ good-names=logger,id,ID
9187
bad-names=foo,bar,baz,toto,tutu,tata
9288

9389
# List of builtins function names that should not be used, separated by a comma
94-
bad-functions=apply,input
9590

9691
[DESIGN]
9792
max-args = 10
@@ -106,4 +101,4 @@ min-public-methods = 2
106101
max-public-methods = 20
107102

108103
[EXCEPTIONS]
109-
overgeneral-exceptions = Exception
104+
overgeneral-exceptions = builtins.Exception

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.9-trixie
1+
FROM python:3.13-trixie
22
WORKDIR /opt/proxstar
33
RUN apt-get update -y && apt-get install -y python3-dev libldap2-dev libsasl2-dev ldap-utils git
44
COPY requirements.txt .

HACKING/docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ services:
2121
proxstar-rq-scheduler:
2222
build:
2323
context: ..
24-
env_file: .env.local
24+
env_file: .env
2525
entrypoint: ./start_scheduler.sh
2626
networks:
2727
- proxstar
@@ -30,7 +30,7 @@ services:
3030
proxstar-rq:
3131
build:
3232
context: ..
33-
env_file: .env.local
33+
env_file: .env
3434
entrypoint: ./start_worker.sh
3535
networks:
3636
- proxstar
@@ -42,7 +42,7 @@ services:
4242
ports:
4343
- "8000:8000"
4444
- "8001:8001"
45-
env_file: .env.local
45+
env_file: .env
4646
entrypoint: ["gunicorn", "proxstar:app", "--bind=0.0.0.0:8000"]
4747
networks:
4848
- proxstar

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
Proxstar
22
===========
33

4-
[![Python 3.8](https://img.shields.io/badge/python-3.8-blue.svg)](https://www.python.org/downloads/release/python-380/)
4+
[![Python 3.13](https://img.shields.io/badge/python-3.13-blue.svg)](https://www.python.org/downloads/release/python-3130/)
5+
[![Proxstar](https://github.com/ComputerScienceHouse/proxstar/actions/workflows/python-app.yml/badge.svg)](https://github.com/ComputerScienceHouse/proxstar/actions/workflows/python-app.yml)
56

67
Proxstar is a proxmox VM web management tool used by [Rochester Institute of Technology](https://rit.edu/)'s [Computer Science House](https://csh.rit.edu).
78

config.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,8 @@
2323

2424
# OIDC
2525
OIDC_ISSUER = environ.get('PROXSTAR_OIDC_ISSUER', 'https://sso.csh.rit.edu/auth/realms/csh')
26-
OIDC_CLIENT_CONFIG = {
27-
'client_id': environ.get('PROXSTAR_CLIENT_ID', 'proxstar'),
28-
'client_secret': environ.get('PROXSTAR_CLIENT_SECRET', ''),
29-
'post_logout_redirect_uris': [
30-
environ.get('PROXSTAR_REDIRECT_URI', 'https://proxstar.csh.rit.edu/logout')
31-
],
32-
}
26+
OIDC_CLIENT_ID = environ.get('PROXSTAR_CLIENT_ID', 'proxstar')
27+
OIDC_CLIENT_SECRET = environ.get('PROXSTAR_CLIENT_SECRET', '')
3328

3429
# Proxmox
3530
PROXMOX_HOSTS = [host.strip() for host in environ.get('PROXSTAR_PROXMOX_HOSTS', '').split(',')]
@@ -55,7 +50,10 @@
5550

5651
# REDIS
5752
REDIS_HOST = environ.get('PROXSTAR_REDIS_HOST', 'localhost')
58-
RQ_DASHBOARD_REDIS_HOST = environ.get('PROXSTAR_REDIS_HOST', 'localhost')
53+
RQ_DASHBOARD_REDIS_URL = (
54+
"redis://" + environ.get('PROXSTAR_REDIS_HOST', 'localhost') + ":" +
55+
environ.get('PROXSTAR_REDIS_PORT', '6379') + "/0"
56+
)
5957
REDIS_PORT = int(environ.get('PROXSTAR_REDIS_PORT', '6379'))
6058

6159
# VNC

gunicorn.conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515

1616
def start_websockify(websockify_path, target_file):
17-
result = subprocess.run(['pgrep', 'websockify'], stdout=subprocess.PIPE)
17+
result = subprocess.run(['pgrep', 'websockify'], stdout=subprocess.PIPE, check=False)
1818
if not result.stdout:
1919
print("Websockify is stopped. Starting websockify.")
2020
proxstar_port = app.config.get('WEBSOCKIFY_PORT')
@@ -34,6 +34,6 @@ def start_websockify(websockify_path, target_file):
3434
print("Websockify started.")
3535

3636

37-
def on_starting(server):
37+
def on_starting(server): # pylint: disable=unused-argument
3838
print("Booting Websockify server in daemon mode...")
3939
start_websockify(app.config['WEBSOCKIFY_PATH'], app.config['WEBSOCKIFY_TARGET_FILE'])

0 commit comments

Comments
 (0)