blue-assistant 4.9.1__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.
Files changed (40) hide show
  1. blue_assistant-4.9.1/LICENSE +121 -0
  2. blue_assistant-4.9.1/MANIFEST.in +1 -0
  3. blue_assistant-4.9.1/PKG-INFO +65 -0
  4. blue_assistant-4.9.1/README.md +26 -0
  5. blue_assistant-4.9.1/blue_assistant/.abcli/abcli.sh +9 -0
  6. blue_assistant-4.9.1/blue_assistant/.abcli/actions.sh +11 -0
  7. blue_assistant-4.9.1/blue_assistant/.abcli/alias.sh +6 -0
  8. blue_assistant-4.9.1/blue_assistant/.abcli/blue_assistant.sh +11 -0
  9. blue_assistant-4.9.1/blue_assistant/.abcli/browse.sh +15 -0
  10. blue_assistant-4.9.1/blue_assistant/.abcli/chat.sh +28 -0
  11. blue_assistant-4.9.1/blue_assistant/.abcli/tests/README.sh +11 -0
  12. blue_assistant-4.9.1/blue_assistant/.abcli/tests/chat.sh +12 -0
  13. blue_assistant-4.9.1/blue_assistant/.abcli/tests/help.sh +33 -0
  14. blue_assistant-4.9.1/blue_assistant/.abcli/tests/version.sh +8 -0
  15. blue_assistant-4.9.1/blue_assistant/README.py +30 -0
  16. blue_assistant-4.9.1/blue_assistant/__init__.py +19 -0
  17. blue_assistant-4.9.1/blue_assistant/__main__.py +19 -0
  18. blue_assistant-4.9.1/blue_assistant/chat/__init__.py +0 -0
  19. blue_assistant-4.9.1/blue_assistant/chat/__main__.py +46 -0
  20. blue_assistant-4.9.1/blue_assistant/chat/functions.py +25 -0
  21. blue_assistant-4.9.1/blue_assistant/config.env +1 -0
  22. blue_assistant-4.9.1/blue_assistant/env.py +11 -0
  23. blue_assistant-4.9.1/blue_assistant/functions.py +3 -0
  24. blue_assistant-4.9.1/blue_assistant/help/__init__.py +3 -0
  25. blue_assistant-4.9.1/blue_assistant/help/__main__.py +13 -0
  26. blue_assistant-4.9.1/blue_assistant/help/chat.py +27 -0
  27. blue_assistant-4.9.1/blue_assistant/help/functions.py +34 -0
  28. blue_assistant-4.9.1/blue_assistant/host.py +14 -0
  29. blue_assistant-4.9.1/blue_assistant/logger.py +7 -0
  30. blue_assistant-4.9.1/blue_assistant/sample.env +0 -0
  31. blue_assistant-4.9.1/blue_assistant/urls.py +4 -0
  32. blue_assistant-4.9.1/blue_assistant.egg-info/PKG-INFO +65 -0
  33. blue_assistant-4.9.1/blue_assistant.egg-info/SOURCES.txt +38 -0
  34. blue_assistant-4.9.1/blue_assistant.egg-info/dependency_links.txt +1 -0
  35. blue_assistant-4.9.1/blue_assistant.egg-info/requires.txt +15 -0
  36. blue_assistant-4.9.1/blue_assistant.egg-info/top_level.txt +1 -0
  37. blue_assistant-4.9.1/pyproject.toml +6 -0
  38. blue_assistant-4.9.1/requirements.txt +15 -0
  39. blue_assistant-4.9.1/setup.cfg +4 -0
  40. blue_assistant-4.9.1/setup.py +26 -0
