progstats.entities package¶
Submodules¶
progstats.entities.Project module¶
-
class
progstats.entities.Project.
Project
(name: str, topics: List[progstats.entities.Topic.Topic])¶ Bases:
object
Models a project
-
__init__
(name: str, topics: List[progstats.entities.Topic.Topic])¶ Initializes the project :param name: The name of the project :param topics: The topics available for this project
-
add_topic
(topic: progstats.entities.Topic.Topic)¶ Adds a topic to the project :param topic: The topic to add :return: None
-
get_target
(host: str, topic: progstats.entities.Topic.Topic) → str¶ Generates the target URL to the data resource for a specified topic :param host: The host’s root URL :param topic: The topic to generate the target path for :return: The generated path, or None if the specified topic does not
apply to this project
-
progstats.entities.Topic module¶
-
class
progstats.entities.Topic.
Topic
(root_dir: str, topic_type: progstats.entities.Topic.TopicType)¶ Bases:
object
Models a topic
-
__init__
(root_dir: str, topic_type: progstats.entities.Topic.TopicType)¶ Initializes the topic :param root_dir: The root data directory path :param topic_type:
-
generate_path
(project_name: str) → str¶ Generates the path to a project’s data resource :param project_name: The name of the project :return: The path to the resource
-
-
class
progstats.entities.Topic.
TopicType
(value)¶ Bases:
enum.Enum
An enumeration modelling all possible topic types
-
COVERAGE
= ('coverage', '@{project}/index.html')¶
-
DOC_HTML
= ('doc_html', '@{project}/index.html')¶
-
DOC_PDF
= ('doc_pdf', '@{project}.pdf')¶
-
GITSTATS
= ('gitstats', '@{project}/index.html')¶
-
GIT_STATS
= ('git_stats', '@{project}/index.html')¶
-
Module contents¶
-
progstats.entities.
get_projects
() → List[progstats.entities.Project.Project]¶ Retrieves a list of all projects :return: The list of projects
-
progstats.entities.
get_topics
() → List[progstats.entities.Topic.Topic]¶ Retrieves a list of all available topics :return: The list of topics