Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
larbatch
python
projectstatus.py
Go to the documentation of this file.
1
#! /usr/bin/env python
2
######################################################################
3
#
4
# Name: projectstatus.py
5
#
6
# Purpose: Python class ProjectStatus (used by project.py script).
7
# This class contains information about project status.
8
#
9
# Created: 12-Dec-2014 Herbert Greenlee
10
#
11
######################################################################
12
13
from
__future__
import
absolute_import
14
from
__future__
import
print_function
15
from
project_modules.stagestatus
import
StageStatus
16
17
# Project status class.
18
19
class
ProjectStatus
:
20
21
# Constructor.
22
23
def
__init__
(self, projects):
24
25
# Initialize attributes.
26
27
self.
projects
= projects
28
self.
stats
= {}
29
for
project
in
projects:
30
for
stage
in
project.stages:
31
self.
stats
[stage.name] = StageStatus(stage)
32
33
# Update data for the specified project.
34
35
def
update
(self):
36
37
# Update all stages.
38
39
for
stagename
in
list(self.stats.keys()):
40
self.
stats
[stagename].
update
()
41
42
# Get stage status for specified stage.
43
44
def
get_stage_status
(self, stagename):
45
return
self.
stats
[stagename]
python.projectstatus.ProjectStatus
Definition:
projectstatus.py:19
python.projectstatus.ProjectStatus.stats
stats
Definition:
projectstatus.py:28
python.projectstatus.ProjectStatus.update
def update(self)
Definition:
projectstatus.py:35
python.projectstatus.ProjectStatus.projects
projects
Definition:
projectstatus.py:27
python.projectstatus.ProjectStatus.__init__
def __init__(self, projects)
Definition:
projectstatus.py:23
python.projectstatus.ProjectStatus.get_stage_status
def get_stage_status(self, stagename)
Definition:
projectstatus.py:44
Generated by
1.8.11