Titaness


NameTitaness JSON
Version 2.1.0 PyPI version JSON
download
home_pageNone
SummaryBringing fame, fortune, and health to friends and family
upload_time2024-07-08 21:31:06
maintainerNone
docs_urlNone
authorNone
requires_python<4.0,>=3.10
licenseGPL-3.0-only
keywords alarms screening monitors cybernetics neurons nervous system bioelectric homeostasis reliability consistency integrity guarantees vows oaths assurances insurances ensurances speed calmness education augmentation enhancement improvements
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
----

## Certification

Bravo!  You have received a Medical Diploma in "Titaness" from      
the Orbital Convergence University International Air and Water   
Embassy of the Tangerine Planet.  

You are now officially certified to include "Titaness" in your   
practice.  

----

# Titaness

----

## License

Please feel free to use this module however (business, personal, etc.)
subject to the terms of GPL 3.0 License.

	@ Bryan Grace (BGraceful)

----

![Titaness](https://gitlab.com/status600/treasures/Titaness.1/-/raw/business/CharlVera--cow-8637470_1280.jpg)
from https://pixabay.com/users/charlvera-11040068/

----
 
[![CircleCI](https://dl.circleci.com/status-badge/img/circleci/EGXocrWNVJE6QWAifHn6r3/XP6tKC6Z4p7cTe8uyzgEjb/tree/performance.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/circleci/EGXocrWNVJE6QWAifHn6r3/XP6tKC6Z4p7cTe8uyzgEjb/tree/performance)

----


## Description
This module can monitor the health of a python3 `.py` biome. 

----

## Licensing
`GNU General Public License v3.0 - GNU Project - Free Software Foundation (FSF)`

The complete license is included in the module  
in the "./__license/options" directory.
	
----		
		
## Install

This utilizes:     
[https://pypi.org/project/xonsh](https://pypi.org/project/xonsh)   

```
[xonsh] pip install Titaness
```

----
	
## Internal health monitor of the module

To monitor the internal health of the "Titaness" module:

```
[xonsh] Titaness internal-health
```
	
These checks are run with pypi "body_scan";   
"Titaness" is built from a fork of "body_scan".  

The "body_scan" checks are written with "unittest". 
   
----
	
## Documentation   
```
[xonsh] Titaness help 
```

This opens a server process that can be opened in a browser. 
	
----

## Tutorial

### The Frame
```
[directory] health
	[directory] monitors
		[file] health.quest.py
		
	[file]health.move.py
```

### [file] health.quest.py
```		
def check_1 ():
	print ("check 1")
	
def check_2 ():
	print ("check 2")
	
def check_3 ():
	raise Exception ("not 110%")

checks = {
	"check 1": check_1,
	"check 2": check_2,
	"check 3": check_3
}
```
		
### [file] health.move.py 
This is run with `python3 health.move.py`
"rich" is a dependency of "Titaness"
```
#/
#
import Titaness
#
#
import rich
#
#
import json
import pathlib
import pprint
from os.path import dirname, join, normpath
import os
import sys
import subprocess
import time
#
#\

this_directory = pathlib.Path (__file__).parent.resolve ()
monitors_path = str (normpath (join (this_directory, f"monitors")))

promote = Titaness.on ({
	
	#	
	#	[necessary] 
	#	
	#	This is the file paths of the checks.
	#	
	"glob_string": monitors_path + '/**/*.quest.py',
	
	#
	#	[voluntary] 
	#		original = False
	#
	#	If False, the checks are run 
	#	one at a time.
	#
	"simultaneous": True,
	
	#
	#	[voluntary]
	#		original = 10
	#
	#	This is the limit on the amount
	#	of checks that can be run at the 
	#	same time.
	#
	"simultaneous_capacity": 50,

	#
	#	[voluntary]
	#		original = "99999999999999999999999"
	#
	#	After this time limit, lingering checks are stopped
	#	and reported as 
	#
	"time_limit": 60,
	
	#
	#	[voluntary]
	#		original = []
	#
	#	These are added to the sys.path of the process of
	#	each quest in the glob_string.
	#
	"module_paths": [
		normpath (join (monitors_path, "stages"))
	],

	#
	#	[voluntary]
	#		original = False
	#			False returns the absolute path.
	#
	#	This is the path that is subtracted from the absolute path
	#	in the health report.
	#
	#	For example:
	#		absolute path: /habitats/venue.1/health/monitors/health_1.py
	#		relative path: /habitats/venue.1/health/monitors
	#		reported path: health_1.py
	#
	"relative_path": monitors_path,
	
	#
	#	[voluntary]
	#		original = False
	#			With False, a DB is not created 
	#			and reports aren't saved.
	#	
	#	This is where the results are kept.
	#	TinyDB is utilized.
	#
	"db_directory": normpath (join (this_directory, "DB")),
	
	#
	#	[voluntary]
	#		original = 1
	#
	#	This is how the "proceeds" (report) is presented.
	#	1 might not be as good as 2.
	#
	"aggregation_format": 2
})

promote ["off"] ()

#
#	This is a detailed report
#	of the technique.
#
rich.print_json (data = {
	"paths": promote ["proceeds"] ["paths"]
})

#
#	This is the checks that did 
#	not finish successfully.
#
rich.print_json (data = {
	"alarms": promote ["proceeds"] ["alarms"]
})

#
#	This is concise stats about
#	the  technique.
#
rich.print_json (data = {
	"stats": promote ["proceeds"] ["stats"]
})
```

#### Health Report
If built perfectly, this is the "alarms" 
and "stats" that are presented.

```
{
  "alarms": [
    {
      "checks": [
        {
          "check": "check 3",
          "exception": "Exception('not 110%')",
          "exception trace": [
            "Traceback (most recent call last):",
            "  File \"/habitat/venues/stages/Titaness/procedures/health_scan/process/modules/__health_scan_utilities/import_from_path/__init__.py\", line 56, in import_from_path",
            "    checks [ check ] ()",
            "  File \"/habitat/venues/stages/Titaness/_health_readme/monitors/health.quest.py\", line 11, in check_3",
            "    raise Exception (\"not 110%\")",
            "Exception: not 110%"
          ],
          "passed": false
        }
      ],
      "path": "health.quest.py"
    }
  ]
}
{
  "stats": {
    "checks": {
      "alarms": 1,
      "passes": 2
    },
    "paths": {
      "alarms": 0,
      "empty": 0
    }
  }
}
```
	
### Notes
- Checks are started simultaneously, unless `--simultaneous no`
	- `[xonsh] Titaness health --simultaneous no`

- The fractory glob pattern is "**/status_*.py", but can be changed with `--glob-string`  
    - `[xonsh] Titaness health --glob-string "**/performance_*.py"`  	
	
----

## Advanced Tutorial   

It's recommended to run Titaness in a .py script.    

An example of this can be found in the "_book/advanced tutorial"  
section of the documentation.   

----

```
from Titaness.topics.show.variable import show_variable
show_variable ({}, mode = "pprint")
show_variable ({}, mode = "condensed")
```

----

## Contacts
graceful.bryonics@proton.me

		
	

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "Titaness",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": "alarms, screening, monitors, cybernetics, neurons, nervous system, bioelectric, homeostasis, reliability, consistency, integrity, guarantees, vows, oaths, assurances, insurances, ensurances, speed, calmness, education, augmentation, enhancement, improvements",
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/b0/b5/9151d7048bfc5b0886c981a5ab13f7a26c74b06c43b1b5cc7155447d7d80/titaness-2.1.0.tar.gz",
    "platform": null,
    "description": "\n----\n\n## Certification\n\nBravo!  You have received a Medical Diploma in \"Titaness\" from      \nthe Orbital Convergence University International Air and Water   \nEmbassy of the Tangerine Planet.  \n\nYou are now officially certified to include \"Titaness\" in your   \npractice.  \n\n----\n\n# Titaness\n\n----\n\n## License\n\nPlease feel free to use this module however (business, personal, etc.)\nsubject to the terms of GPL 3.0 License.\n\n\t@ Bryan Grace (BGraceful)\n\n----\n\n![Titaness](https://gitlab.com/status600/treasures/Titaness.1/-/raw/business/CharlVera--cow-8637470_1280.jpg)\nfrom https://pixabay.com/users/charlvera-11040068/\n\n----\n \n[![CircleCI](https://dl.circleci.com/status-badge/img/circleci/EGXocrWNVJE6QWAifHn6r3/XP6tKC6Z4p7cTe8uyzgEjb/tree/performance.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/circleci/EGXocrWNVJE6QWAifHn6r3/XP6tKC6Z4p7cTe8uyzgEjb/tree/performance)\n\n----\n\n\n## Description\nThis module can monitor the health of a python3 `.py` biome. \n\n----\n\n## Licensing\n`GNU General Public License v3.0 - GNU Project - Free Software Foundation (FSF)`\n\nThe complete license is included in the module  \nin the \"./__license/options\" directory.\n\t\n----\t\t\n\t\t\n## Install\n\nThis utilizes:     \n[https://pypi.org/project/xonsh](https://pypi.org/project/xonsh)   \n\n```\n[xonsh] pip install Titaness\n```\n\n----\n\t\n## Internal health monitor of the module\n\nTo monitor the internal health of the \"Titaness\" module:\n\n```\n[xonsh] Titaness internal-health\n```\n\t\nThese checks are run with pypi \"body_scan\";   \n\"Titaness\" is built from a fork of \"body_scan\".  \n\nThe \"body_scan\" checks are written with \"unittest\". \n   \n----\n\t\n## Documentation   \n```\n[xonsh] Titaness help \n```\n\nThis opens a server process that can be opened in a browser. \n\t\n----\n\n## Tutorial\n\n### The Frame\n```\n[directory] health\n\t[directory] monitors\n\t\t[file] health.quest.py\n\t\t\n\t[file]health.move.py\n```\n\n### [file] health.quest.py\n```\t\t\ndef check_1 ():\n\tprint (\"check 1\")\n\t\ndef check_2 ():\n\tprint (\"check 2\")\n\t\ndef check_3 ():\n\traise Exception (\"not 110%\")\n\nchecks = {\n\t\"check 1\": check_1,\n\t\"check 2\": check_2,\n\t\"check 3\": check_3\n}\n```\n\t\t\n### [file] health.move.py \nThis is run with `python3 health.move.py`\n\"rich\" is a dependency of \"Titaness\"\n```\n#/\n#\nimport Titaness\n#\n#\nimport rich\n#\n#\nimport json\nimport pathlib\nimport pprint\nfrom os.path import dirname, join, normpath\nimport os\nimport sys\nimport subprocess\nimport time\n#\n#\\\n\nthis_directory = pathlib.Path (__file__).parent.resolve ()\nmonitors_path = str (normpath (join (this_directory, f\"monitors\")))\n\npromote = Titaness.on ({\n\t\n\t#\t\n\t#\t[necessary] \n\t#\t\n\t#\tThis is the file paths of the checks.\n\t#\t\n\t\"glob_string\": monitors_path + '/**/*.quest.py',\n\t\n\t#\n\t#\t[voluntary] \n\t#\t\toriginal = False\n\t#\n\t#\tIf False, the checks are run \n\t#\tone at a time.\n\t#\n\t\"simultaneous\": True,\n\t\n\t#\n\t#\t[voluntary]\n\t#\t\toriginal = 10\n\t#\n\t#\tThis is the limit on the amount\n\t#\tof checks that can be run at the \n\t#\tsame time.\n\t#\n\t\"simultaneous_capacity\": 50,\n\n\t#\n\t#\t[voluntary]\n\t#\t\toriginal = \"99999999999999999999999\"\n\t#\n\t#\tAfter this time limit, lingering checks are stopped\n\t#\tand reported as \n\t#\n\t\"time_limit\": 60,\n\t\n\t#\n\t#\t[voluntary]\n\t#\t\toriginal = []\n\t#\n\t#\tThese are added to the sys.path of the process of\n\t#\teach quest in the glob_string.\n\t#\n\t\"module_paths\": [\n\t\tnormpath (join (monitors_path, \"stages\"))\n\t],\n\n\t#\n\t#\t[voluntary]\n\t#\t\toriginal = False\n\t#\t\t\tFalse returns the absolute path.\n\t#\n\t#\tThis is the path that is subtracted from the absolute path\n\t#\tin the health report.\n\t#\n\t#\tFor example:\n\t#\t\tabsolute path: /habitats/venue.1/health/monitors/health_1.py\n\t#\t\trelative path: /habitats/venue.1/health/monitors\n\t#\t\treported path: health_1.py\n\t#\n\t\"relative_path\": monitors_path,\n\t\n\t#\n\t#\t[voluntary]\n\t#\t\toriginal = False\n\t#\t\t\tWith False, a DB is not created \n\t#\t\t\tand reports aren't saved.\n\t#\t\n\t#\tThis is where the results are kept.\n\t#\tTinyDB is utilized.\n\t#\n\t\"db_directory\": normpath (join (this_directory, \"DB\")),\n\t\n\t#\n\t#\t[voluntary]\n\t#\t\toriginal = 1\n\t#\n\t#\tThis is how the \"proceeds\" (report) is presented.\n\t#\t1 might not be as good as 2.\n\t#\n\t\"aggregation_format\": 2\n})\n\npromote [\"off\"] ()\n\n#\n#\tThis is a detailed report\n#\tof the technique.\n#\nrich.print_json (data = {\n\t\"paths\": promote [\"proceeds\"] [\"paths\"]\n})\n\n#\n#\tThis is the checks that did \n#\tnot finish successfully.\n#\nrich.print_json (data = {\n\t\"alarms\": promote [\"proceeds\"] [\"alarms\"]\n})\n\n#\n#\tThis is concise stats about\n#\tthe  technique.\n#\nrich.print_json (data = {\n\t\"stats\": promote [\"proceeds\"] [\"stats\"]\n})\n```\n\n#### Health Report\nIf built perfectly, this is the \"alarms\" \nand \"stats\" that are presented.\n\n```\n{\n  \"alarms\": [\n    {\n      \"checks\": [\n        {\n          \"check\": \"check 3\",\n          \"exception\": \"Exception('not 110%')\",\n          \"exception trace\": [\n            \"Traceback (most recent call last):\",\n            \"  File \\\"/habitat/venues/stages/Titaness/procedures/health_scan/process/modules/__health_scan_utilities/import_from_path/__init__.py\\\", line 56, in import_from_path\",\n            \"    checks [ check ] ()\",\n            \"  File \\\"/habitat/venues/stages/Titaness/_health_readme/monitors/health.quest.py\\\", line 11, in check_3\",\n            \"    raise Exception (\\\"not 110%\\\")\",\n            \"Exception: not 110%\"\n          ],\n          \"passed\": false\n        }\n      ],\n      \"path\": \"health.quest.py\"\n    }\n  ]\n}\n{\n  \"stats\": {\n    \"checks\": {\n      \"alarms\": 1,\n      \"passes\": 2\n    },\n    \"paths\": {\n      \"alarms\": 0,\n      \"empty\": 0\n    }\n  }\n}\n```\n\t\n### Notes\n- Checks are started simultaneously, unless `--simultaneous no`\n\t- `[xonsh] Titaness health --simultaneous no`\n\n- The fractory glob pattern is \"**/status_*.py\", but can be changed with `--glob-string`  \n    - `[xonsh] Titaness health --glob-string \"**/performance_*.py\"`  \t\n\t\n----\n\n## Advanced Tutorial   \n\nIt's recommended to run Titaness in a .py script.    \n\nAn example of this can be found in the \"_book/advanced tutorial\"  \nsection of the documentation.   \n\n----\n\n```\nfrom Titaness.topics.show.variable import show_variable\nshow_variable ({}, mode = \"pprint\")\nshow_variable ({}, mode = \"condensed\")\n```\n\n----\n\n## Contacts\ngraceful.bryonics@proton.me\n\n\t\t\n\t\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-only",
    "summary": "Bringing fame, fortune, and health to friends and family",
    "version": "2.1.0",
    "project_urls": {
        "GitLab": "https://gitlab.com/status600/treasures/Titaness.1"
    },
    "split_keywords": [
        "alarms",
        " screening",
        " monitors",
        " cybernetics",
        " neurons",
        " nervous system",
        " bioelectric",
        " homeostasis",
        " reliability",
        " consistency",
        " integrity",
        " guarantees",
        " vows",
        " oaths",
        " assurances",
        " insurances",
        " ensurances",
        " speed",
        " calmness",
        " education",
        " augmentation",
        " enhancement",
        " improvements"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b0b59151d7048bfc5b0886c981a5ab13f7a26c74b06c43b1b5cc7155447d7d80",
                "md5": "6590d13839321865c2b2ef630d52b5cd",
                "sha256": "f1e7032d896def4456a556e35f35c39286460a5920e4de3eee2c060ed95c8389"
            },
            "downloads": -1,
            "filename": "titaness-2.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "6590d13839321865c2b2ef630d52b5cd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 166037,
            "upload_time": "2024-07-08T21:31:06",
            "upload_time_iso_8601": "2024-07-08T21:31:06.824042Z",
            "url": "https://files.pythonhosted.org/packages/b0/b5/9151d7048bfc5b0886c981a5ab13f7a26c74b06c43b1b5cc7155447d7d80/titaness-2.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-08 21:31:06",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "status600",
    "gitlab_project": "treasures",
    "lcname": "titaness"
}
        
Elapsed time: 0.26356s