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

georgia-tech-db / eva / bb785c16-fd0a-4407-a500-a04c85e89862

pending completion
bb785c16-fd0a-4407-a500-a04c85e89862

Pull #582

circle-ci

jarulraj
checkpoint
Pull Request #582: server: asyncio refactoring

148 of 148 new or added lines in 7 files covered. (100.0%)

8292 of 8887 relevant lines covered (93.3%)

0.93 hits per line

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

75.0
/eva/eva_cmd_client.py
1
# coding=utf-8
2
# Copyright 2018-2022 EVA
3
#
4
# Licensed under the Apache License, Version 2.0 (the "License");
5
# you may not use this file except in compliance with the License.
6
# You may obtain a copy of the License at
7
#
8
#     http://www.apache.org/licenses/LICENSE-2.0
9
#
10
# Unless required by applicable law or agreed to in writing, software
11
# distributed under the License is distributed on an "AS IS" BASIS,
12
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
# See the License for the specific language governing permissions and
14
# limitations under the License.
15
import asyncio
1✔
16
import sys
1✔
17
from os.path import abspath, dirname, join
1✔
18

19
from eva.utils.logging_manager import logger
1✔
20

21
"""
22
To allow running eva_server from any location
23
"""
24
THIS_DIR = dirname(__file__)
1✔
25
EVA_CODE_DIR = abspath(join(THIS_DIR, ".."))
1✔
26
sys.path.append(EVA_CODE_DIR)
1✔
27

28
from eva.configuration.configuration_manager import ConfigurationManager  # noqa: E402
1✔
29
from eva.server.interpreter import start_cmd_client  # noqa: E402
1✔
30

31

32
async def eva_client():
1✔
33
    """
34
    Start the eva system
35
    """
36

37
    # Get the hostname and port information from the configuration file
38
    config = ConfigurationManager()
1✔
39
    host = config.get_value("server", "host")
1✔
40
    port = config.get_value("server", "port")
1✔
41

42
    # Launch client
43
    try:
1✔
44
        await start_cmd_client(host, port)
1✔
45
    except KeyboardInterrupt:
×
46
        pass
×
47
    except Exception as e:
×
48
        logger.critical(e)
×
49
        raise e
×
50

51

52
def main():
1✔
53
    asyncio.run(eva_client())
1✔
54

55

56
if __name__ == "__main__":
1✔
57
    main()
×
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