Skip to content

Commit

Permalink
Minor updates to linter, README.md and runbook
Browse files Browse the repository at this point in the history
  • Loading branch information
dormant-user committed Nov 24, 2024
1 parent 304de18 commit 966bf05
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 20 deletions.
5 changes: 3 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ fail_fast: true
exclude: ^(notebooks/|scripts/|.github/|docs/)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-ast
Expand Down Expand Up @@ -31,13 +31,14 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/psf/black
# Latest version is just ugly and does the opposite of a linter
rev: 22.3.0
hooks:
- id: black
exclude: docs_gen/

- repo: https://github.com/PyCQA/flake8
rev: 7.1.0
rev: 7.1.1
hooks:
- id: flake8
additional_dependencies:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ Licensed under the [MIT License][license]
[wiki]: https://github.com/thevickypedia/Jarvis/wiki
[release-notes]: https://github.com/thevickypedia/Jarvis/blob/master/release_notes.rst
[gha_pages]: https://github.com/thevickypedia/Jarvis/actions/workflows/pages/pages-build-deployment
[gha_pypi]: https://github.com/thevickypedia/Jarvis/actions/workflows/python-publish.yml
[gha_pypi]: https://github.com/thevickypedia/Jarvis/actions/workflows/matrix-publisher.yml
[gha_md_valid]: https://github.com/thevickypedia/Jarvis/actions/workflows/markdown.yml
[webpage]: https://vigneshrao.com/
[webpage_contact]: https://vigneshrao.com/contact
Expand Down Expand Up @@ -250,7 +250,7 @@ Licensed under the [MIT License][license]
[label-stats-Make]: https://img.shields.io/github/search/thevickypedia/Jarvis/Makefile

[label-actions-pages]: https://github.com/thevickypedia/Jarvis/actions/workflows/pages/pages-build-deployment/badge.svg
[label-actions-pypi]: https://github.com/thevickypedia/Jarvis/actions/workflows/python-publish.yml/badge.svg
[label-actions-pypi]: https://github.com/thevickypedia/Jarvis/actions/workflows/matrix-publisher.yml/badge.svg
[label-actions-markdown]: https://github.com/thevickypedia/Jarvis/actions/workflows/markdown.yml/badge.svg

[label-pypi]: https://img.shields.io/pypi/v/jarvis-ironman
Expand Down
2 changes: 1 addition & 1 deletion docs/README.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ <h2 align="center">Voice-Activated Natural Language UI</h2><p><a class="referenc
<img alt="Make" src="https://img.shields.io/github/search/thevickypedia/Jarvis/Makefile" /></p>
<p><strong>Deployments</strong></p>
<p><a class="reference external" href="https://github.com/thevickypedia/Jarvis/actions/workflows/pages/pages-build-deployment"><img alt="pages" src="https://github.com/thevickypedia/Jarvis/actions/workflows/pages/pages-build-deployment/badge.svg" /></a>
<a class="reference external" href="https://github.com/thevickypedia/Jarvis/actions/workflows/python-publish.yml"><img alt="pypi" src="https://github.com/thevickypedia/Jarvis/actions/workflows/python-publish.yml/badge.svg" /></a>
<a class="reference external" href="https://github.com/thevickypedia/Jarvis/actions/workflows/matrix-publisher.yml"><img alt="pypi" src="https://github.com/thevickypedia/Jarvis/actions/workflows/matrix-publisher.yml/badge.svg" /></a>
<a class="reference external" href="https://github.com/thevickypedia/Jarvis/actions/workflows/markdown.yml"><img alt="markdown" src="https://github.com/thevickypedia/Jarvis/actions/workflows/markdown.yml/badge.svg" /></a></p>
<p><a class="reference external" href="https://pypi.org/project/jarvis-ironman"><img alt="Pypi" src="https://img.shields.io/pypi/v/jarvis-ironman" /></a>
<a class="reference external" href="https://pypi.org/project/jarvis-ironman/#files"><img alt="Pypi-format" src="https://img.shields.io/pypi/format/jarvis-ironman" /></a>
Expand Down
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ Licensed under the [MIT License][license]
[wiki]: https://github.com/thevickypedia/Jarvis/wiki
[release-notes]: https://github.com/thevickypedia/Jarvis/blob/master/release_notes.rst
[gha_pages]: https://github.com/thevickypedia/Jarvis/actions/workflows/pages/pages-build-deployment
[gha_pypi]: https://github.com/thevickypedia/Jarvis/actions/workflows/python-publish.yml
[gha_pypi]: https://github.com/thevickypedia/Jarvis/actions/workflows/matrix-publisher.yml
[gha_md_valid]: https://github.com/thevickypedia/Jarvis/actions/workflows/markdown.yml
[webpage]: https://vigneshrao.com/
[webpage_contact]: https://vigneshrao.com/contact
Expand Down Expand Up @@ -250,7 +250,7 @@ Licensed under the [MIT License][license]
[label-stats-Make]: https://img.shields.io/github/search/thevickypedia/Jarvis/Makefile

