Skip to content

Commit 74bead1

Browse files
committed
Changed to new module naming convention, abandoned namespace packages
1 parent 277104e commit 74bead1

File tree

8 files changed

+12
-13
lines changed

8 files changed

+12
-13
lines changed

__main__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import aw.server
1+
import aw_server
22

3-
aw.server.main()
3+
aw_server.main()
File renamed without changes.

aw/server/api.py aw_server/api.py

File renamed without changes.

aw/server/main.py aw_server/main.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import logging
22

33
from .server import _start
4-
from aw.datastore import Datastore, get_storage_methods, get_storage_method_names
4+
from aw_datastore import Datastore, get_storage_methods, get_storage_method_names
55

66

77
def main():

aw/server/server.py aw_server/server.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from flask import Flask
44
from flask.ext.cors import CORS
55

6-
from aw.datastore import Datastore
6+
from aw_datastore import Datastore
77

88

99
app = Flask("aw-server")
@@ -12,7 +12,7 @@
1212
# The following will be set when started
1313
app.db = None # type: Datastore
1414

15-
# Only to be called from aw.server.main function!
15+
# Only to be called from aw_server.main function!
1616
def _start(storage_method, port=5600, testing=False):
1717
# TODO: Restructure so it's called in a more sane way
1818
app.db = Datastore(storage_method, testing=testing)
File renamed without changes.

setup.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
#!/usr/bin/env python
22

3-
from setuptools import setup, find_packages
3+
from setuptools import setup
44

55
setup(name='aw-server',
66
version='0.1',
77
description='ActivityWatch server',
88
author='Erik Bjäreholt',
99
author_email='[email protected]',
1010
url='https://github.com/ActivityWatch/aw-server',
11-
namespace_packages=['aw'],
12-
packages=['aw.server'],
11+
packages=['aw_server'],
1312
install_requires=['aw-core', 'flask>=0.10', 'Flask-RESTful>=0.3', 'Flask-Cors>=2.1', 'pymongo>=3.2', 'appdirs==1.4.0'],
1413
entry_points={
15-
'console_scripts': ['aw-server = aw.server:main']
14+
'console_scripts': ['aw-server = aw_server:main']
1615
}
1716
)

tests/test_client.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
import unittest
33
from datetime import datetime
44

5-
from aw.client import ActivityWatchClient
6-
from aw.core.models import Event
5+
from aw_client import ActivityWatchClient
6+
from aw_core.models import Event
77

8-
from aw.server import datastore
9-
from aw.server.datastore import Datastore
8+
from aw_server import datastore
9+
from aw_server.datastore import Datastore
1010

1111
logging.basicConfig(level=logging.DEBUG)
1212

0 commit comments

Comments
 (0)