From 61a333cec4df7a7acafa65da080cdd0ef56fe459 Mon Sep 17 00:00:00 2001 From: jaclynpqc Date: Fri, 1 Dec 2023 16:25:40 -0500 Subject: [PATCH 01/13] feat: rearrage sections --- README.md | 72 ++++++++++++++++++++++++++++++++++++------------- chasten/main.py | 1 + 2 files changed, 55 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index f9d1c8bb..d9115f8b 100644 --- a/README.md +++ b/README.md @@ -89,24 +89,6 @@ Follow these steps to install the `chasten` program: - Type `pipx list` and confirm that Chasten is installed - Type `chasten --help` to learn how to use the tool -## ๐Ÿ‹ Docker - -There is also the option to use [Docker](https://www.docker.com/) to use `chasten` - -Follow these steps to utilize Docker: - -- Install [Docker Desktop](https://docs.docker.com/get-docker/) for your operating system -- Ensure Docker Desktop is running -- `cd` into the chasten directory where the `Dockerfile` is located -- Type `docker build -t chasten .` to build the container -- Type one of the following commands to run the container: - - Windows (Command Prompt) -> `docker run --rm -v "%cd%":/root/src -it chasten` - - Windows (Powershell) -> `docker run --rm -v ${pwd}:/root/src -it chasten` - - Mac/Ubuntu -> `docker run --rm -v $(pwd):/root/src -it chasten` -- Inside the container type `poetry install` -- Outside of the container type `docker ps` to view running container information -- Outside of the container type `docker commit ` to save the dependecy installation -- Now you can use Docker for all of your `chasten` needs! ## ๐Ÿช‚ Configuration @@ -345,7 +327,24 @@ class DebugLevel(str, Enum): CRITICAL = "CRITICAL" ``` +## ๐Ÿ‹ Docker + +There is also the option to use [Docker](https://www.docker.com/) to use `chasten` +Follow these steps to utilize Docker: + +- Install [Docker Desktop](https://docs.docker.com/get-docker/) for your operating system +- Ensure Docker Desktop is running +- `cd` into the chasten directory where the `Dockerfile` is located +- Type `docker build -t chasten .` to build the container +- Type one of the following commands to run the container: + - Windows (Command Prompt) -> `docker run --rm -v "%cd%":/root/src -it chasten` + - Windows (Powershell) -> `docker run --rm -v ${pwd}:/root/src -it chasten` + - Mac/Ubuntu -> `docker run --rm -v $(pwd):/root/src -it chasten` +- Inside the container type `poetry install` +- Outside of the container type `docker ps` to view running container information +- Outside of the container type `docker commit ` to save the dependecy installation +- Now you can use Docker for all of your `chasten` needs! ## ๐Ÿค— Learning @@ -374,6 +373,43 @@ class DebugLevel(str, Enum): - [Python Treesitter](https://github.com/tree-sitter/py-tree-sitter) offers a Python language bindings for to parsing and querying with Treesitter +## ๐Ÿค“Comparisons + +Chasten is very similar to a tool called symbex which was created by a top software +engineer by the name of Simon Willison. Its original use was to be able to search for +names of functions and classes that appear in a file. The biggest difference is when +looking at the cli interface. Symbex uses many abbreviations, looking at this command +the -s is looking for signatures and the -f is looking for functions. So in all it +is checking for function signatures in the file test_debug.py and this is what the +output would look like. +```python +command :symbex -s -f symbex/test_debug.py + def test_debug_level_values(): + def test_debug_level_isinstance(): + def test_debug_level_iteration(): + def test_debug_destination_values(): + def test_debug_destination_isinstance(): + def test_debug_destination_iteration(): + def test_level_destination_invalid(): + def test_debug_destination_invalid(): +``` + +Compared to Chasten, which uses and leverages many different python packages to make +the cli interface as efficient as possible for a broad range of users. By using packages +like typer and rich, these allow for chasten to be very easily understood within the +cli. Commands available to use for the cli interface for Chasten are as followsโ€ฆ + +- analyze ๐Ÿ’ซ Analyze the AST of Python source code +- configure ๐Ÿช‚ Manage chasten's configuration +- datasette-publish ๐ŸŒŽ Publish a datasette to Fly or Vercel +- datasette-serve ๐Ÿƒ Start a local datasette server +- integrate ๐Ÿšง Integrate files and make a database +- interact ๐Ÿš€ Interactively configure and run +- log ๐Ÿฆš Start the logging server. + +A command like chasten analyze, will create a similar output as the symbex tool, but +the command is much simpler due to the use of different tools + ## ๐Ÿง—Improvement - Found a bug or have a feature that the development team should implement? diff --git a/chasten/main.py b/chasten/main.py index 839a78a2..6dd520c2 100644 --- a/chasten/main.py +++ b/chasten/main.py @@ -575,6 +575,7 @@ def analyze( # noqa: PLR0912, PLR0913, PLR0915 # of the syntax box for this specific check check_id = current_check[constants.checks.Check_Id] # type: ignore output.logger.debug(f"check id: {check_id}") + check_name = current_check[constants.checks.Check_Name] # type: ignore check_description = checks.extract_description(current_check) # search for the XML contents of an AST that match the provided From f782059b96fc0acc4a1cd0c8e76956b3df7db466 Mon Sep 17 00:00:00 2001 From: jaclynpqc Date: Mon, 4 Dec 2023 21:02:42 -0500 Subject: [PATCH 02/13] add intro of symbex --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d9115f8b..3efb89b4 100644 --- a/README.md +++ b/README.md @@ -373,7 +373,9 @@ Follow these steps to utilize Docker: - [Python Treesitter](https://github.com/tree-sitter/py-tree-sitter) offers a Python language bindings for to parsing and querying with Treesitter -## ๐Ÿค“Comparisons +## ๐Ÿค“ Chasten vs. Symbex + +Chasten and Symbex are both tools designed for analyzing Python source code, particularly focusing on searching for functions and classes within files. While they share a common goal, there are notable differences between the two, especially in terms of their command-line interfaces and functionality. Chasten is very similar to a tool called symbex which was created by a top software engineer by the name of Simon Willison. Its original use was to be able to search for From 8cc48329f41e0957014a4b7e82a677d2db38b03d Mon Sep 17 00:00:00 2001 From: jaclynpqc Date: Mon, 4 Dec 2023 21:08:24 -0500 Subject: [PATCH 03/13] compare cli --- README.md | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 3efb89b4..0fd9086a 100644 --- a/README.md +++ b/README.md @@ -375,15 +375,10 @@ Follow these steps to utilize Docker: ## ๐Ÿค“ Chasten vs. Symbex -Chasten and Symbex are both tools designed for analyzing Python source code, particularly focusing on searching for functions and classes within files. While they share a common goal, there are notable differences between the two, especially in terms of their command-line interfaces and functionality. - -Chasten is very similar to a tool called symbex which was created by a top software -engineer by the name of Simon Willison. Its original use was to be able to search for -names of functions and classes that appear in a file. The biggest difference is when -looking at the cli interface. Symbex uses many abbreviations, looking at this command -the -s is looking for signatures and the -f is looking for functions. So in all it -is checking for function signatures in the file test_debug.py and this is what the -output would look like. +Chasten and Symbex are both tools designed for analyzing Python source code, particularly focusing on searching for functions and classes within files. While they share a common goal, there are notable differences between the two, especially in terms of their command-line interfaces and functionality. + +In terms of Command-Line Interface, Symbex employs a concise CLI, utilizing abbreviations for various options. For instance, the command to search for function signatures in a file named `test_debug.py` is as follows: + ```python command :symbex -s -f symbex/test_debug.py def test_debug_level_values(): @@ -396,10 +391,7 @@ command :symbex -s -f symbex/test_debug.py def test_debug_destination_invalid(): ``` -Compared to Chasten, which uses and leverages many different python packages to make -the cli interface as efficient as possible for a broad range of users. By using packages -like typer and rich, these allow for chasten to be very easily understood within the -cli. Commands available to use for the cli interface for Chasten are as followsโ€ฆ +Chasten, on the other hand, leverages Python packages such as Typer and Rich to provide user-friendly and feature-rich command-line interface. The available commands for Chasten include: - analyze ๐Ÿ’ซ Analyze the AST of Python source code - configure ๐Ÿช‚ Manage chasten's configuration @@ -409,8 +401,8 @@ cli. Commands available to use for the cli interface for Chasten are as follows - interact ๐Ÿš€ Interactively configure and run - log ๐Ÿฆš Start the logging server. -A command like chasten analyze, will create a similar output as the symbex tool, but -the command is much simpler due to the use of different tools + + ## ๐Ÿง—Improvement From bf5b6a87c1224457e9b5350cb450998f60691bf8 Mon Sep 17 00:00:00 2001 From: jaclynpqc Date: Mon, 4 Dec 2023 21:12:04 -0500 Subject: [PATCH 04/13] compare functionality --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 0fd9086a..7647d724 100644 --- a/README.md +++ b/README.md @@ -401,6 +401,9 @@ Chasten, on the other hand, leverages Python packages such as Typer and Rich to - interact ๐Ÿš€ Interactively configure and run - log ๐Ÿฆš Start the logging server. +In terms of functionality, Symbex is designed to search Python code for functions and classes by name or wildcard. It provides the ability to filter results based on various criteria, including function type (async or non-async), documentation presence, visibility, and type annotations. + +On the other hand, Chasten's `analyze` command performs AST analysis on Python source code. It allows users to specify a project name, XPATH version, search path, and various filtering criteria. Chasten supports checks for inclusion and exclusion based on attributes, values, and match confidence levels. The tool also provides extensive configuration options and the ability to save results in different formats, including markdown. From 519f91865cff9ff54f5a83f27841a6129fc90696 Mon Sep 17 00:00:00 2001 From: jaclynpqc Date: Mon, 4 Dec 2023 21:13:42 -0500 Subject: [PATCH 05/13] add conclusion --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7647d724..79df4958 100644 --- a/README.md +++ b/README.md @@ -405,7 +405,7 @@ In terms of functionality, Symbex is designed to search Python code for function On the other hand, Chasten's `analyze` command performs AST analysis on Python source code. It allows users to specify a project name, XPATH version, search path, and various filtering criteria. Chasten supports checks for inclusion and exclusion based on attributes, values, and match confidence levels. The tool also provides extensive configuration options and the ability to save results in different formats, including markdown. - +In summary, while both Chasten and Symbex serve the common purpose of analyzing Python source code, Chasten offers a more versatile and user-friendly CLI with additional features of configuration and result management. Symbex, on the other hand, adopts a concise CLI with a focus on searching and filtering functionalities. The choice between the two tools depends on the user's preferences and specific requirements for Python code analysis. ## ๐Ÿง—Improvement From 74e0e07f19b4d8b5975f11d37ef3ec2590f520b8 Mon Sep 17 00:00:00 2001 From: jaclynpqc Date: Mon, 4 Dec 2023 21:14:44 -0500 Subject: [PATCH 06/13] add section for similar tools --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 79df4958..a0bbf0e6 100644 --- a/README.md +++ b/README.md @@ -407,6 +407,8 @@ On the other hand, Chasten's `analyze` command performs AST analysis on Python s In summary, while both Chasten and Symbex serve the common purpose of analyzing Python source code, Chasten offers a more versatile and user-friendly CLI with additional features of configuration and result management. Symbex, on the other hand, adopts a concise CLI with a focus on searching and filtering functionalities. The choice between the two tools depends on the user's preferences and specific requirements for Python code analysis. +## ๐Ÿค“ Similar Tools + ## ๐Ÿง—Improvement - Found a bug or have a feature that the development team should implement? From 85f6d02c2d2cfa07532ab35cc70423c5da186d05 Mon Sep 17 00:00:00 2001 From: jaclynpqc Date: Mon, 4 Dec 2023 21:21:23 -0500 Subject: [PATCH 07/13] add tool suggestions --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a0bbf0e6..f82a9518 100644 --- a/README.md +++ b/README.md @@ -405,9 +405,14 @@ In terms of functionality, Symbex is designed to search Python code for function On the other hand, Chasten's `analyze` command performs AST analysis on Python source code. It allows users to specify a project name, XPATH version, search path, and various filtering criteria. Chasten supports checks for inclusion and exclusion based on attributes, values, and match confidence levels. The tool also provides extensive configuration options and the ability to save results in different formats, including markdown. -In summary, while both Chasten and Symbex serve the common purpose of analyzing Python source code, Chasten offers a more versatile and user-friendly CLI with additional features of configuration and result management. Symbex, on the other hand, adopts a concise CLI with a focus on searching and filtering functionalities. The choice between the two tools depends on the user's preferences and specific requirements for Python code analysis. +In summary, while both Chasten and Symbex serve the common purpose of analyzing Python source code, Chasten offers a more versatile and user-friendly CLI with additional features of configuration and result management. Symbex, on the other hand, adopts a concise CLI with a focus on searching and filtering functionalities. The choice between the two tools depends on the user's preferences and specific requirements for Python code analysis. -## ๐Ÿค“ Similar Tools +## ๐Ÿ“ฆ Similar Tools + +In addition to Chasten and Symbex, several other tools offer unique capabilities for analyzing and searching through Python source code, each catering to specific use cases. + +- [pyastgrep](https://github.com/spookylukey/pyastgrep) is a tool developed by Luke Plant that provides advanced capabilities for viewing and searching AST using XPath expressions. It allows users to define complex patterns and queries to navigate and extract information from Python code, making it a powerful tool for in-depth code analysis. +- [treesitter](https://tree-sitter.github.io/tree-sitter/) offers a generic and efficient approach to parsing source code and building AST. It supports multiple languages, providing a consistent API for interacting with parsed code across different language ecosystems. ## ๐Ÿง—Improvement From 10371f1af86f450927e8bb4258ae4f8a36351a92 Mon Sep 17 00:00:00 2001 From: jaclynpqc Date: Mon, 4 Dec 2023 21:23:54 -0500 Subject: [PATCH 08/13] add chasten --help section --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index f82a9518..0bf68d77 100644 --- a/README.md +++ b/README.md @@ -327,6 +327,29 @@ class DebugLevel(str, Enum): CRITICAL = "CRITICAL" ``` +## chasten --help + +```shell + Usage: chasten [OPTIONS] COMMAND [ARGS]... + +โ•ญโ”€ Options โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ +โ”‚ --install-completion Install completion for the current shell. โ”‚ +โ”‚ --show-completion Show completion for the current shell, to copy it or โ”‚ +โ”‚ customize the installation. โ”‚ +โ”‚ --help Show this message and exit. โ”‚ +โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ +โ•ญโ”€ Commands โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ +โ”‚ analyze ๐Ÿ’ซ Analyze the AST of Python source code. โ”‚ +โ”‚ configure ๐Ÿช‚ Manage chasten's configuration. โ”‚ +โ”‚ datasette-publish ๐ŸŒŽ Publish a datasette to Fly or Vercel. โ”‚ +โ”‚ datasette-serve ๐Ÿƒ Start a local datasette server. โ”‚ +โ”‚ integrate ๐Ÿšง Integrate files and make a database. โ”‚ +โ”‚ interact ๐Ÿš€ Interactively configure and run. โ”‚ +โ”‚ log ๐Ÿฆš Start the logging server. โ”‚ +โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ + +``` + ## ๐Ÿ‹ Docker There is also the option to use [Docker](https://www.docker.com/) to use `chasten` From 9479dad5cad503c55bec27485b8b70a7e6b5b54b Mon Sep 17 00:00:00 2001 From: jaclynpqc Date: Mon, 4 Dec 2023 21:28:21 -0500 Subject: [PATCH 09/13] feat: polish writing --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0bf68d77..29cdbf22 100644 --- a/README.md +++ b/README.md @@ -369,7 +369,6 @@ Follow these steps to utilize Docker: - Outside of the container type `docker commit ` to save the dependecy installation - Now you can use Docker for all of your `chasten` needs! - ## ๐Ÿค— Learning - **Curious about the nodes that are available in a Python program's AST?** @@ -398,7 +397,7 @@ Follow these steps to utilize Docker: ## ๐Ÿค“ Chasten vs. Symbex -Chasten and Symbex are both tools designed for analyzing Python source code, particularly focusing on searching for functions and classes within files. While they share a common goal, there are notable differences between the two, especially in terms of their command-line interfaces and functionality. +Chasten and Symbex, which was created by Simon Willison, are both tools designed for analyzing Python source code, particularly focusing on searching for functions and classes within files. While they share a common goal, there are notable differences between the two, especially in terms of their command-line interfaces and functionality. In terms of Command-Line Interface, Symbex employs a concise CLI, utilizing abbreviations for various options. For instance, the command to search for function signatures in a file named `test_debug.py` is as follows: @@ -414,7 +413,7 @@ command :symbex -s -f symbex/test_debug.py def test_debug_destination_invalid(): ``` -Chasten, on the other hand, leverages Python packages such as Typer and Rich to provide user-friendly and feature-rich command-line interface. The available commands for Chasten include: +Chasten, on the other hand, leverages Python packages such as Typer and Rich to provide a user-friendly and feature-rich command-line interface. The available commands for Chasten include: - analyze ๐Ÿ’ซ Analyze the AST of Python source code - configure ๐Ÿช‚ Manage chasten's configuration From f6762a5c0c627a7192b75cbd5fb9e1e45eb5af54 Mon Sep 17 00:00:00 2001 From: jaclynpqc Date: Mon, 4 Dec 2023 21:36:50 -0500 Subject: [PATCH 10/13] add icon to section --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 29cdbf22..6f1a67ea 100644 --- a/README.md +++ b/README.md @@ -327,7 +327,7 @@ class DebugLevel(str, Enum): CRITICAL = "CRITICAL" ``` -## chasten --help +## โœจ chasten --help ```shell Usage: chasten [OPTIONS] COMMAND [ARGS]... From cf5a602cf876b14c6b3311037ee768299e0371de Mon Sep 17 00:00:00 2001 From: jaclynpqc Date: Mon, 4 Dec 2023 21:41:07 -0500 Subject: [PATCH 11/13] fix: delete empty line in main.py --- chasten/main.py | 1 - 1 file changed, 1 deletion(-) diff --git a/chasten/main.py b/chasten/main.py index 6dd520c2..839a78a2 100644 --- a/chasten/main.py +++ b/chasten/main.py @@ -575,7 +575,6 @@ def analyze( # noqa: PLR0912, PLR0913, PLR0915 # of the syntax box for this specific check check_id = current_check[constants.checks.Check_Id] # type: ignore output.logger.debug(f"check id: {check_id}") - check_name = current_check[constants.checks.Check_Name] # type: ignore check_description = checks.extract_description(current_check) # search for the XML contents of an AST that match the provided From fc621037412f308690c5bb079df74a6a92c225dd Mon Sep 17 00:00:00 2001 From: AlishChhetri Date: Wed, 6 Dec 2023 10:00:01 -0500 Subject: [PATCH 12/13] feat: rearrange readme and add dev content --- README.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6f1a67ea..69b8b87a 100644 --- a/README.md +++ b/README.md @@ -350,7 +350,18 @@ class DebugLevel(str, Enum): ``` -## ๐Ÿ‹ Docker +## ๐Ÿง‘โ€๐Ÿ’ป Development Enviroment + +### ๐Ÿ  Local + +Follow these steps to install the `chasten` tool for future development: + +- The developement and use of Chasten requires [Python 3.11](https://www.python.org/downloads/release/python-3115/), must be greater or equal to version 3.11.5. +- The developers of Chasten use [Poetry](https://github.com/python-poetry/poetry) for packaging and dependency management. + +Once Python and Poetry is installed, please go to the [Chasten](https://github.com/AstuteSource/chasten) repository on github and install the tool using the `git clone` command in your terminal. Then navigate to the Chasten directory and run the command `poetry install` to install all the dependencies. + +### ๐Ÿ‹ Docker There is also the option to use [Docker](https://www.docker.com/) to use `chasten` @@ -369,6 +380,15 @@ Follow these steps to utilize Docker: - Outside of the container type `docker commit ` to save the dependecy installation - Now you can use Docker for all of your `chasten` needs! +## ๐Ÿ“‹ Development Tasks + +- **Linting and Formatting** + - We use the linting tools `Black` and `Ruff` on Chasten to ensure code consistency, readability, and adherence to predefined formatting standards across the entire project, ultimately enhancing maintainability and collaboration among developers. + - Please ensure all content in the project follow the appropriate format by running the following commands: `poetry run task fiximports` and/or `poetry run task fixformat` before shipping new features. If features are shipped with linting issues, the build will break on github due to the failure of the test suite. +- **Testing and Coverage** + - Chasten uses the testing tools `Pytest` and `Hypothesis` which enables us to fortify code consistency, readability, and alignment with established formatting standards throughout the project. When writing test cases for features, create a new file in the tests directory with the naming convention `test_(name of file)`. + - Please ensure all content in the project passes the tests by running the following commands: `poetry run task test` for most cases or if you would like to test the OpenAI API based features `poetry run task test-api` before shipping. If features are shipped without a test suite, the coverage will be lowered on github due to the addition of untested code and may potenitally lead to larger issues in the future. + ## ๐Ÿค— Learning - **Curious about the nodes that are available in a Python program's AST?** From 8014841978fe82e082414e310646784fd133c3d8 Mon Sep 17 00:00:00 2001 From: boulais01 <89533621+boulais01@users.noreply.github.com> Date: Fri, 8 Dec 2023 14:39:44 -0600 Subject: [PATCH 13/13] fix: typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 69b8b87a..ee479e50 100644 --- a/README.md +++ b/README.md @@ -356,7 +356,7 @@ class DebugLevel(str, Enum): Follow these steps to install the `chasten` tool for future development: -- The developement and use of Chasten requires [Python 3.11](https://www.python.org/downloads/release/python-3115/), must be greater or equal to version 3.11.5. +- The development and use of Chasten requires [Python 3.11](https://www.python.org/downloads/release/python-3115/), must be greater or equal to version 3.11.5. - The developers of Chasten use [Poetry](https://github.com/python-poetry/poetry) for packaging and dependency management. Once Python and Poetry is installed, please go to the [Chasten](https://github.com/AstuteSource/chasten) repository on github and install the tool using the `git clone` command in your terminal. Then navigate to the Chasten directory and run the command `poetry install` to install all the dependencies.