[label-actions-pages]: https://github.com/thevickypedia/Jarvis/actions/workflows/pages/pages-build-deployment/badge.svg
[label-actions-pypi]: https://github.com/thevickypedia/Jarvis/actions/workflows/python-publish.yml/badge.svg
[label-actions-pypi]: https://github.com/thevickypedia/Jarvis/actions/workflows/matrix-publisher.yml/badge.svg
[label-actions-markdown]: https://github.com/thevickypedia/Jarvis/actions/workflows/markdown.yml/badge.svg

[label-pypi]: https://img.shields.io/pypi/v/jarvis-ironman
Expand Down
4 changes: 2 additions & 2 deletions docs/_sources/README.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ Licensed under the [MIT License][license]
[wiki]: https://github.com/thevickypedia/Jarvis/wiki
[release-notes]: https://github.com/thevickypedia/Jarvis/blob/master/release_notes.rst
[gha_pages]: https://github.com/thevickypedia/Jarvis/actions/workflows/pages/pages-build-deployment
[gha_pypi]: https://github.com/thevickypedia/Jarvis/actions/workflows/python-publish.yml
[gha_pypi]: https://github.com/thevickypedia/Jarvis/actions/workflows/matrix-publisher.yml
[gha_md_valid]: https://github.com/thevickypedia/Jarvis/actions/workflows/markdown.yml
[webpage]: https://vigneshrao.com/
[webpage_contact]: https://vigneshrao.com/contact
Expand Down Expand Up @@ -250,7 +250,7 @@ Licensed under the [MIT License][license]
[label-stats-Make]: https://img.shields.io/github/search/thevickypedia/Jarvis/Makefile

[label-actions-pages]: https://github.com/thevickypedia/Jarvis/actions/workflows/pages/pages-build-deployment/badge.svg
[label-actions-pypi]: https://github.com/thevickypedia/Jarvis/actions/workflows/python-publish.yml/badge.svg
[label-actions-pypi]: https://github.com/thevickypedia/Jarvis/actions/workflows/matrix-publisher.yml/badge.svg
[label-actions-markdown]: https://github.com/thevickypedia/Jarvis/actions/workflows/markdown.yml/badge.svg

[label-pypi]: https://img.shields.io/pypi/v/jarvis-ironman
Expand Down
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3614,7 +3614,7 @@ <h1>———-Executors———-<a class="headerlink" href="#executors" title="
<dd><p>Custom conditions to map specific keywords to one or many functions.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>A unique key value pair of custom phrase as key and an embedded dict of function name and phrase.</p>
<dd class="field-odd"><p>A unique key value pair, of custom phrase as key and an embedded dict of function name and phrase.</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>Dict[str, Dict[str, str]]</p>
Expand Down Expand Up @@ -5731,7 +5731,7 @@ <h1>———-Models———-<a class="headerlink" href="#models" title="Permal

<dl class="py attribute">
<dt class="sig sig-object py" id="jarvis.modules.models.classes.Settings._platform_info">
<span class="sig-name descname"><span class="pre">_platform_info</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">str</span></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">ModelPrivateAttr(default=['macOS',</span> <span class="pre">'14.5'])</span></em><a class="headerlink" href="#jarvis.modules.models.classes.Settings._platform_info" title="Permalink to this definition">¶</a></dt>
<span class="sig-name descname"><span class="pre">_platform_info</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">str</span></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">ModelPrivateAttr(default=['macOS',</span> <span class="pre">'15.1'])</span></em><a class="headerlink" href="#jarvis.modules.models.classes.Settings._platform_info" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="py attribute">
Expand Down
2 changes: 1 addition & 1 deletion docs/searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion jarvis/executors/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def get_custom_conditions() -> Dict[str, Dict[str, str]]:
Returns:
Dict[str, Dict[str, str]]:
A unique key value pair of custom phrase as key and an embedded dict of function name and phrase.
A unique key value pair, of custom phrase as key and an embedded dict of function name and phrase.
"""
try:
with open(models.fileio.conditions) as file:
Expand Down
1 change: 1 addition & 0 deletions release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ v6.0.0 (10/04/2024)
- Makes ``root_password`` optional for Linux machines
- Includes bug fixes and minor improvements to overall coding structure
- Improved container orchestration using Docker API and email templates
- **Full Changelog**: https://github.com/thevickypedia/Jarvis/compare/v5.1.0...v6.0.0

v5.1.0 (06/09/2024)
-------------------
Expand Down
19 changes: 12 additions & 7 deletions update-toml.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,31 @@
import toml


def update_name_in_pyproject(file_path, new_name_value):
def update_name_in_pyproject(file_path, project_name):
"""Update project name handler in pyproject.toml.
Args:
file_path: Source filepath.
project_name: New project name.
"""
try:
with open(file_path, 'r') as file:
with open(file_path, "r") as file:
data = toml.load(file)
except FileNotFoundError:
print(f"TOML file {file_path!r} not found!")
return

# Update the 'name' in the '[project]' section
if 'project' in data:
data['project']['name'] = new_name_value
print(f"Updated 'name' to {new_name_value!r} in [project]")
if "project" in data:
data["project"]["name"] = project_name
print(f"Updated 'name' to {project_name!r} in [project]")
else:
print("[project] section not found in TOML file!")
return

# Write the updated content back to the TOML file
with open(file_path, 'w') as file:
with open(file_path, "w") as file:
toml.dump(data, file)
file.flush()


if __name__ == "__main__":
Expand Down

0 comments on commit 966bf05

Please sign in to comment.