aptracker 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2016 Debmalya Pramanik
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,77 @@
1
+ Metadata-Version: 2.4
2
+ Name: aptracker
3
+ Version: 1.0.0
4
+ Summary: Advanced Project Tracker and Manager Application
5
+ Home-page: https://github.com/PyUtility/aptracker
6
+ License: MIT License
7
+
8
+ Copyright (c) 2016 Debmalya Pramanik
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Classifier: Development Status :: 5 - Production/Stable
29
+ Classifier: Intended Audience :: Developers
30
+ Classifier: Intended Audience :: Education
31
+ Classifier: Intended Audience :: End Users/Desktop
32
+ Classifier: Operating System :: Unix
33
+ Classifier: Operating System :: POSIX
34
+ Classifier: Operating System :: Microsoft :: Windows
35
+ Classifier: Programming Language :: Python
36
+ Classifier: Programming Language :: Python :: 3
37
+ Classifier: Programming Language :: Python :: 3 :: Only
38
+ Classifier: Programming Language :: Python :: 3.12
39
+ Classifier: License :: OSI Approved :: MIT License
40
+ Requires-Python: >=3.12
41
+ Description-Content-Type: text/markdown
42
+ License-File: LICENSE
43
+ Dynamic: home-page
44
+ Dynamic: license-file
45
+ Dynamic: requires-python
46
+
47
+ <div align = "center">
48
+
49
+ # Advanced Python (AP) Project Tracker
50
+
51
+ </div>
52
+
53
+ <div align = "justify">
54
+
55
+ **`APTracker`** is an advanced Python module for tracking multiple projects running on a single/distributed cluster using
56
+ managers and/or objects to handle/track different projects.
57
+
58
+ ## Getting Started
59
+
60
+ The project is available in [PyPI](https://pypi.org/p/aptracker) and can be installed using standard `pip` library or other
61
+ default package managers as below:
62
+
63
+ ```shell
64
+ pip install aptracker
65
+ ```
66
+
67
+ ## Contribution Guidelines
68
+
69
+ All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome. A detailed
70
+ overview on how to contribute can be found in the **contributing guidelines**. If you run into an issue, please file a new
71
+ [issue](https://github.com/PyUtility/apttracker/issues) for discussion. Create a pull request for a new feature or a fix to
72
+ an existing issue [here](https://github.com/PyUtility/aptracker/pulls).
73
+
74
+ As contributors and maintainers to this project, you are expected to abide by [PyUtility](https://github.com/PyUtility)'s
75
+ code of conduct. More information can be found at: **Contributor Code of Conduct**.
76
+
77
+ </div>
@@ -0,0 +1,31 @@
1
+ <div align = "center">
2
+
3
+ # Advanced Python (AP) Project Tracker
4
+
5
+ </div>
6
+
7
+ <div align = "justify">
8
+
9
+ **`APTracker`** is an advanced Python module for tracking multiple projects running on a single/distributed cluster using
10
+ managers and/or objects to handle/track different projects.
11
+
12
+ ## Getting Started
13
+
14
+ The project is available in [PyPI](https://pypi.org/p/aptracker) and can be installed using standard `pip` library or other
15
+ default package managers as below:
16
+
17
+ ```shell
18
+ pip install aptracker
19
+ ```
20
+
21
+ ## Contribution Guidelines
22
+
23
+ All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome. A detailed
24
+ overview on how to contribute can be found in the **contributing guidelines**. If you run into an issue, please file a new
25
+ [issue](https://github.com/PyUtility/apttracker/issues) for discussion. Create a pull request for a new feature or a fix to
26
+ an existing issue [here](https://github.com/PyUtility/aptracker/pulls).
27
+
28
+ As contributors and maintainers to this project, you are expected to abide by [PyUtility](https://github.com/PyUtility)'s
29
+ code of conduct. More information can be found at: **Contributor Code of Conduct**.
30
+
31
+ </div>
@@ -0,0 +1,16 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+ """
4
+ APTracker - Advanced Python (AP) Project Tracker & Manager
5
+ ==========================================================
6
+
7
+ Working on multiple projects, or want to track different projects
8
+ running in a production environment efficiently using ``aptracker``
9
+ that provides simple context managers, classes etc. with a dynamic
10
+ dashboard of the performance logs.
11
+ """
12
+
13
+ __version__ = "v1.0.0"
14
+
15
+ # ? added init time options registrations from aptracker.api
16
+ from aptracker.api import * # noqa: F401, F403 # pyright: ignore[reportMissingImports]
@@ -0,0 +1,12 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ """
4
+ Initialization time option registrations and expose callables at
5
+ module level for :mod:`aptracker` module.
6
+ """
7
+
8
+ from aptracker.session import SessionConfig
9
+
10
+ __all__ = [
11
+ "SessionConfig"
12
+ ]
@@ -0,0 +1,110 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ """
4
+ Track a project that has multiple instances or sessions running in a
5
+ production environment using session managers that can be used to set
6
+ an unique identity and can be tracked from a centralized system.
7
+ """
8
+
9
+ import os
10
+ import getpass
11
+ import subprocess
12
+ import datetime as dt
13
+
14
+ from uuid import uuid4 as UUIDx
15
+ from dataclasses import dataclass
16
+
17
+ @dataclass(frozen = True)
18
+ class SessionConfig:
19
+ """
20
+ A Strictly Frozen Data Class for to Handle Sessions of a Project
21
+
22
+ A session of a project can be running instances or schedules on a
23
+ production environment. The session can be tracked using a unique
24
+ key and can be referenced back to the project.
25
+
26
+ :type JOB_NAME: str
27
+ :param JOB_NAME: Name of the job, this can be a "human-redable"
28
+ name or a unique project ket that can be used identify the
29
+ project. An efficient system should be able to track the job
30
+ and all its associated sessions using this key.
31
+
32
+ :type SESSION_ID: str
33
+ :param SESSION_ID: A unique session identity key, defaults to
34
+ ``UUID`` that can be used for a particular project.
35
+
36
+ :type SCHEDULED_ON: dt.datetime
37
+ :param SCHEDULED_ON: The date and time when the session was
38
+ created, defaults to ``dt.datetime.now()`` value.
39
+
40
+ :type SCHEDULED_BY: str
41
+ :param SCHEDULED_BY: Name of the user, machine or instance where
42
+ the session was created.
43
+
44
+ :type ENVIRONMENT: str
45
+ :param ENVIRONMENT: Environment details, defaults to ``dev``. Any
46
+ values can be set and there is no restriction.
47
+
48
+ :type VERBOSEMODE: bool
49
+ :param VERBOSEMODE: Verbose details into console when True
50
+ (default) during post initialization.
51
+
52
+ The data class is defined as ``frozen`` as once initialized this
53
+ value should not be changed or altered. Example usage:
54
+
55
+ .. code-block:: python
56
+
57
+ import aptracker as apt
58
+
59
+ session = apt.SessionConfig(JOB_NAME = "Example Job")
60
+ >> Session ID : ABC... Crated for 'Example Job' at ...
61
+ """
62
+
63
+ JOB_NAME : str
64
+
65
+ # ? global frozen values for a project run, with default values
66
+ SESSION_ID : str = str(UUIDx()).upper()
67
+ SCHEDULED_ON : dt.datetime = dt.datetime.now()
68
+ SCHEDULED_BY : str = getpass.getuser()
69
+
70
+ # ? control for environment, verbose statements
71
+ ENVIRONMENT : str = "dev"
72
+ VERBOSEMODE : bool = True
73
+
74
+
75
+ @property
76
+ def PROJECT_ROOT(self) -> str:
77
+ """
78
+ Define Root Directory for the Project if Version Controlled
79
+
80
+ The root of the project can be defined directly, if version
81
+ controlled using ``git``, else sets to the current directory.
82
+ The value is always absolute path to the project.
83
+ """
84
+
85
+ root = os.path.join(subprocess.Popen(
86
+ ['git', 'rev-parse', '--show-toplevel'],
87
+ stdout=subprocess.PIPE
88
+ ).communicate()[0].rstrip().decode('utf-8'))
89
+
90
+ return root or os.path.abspath(os.path.dirname(__file__))
91
+
92
+
93
+ def __post_init__(self) -> None:
94
+ """
95
+ Post Session Initialization Verbose Details into Console/Log
96
+
97
+ When a session is created, log details into console about the
98
+ session and other important attributes. Useful in development
99
+ environment, can be toggled based on object.
100
+ """
101
+
102
+ statement = f"Session ID : {self.SESSION_ID} " \
103
+ + f"Created for '{self.JOB_NAME}' at {self.SCHEDULED_ON}"
104
+
105
+ if self.VERBOSEMODE:
106
+ print(statement)
107
+ else:
108
+ pass
109
+
110
+ return
@@ -0,0 +1,77 @@
1
+ Metadata-Version: 2.4
2
+ Name: aptracker
3
+ Version: 1.0.0
4
+ Summary: Advanced Project Tracker and Manager Application
5
+ Home-page: https://github.com/PyUtility/aptracker
6
+ License: MIT License
7
+
8
+ Copyright (c) 2016 Debmalya Pramanik
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Classifier: Development Status :: 5 - Production/Stable
29
+ Classifier: Intended Audience :: Developers
30
+ Classifier: Intended Audience :: Education
31
+ Classifier: Intended Audience :: End Users/Desktop
32
+ Classifier: Operating System :: Unix
33
+ Classifier: Operating System :: POSIX
34
+ Classifier: Operating System :: Microsoft :: Windows
35
+ Classifier: Programming Language :: Python
36
+ Classifier: Programming Language :: Python :: 3
37
+ Classifier: Programming Language :: Python :: 3 :: Only
38
+ Classifier: Programming Language :: Python :: 3.12
39
+ Classifier: License :: OSI Approved :: MIT License
40
+ Requires-Python: >=3.12
41
+ Description-Content-Type: text/markdown
42
+ License-File: LICENSE
43
+ Dynamic: home-page
44
+ Dynamic: license-file
45
+ Dynamic: requires-python
46
+
47
+ <div align = "center">
48
+
49
+ # Advanced Python (AP) Project Tracker
50
+
51
+ </div>
52
+
53
+ <div align = "justify">
54
+
55
+ **`APTracker`** is an advanced Python module for tracking multiple projects running on a single/distributed cluster using
56
+ managers and/or objects to handle/track different projects.
57
+
58
+ ## Getting Started
59
+
60
+ The project is available in [PyPI](https://pypi.org/p/aptracker) and can be installed using standard `pip` library or other
61
+ default package managers as below:
62
+
63
+ ```shell
64
+ pip install aptracker
65
+ ```
66
+
67
+ ## Contribution Guidelines
68
+
69
+ All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome. A detailed
70
+ overview on how to contribute can be found in the **contributing guidelines**. If you run into an issue, please file a new
71
+ [issue](https://github.com/PyUtility/apttracker/issues) for discussion. Create a pull request for a new feature or a fix to
72
+ an existing issue [here](https://github.com/PyUtility/aptracker/pulls).
73
+
74
+ As contributors and maintainers to this project, you are expected to abide by [PyUtility](https://github.com/PyUtility)'s
75
+ code of conduct. More information can be found at: **Contributor Code of Conduct**.
76
+
77
+ </div>
@@ -0,0 +1,11 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ setup.py
5
+ aptracker/__init__.py
6
+ aptracker/api.py
7
+ aptracker/session.py
8
+ aptracker.egg-info/PKG-INFO
9
+ aptracker.egg-info/SOURCES.txt
10
+ aptracker.egg-info/dependency_links.txt
11
+ aptracker.egg-info/top_level.txt
@@ -0,0 +1,3 @@
1
+ aptracker
2
+ dist
3
+ docs
@@ -0,0 +1,38 @@
1
+ [build-system]
2
+ requires = [
3
+ "setuptools==82.0.1",
4
+ "wheel==0.46.3"
5
+ ]
6
+ build-backend = "setuptools.build_meta"
7
+
8
+ [project]
9
+ name = "aptracker"
10
+ dynamic = ["version"]
11
+ description = "Advanced Project Tracker and Manager Application"
12
+ readme = {file = "README.md", content-type = "text/markdown"}
13
+ requires-python = ">=3.12"
14
+ license = {file = "LICENSE" }
15
+
16
+ classifiers = [
17
+ "Development Status :: 5 - Production/Stable",
18
+ "Intended Audience :: Developers",
19
+ "Intended Audience :: Education",
20
+ "Intended Audience :: End Users/Desktop",
21
+ "Operating System :: Unix",
22
+ "Operating System :: POSIX",
23
+ "Operating System :: Microsoft :: Windows",
24
+ "Programming Language :: Python",
25
+ "Programming Language :: Python :: 3",
26
+ "Programming Language :: Python :: 3 :: Only",
27
+ "Programming Language :: Python :: 3.12",
28
+ "License :: OSI Approved :: MIT License"
29
+ ]
30
+
31
+ [tool.setuptools]
32
+ py-modules = []
33
+
34
+ [tool.setuptools.packages.find]
35
+ exclude = ["tests*", "examples*"]
36
+
37
+ [tool.setuptools.dynamic]
38
+ version = {attr = "aptracker.__version__"}
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/env python
2
+
3
+ import os
4
+ import sys
5
+
6
+ from setuptools import setup
7
+ from setuptools import find_packages
8
+
9
+ sys.path.append(
10
+ os.path.join(os.path.dirname(__file__))
11
+ )
12
+
13
+ import aptracker
14
+
15
+ setup(
16
+ name = "aptracker",
17
+ version = aptracker.__version__,
18
+ description = "Advanced Project Tracker and Manager Application",
19
+ long_description = open("README.md", "r").read(),
20
+ long_description_content_type = "text/markdown",
21
+ url = "https://github.com/PyUtility/aptracker",
22
+ packages = find_packages(
23
+ exclude = ["tests*", "examples*"]
24
+ ),
25
+ classifiers = [
26
+ "Development Status :: 5 - Production/Stable",
27
+ "Intended Audience :: Developers",
28
+ "Intended Audience :: Education",
29
+ "Intended Audience :: End Users/Desktop",
30
+ "Operating System :: Unix",
31
+ "Operating System :: POSIX",
32
+ "Operating System :: Microsoft :: Windows",
33
+ "Programming Language :: Python",
34
+ "Programming Language :: Python :: 3",
35
+ "Programming Language :: Python :: 3 :: Only",
36
+ "Programming Language :: Python :: 3.12",
37
+ "License :: OSI Approved :: MIT License"
38
+ ],
39
+ python_requires = ">=3.12"
40
+ )