2013-07-08 05:38:01 +04:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
"""
|
|
|
|
wakatime.projects.base
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
Base project for use when no other project can be found.
|
|
|
|
|
|
|
|
:copyright: (c) 2013 Alan Hamlett.
|
|
|
|
:license: BSD, see LICENSE for more details.
|
|
|
|
"""
|
|
|
|
|
|
|
|
import logging
|
|
|
|
|
2015-09-29 13:11:25 +03:00
|
|
|
from ..exceptions import NotYetImplemented
|
|
|
|
|
2013-07-08 05:38:01 +04:00
|
|
|
|
2014-07-25 12:01:39 +04:00
|
|
|
log = logging.getLogger('WakaTime')
|
2013-07-08 05:38:01 +04:00
|
|
|
|
|
|
|
|
2013-07-10 11:14:44 +04:00
|
|
|
class BaseProject(object):
|
|
|
|
""" Parent project class only
|
|
|
|
used when no valid project can
|
|
|
|
be found for the current path.
|
|
|
|
"""
|
2013-07-08 05:38:01 +04:00
|
|
|
|
2013-12-13 18:35:49 +04:00
|
|
|
def __init__(self, path, configs=None):
|
2013-07-08 05:38:01 +04:00
|
|
|
self.path = path
|
2013-12-13 18:35:49 +04:00
|
|
|
self._configs = configs
|
2013-07-08 05:38:01 +04:00
|
|
|
|
2013-07-10 11:14:44 +04:00
|
|
|
def process(self):
|
|
|
|
""" Processes self.path into a project and
|
|
|
|
returns True if project is valid, otherwise
|
|
|
|
returns False.
|
|
|
|
"""
|
2015-09-29 13:11:25 +03:00
|
|
|
raise NotYetImplemented()
|
2013-07-10 11:14:44 +04:00
|
|
|
|
|
|
|
def name(self):
|
|
|
|
""" Returns the project's name.
|
|
|
|
"""
|
2015-09-29 13:11:25 +03:00
|
|
|
raise NotYetImplemented()
|
2013-07-08 05:38:01 +04:00
|
|
|
|
2013-09-07 09:59:03 +04:00
|
|
|
def branch(self):
|
|
|
|
""" Returns the current branch.
|
2013-07-10 11:14:44 +04:00
|
|
|
"""
|
2015-09-29 13:11:25 +03:00
|
|
|
raise NotYetImplemented()
|
2018-09-21 08:29:34 +03:00
|
|
|
|
|
|
|
def folder(self):
|
|
|
|
""" Returns the project's top folder path.
|
|
|
|
"""
|
|
|
|
raise NotYetImplemented()
|