Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved File Handling #91

Merged
merged 15 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .idea/todo-or-not.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ Options:
--xi FILENAME
: Copy the contents of other files into a E**X**ISTING [.todo-ignore](#todo-ignore), this option must be specified for each. e.g. `--ni .gitignore --xi .prettierignore`

If a file discovered by `todoon` is not of a supported encoding [see [SUPPORTED_ENCODINGS_TODO_CHECK](todo_or_not/localize.py) for most up-to-date list] it will be skipped.
The number of skipped files is summarized at the end of the run.

### Environment Variables

MAXIMUM_ISSUES_GENERATED
Expand All @@ -119,7 +122,17 @@ PERTINENT_LINE_LIMIT

### .todo-ignore

This file specifies which files and directories that todo_check doesn't need to walk through or analyze. It follows the same syntax as a .gitignore file.
A plaintext file in a supported encoding.
This file specifies which files and directories that todo_check doesn't need to walk through or analyze.
It follows the same syntax as a .gitignore file.

Supported encodings:

* UTF-8
* UTF-16

[see [SUPPORTED_ENCODINGS_TODOIGNORE](todo_or_not/localize.py) for most up-to-date list]


### Issues

Expand Down
Binary file added logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions old_pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "todo_or_not"

version = "v0.6.5-alpha"

dependencies = [
"typer==0.9.0",
"typing_extensions==4.10.0"
]
authors = [
{ name="Trenton Young", email="askstartout@gmail.com" },
]
description = "#todoon integrates the TODOs in your codebase with your GitHub repository"
keywords = ["todo", "github"]
readme = "README.md"
requires-python = ">=3.11"
classifiers = [
"Programming Language :: Python :: 3.11",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Operating System :: OS Independent",
]

[project.urls]
Homepage = "https://github.com/Start-Out/todo-or-not"
Issues = "https://github.com/Start-Out/todo-or-not/issues"

[project.scripts]
todoon = "todo_or_not:todo_check.typer_main"
66 changes: 66 additions & 0 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 20 additions & 28 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,32 +1,24 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "todo_or_not"

version = "v0.6.3-alpha"

dependencies = [
"typer",
"typing_extensions"
]
authors = [
{ name="Trenton Young", email="askstartout@gmail.com" },
]
[tool.poetry]
name = "todo-or-not"
version = "0.7.1-alpha"
description = "#todoon integrates the TODOs in your codebase with your GitHub repository"
keywords = ["todo", "github"]
authors = ["TrentonYo <trentonyo@gmail.com>"]
license = "GPL-3.0-only"
readme = "README.md"
requires-python = ">=3.11"
classifiers = [
"Programming Language :: Python :: 3.11",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Operating System :: OS Independent",
]
keywords = ["todo", "github"]
homepage = "https://github.com/apps/todo-or-not"
repository = "https://github.com/Start-Out/todo-or-not"
documentation = "https://github.com/Start-Out/todo-or-not/blob/main/README.md"

[tool.poetry.dependencies]
python = "^3.11"
typer = "^0.9.0"
typing-extensions = "^4.10.0"

[project.urls]
Homepage = "https://github.com/Start-Out/todo-or-not"
Issues = "https://github.com/Start-Out/todo-or-not/issues"

[project.scripts]
todoon = "todo_or_not:todo_check.typer_main"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.scripts]
todoon = "todo_or_not:todo_check.typer_main"
18 changes: 13 additions & 5 deletions todo_or_not/localize.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
SUPPORTED_ENCODINGS_TODOIGNORE = ['utf-8', 'utf-16']
SUPPORTED_ENCODINGS_TODO_CHECK = ['utf-8', 'utf-16']

LOCALIZE = {
"en_us": {
"reference_link": "Reference",
"summary": "Summary",
"issue_body_reference_link": "Reference",
"summary_title": "Summary",
"summary_encoding_unsupported_singular": "File skipped due to unsupported encoding",
"summary_encoding_unsupported_plural": "Files skipped due to unsupported encodings",
"info_duplicate_issue_avoided": "INFO: Duplicate issue avoided",
"error_cannot_specify_ni_ci": "ERROR: Cannot specify both --ni and --ci",
"error_cannot_specify_ni_xi": "ERROR: Cannot specify both --ni and --xi",
"error_todo_ignore_not_found": "ERROR: .todo-ignore NOT FOUND! use -i to copy another .ignore OR --force to run without a .todo-ignore (NOT RECOMMENDED)",
"error_todo_ignore_not_supported": f"ERROR: .todo-ignore uses unsupported encoding! Supported encodings: {SUPPORTED_ENCODINGS_TODOIGNORE}",
"error_exceeded_maximum_issues": "ERROR: Exceeded maximum number of issues for this run, exiting now",
"warning_force_overrides_ignore": "WARNING: --force will ignore the contents of the .todo-ignore generated when you specified",
"warning_run_without_todo_ignore": "WARNING: Running without a .todo-ignore, to cancel use "
"warning_force_overrides_ignore": "WARNING: --force will ignore the contents of the .todo-ignore generated when you specified (.todo-ignore will still be changed, just not used)",
"warning_run_with_empty_todo_ignore": "WARNING: .todo-ignore was empty (if the file isn't empty, check its encoding), running anyway. To cancel use ",
"warning_run_without_todo_ignore": "WARNING: Running without a .todo-ignore, to cancel use ",
"warning_encoding_not_supported": f"WARNING: File uses unsupported encoding, we will skip it but consider adding to .todo-ignore (Supported encodings: {SUPPORTED_ENCODINGS_TODO_CHECK})",
},
"windows": {
"shell_sigint": "CTRL + C"
Expand Down
Loading
Loading