Skip to content

refactor server.py for using Blueprint#3033

Open
JanEisermann wants to merge 66 commits into
Open-MSS:developfrom
JanEisermann:inkludingBP
Open

refactor server.py for using Blueprint#3033
JanEisermann wants to merge 66 commits into
Open-MSS:developfrom
JanEisermann:inkludingBP

Conversation

@JanEisermann

@JanEisermann JanEisermann commented Mar 13, 2026

Copy link
Copy Markdown
Collaborator

Purpose of PR?:

Fixes #2081

Does this PR introduce a breaking change?
included Blueprint, fixed test_load_no_file

If the changes in this PR are manually verified, list down the scenarios covered::
tests succeed, not manually verified

Additional information for reviewer? :
Mention if this PR is part of any design or a continuation of previous PRs

Does this PR results in some Documentation changes?
If yes, include the list of Documentation changes

Checklist:

  • Bug fix. Fixes #
  • New feature (Non-API breaking changes that adds functionality)
  • PR Title follows the convention of <type>: <subject>
  • Commit has unit tests

@JanEisermann JanEisermann changed the title Inkluding bp Inkcuding bp Mar 13, 2026
@JanEisermann JanEisermann changed the title Inkcuding bp Including bp Mar 13, 2026
@JanEisermann JanEisermann changed the title Including bp refactor server.py for using Blueprint Mar 13, 2026
Comment thread mslib/mswms/app/__init__.py Outdated
Comment thread mslib/mscolab/app/__init__.py Outdated
Comment thread mslib/mscolab/app/__init__.py Outdated
Comment thread mslib/mswms/app/__init__.py Outdated
Comment thread mslib/mswms/app/__init__.py Outdated
Comment thread mslib/mscolab/server.py Outdated
Comment thread mslib/mscolab/app/__init__.py Outdated
Comment thread mslib/mscolab/blueprints/chat/chat.py Outdated
Comment thread mslib/mscolab/blueprints/chat/chat.py Outdated
Comment thread mslib/mscolab/blueprints/chat/chat.py Outdated
Comment thread mslib/mscolab/blueprints/chat/chat.py Outdated
Comment thread mslib/mscolab/blueprints/operation/__init__.py
Comment thread mslib/mscolab/blueprints/auth/auth.py
Comment thread mslib/mscolab/blueprints/auth/auth.py Outdated
Comment thread mslib/mswms/app/__init__.py Outdated
Comment thread mslib/utils/file_exists.py Outdated

@ReimarBauer ReimarBauer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's good progress. We can already see it's becoming much more readable. You need to rearrange a few things.

The blueprints should contain as few additional functions as possible.

Especially not ones that need to be imported from other blueprints.

see comments

@@ -32,7 +32,7 @@ <h3>Reset Password</h3>
</div>
{% if uri is defined %}

@ReimarBauer ReimarBauer Mar 24, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe the name should be changed from status.html to status_password.html

status has too much meanings


mslib.mscolab.blueprints.auth.auth
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mslib.mscolab.blueprints.auth

"""

mslib.mscolab.blueprints.docs.docs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@ReimarBauer ReimarBauer Mar 24, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mslib.mscolab.blueprints.docs

look also on the others

Comment thread mslib/mscolab/server.py Outdated
return _app, sockio, cm, fm, mail


@APP.route('/')

@ReimarBauer ReimarBauer Mar 24, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this has to go to bp docs

Comment thread mslib/mscolab/server.py Outdated


@APP.route('/uploads/<name>/<path:filename>', methods=["GET"])
def uploads(name=None, filename=None):

@ReimarBauer ReimarBauer Mar 24, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this has to go to bp chat

Comment thread mslib/mscolab/server.py Outdated
return render_template("docs/index.html")


@APP.route("/status")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this goes to bp auth

@@ -17,13 +17,13 @@
<div class="container-fluid">
<div class="row" style="background-color:lavender;">
{% if file_exists(imprint) %}

@ReimarBauer ReimarBauer Mar 24, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the file has to go to mscolab.blueprints.docs.templates and msmw.blueprints.docs.templates

one move one copy

@@ -8,9 +8,9 @@
<meta name="description" content="Mission Support System">
<meta name="keywords" content="MSS, MSCOLAB">
<meta name="author" content="authors of MSS">
<link rel='shortcut icon' type='image/x-icon' href="{{ url_for('favicons') }}">
<link rel='shortcut icon' type='image/x-icon' href="{{ url_for('docs.favicons') }}">
<title>Mission Support System Collaboration Platform</title><!-- Bootstrap core CSS -->

@ReimarBauer ReimarBauer Mar 24, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the file has to go to mscolab.blueprints.docs.templates and msmw.blueprints.docs.templates

one move one copy

@@ -28,13 +28,21 @@
import logging

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doc string

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor server.py for using Blueprint

3 participants