• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Open-MSS / MSS / 10653123390

01 Sep 2024 10:12AM UTC coverage: 69.967% (-0.07%) from 70.037%
10653123390

Pull #2495

github

web-flow
Merge d3a10b8f0 into 0b95679f6
Pull Request #2495: remove the conda/mamba based updater.

24 of 41 new or added lines in 5 files covered. (58.54%)

92 existing lines in 6 files now uncovered.

13843 of 19785 relevant lines covered (69.97%)

0.7 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

94.12
/mslib/mswms/app/__init__.py
1
# -*- coding: utf-8 -*-
2
"""
3

4
    mslib.mswms.app
5
    ~~~~~~~~~~~~~~~
6

7
    app module of mswms
8

9
    This file is part of MSS.
10

11
    :copyright: Copyright 2016-2024 by the MSS team, see AUTHORS.
12
    :license: APACHE-2.0, see LICENSE for details.
13

14
    Licensed under the Apache License, Version 2.0 (the "License");
15
    you may not use this file except in compliance with the License.
16
    You may obtain a copy of the License at
17

18
       http://www.apache.org/licenses/LICENSE-2.0
19

20
    Unless required by applicable law or agreed to in writing, software
21
    distributed under the License is distributed on an "AS IS" BASIS,
22
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23
    See the License for the specific language governing permissions and
24
    limitations under the License.
25
"""
26

27
import os
1✔
28
import logging
1✔
29
import mslib
1✔
30

31
from flask import Flask, url_for
1✔
32
from mslib.mswms.gallery_builder import STATIC_LOCATION
1✔
33
from mslib.utils import prefix_route, release_info
1✔
34

35

36
message, update = release_info.check_for_new_release()
1✔
37
if update:
1✔
NEW
38
    logging.warning(message)
×
39

40

41
DOCS_SERVER_PATH = os.path.dirname(os.path.abspath(mslib.__file__))
1✔
42
# This can be used to set a location by SCRIPT_NAME for testing. e.g. export SCRIPT_NAME=/demo/
43
SCRIPT_NAME = os.environ.get('SCRIPT_NAME', '/')
1✔
44

45
# in memory database for testing
46
# app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///'
47
APP = Flask(__name__, template_folder=os.path.join(DOCS_SERVER_PATH, 'static', 'templates'), static_url_path="/static",
1✔
48
            static_folder=STATIC_LOCATION)
49
APP.config.from_object(__name__)
1✔
50
APP.route = prefix_route(APP.route, SCRIPT_NAME)
1✔
51

52

53
def get_topmenu():
1✔
54
    menu = [
1✔
55
        (url_for('index'), 'Mission Support System',
56
         ((url_for('about'), 'About'),
57
          (url_for('install'), 'Install'),
58
          (url_for("plots"), 'Gallery'),
59
          (url_for('help'), 'Help'),
60
          )),
61
    ]
62

63
    return menu
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc