diff --git a/changelog.rst b/changelog.rst index c1bdc57..c27b291 100644 --- a/changelog.rst +++ b/changelog.rst @@ -1,6 +1,13 @@ Commit History ============== +0.5.4 (12/01/2023) +------------------ +- Reduce redundancy, improve runtime +- Suppress onscreen rejection messages while pruning +- Print onscreen runtime message regardless of debug flag +- Fix broken sections of the runbook + 0.5.3 (11/30/2023) ------------------ - Support hyperlinks for restructured text file format diff --git a/doc_generator/index.rst b/doc_generator/index.rst index 3e0f12a..0319af6 100644 --- a/doc_generator/index.rst +++ b/doc_generator/index.rst @@ -29,14 +29,14 @@ CommitHistory AuthBearer ========== -.. automodule:: gitverse.auth_bearer +.. automodule:: gitverse.models.auth_bearer :members: :undoc-members: Debugger ======== -.. automodule:: gitverse.debugger +.. automodule:: gitverse.models.debugger :members: :undoc-members: diff --git a/docs/_sources/index.rst.txt b/docs/_sources/index.rst.txt index 3e0f12a..0319af6 100644 --- a/docs/_sources/index.rst.txt +++ b/docs/_sources/index.rst.txt @@ -29,14 +29,14 @@ CommitHistory AuthBearer ========== -.. automodule:: gitverse.auth_bearer +.. automodule:: gitverse.models.auth_bearer :members: :undoc-members: Debugger ======== -.. automodule:: gitverse.debugger +.. automodule:: gitverse.models.debugger :members: :undoc-members: diff --git a/docs/genindex.html b/docs/genindex.html index bfed01d..a42d9cf 100644 --- a/docs/genindex.html +++ b/docs/genindex.html @@ -41,11 +41,40 @@

Navigation

Index

- G + B + | D + | E + | G + | I | M | R + | W
+

B

+ + +
+ +

D

+ + +
+ +

E

+ + +
+

G

- +
  • gitverse.commits
  • +
  • + gitverse.models.auth_bearer + +
  • +
  • + gitverse.models.debugger + +
  • @@ -93,6 +136,14 @@

    G

+

I

+ + +
+

M

+

W

+ + +
+
diff --git a/docs/index.html b/docs/index.html index 1e3d4d8..f8bcb55 100644 --- a/docs/index.html +++ b/docs/index.html @@ -129,7 +129,7 @@

Welcome to GitVerse’s documentation!
-gitverse.releases.run_git_cmd(cmd: str, raw: bool = False) Union[str, List[str]]
+gitverse.releases.run_git_cmd(cmd: str) str

Run the git command.

Parameters:
@@ -225,11 +225,56 @@

Welcome to GitVerse’s documentation! -

AuthBearer

+
+

AuthBearer

+

Module to set up bearer authentication.

+
>>> AuthBearer
+
+
+
+
+class gitverse.models.auth_bearer.BearerAuth(token: str)
+

Instantiates BearerAuth object.

+
>>> BearerAuth
+
+
+

References

+

New Forms of Authentication

+

Initializes the class and assign object members.

+
+
Parameters:
+

token – Token for bearer auth.

+
+
+
+
-
-

Debugger

+
+

Debugger

+
+
+gitverse.models.debugger.debug(msg, override: bool = False)
+

Print the incoming message in light green.

+
+ +
+
+gitverse.models.debugger.error(msg, override: bool = False)
+

Print the incoming message in bright red.

+
+ +
+
+gitverse.models.debugger.info(msg, override: bool = False)
+

Print the incoming message in bright green.

+
+ +
+
+gitverse.models.debugger.warning(msg, override: bool = False)
+

Print the incoming message in bright yellow.

+
+

RST Parser

@@ -316,8 +361,8 @@