@@ -0,0 +1,121 @@
1
+ Creative Commons Legal Code
2
+
3
+ CC0 1.0 Universal
4
+
5
+ CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
6
+ LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
7
+ ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
8
+ INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
9
+ REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
10
+ PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
11
+ THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
12
+ HEREUNDER.
13
+
14
+ Statement of Purpose
15
+
16
+ The laws of most jurisdictions throughout the world automatically confer
17
+ exclusive Copyright and Related Rights (defined below) upon the creator
18
+ and subsequent owner(s) (each and all, an "owner") of an original work of
19
+ authorship and/or a database (each, a "Work").
20
+
21
+ Certain owners wish to permanently relinquish those rights to a Work for
22
+ the purpose of contributing to a commons of creative, cultural and
23
+ scientific works ("Commons") that the public can reliably and without fear
24
+ of later claims of infringement build upon, modify, incorporate in other
25
+ works, reuse and redistribute as freely as possible in any form whatsoever
26
+ and for any purposes, including without limitation commercial purposes.
27
+ These owners may contribute to the Commons to promote the ideal of a free
28
+ culture and the further production of creative, cultural and scientific
29
+ works, or to gain reputation or greater distribution for their Work in
30
+ part through the use and efforts of others.
31
+
32
+ For these and/or other purposes and motivations, and without any
33
+ expectation of additional consideration or compensation, the person
34
+ associating CC0 with a Work (the "Affirmer"), to the extent that he or she
35
+ is an owner of Copyright and Related Rights in the Work, voluntarily
36
+ elects to apply CC0 to the Work and publicly distribute the Work under its
37
+ terms, with knowledge of his or her Copyright and Related Rights in the
38
+ Work and the meaning and intended legal effect of CC0 on those rights.
39
+
40
+ 1. Copyright and Related Rights. A Work made available under CC0 may be
41
+ protected by copyright and related or neighboring rights ("Copyright and
42
+ Related Rights"). Copyright and Related Rights include, but are not
43
+ limited to, the following:
44
+
45
+ i. the right to reproduce, adapt, distribute, perform, display,
46
+ communicate, and translate a Work;
47
+ ii. moral rights retained by the original author(s) and/or performer(s);
48
+ iii. publicity and privacy rights pertaining to a person's image or
49
+ likeness depicted in a Work;
50
+ iv. rights protecting against unfair competition in regards to a Work,
51
+ subject to the limitations in paragraph 4(a), below;
52
+ v. rights protecting the extraction, dissemination, use and reuse of data
53
+ in a Work;
54
+ vi. database rights (such as those arising under Directive 96/9/EC of the
55
+ European Parliament and of the Council of 11 March 1996 on the legal
56
+ protection of databases, and under any national implementation
57
+ thereof, including any amended or successor version of such
58
+ directive); and
59
+ vii. other similar, equivalent or corresponding rights throughout the
60
+ world based on applicable law or treaty, and any national
61
+ implementations thereof.
62
+
63
+ 2. Waiver. To the greatest extent permitted by, but not in contravention
64
+ of, applicable law, Affirmer hereby overtly, fully, permanently,
65
+ irrevocably and unconditionally waives, abandons, and surrenders all of
66
+ Affirmer's Copyright and Related Rights and associated claims and causes
67
+ of action, whether now known or unknown (including existing as well as
68
+ future claims and causes of action), in the Work (i) in all territories
69
+ worldwide, (ii) for the maximum duration provided by applicable law or
70
+ treaty (including future time extensions), (iii) in any current or future
71
+ medium and for any number of copies, and (iv) for any purpose whatsoever,
72
+ including without limitation commercial, advertising or promotional
73
+ purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
74
+ member of the public at large and to the detriment of Affirmer's heirs and
75
+ successors, fully intending that such Waiver shall not be subject to
76
+ revocation, rescission, cancellation, termination, or any other legal or
77
+ equitable action to disrupt the quiet enjoyment of the Work by the public
78
+ as contemplated by Affirmer's express Statement of Purpose.
79
+
80
+ 3. Public License Fallback. Should any part of the Waiver for any reason
81
+ be judged legally invalid or ineffective under applicable law, then the
82
+ Waiver shall be preserved to the maximum extent permitted taking into
83
+ account Affirmer's express Statement of Purpose. In addition, to the
84
+ extent the Waiver is so judged Affirmer hereby grants to each affected
85
+ person a royalty-free, non transferable, non sublicensable, non exclusive,
86
+ irrevocable and unconditional license to exercise Affirmer's Copyright and
87
+ Related Rights in the Work (i) in all territories worldwide, (ii) for the
88
+ maximum duration provided by applicable law or treaty (including future
89
+ time extensions), (iii) in any current or future medium and for any number
90
+ of copies, and (iv) for any purpose whatsoever, including without
91
+ limitation commercial, advertising or promotional purposes (the
92
+ "License"). The License shall be deemed effective as of the date CC0 was
93
+ applied by Affirmer to the Work. Should any part of the License for any
94
+ reason be judged legally invalid or ineffective under applicable law, such
95
+ partial invalidity or ineffectiveness shall not invalidate the remainder
96
+ of the License, and in such case Affirmer hereby affirms that he or she
97
+ will not (i) exercise any of his or her remaining Copyright and Related
98
+ Rights in the Work or (ii) assert any associated claims and causes of
99
+ action with respect to the Work, in either case contrary to Affirmer's
100
+ express Statement of Purpose.
101
+
102
+ 4. Limitations and Disclaimers.
103
+
104
+ a. No trademark or patent rights held by Affirmer are waived, abandoned,
105
+ surrendered, licensed or otherwise affected by this document.
106
+ b. Affirmer offers the Work as-is and makes no representations or
107
+ warranties of any kind concerning the Work, express, implied,
108
+ statutory or otherwise, including without limitation warranties of
109
+ title, merchantability, fitness for a particular purpose, non
110
+ infringement, or the absence of latent or other defects, accuracy, or
111
+ the present or absence of errors, whether or not discoverable, all to
112
+ the greatest extent permissible under applicable law.
113
+ c. Affirmer disclaims responsibility for clearing rights of other persons
114
+ that may apply to the Work or any use thereof, including without
115
+ limitation any person's Copyright and Related Rights in the Work.
116
+ Further, Affirmer disclaims responsibility for obtaining any necessary
117
+ consents, permissions or other rights required for any use of the
118
+ Work.
119
+ d. Affirmer understands and acknowledges that Creative Commons is not a
120
+ party to this document and has no duty or obligation with respect to
121
+ this CC0 or use of the Work.
@@ -0,0 +1 @@
1
+ include requirements.txt
@@ -0,0 +1,65 @@
1
+ Metadata-Version: 2.2
2
+ Name: blue_assistant
3
+ Version: 4.9.1
4
+ Summary: 🌀 An AI Assistant.
5
+ Home-page: https://github.com/kamangir/blue-assistant
6
+ Author: Arash Abadpour (Kamangir)
7
+ Author-email: arash@kamangir.net
8
+ License: Public Domain
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Unix Shell
11
+ Classifier: License :: Public Domain
12
+ Classifier: Operating System :: OS Independent
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Requires-Dist: blueness
16
+ Requires-Dist: blue-options
17
+ Requires-Dist: abcli
18
+ Requires-Dist: boto3
19
+ Requires-Dist: geojson
20
+ Requires-Dist: geopandas
21
+ Requires-Dist: matplotlib
22
+ Requires-Dist: numpy
23
+ Requires-Dist: opencv-python
24
+ Requires-Dist: pymysql
25
+ Requires-Dist: pyyaml
26
+ Requires-Dist: pylint
27
+ Requires-Dist: pytest
28
+ Requires-Dist: python-dotenv[cli]
29
+ Requires-Dist: tqdm
30
+ Dynamic: author
31
+ Dynamic: author-email
32
+ Dynamic: classifier
33
+ Dynamic: description
34
+ Dynamic: description-content-type
35
+ Dynamic: home-page
36
+ Dynamic: license
37
+ Dynamic: requires-dist
38
+ Dynamic: summary
39
+
40
+ # 🌀 blue-assistant
41
+
42
+ 🌀 `@assistant` is an AI assistant.
43
+
44
+ ```bash
45
+ pip install blue-assistant
46
+ ```
47
+
48
+ ```mermaid
49
+ graph LR
50
+ chat["@assistant<br>chat - -<br>&lt;object-name&gt;"]
51
+
52
+ object["📂 object"]:::folder
53
+
54
+ object --> chat
55
+ chat --> object
56
+
57
+ classDef folder fill:#999,stroke:#333,stroke-width:2px;
58
+ ```
59
+
60
+ ---
61
+
62
+
63
+ [![pylint](https://github.com/kamangir/blue-assistant/actions/workflows/pylint.yml/badge.svg)](https://github.com/kamangir/blue-assistant/actions/workflows/pylint.yml) [![pytest](https://github.com/kamangir/blue-assistant/actions/workflows/pytest.yml/badge.svg)](https://github.com/kamangir/blue-assistant/actions/workflows/pytest.yml) [![bashtest](https://github.com/kamangir/blue-assistant/actions/workflows/bashtest.yml/badge.svg)](https://github.com/kamangir/blue-assistant/actions/workflows/bashtest.yml) [![PyPI version](https://img.shields.io/pypi/v/blue-assistant.svg)](https://pypi.org/project/blue-assistant/) [![PyPI - Downloads](https://img.shields.io/pypi/dd/blue-assistant)](https://pypistats.org/packages/blue-assistant)
64
+
65
+ built by 🌀 [`blue_options-4.205.1`](https://github.com/kamangir/awesome-bash-cli), based on 🌀 [`blue_assistant-4.9.1`](https://github.com/kamangir/blue-assistant).
@@ -0,0 +1,26 @@
1
+ # 🌀 blue-assistant
2
+
3
+ 🌀 `@assistant` is an AI assistant.
4
+
5
+ ```bash
6
+ pip install blue-assistant
7
+ ```
8
+
9
+ ```mermaid
10
+ graph LR
11
+ chat["@assistant<br>chat - -<br>&lt;object-name&gt;"]
12
+
13
+ object["📂 object"]:::folder
14
+
15
+ object --> chat
16
+ chat --> object
17
+
18
+ classDef folder fill:#999,stroke:#333,stroke-width:2px;
19
+ ```
20
+
21
+ ---
22
+
23
+
24
+ [![pylint](https://github.com/kamangir/blue-assistant/actions/workflows/pylint.yml/badge.svg)](https://github.com/kamangir/blue-assistant/actions/workflows/pylint.yml) [![pytest](https://github.com/kamangir/blue-assistant/actions/workflows/pytest.yml/badge.svg)](https://github.com/kamangir/blue-assistant/actions/workflows/pytest.yml) [![bashtest](https://github.com/kamangir/blue-assistant/actions/workflows/bashtest.yml/badge.svg)](https://github.com/kamangir/blue-assistant/actions/workflows/bashtest.yml) [![PyPI version](https://img.shields.io/pypi/v/blue-assistant.svg)](https://pypi.org/project/blue-assistant/) [![PyPI - Downloads](https://img.shields.io/pypi/dd/blue-assistant)](https://pypistats.org/packages/blue-assistant)
25
+
26
+ built by 🌀 [`blue_options-4.205.1`](https://github.com/kamangir/awesome-bash-cli), based on 🌀 [`blue_assistant-4.9.1`](https://github.com/kamangir/blue-assistant).
@@ -0,0 +1,9 @@
1
+ #! /usr/bin/env bash
2
+
3
+ abcli_source_caller_suffix_path /tests
4
+
5
+ abcli_env_dot_load \
6
+ caller,ssm,plugin=blue_assistant,suffix=/../..
7
+
8
+ abcli_env_dot_load \
9
+ caller,filename=config.env,suffix=/..
@@ -0,0 +1,11 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function blue_assistant_action_git_before_push() {
4
+ blue_assistant build_README
5
+ [[ $? -ne 0 ]] && return 1
6
+
7
+ [[ "$(abcli_git get_branch)" != "main" ]] &&
8
+ return 0
9
+
10
+ blue_assistant pypi build
11
+ }
@@ -0,0 +1,6 @@
1
+ #! /usr/bin/env bash
2
+
3
+ alias @assistant=blue_assistant
4
+
5
+
6
+
@@ -0,0 +1,11 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function blue_assistant() {
4
+ local task=$(abcli_unpack_keyword $1 version)
5
+
6
+ abcli_generic_task \
7
+ plugin=blue_assistant,task=$task \
8
+ "${@:2}"
9
+ }
10
+
11
+ abcli_log $(blue_assistant version --show_icon 1)
@@ -0,0 +1,15 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function blue_assistant_browse() {
4
+ local options=$1
5
+ local what=$(abcli_option_choice "$options" actions,repo repo)
6
+
7
+ local url="https://github.com/kamangir/blue-assistant"
8
+ [[ "$what" == "actions" ]] &&
9
+ url="$url/actions"
10
+
11
+ abcli_browse $url
12
+ }
13
+
14
+
15
+
@@ -0,0 +1,28 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function blue_assistant_chat() {
4
+ local options=$1
5
+ local do_dryrun=$(abcli_option_int "$options" dryrun 0)
6
+ local do_download=$(abcli_option_int "$options" download 0)
7
+ local do_upload=$(abcli_option_int "$options" upload $(abcli_not $do_dryrun))
8
+
9
+ local chat_options=$2
10
+ local interactive=$(abcli_option_int "$options" interact 1)
11
+
12
+ local object_name=$(abcli_clarify_object $3 chat-$(abcli_string_timestamp))
13
+ [[ "$do_download" == 1 ]] &&
14
+ abcli_download - $object_name
15
+
16
+ abcli_eval dryrun=$do_dryrun \
17
+ python3 -m blue_assistant.chat \
18
+ chat \
19
+ --object_name $object_name \
20
+ --interactive $interactive \
21
+ "${@:4}"
22
+ [[ $? -ne 0 ]] && return 1
23
+
24
+ [[ "$do_upload" == 1 ]] &&
25
+ abcli_upload - $object_name
26
+
27
+ return 0
28
+ }
@@ -0,0 +1,11 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function test_blue_assistant_README() {
4
+ local options=$1
5
+
6
+ abcli_eval ,$options \
7
+ blue_assistant build_README
8
+ }
9
+
10
+
11
+
@@ -0,0 +1,12 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function test_blue_assistant_chat() {
4
+ local options=$1
5
+
6
+ abcli_eval ,$options \
7
+ blue_assistant_chat \
8
+ ~upload,$options \
9
+ ~interact \
10
+ test_blue_assistant_chat-$(abcli_string_timestamp_short) \
11
+ "${@:2}"
12
+ }
@@ -0,0 +1,33 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function test_blue_assistant_help() {
4
+ local options=$1
5
+
6
+ local module
7
+ for module in \
8
+ "@assistant" \
9
+ \
10
+ "@assistant pypi" \
11
+ "@assistant pypi browse" \
12
+ "@assistant pypi build" \
13
+ "@assistant pypi install" \
14
+ \
15
+ "@assistant pytest" \
16
+ \
17
+ "@assistant test" \
18
+ "@assistant test list" \
19
+ \
20
+ "@assistant browse" \
21
+ \
22
+ "@assistant chat" \
23
+ \
24
+ "blue_assistant"; do
25
+ abcli_eval ,$options \
26
+ abcli_help $module
27
+ [[ $? -ne 0 ]] && return 1
28
+
29
+ abcli_hr
30
+ done
31
+
32
+ return 0
33
+ }
@@ -0,0 +1,8 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function test_blue_assistant_version() {
4
+ local options=$1
5
+
6
+ abcli_eval ,$options \
7
+ "blue_assistant version ${@:2}"
8
+ }
@@ -0,0 +1,30 @@
1
+ import os
2
+
3
+ from blue_objects import file, README
4
+
5
+ from blue_assistant import NAME, VERSION, ICON, REPO_NAME
6
+
7
+
8
+ items = [
9
+ "{}[`{}`](#) [![image]({})](#) {}".format(
10
+ ICON,
11
+ f"feature {index}",
12
+ "https://github.com/kamangir/assets/raw/main/blue-assistant/marquee.png?raw=true",
13
+ f"description of feature {index} ...",
14
+ )
15
+ for index in range(1, 4)
16
+ ]
17
+
18
+
19
+ def build():
20
+ return README.build(
21
+ items=items,
22
+ path=os.path.join(file.path(__file__), ".."),
23
+ ICON=ICON,
24
+ NAME=NAME,
25
+ VERSION=VERSION,
26
+ REPO_NAME=REPO_NAME,
27
+ )
28
+
29
+
30
+
@@ -0,0 +1,19 @@
1
+ NAME = "blue_assistant"
2
+
3
+ ICON = "🌀"
4
+
5
+ DESCRIPTION = f"{ICON} An AI Assistant."
6
+
7
+ VERSION = "4.9.1"
8
+
9
+ REPO_NAME = "blue-assistant"
10
+
11
+ MARQUEE = (
12
+ "https://github.com/kamangir/assets/raw/main/blue-assistant/marquee.png?raw=true"
13
+ )
14
+
15
+ ALIAS = "@assistant"
16
+
17
+
18
+ def fullname() -> str:
19
+ return f"{NAME}-{VERSION}"
@@ -0,0 +1,19 @@
1
+ from blueness.argparse.generic import main
2
+
3
+ from blue_assistant import NAME, VERSION, DESCRIPTION, ICON, README
4
+ from blue_assistant.logger import logger
5
+
6
+ main(
7
+ ICON=ICON,
8
+ NAME=NAME,
9
+ DESCRIPTION=DESCRIPTION,
10
+ VERSION=VERSION,
11
+ main_filename=__file__,
12
+ tasks={
13
+ "build_README": lambda _: README.build(),
14
+ },
15
+ logger=logger,
16
+ )
17
+
18
+
19
+
File without changes
@@ -0,0 +1,46 @@
1
+ import argparse
2
+
3
+ from blueness import module
4
+ from blueness.argparse.generic import sys_exit
5
+
6
+ from blue_assistant import NAME
7
+ from blue_assistant.chat.functions import chat
8
+ from blue_assistant.logger import logger
9
+
10
+ NAME = module.name(__file__, NAME)
11
+
12
+ parser = argparse.ArgumentParser(NAME)
13
+ parser.add_argument(
14
+ "task",
15
+ type=str,
16
+ help="chat",
17
+ )
18
+ parser.add_argument(
19
+ "--object_name",
20
+ type=str,
21
+ )
22
+ parser.add_argument(
23
+ "--interactive",
24
+ type=int,
25
+ default=0,
26
+ help="0 | 1",
27
+ )
28
+ parser.add_argument(
29
+ "--verbose",
30
+ type=int,
31
+ default=0,
32
+ help="0 | 1",
33
+ )
34
+ args = parser.parse_args()
35
+
36
+ success = False
37
+ if args.task == "chat":
38
+ success = chat(
39
+ object_name=args.object_name,
40
+ interactive=args.interactive == 1,
41
+ verbose=args.verbose == 1,
42
+ )
43
+ else:
44
+ success = None
45
+
46
+ sys_exit(logger, NAME, args.task, success)
@@ -0,0 +1,25 @@
1
+ from blueness import module
2
+
3
+ from blue_assistant import NAME
4
+ from blue_assistant.logger import logger
5
+
6
+
7
+ NAME = module.name(__file__, NAME)
8
+
9
+
10
+ def chat(
11
+ object_name: str,
12
+ interactive: bool = True,
13
+ verbose: bool = False,
14
+ ) -> bool:
15
+ logger.info(
16
+ "{}.chat -{}> {}".format(
17
+ NAME,
18
+ "interactive-" if interactive else "",
19
+ object_name,
20
+ )
21
+ )
22
+
23
+ logger.info("🪄")
24
+
25
+ return True
@@ -0,0 +1 @@
1
+ BLUE_PLUGIN_CONFIG=value
@@ -0,0 +1,11 @@
1
+ import os
2
+ from blue_options.env import load_config, load_env
3
+
4
+ load_env(__name__)
5
+ load_config(__name__)
6
+
7
+
8
+ BLUE_ASSISTANT_MODEL = os.getenv(
9
+ "BLUE_ASSISTANT_MODEL",
10
+ "",
11
+ )
@@ -0,0 +1,13 @@
1
+ from blueness import module
2
+ from blue_options.help.functions import help_main
3
+
4
+ from blue_assistant import NAME
5
+ from blue_assistant.help.functions import help_functions
6
+
7
+ NAME = module.name(__file__, NAME)
8
+
9
+
10
+ help_main(NAME, help_functions)
11
+
12
+
13
+
@@ -0,0 +1,27 @@
1
+ from typing import List
2
+
3
+ from blue_options.terminal import show_usage, xtra
4
+
5
+
6
+ def help_chat(
7
+ tokens: List[str],
8
+ mono: bool,
9
+ ) -> str:
10
+ options = xtra("download,dryrun,~upload", mono=mono)
11
+
12
+ chat_options = xtra("~interact", mono=mono)
13
+
14
+ args = ["--verbose 1"]
15
+
16
+ return show_usage(
17
+ [
18
+ "@assistant",
19
+ "chat",
20
+ f"[{options}]",
21
+ f"[{chat_options}]",
22
+ "[-|<object-name>]",
23
+ ]
24
+ + args,
25
+ "chat with @assistant.",
26
+ mono=mono,
27
+ )
@@ -0,0 +1,34 @@
1
+ from typing import List
2
+
3
+ from blue_options.terminal import show_usage, xtra
4
+ from abcli.help.generic import help_functions as generic_help_functions
5
+
6
+ from blue_assistant import ALIAS
7
+ from blue_assistant.help.chat import help_chat
8
+
9
+
10
+ def help_browse(
11
+ tokens: List[str],
12
+ mono: bool,
13
+ ) -> str:
14
+ options = "actions|repo"
15
+
16
+ return show_usage(
17
+ [
18
+ "@assistant",
19
+ "browse",
20
+ f"[{options}]",
21
+ ],
22
+ "browse blue_assistant.",
23
+ mono=mono,
24
+ )
25
+
26
+
27
+ help_functions = generic_help_functions(plugin_name=ALIAS)
28
+
29
+ help_functions.update(
30
+ {
31
+ "browse": help_browse,
32
+ "chat": help_chat,
33
+ }
34
+ )
@@ -0,0 +1,14 @@
1
+ from typing import List
2
+
3
+ from abcli.host import signature as abcli_signature
4
+
5
+ from blue_assistant import fullname
6
+
7
+
8
+ def signature() -> List[str]:
9
+ return [
10
+ fullname(),
11
+ ] + abcli_signature()
12
+
13
+
14
+
@@ -0,0 +1,7 @@
1
+ from blue_options.logger import get_logger
2
+ from blue_assistant import ICON
3
+
4
+ logger = get_logger(ICON)
5
+
6
+
7
+
File without changes
@@ -0,0 +1,4 @@
1
+ urlpatterns = []
2
+
3
+
4
+
@@ -0,0 +1,65 @@
1
+ Metadata-Version: 2.2
2
+ Name: blue_assistant
3
+ Version: 4.9.1
4
+ Summary: 🌀 An AI Assistant.
5
+ Home-page: https://github.com/kamangir/blue-assistant
6
+ Author: Arash Abadpour (Kamangir)
7
+ Author-email: arash@kamangir.net
8
+ License: Public Domain
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Unix Shell
11
+ Classifier: License :: Public Domain
12
+ Classifier: Operating System :: OS Independent
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Requires-Dist: blueness
16
+ Requires-Dist: blue-options
17
+ Requires-Dist: abcli
18
+ Requires-Dist: boto3
19
+ Requires-Dist: geojson
20
+ Requires-Dist: geopandas
21
+ Requires-Dist: matplotlib
22
+ Requires-Dist: numpy
23
+ Requires-Dist: opencv-python
24
+ Requires-Dist: pymysql
25
+ Requires-Dist: pyyaml
26
+ Requires-Dist: pylint
27
+ Requires-Dist: pytest
28
+ Requires-Dist: python-dotenv[cli]
29
+ Requires-Dist: tqdm
30
+ Dynamic: author
31
+ Dynamic: author-email
32
+ Dynamic: classifier
33
+ Dynamic: description
34
+ Dynamic: description-content-type
35
+ Dynamic: home-page
36
+ Dynamic: license
37
+ Dynamic: requires-dist
38
+ Dynamic: summary
39
+
40
+ # 🌀 blue-assistant
41
+
42
+ 🌀 `@assistant` is an AI assistant.
43
+
44
+ ```bash
45
+ pip install blue-assistant
46
+ ```
47
+
48
+ ```mermaid
49
+ graph LR
50
+ chat["@assistant<br>chat - -<br>&lt;object-name&gt;"]
51
+
52
+ object["📂 object"]:::folder
53
+
54
+ object --> chat
55
+ chat --> object
56
+
57
+ classDef folder fill:#999,stroke:#333,stroke-width:2px;
58
+ ```
59
+
60
+ ---
61
+
62
+
63
+ [![pylint](https://github.com/kamangir/blue-assistant/actions/workflows/pylint.yml/badge.svg)](https://github.com/kamangir/blue-assistant/actions/workflows/pylint.yml) [![pytest](https://github.com/kamangir/blue-assistant/actions/workflows/pytest.yml/badge.svg)](https://github.com/kamangir/blue-assistant/actions/workflows/pytest.yml) [![bashtest](https://github.com/kamangir/blue-assistant/actions/workflows/bashtest.yml/badge.svg)](https://github.com/kamangir/blue-assistant/actions/workflows/bashtest.yml) [![PyPI version](https://img.shields.io/pypi/v/blue-assistant.svg)](https://pypi.org/project/blue-assistant/) [![PyPI - Downloads](https://img.shields.io/pypi/dd/blue-assistant)](https://pypistats.org/packages/blue-assistant)
64
+
65
+ built by 🌀 [`blue_options-4.205.1`](https://github.com/kamangir/awesome-bash-cli), based on 🌀 [`blue_assistant-4.9.1`](https://github.com/kamangir/blue-assistant).
@@ -0,0 +1,38 @@
1
+ LICENSE
2
+ MANIFEST.in
3
+ README.md
4
+ pyproject.toml
5
+ requirements.txt
6
+ setup.py
7
+ blue_assistant/README.py
8
+ blue_assistant/__init__.py
9
+ blue_assistant/__main__.py
10
+ blue_assistant/config.env
11
+ blue_assistant/env.py
12
+ blue_assistant/functions.py
13
+ blue_assistant/host.py
14
+ blue_assistant/logger.py
15
+ blue_assistant/sample.env
16
+ blue_assistant/urls.py
17
+ blue_assistant.egg-info/PKG-INFO
18
+ blue_assistant.egg-info/SOURCES.txt
19
+ blue_assistant.egg-info/dependency_links.txt
20
+ blue_assistant.egg-info/requires.txt
21
+ blue_assistant.egg-info/top_level.txt
22
+ blue_assistant/.abcli/abcli.sh
23
+ blue_assistant/.abcli/actions.sh
24
+ blue_assistant/.abcli/alias.sh
25
+ blue_assistant/.abcli/blue_assistant.sh
26
+ blue_assistant/.abcli/browse.sh
27
+ blue_assistant/.abcli/chat.sh
28
+ blue_assistant/.abcli/tests/README.sh
29
+ blue_assistant/.abcli/tests/chat.sh
30
+ blue_assistant/.abcli/tests/help.sh
31
+ blue_assistant/.abcli/tests/version.sh
32
+ blue_assistant/chat/__init__.py
33
+ blue_assistant/chat/__main__.py
34
+ blue_assistant/chat/functions.py
35
+ blue_assistant/help/__init__.py
36
+ blue_assistant/help/__main__.py
37
+ blue_assistant/help/chat.py
38
+ blue_assistant/help/functions.py
@@ -0,0 +1,15 @@
1
+ blueness
2
+ blue-options
3
+ abcli
4
+ boto3
5
+ geojson
6
+ geopandas
7
+ matplotlib
8
+ numpy
9
+ opencv-python
10
+ pymysql
11
+ pyyaml
12
+ pylint
13
+ pytest
14
+ python-dotenv[cli]
15
+ tqdm
@@ -0,0 +1 @@
1
+ blue_assistant
@@ -0,0 +1,6 @@
1
+ [build-system]
2
+ requires = [
3
+ "setuptools>=42",
4
+ "wheel",
5
+ "blueness",
6
+ ]
@@ -0,0 +1,15 @@
1
+ blueness
2
+ blue-options
3
+ abcli
4
+ boto3
5
+ geojson
6
+ geopandas
7
+ matplotlib
8
+ numpy
9
+ opencv-python
10
+ pymysql
11
+ pyyaml
12
+ pylint
13
+ pytest
14
+ python-dotenv[cli]
15
+ tqdm
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,26 @@
1
+ from blue_assistant import NAME, VERSION, DESCRIPTION, REPO_NAME
2
+ from blueness.pypi import setup
3
+
4
+ setup(
5
+ filename=__file__,
6
+ repo_name=REPO_NAME,
7
+ name=NAME,
8
+ version=VERSION,
9
+ description=DESCRIPTION,
10
+ packages=[
11
+ NAME,
12
+ f"{NAME}.help",
13
+ f"{NAME}.chat",
14
+ ],
15
+ include_package_data=True,
16
+ package_data={
17
+ NAME: [
18
+ "config.env",
19
+ "sample.env",
20
+ ".abcli/**/*.sh",
21
+ ],
22
+ },
23
+ )
24
+
25
+
26
+