Table of Contents

  • Welcome to GitVerse’s documentation!
  • ReleaseNotes
  • CommitHistory
  • -
  • AuthBearer
  • -
  • Debugger
  • +
  • AuthBearer
  • +
  • Debugger
  • RST Parser
  • Indices and tables
  • diff --git a/docs/objects.inv b/docs/objects.inv index a34f078..6df7d3e 100644 --- a/docs/objects.inv +++ b/docs/objects.inv @@ -2,4 +2,6 @@ # Project: GitVerse # Version: # The remainder of this file is compressed using zlib. -xڥMN09lQ!Q!*`iXrȞ \`Ǥu?qͼy&_:i[tò5u\kxly,7246Ͻ(&CLh2q&ʈLz&aAsLauZv̾_buSD6m@)ohRya^vP gwU-9f"em8)$VFl (Tl *Hj߅b/KO[ŒgúmM`Y0'6 +xڥN0 } bwbB&M JS/&UOB-kʡjd8XȘk4yV$BUXsoK/H#$PԦ7b("ü0T +48tFy$hZ5pi3b@ ~pNIj%-r_zǂ1'j'/(m@53=Vѣ`NUahn5.G- +wb̹젰/89{]$ /7%XKH:#G[l@I ]`w2ه}O N֠v5%?$kj+>m=XN=k:3޿OoqcJ \ No newline at end of file diff --git a/docs/py-modindex.html b/docs/py-modindex.html index b705847..da97dc4 100644 --- a/docs/py-modindex.html +++ b/docs/py-modindex.html @@ -62,6 +62,16 @@

    Python Module Index

        gitverse.commits + + +     + gitverse.models.auth_bearer + + + +     + gitverse.models.debugger +     diff --git a/docs/searchindex.js b/docs/searchindex.js index 397fa25..f0bc03a 100644 --- a/docs/searchindex.js +++ b/docs/searchindex.js @@ -1 +1 @@ -Search.setIndex({"docnames": ["README", "index"], "filenames": ["README.md", "index.rst"], "titles": ["GitVerse", "Welcome to GitVerse\u2019s documentation!"], "terms": {"get": [0, 1], "github": [0, 1], "": 0, "format": 0, "restructuredtext": 0, "markdown": [0, 1], "document": 0, "pip": 0, "gener": [0, 1], "from": [0, 1], "tri": 0, "us": 0, "api": [0, 1], "If": 0, "fail": 0, "messag": [0, 1], "associ": 0, "thi": [0, 1], "featur": 0, "take": [0, 1], "git_token": 0, "an": [0, 1], "environ": 0, "variabl": 0, "i": 0, "person": 0, "repo": [0, 1], "known": 0, "issu": 0, "relat": 0, "order": [0, 1], "There": 0, "where": [0, 1], "git": [0, 1], "command": [0, 1], "return": [0, 1], "incorrect": 0, "timestamp": [0, 1], "when": 0, "ar": 0, "creat": [0, 1], "differ": 0, "timezon": 0, "expect": 0, "pleas": 0, "run": [0, 1], "follow": 0, "verifi": 0, "each": [0, 1], "ref": 0, "sort": 0, "creatord": 0, "refnam": 0, "short": 0, "iso8601": 0, "output": [0, 1], "rais": 0, "log": [0, 1], "debug": 0, "enabl": 0, "mode": 0, "revers": [0, 1], "b": 0, "gather": [0, 1], "specif": 0, "branch": [0, 1], "default": [0, 1], "pass": [0, 1], "onli": 0, "f": 0, "write": [0, 1], "custom": 0, "filenam": [0, 1], "t": 0, "titl": [0, 1], "index": [0, 1], "line": [0, 1], "file": [0, 1], "_": 0, "rst": 0, "changelog": 0, "precommit": 0, "ensur": 0, "doc": 0, "creation": 0, "everi": 0, "requir": 0, "sphinx": 0, "5": 0, "1": 0, "pre": 0, "2": 0, "20": 0, "0": 0, "recommonmark": 0, "7": 0, "all": [0, 1], "http": 0, "org": 0, "project": 0, "thevickypedia": 0, "io": 0, "vignesh": 0, "rao": 0, "under": [0, 1], "mit": 0, "instal": 1, "usag": 1, "lint": 1, "pypi": 1, "packag": 1, "licens": 1, "copyright": 1, "releas": 1, "generate_snippet": 1, "list": 1, "str": 1, "snippet": 1, "base": 1, "inform": 1, "readi": 1, "load": 1, "type": 1, "get_api_releas": 1, "dict": 1, "note": 1, "via": 1, "form": 1, "version": 1, "descript": 1, "kei": 1, "valu": 1, "pair": 1, "get_releas": 1, "option": 1, "union": 1, "int": 1, "map": 1, "dictionari": 1, "none": 1, "get_tag": 1, "tag": 1, "iter": 1, "over": 1, "subject": 1, "yield": 1, "date": 1, "handler": 1, "function": 1, "paramet": 1, "name": 1, "ha": 1, "store": 1, "which": 1, "run_git_cmd": 1, "cmd": 1, "raw": 1, "bool": 1, "fals": 1, "argument": 1, "split": 1, "commit": 1, "gitlog": 1, "trigger": 1, "convers": 1, "process": 1, "written": 1, "get_branch": 1, "avail": 1, "get_commit": 1, "trunk": 1, "scan": 1, "number": 1, "get_gitlog": 1, "exclud": 1, "merg": 1, "histori": 1, "util": 1, "get_release_not": 1, "pathlik": 1, "test": 1, "modul": 1, "sourc": 1, "particular": 1, "string": 1, "rst2dict": 1, "regular_dict": 1, "ordereddict": 1, "convert": 1, "python": 1, "filepath": 1, "boolean": 1, "flag": 1, "regular": 1, "arg": 1, "rst2html": 1, "src": 1, "dst": 1, "html": 1, "destin": 1, "A": 1, "wa": 1, "success": 1, "search": 1, "page": 1}, "objects": {"gitverse": [[1, 0, 0, "-", "commits"], [1, 0, 0, "-", "releases"]], "gitverse.commits": [[1, 1, 1, "", "generator"], [1, 1, 1, "", "get_branches"], [1, 1, 1, "", "get_commits"], [1, 1, 1, "", "get_gitlog"], [1, 1, 1, "", "run"]], "gitverse.releases": [[1, 1, 1, "", "generate_snippets"], [1, 1, 1, "", "get_api_releases"], [1, 1, 1, "", "get_releases"], [1, 1, 1, "", "get_tags"], [1, 1, 1, "", "run"], [1, 1, 1, "", "run_git_cmd"]], "gitverse.utils": [[1, 0, 0, "-", "rst"]], "gitverse.utils.rst": [[1, 1, 1, "", "get_release_notes"], [1, 1, 1, "", "rst2dict"], [1, 1, 1, "", "rst2html"]]}, "objtypes": {"0": "py:module", "1": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "function", "Python function"]}, "titleterms": {"gitvers": [0, 1], "instal": 0, "usag": 0, "releas": 0, "note": 0, "tag": 0, "commit": 0, "histori": 0, "option": 0, "flag": 0, "sampl": 0, "lint": 0, "pypi": 0, "packag": 0, "runbook": 0, "licens": 0, "copyright": 0, "welcom": 1, "": 1, "document": 1, "read": 1, "me": 1, "releasenot": 1, "commithistori": 1, "authbear": 1, "debugg": 1, "rst": 1, "parser": 1, "indic": 1, "tabl": 1}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 6, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 56}}) \ No newline at end of file +Search.setIndex({"docnames": ["README", "index"], "filenames": ["README.md", "index.rst"], "titles": ["GitVerse", "Welcome to GitVerse\u2019s documentation!"], "terms": {"get": [0, 1], "github": [0, 1], "": 0, "format": 0, "restructuredtext": 0, "markdown": [0, 1], "document": 0, "pip": 0, "gener": [0, 1], "from": [0, 1], "tri": 0, "us": 0, "api": [0, 1], "If": 0, "fail": 0, "messag": [0, 1], "associ": 0, "thi": [0, 1], "featur": 0, "take": [0, 1], "git_token": 0, "an": [0, 1], "environ": 0, "variabl": 0, "i": 0, "person": 0, "repo": [0, 1], "known": 0, "issu": 0, "relat": 0, "order": [0, 1], "There": 0, "where": [0, 1], "git": [0, 1], "command": [0, 1], "return": [0, 1], "incorrect": 0, "timestamp": [0, 1], "when": 0, "ar": 0, "creat": [0, 1], "differ": 0, "timezon": 0, "expect": 0, "pleas": 0, "run": [0, 1], "follow": 0, "verifi": 0, "each": [0, 1], "ref": 0, "sort": 0, "creatord": 0, "refnam": 0, "short": 0, "iso8601": 0, "output": [0, 1], "rais": 0, "log": [0, 1], "debug": [0, 1], "enabl": 0, "mode": 0, "revers": [0, 1], "b": 0, "gather": [0, 1], "specif": 0, "branch": [0, 1], "default": [0, 1], "pass": [0, 1], "onli": 0, "f": 0, "write": [0, 1], "custom": 0, "filenam": [0, 1], "t": 0, "titl": [0, 1], "index": [0, 1], "line": [0, 1], "file": [0, 1], "_": 0, "rst": 0, "changelog": 0, "precommit": 0, "ensur": 0, "doc": 0, "creation": 0, "everi": 0, "requir": 0, "sphinx": 0, "5": 0, "1": 0, "pre": 0, "2": 0, "20": 0, "0": 0, "recommonmark": 0, "7": 0, "all": [0, 1], "http": 0, "org": 0, "project": 0, "thevickypedia": 0, "io": 0, "vignesh": 0, "rao": 0, "under": [0, 1], "mit": 0, "instal": 1, "usag": 1, "lint": 1, "pypi": 1, "packag": 1, "licens": 1, "copyright": 1, "releas": 1, "generate_snippet": 1, "list": 1, "str": 1, "snippet": 1, "base": 1, "inform": 1, "readi": 1, "load": 1, "type": 1, "get_api_releas": 1, "dict": 1, "note": 1, "via": 1, "form": 1, "version": 1, "descript": 1, "kei": 1, "valu": 1, "pair": 1, "get_releas": 1, "option": 1, "union": 1, "int": 1, "map": 1, "dictionari": 1, "none": 1, "get_tag": 1, "tag": 1, "iter": 1, "over": 1, "subject": 1, "yield": 1, "date": 1, "handler": 1, "function": 1, "paramet": 1, "name": 1, "ha": 1, "store": 1, "which": 1, "run_git_cmd": 1, "cmd": 1, "argument": 1, "split": 1, "commit": 1, "gitlog": 1, "trigger": 1, "convers": 1, "process": 1, "written": 1, "get_branch": 1, "avail": 1, "get_commit": 1, "trunk": 1, "scan": 1, "number": 1, "get_gitlog": 1, "exclud": 1, "merg": 1, "histori": 1, "modul": 1, "set": 1, "up": 1, "bearer": 1, "authent": 1, "class": 1, "model": 1, "auth_bear": 1, "bearerauth": 1, "token": 1, "instanti": 1, "object": 1, "refer": 1, "new": 1, "initi": 1, "assign": 1, "member": 1, "auth": 1, "msg": 1, "overrid": 1, "bool": 1, "fals": 1, "print": 1, "incom": 1, "light": 1, "green": 1, "error": 1, "bright": 1, "red": 1, "info": 1, "warn": 1, "yellow": 1, "util": 1, "get_release_not": 1, "pathlik": 1, "test": 1, "sourc": 1, "particular": 1, "string": 1, "rst2dict": 1, "regular_dict": 1, "ordereddict": 1, "convert": 1, "python": 1, "filepath": 1, "boolean": 1, "flag": 1, "regular": 1, "arg": 1, "rst2html": 1, "src": 1, "dst": 1, "html": 1, "destin": 1, "A": 1, "wa": 1, "success": 1, "search": 1, "page": 1}, "objects": {"gitverse": [[1, 0, 0, "-", "commits"], [1, 0, 0, "-", "releases"]], "gitverse.commits": [[1, 1, 1, "", "generator"], [1, 1, 1, "", "get_branches"], [1, 1, 1, "", "get_commits"], [1, 1, 1, "", "get_gitlog"], [1, 1, 1, "", "run"]], "gitverse.models": [[1, 0, 0, "-", "auth_bearer"], [1, 0, 0, "-", "debugger"]], "gitverse.models.auth_bearer": [[1, 2, 1, "", "BearerAuth"]], "gitverse.models.debugger": [[1, 1, 1, "", "debug"], [1, 1, 1, "", "error"], [1, 1, 1, "", "info"], [1, 1, 1, "", "warning"]], "gitverse.releases": [[1, 1, 1, "", "generate_snippets"], [1, 1, 1, "", "get_api_releases"], [1, 1, 1, "", "get_releases"], [1, 1, 1, "", "get_tags"], [1, 1, 1, "", "run"], [1, 1, 1, "", "run_git_cmd"]], "gitverse.utils": [[1, 0, 0, "-", "rst"]], "gitverse.utils.rst": [[1, 1, 1, "", "get_release_notes"], [1, 1, 1, "", "rst2dict"], [1, 1, 1, "", "rst2html"]]}, "objtypes": {"0": "py:module", "1": "py:function", "2": "py:class"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "function", "Python function"], "2": ["py", "class", "Python class"]}, "titleterms": {"gitvers": [0, 1], "instal": 0, "usag": 0, "releas": 0, "note": 0, "tag": 0, "commit": 0, "histori": 0, "option": 0, "flag": 0, "sampl": 0, "lint": 0, "pypi": 0, "packag": 0, "runbook": 0, "licens": 0, "copyright": 0, "welcom": 1, "": 1, "document": 1, "read": 1, "me": 1, "releasenot": 1, "commithistori": 1, "authbear": 1, "debugg": 1, "rst": 1, "parser": 1, "indic": 1, "tabl": 1}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 6, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 56}}) \ No newline at end of file diff --git a/gitverse/__init__.py b/gitverse/__init__.py index 06bcd91..f958670 100644 --- a/gitverse/__init__.py +++ b/gitverse/__init__.py @@ -1 +1 @@ -version = "3.0" +version = "3.1" diff --git a/gitverse/commits.py b/gitverse/commits.py index a6e8707..b394dd8 100644 --- a/gitverse/commits.py +++ b/gitverse/commits.py @@ -19,9 +19,8 @@ def get_branches() -> List[str]: Returns a list of branches available. """ try: - branches = subprocess.check_output("git branch", - shell=True).decode(encoding='UTF-8').replace('* ', '').strip().splitlines() - return branches + return subprocess.check_output("git branch", stderr=subprocess.DEVNULL, + shell=True).decode(encoding='UTF-8').replace('* ', '').strip().splitlines() except (subprocess.CalledProcessError, subprocess.SubprocessError, Exception) as error: if isinstance(error, subprocess.CalledProcessError): result = error.output.decode(encoding='UTF-8').strip() @@ -41,7 +40,7 @@ def get_gitlog(branch: str) -> List[str]: Returns the output of gitlog as a list. """ try: - return subprocess.check_output(f'git log --no-merges --reverse {branch}', + return subprocess.check_output(f'git log --no-merges --reverse {branch}', stderr=subprocess.DEVNULL, shell=True).decode(encoding='UTF-8').splitlines() except (subprocess.CalledProcessError, subprocess.SubprocessError, Exception) as error: if isinstance(error, subprocess.CalledProcessError): @@ -62,7 +61,7 @@ def get_commits(trunk: str) -> int: Number of commits. """ try: - commits = int(subprocess.check_output(f"git rev-list --count {trunk}", + commits = int(subprocess.check_output(f"git rev-list --count {trunk}", stderr=subprocess.DEVNULL, shell=True).decode('utf-8').splitlines()[0]) debugger.info(f'Number of commits: {commits}') return commits @@ -148,7 +147,7 @@ def run(branch: str, filename: str, title: str) -> None: file.write('%s\n%s\n\n' % (title, '=' * len(title))) for index, each_snippet in enumerate(snippets): file.write(f'{each_snippet}\n' if index + 1 < len(snippets) else each_snippet) - debugger.info(f"{filename!r} was created in: {round(float(time.time() - options['start']), 2)}s") + debugger.info(f"{filename!r} was generated in: {round(float(time.time() - options['start']), 2)}s", True) @click.command() diff --git a/gitverse/models/debugger.py b/gitverse/models/debugger.py index b73fb74..928db2b 100644 --- a/gitverse/models/debugger.py +++ b/gitverse/models/debugger.py @@ -3,25 +3,25 @@ from gitverse.models.callables import options -def debug(msg): +def debug(msg, override: bool = False): """Print the incoming message in light green.""" - if options['debug']: + if options['debug'] or override: click.secho(message=msg, fg='green') -def info(msg): +def info(msg, override: bool = False): """Print the incoming message in bright green.""" - if options['debug']: + if options['debug'] or override: click.secho(message=msg, fg='bright_green') -def warning(msg): +def warning(msg, override: bool = False): """Print the incoming message in bright yellow.""" - if options['debug']: + if options['debug'] or override: click.secho(message=msg, fg='bright_yellow') -def error(msg): +def error(msg, override: bool = False): """Print the incoming message in bright red.""" - if options['debug']: + if options['debug'] or override: click.secho(message=msg, fg='bright_red') diff --git a/gitverse/releases.py b/gitverse/releases.py index bc22f40..0412f0f 100644 --- a/gitverse/releases.py +++ b/gitverse/releases.py @@ -24,8 +24,7 @@ def get_api_releases() -> Dict[str, List[str]]: """ gh_token = os.getenv('GIT_TOKEN') or os.getenv('git_token') session = requests.Session() - if git_config := run_git_cmd(cmd=r"git config --get remote.origin.url | sed 's/.*\/\([^ ]*\/[^.]*\).*/\1/'", - raw=True): + if git_config := run_git_cmd(r"git config --get remote.origin.url | sed 's/.*\/\([^ ]*\/[^.]*\).*/\1/'"): owner, repo_name = git_config.split('/') if gh_token: debugger.info("Loading bearer auth with git token") @@ -43,7 +42,7 @@ def get_api_releases() -> Dict[str, List[str]]: debugger.error(f"{response.status_code} - {response.text}") -def run_git_cmd(cmd: str, raw: bool = False) -> Union[str, List[str]]: +def run_git_cmd(cmd: str) -> str: """Run the git command. Args: @@ -54,10 +53,7 @@ def run_git_cmd(cmd: str, raw: bool = False) -> Union[str, List[str]]: Returns the output of the git command split by lines. """ try: - output = subprocess.check_output(cmd, shell=True).decode(encoding='UTF-8').strip() - if raw: - return output - return output.splitlines() + return subprocess.check_output(cmd, shell=True, stderr=subprocess.DEVNULL).decode(encoding='UTF-8').strip() except (subprocess.CalledProcessError, subprocess.SubprocessError, Exception) as error: if isinstance(error, subprocess.CalledProcessError): result = error.output.decode(encoding='UTF-8').strip() @@ -74,12 +70,13 @@ def get_tags() -> Generator[Dict[str, Union[str, int, List[str]]]]: Yields the release version, description, timestamp and the date for each tag. """ # Alternate: git for-each-ref --sort='-creatordate' --format '%(refname:short) %(creatordate:iso8601)' refs/tags - if dates_values := run_git_cmd(cmd='git tag --format "%(refname:short)||%(creatordate:format:%s)"'): + if dates_values := run_git_cmd('git tag --format "%(refname:short)||%(creatordate:format:%s)"'): + dates_values = dates_values.splitlines() for line in dates_values: tag_line = line.split('||') tag_name = tag_line[0] timestamp = int(tag_line[1]) - if notes := run_git_cmd(cmd=f'git tag -l -n99 {tag_name}', raw=True): + if notes := run_git_cmd(f'git tag -l -n99 {tag_name}'): yield dict( version=tag_name, description=[v.strip() for v in notes.lstrip(tag_name).splitlines()], @@ -135,13 +132,14 @@ def generate_snippets() -> List[str]: line2 = "-" * len(line1) description = [] for desc in each_tag['description']: - if options['ext'] == '.rst': - desc = md_link_pattern.sub(r'`\1 <\2>`_', desc) if desc.startswith('-'): description.append(desc) else: description.append('- ' + desc) - line3 = "\n".join(description) + if options['ext'] == '.rst': + line3 = md_link_pattern.sub(r'`\1 <\2>`_', '\n'.join(description)) + else: + line3 = '\n'.join(description) line = line1 + "\n" + line2 + "\n" + line3 + "\n" snippets.append(line) return snippets @@ -166,7 +164,7 @@ def run(filename: str, title: str) -> None: file.write('%s\n%s\n\n' % (title, '=' * len(title))) for index, each_snippet in enumerate(snippets): file.write(f'{each_snippet}\n' if index + 1 < len(snippets) else each_snippet) - debugger.info(f"{filename!r} was created in: {round(float(time.time() - options['start']), 2)}s") + debugger.info(f"{filename!r} was generated in: {round(float(time.time() - options['start']), 2)}s", True) @click.command() diff --git a/release_notes.rst b/release_notes.rst index 0428797..57319f5 100644 --- a/release_notes.rst +++ b/release_notes.rst @@ -1,6 +1,12 @@ Release Notes ============= +v3.1 (12/01/2023) +----------------- +- Reduces redundant code and improves runtime +- Prints runtime on screen regardless of ``debug`` flag +- Hides unwanted messages while running ``git`` CLI commands + v3.0 (11/30/2023) ----------------- - Support hyperlinks for restructured text file format