From 79a115548adbc21b00e3fecfee6e1d94749d7e18 Mon Sep 17 00:00:00 2001 From: Poiuy7312 Date: Fri, 15 Sep 2023 10:42:08 -0400 Subject: [PATCH 01/35] Tried using a os matrix like I saw in gatorgrade --- .github/workflows/build.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8ab68c16..ce0ee551 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,12 +18,19 @@ on: # This job performs all necessary checks jobs: build: - # Use the latest version of Ubuntu on Microsoft Azure - runs-on: ubuntu-latest + # Use the latest version of Ubuntu,Windows and MacOS + runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: - # Performs all actions on different versions of Python - python-version: ['3.11'] + os: [ubuntu-latest] + # Performs all actions on different versions of Python and OS + python-version: ['3.10','3.11'] + include: + - os: macos-latest + python-version: ["3.10","3.11"] + - os: windows-latest + python-version: ["3.10","3.11"] # Define the workflow steps steps: # Checkout the code of the repository From 58d44814b027dd70ced87c3fc3309d379efb296e Mon Sep 17 00:00:00 2001 From: Poiuy7312 Date: Sat, 16 Sep 2023 13:56:43 -0400 Subject: [PATCH 02/35] Edited workflow --- .github/workflows/build.yml | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ce0ee551..c33f19a6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ env: # Focuses on the master branch only on: push: - branches: [ master ] + branches: [ master , Work-flow-changes-to-check-more-OS] pull_request: branches: [ master ] @@ -18,19 +18,12 @@ on: # This job performs all necessary checks jobs: build: - # Use the latest version of Ubuntu,Windows and MacOS - runs-on: ${{ matrix.os }} + # Use the latest version of Ubuntu on Microsoft Azure + runs-on: ubuntu-latest strategy: - fail-fast: false matrix: - os: [ubuntu-latest] - # Performs all actions on different versions of Python and OS - python-version: ['3.10','3.11'] - include: - - os: macos-latest - python-version: ["3.10","3.11"] - - os: windows-latest - python-version: ["3.10","3.11"] + # Performs all actions on different versions of Python + python-version: ['3.11'] # Define the workflow steps steps: # Checkout the code of the repository @@ -75,6 +68,20 @@ jobs: run: | poetry run chasten analyze chasten --config $PWD/.chasten/ --debug-level ERROR --debug-dest CONSOLE --search-path . # Run the tests + test: + name: Test + runs-on: ${{ matrix.os }} + needs: build + strategy: + matrix: + os: [ubuntu-latest] + python-version: ["3.10","3.11"] + include: + - os: macos-latest + python-version: "3.11" + - os: windows-latest + python-version: "3.11" + steps: - name: Run Tests if: always() run: | @@ -105,4 +112,4 @@ jobs: message: ${{ env.total }}% minColorRange: 50 maxColorRange: 90 - valColorRange: ${{ env.total }} + valColorRange: ${{ env.total }} \ No newline at end of file From 11d3530ac582c689e6485b49df652765d1086901 Mon Sep 17 00:00:00 2001 From: Poiuy7312 Date: Sat, 16 Sep 2023 14:05:04 -0400 Subject: [PATCH 03/35] Checking Error --- .github/workflows/build.yml | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c33f19a6..3e8a2aa3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ env: # Focuses on the master branch only on: push: - branches: [ master , Work-flow-changes-to-check-more-OS] + branches: [ master ] pull_request: branches: [ master ] @@ -19,11 +19,17 @@ on: jobs: build: # Use the latest version of Ubuntu on Microsoft Azure - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: - # Performs all actions on different versions of Python - python-version: ['3.11'] + os: [ubuntu-latest] + python-version: ["3.10","3.11"] + include: + - os: macos-latest + python-version: "3.11" + - os: windows-latest + python-version: "3.11" # Define the workflow steps steps: # Checkout the code of the repository @@ -68,20 +74,6 @@ jobs: run: | poetry run chasten analyze chasten --config $PWD/.chasten/ --debug-level ERROR --debug-dest CONSOLE --search-path . # Run the tests - test: - name: Test - runs-on: ${{ matrix.os }} - needs: build - strategy: - matrix: - os: [ubuntu-latest] - python-version: ["3.10","3.11"] - include: - - os: macos-latest - python-version: "3.11" - - os: windows-latest - python-version: "3.11" - steps: - name: Run Tests if: always() run: | From d7a3f5a937e4be8aecd560e97d82fda18366386b Mon Sep 17 00:00:00 2001 From: Poiuy7312 Date: Sat, 16 Sep 2023 14:06:18 -0400 Subject: [PATCH 04/35] added bracnh to workflow --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3e8a2aa3..792c2510 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ env: # Focuses on the master branch only on: push: - branches: [ master ] + branches: [ master, Work-flow-changes-to-check-more-OS ] pull_request: branches: [ master ] From 8f6e44a23479f9fe6ef28c0a90e898eaad0136d2 Mon Sep 17 00:00:00 2001 From: Poiuy7312 Date: Sat, 16 Sep 2023 19:00:24 -0400 Subject: [PATCH 05/35] Removed python 3.10 from ubuntu. Added conditional --- .github/workflows/build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 792c2510..dd9f8917 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,7 +24,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - python-version: ["3.10","3.11"] + python-version: ["3.11"] include: - os: macos-latest python-version: "3.11" @@ -40,6 +40,7 @@ jobs: # Run the mdl linting tool # Refers to .mdlrc file in repository - name: Run Markdown Linting + if: matrix.os == 'ubuntu-latest' uses: actionshub/markdownlint@main # Setup Python for the current language version - name: Setup Python ${{ matrix.python-version }} @@ -85,7 +86,7 @@ jobs: poetry run task test-coverage-silent > coverage.txt # Display the Coverage Report - name: Display Coverage - if: always() + if: always() && matrix.os == 'ubuntu-latest' run: | export TOTAL=$(python -c "import json;print(json.load(open('coverage.json'))['totals']['percent_covered_display'])") echo "total=$TOTAL" >> $GITHUB_ENV From 30340ab659844e62c44623b9ad0208352b1dba60 Mon Sep 17 00:00:00 2001 From: Preston Smith <112420784+Poiuy7312@users.noreply.github.com> Date: Sat, 16 Sep 2023 19:05:43 -0400 Subject: [PATCH 06/35] Update poetry.lock --- poetry.lock | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/poetry.lock b/poetry.lock index 64c8a1b5..080b421c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2075,17 +2075,6 @@ files = [ [package.extras] plugins = ["importlib-metadata"] -[[package]] -name = "pysqlite3" -version = "0.5.1" -description = "DB-API 2.0 interface for Sqlite 3.x" -category = "main" -optional = false -python-versions = "*" -files = [ - {file = "pysqlite3-0.5.1.tar.gz", hash = "sha256:45496b7a5e5931afb9993f76ce48873d126abfc0fe70b65373970d353fca2c24"}, -] - [[package]] name = "pytest" version = "7.4.0" From a2f00a4df21e49841bd2e308a39edc6c93c5617e Mon Sep 17 00:00:00 2001 From: Preston Smith <112420784+Poiuy7312@users.noreply.github.com> Date: Sat, 16 Sep 2023 19:06:40 -0400 Subject: [PATCH 07/35] Update pyproject.toml --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 38b700f0..0110f796 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,6 @@ datasette-search-all = "^1.1.1" sqlite-utils = "^3.34" sqlean-py = "^0.21.5.3" datasette-sqlite-regex = "^0.2.3" -pysqlite3 = "^0.5.1" sqlite-regex = "^0.2.3" datasette-publish-vercel = "^0.14.2" From 1060f63b39e504e8c3ced38ca83e2c756b006025 Mon Sep 17 00:00:00 2001 From: Poiuy7312 Date: Sat, 16 Sep 2023 19:37:52 -0400 Subject: [PATCH 08/35] got rid of special character in main.py --- .github/workflows/build.yml | 2 +- chasten/main.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dd9f8917..f6a60b79 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -73,7 +73,7 @@ jobs: - name: Run program if: always() run: | - poetry run chasten analyze chasten --config $PWD/.chasten/ --debug-level ERROR --debug-dest CONSOLE --search-path . + poetry run chasten analyze chasten --config $PWD/.chasten/ --debug-level ERROR --debug-dest CONSOLE --search-path . # Run the tests - name: Run Tests if: always() diff --git a/chasten/main.py b/chasten/main.py index f6ed91f6..bd9fa36b 100644 --- a/chasten/main.py +++ b/chasten/main.py @@ -440,7 +440,7 @@ def analyze( # noqa: PLR0913, PLR0915 verbose: bool = typer.Option(False, help="Enable verbose mode output."), save: bool = typer.Option(False, help="Enable saving of output file(s)."), ) -> None: - """💫 Analyze the AST of Python source code.""" + """* Analyze the AST of Python source code.""" # output the preamble, including extra parameters specific to this function output_preamble( verbose, From dd40f83f7677ab8df9c39340041cd3d05c87ca20 Mon Sep 17 00:00:00 2001 From: Preston Smith <112420784+Poiuy7312@users.noreply.github.com> Date: Sat, 16 Sep 2023 19:42:22 -0400 Subject: [PATCH 09/35] Update main.py Removed special character to see if its messing with workflow --- chasten/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chasten/main.py b/chasten/main.py index f6ed91f6..bd9fa36b 100644 --- a/chasten/main.py +++ b/chasten/main.py @@ -440,7 +440,7 @@ def analyze( # noqa: PLR0913, PLR0915 verbose: bool = typer.Option(False, help="Enable verbose mode output."), save: bool = typer.Option(False, help="Enable saving of output file(s)."), ) -> None: - """💫 Analyze the AST of Python source code.""" + """* Analyze the AST of Python source code.""" # output the preamble, including extra parameters specific to this function output_preamble( verbose, From 83105fbf44ab7a38e38d28eb0a1478618444d831 Mon Sep 17 00:00:00 2001 From: Preston Smith <112420784+Poiuy7312@users.noreply.github.com> Date: Sat, 16 Sep 2023 19:47:39 -0400 Subject: [PATCH 10/35] Update main.py --- chasten/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chasten/main.py b/chasten/main.py index bd9fa36b..f6ed91f6 100644 --- a/chasten/main.py +++ b/chasten/main.py @@ -440,7 +440,7 @@ def analyze( # noqa: PLR0913, PLR0915 verbose: bool = typer.Option(False, help="Enable verbose mode output."), save: bool = typer.Option(False, help="Enable saving of output file(s)."), ) -> None: - """* Analyze the AST of Python source code.""" + """💫 Analyze the AST of Python source code.""" # output the preamble, including extra parameters specific to this function output_preamble( verbose, From 0bde930d02bc6831deaac730f0171630715e9b29 Mon Sep 17 00:00:00 2001 From: Poiuy7312 Date: Mon, 18 Sep 2023 10:50:43 -0400 Subject: [PATCH 11/35] Removed pysqlite3 --- chasten/main.py | 2 +- poetry.lock | 152 +++--------------------------------------------- pyproject.toml | 1 - 3 files changed, 10 insertions(+), 145 deletions(-) diff --git a/chasten/main.py b/chasten/main.py index bd9fa36b..f6ed91f6 100644 --- a/chasten/main.py +++ b/chasten/main.py @@ -440,7 +440,7 @@ def analyze( # noqa: PLR0913, PLR0915 verbose: bool = typer.Option(False, help="Enable verbose mode output."), save: bool = typer.Option(False, help="Enable saving of output file(s)."), ) -> None: - """* Analyze the AST of Python source code.""" + """💫 Analyze the AST of Python source code.""" # output the preamble, including extra parameters specific to this function output_preamble( verbose, diff --git a/poetry.lock b/poetry.lock index 64c8a1b5..378d90e1 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,10 +1,9 @@ -# This file is automatically @generated by Poetry 1.4.0 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. [[package]] name = "aiofiles" version = "23.2.1" description = "File support for asyncio." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -16,7 +15,6 @@ files = [ name = "annotated-types" version = "0.5.0" description = "Reusable constraint types to use with typing.Annotated" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -28,7 +26,6 @@ files = [ name = "ansi2html" version = "1.8.0" description = "" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -44,7 +41,6 @@ test = ["pytest", "pytest-cov"] name = "anyio" version = "3.7.1" description = "High level compatibility layer for multiple asynchronous event loop implementations" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -65,7 +61,6 @@ trio = ["trio (<0.22)"] name = "asgi-csrf" version = "0.9" description = "ASGI middleware for protecting against CSRF attacks" -category = "main" optional = false python-versions = "*" files = [ @@ -84,7 +79,6 @@ test = ["asgi-lifespan", "httpx (>=0.16)", "pytest", "pytest-asyncio", "pytest-c name = "asgiref" version = "3.7.2" description = "ASGI specs, helper code, and adapters" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -99,7 +93,6 @@ tests = ["mypy (>=0.800)", "pytest", "pytest-asyncio"] name = "astpretty" version = "3.0.0" description = "Pretty print the output of python stdlib `ast.parse`." -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -111,7 +104,6 @@ files = [ name = "attrs" version = "23.1.0" description = "Classes Without Boilerplate" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -130,7 +122,6 @@ tests-no-zope = ["cloudpickle", "hypothesis", "mypy (>=1.1.1)", "pympler", "pyte name = "black" version = "23.3.0" description = "The uncompromising code formatter." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -178,7 +169,6 @@ uvloop = ["uvloop (>=0.15.2)"] name = "certifi" version = "2023.5.7" description = "Python package for providing Mozilla's CA Bundle." -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -190,7 +180,6 @@ files = [ name = "charset-normalizer" version = "3.2.0" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." -category = "dev" optional = false python-versions = ">=3.7.0" files = [ @@ -275,7 +264,6 @@ files = [ name = "click" version = "8.1.4" description = "Composable command line interface toolkit" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -290,7 +278,6 @@ colorama = {version = "*", markers = "platform_system == \"Windows\""} name = "click-default-group-wheel" version = "1.2.2" description = "Extends click.Group to invoke a command without explicit subcommand name (packaged as a wheel)" -category = "main" optional = false python-versions = "*" files = [ @@ -305,7 +292,6 @@ click = "*" name = "colorama" version = "0.4.6" description = "Cross-platform colored terminal text." -category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" files = [ @@ -317,7 +303,6 @@ files = [ name = "coverage" version = "7.2.7" description = "Code coverage measurement for Python" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -390,7 +375,6 @@ toml = ["tomli"] name = "cssselect" version = "1.2.0" description = "cssselect parses CSS3 Selectors and translates them to XPath 1.0" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -402,7 +386,6 @@ files = [ name = "dash" version = "2.11.1" description = "A Python framework for building reactive web-apps. Developed by Plotly." -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -435,7 +418,6 @@ testing = ["beautifulsoup4 (>=4.8.2)", "cryptography (<3.4)", "dash-testing-stub name = "dash-core-components" version = "2.0.0" description = "Core component suite for Dash" -category = "dev" optional = false python-versions = "*" files = [ @@ -447,7 +429,6 @@ files = [ name = "dash-html-components" version = "2.0.0" description = "Vanilla HTML components for Dash" -category = "dev" optional = false python-versions = "*" files = [ @@ -459,7 +440,6 @@ files = [ name = "dash-table" version = "5.0.0" description = "Dash table" -category = "dev" optional = false python-versions = "*" files = [ @@ -471,7 +451,6 @@ files = [ name = "datasette" version = "0.64.3" description = "An open source multi-tool for exploring and publishing data" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -507,7 +486,6 @@ test = ["beautifulsoup4 (>=4.8.1)", "black (==22.10.0)", "blacken-docs (==1.12.1 name = "datasette-copyable" version = "0.3.2" description = "Datasette plugin for outputting tables in formats suitable for copy and paste" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -526,7 +504,6 @@ test = ["httpx", "pytest", "pytest-asyncio", "sqlite-utils"] name = "datasette-export-notebook" version = "1.0" description = "Datasette plugin providing instructions for exporting data to Jupyter or Observable" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -544,7 +521,6 @@ test = ["pytest", "pytest-asyncio", "sqlite-utils"] name = "datasette-publish-fly" version = "1.3" description = "Datasette plugin for publishing data using Fly" -category = "main" optional = false python-versions = "*" files = [ @@ -562,7 +538,6 @@ test = ["cogapp", "pytest", "pytest-mock"] name = "datasette-publish-vercel" version = "0.14.2" description = "Datasette plugin for publishing data using Vercel" -category = "main" optional = false python-versions = "*" files = [ @@ -580,7 +555,6 @@ test = ["pytest"] name = "datasette-search-all" version = "1.1.1" description = "Datasette plugin for searching all searchable tables at once" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -598,7 +572,6 @@ test = ["pytest", "pytest-asyncio", "sqlite-utils"] name = "datasette-sqlite-regex" version = "0.2.3" description = "" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -616,7 +589,6 @@ test = ["pytest"] name = "elementpath" version = "4.1.4" description = "XPath 1.0/2.0/3.0/3.1 parsers and selectors for ElementTree and lxml" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -631,7 +603,6 @@ dev = ["Sphinx", "coverage", "flake8", "lxml", "lxml-stubs", "memory-profiler", name = "execnet" version = "2.0.2" description = "execnet: rapid multi-Python deployment" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -646,7 +617,6 @@ testing = ["hatch", "pre-commit", "pytest", "tox"] name = "flask" version = "2.2.5" description = "A simple framework for building complex web applications." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -668,7 +638,6 @@ dotenv = ["python-dotenv"] name = "flatterer" version = "0.19.8" description = "Opinionated JSON to CSV converter" -category = "main" optional = false python-versions = "*" files = [ @@ -709,7 +678,6 @@ pandas = "*" name = "h11" version = "0.14.0" description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -721,7 +689,6 @@ files = [ name = "httpcore" version = "0.17.3" description = "A minimal low-level HTTP client." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -733,17 +700,16 @@ files = [ anyio = ">=3.0,<5.0" certifi = "*" h11 = ">=0.13,<0.15" -sniffio = ">=1.0.0,<2.0.0" +sniffio = "==1.*" [package.extras] http2 = ["h2 (>=3,<5)"] -socks = ["socksio (>=1.0.0,<2.0.0)"] +socks = ["socksio (==1.*)"] [[package]] name = "httpx" version = "0.24.1" description = "The next generation HTTP client." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -759,15 +725,14 @@ sniffio = "*" [package.extras] brotli = ["brotli", "brotlicffi"] -cli = ["click (>=8.0.0,<9.0.0)", "pygments (>=2.0.0,<3.0.0)", "rich (>=10,<14)"] +cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<14)"] http2 = ["h2 (>=3,<5)"] -socks = ["socksio (>=1.0.0,<2.0.0)"] +socks = ["socksio (==1.*)"] [[package]] name = "hupper" version = "1.12" description = "Integrated process monitor for developing and reloading daemons." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -783,7 +748,6 @@ testing = ["mock", "pytest", "pytest-cov", "watchdog"] name = "hypofuzz" version = "23.7.1" description = "Adaptive fuzzing for property-based tests" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -809,7 +773,6 @@ pytrace = ["flask-cors (>=3.0.10)", "pycrunch-trace (>=0.1.6)"] name = "hypothesis" version = "6.81.1" description = "A library for property-based testing" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -844,7 +807,6 @@ zoneinfo = ["backports.zoneinfo (>=0.2.1)", "tzdata (>=2023.3)"] name = "hypothesis-jsonschema" version = "0.22.1" description = "Generate test data from JSON schemata with Hypothesis" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -860,7 +822,6 @@ jsonschema = ">=4.0.0" name = "idna" version = "3.4" description = "Internationalized Domain Names in Applications (IDNA)" -category = "main" optional = false python-versions = ">=3.5" files = [ @@ -872,7 +833,6 @@ files = [ name = "ijson" version = "3.2.3" description = "Iterative JSON parser with standard Python iterator interfaces" -category = "main" optional = false python-versions = "*" files = [ @@ -960,7 +920,6 @@ files = [ name = "importlib-metadata" version = "6.8.0" description = "Read metadata from Python packages" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -980,7 +939,6 @@ testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs name = "iniconfig" version = "2.0.0" description = "brain-dead simple config-ini parsing" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -992,7 +950,6 @@ files = [ name = "isort" version = "5.12.0" description = "A Python utility / library to sort Python imports." -category = "dev" optional = false python-versions = ">=3.8.0" files = [ @@ -1010,7 +967,6 @@ requirements-deprecated-finder = ["pip-api", "pipreqs"] name = "itsdangerous" version = "2.1.2" description = "Safely pass data to untrusted environments and back." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1022,7 +978,6 @@ files = [ name = "janus" version = "1.0.0" description = "Mixed sync-async queue to interoperate between asyncio tasks and classic threads" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1037,7 +992,6 @@ typing-extensions = ">=3.7.4.3" name = "jinja2" version = "3.1.2" description = "A very fast and expressive template engine." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1055,7 +1009,6 @@ i18n = ["Babel (>=2.7)"] name = "jsonschema" version = "4.18.3" description = "An implementation of JSON Schema validation for Python" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1077,7 +1030,6 @@ format-nongpl = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339- name = "jsonschema-specifications" version = "2023.6.1" description = "The JSON Schema meta-schemas and vocabularies, exposed as a Registry" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1092,7 +1044,6 @@ referencing = ">=0.28.0" name = "levenshtein" version = "0.21.1" description = "Python extension for computing string edit distances and similarities." -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -1207,7 +1158,6 @@ rapidfuzz = ">=2.3.0,<4.0.0" name = "libcst" version = "1.0.1" description = "A concrete syntax tree with AST-like properties for Python 3.5, 3.6, 3.7, 3.8, 3.9, and 3.10 programs." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1255,7 +1205,6 @@ dev = ["Sphinx (>=5.1.1)", "black (==23.3.0)", "build (>=0.10.0)", "coverage (>= name = "linkify-it-py" version = "2.0.2" description = "Links recognition library with FULL unicode support." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1276,13 +1225,14 @@ test = ["coverage", "pytest", "pytest-cov"] name = "lxml" version = "4.9.3" description = "Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API." -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, != 3.4.*" files = [ {file = "lxml-4.9.3-cp27-cp27m-macosx_11_0_x86_64.whl", hash = "sha256:b0a545b46b526d418eb91754565ba5b63b1c0b12f9bd2f808c852d9b4b2f9b5c"}, {file = "lxml-4.9.3-cp27-cp27m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:075b731ddd9e7f68ad24c635374211376aa05a281673ede86cbe1d1b3455279d"}, {file = "lxml-4.9.3-cp27-cp27m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:1e224d5755dba2f4a9498e150c43792392ac9b5380aa1b845f98a1618c94eeef"}, + {file = "lxml-4.9.3-cp27-cp27m-win32.whl", hash = "sha256:2c74524e179f2ad6d2a4f7caf70e2d96639c0954c943ad601a9e146c76408ed7"}, + {file = "lxml-4.9.3-cp27-cp27m-win_amd64.whl", hash = "sha256:4f1026bc732b6a7f96369f7bfe1a4f2290fb34dce00d8644bc3036fb351a4ca1"}, {file = "lxml-4.9.3-cp27-cp27mu-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c0781a98ff5e6586926293e59480b64ddd46282953203c76ae15dbbbf302e8bb"}, {file = "lxml-4.9.3-cp27-cp27mu-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:cef2502e7e8a96fe5ad686d60b49e1ab03e438bd9123987994528febd569868e"}, {file = "lxml-4.9.3-cp310-cp310-macosx_11_0_x86_64.whl", hash = "sha256:b86164d2cff4d3aaa1f04a14685cbc072efd0b4f99ca5708b2ad1b9b5988a991"}, @@ -1382,7 +1332,6 @@ source = ["Cython (>=0.29.35)"] name = "markdown-it-py" version = "3.0.0" description = "Python port of markdown-it. Markdown parsing, done right!" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1409,7 +1358,6 @@ testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"] name = "markupsafe" version = "2.1.3" description = "Safely add untrusted strings to HTML/XML markup." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1469,7 +1417,6 @@ files = [ name = "mdit-py-plugins" version = "0.4.0" description = "Collection of plugins for markdown-it-py" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1489,7 +1436,6 @@ testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"] name = "mdurl" version = "0.1.2" description = "Markdown URL utilities" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1501,7 +1447,6 @@ files = [ name = "mergedeep" version = "1.3.4" description = "A deep merge function for 🐍." -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -1513,7 +1458,6 @@ files = [ name = "mslex" version = "0.3.0" description = "shlex for windows" -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -1525,7 +1469,6 @@ files = [ name = "mypy" version = "1.4.1" description = "Optional static typing for Python" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1571,7 +1514,6 @@ reports = ["lxml"] name = "mypy-extensions" version = "1.0.0" description = "Type system extensions for programs checked with the mypy type checker." -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -1583,7 +1525,6 @@ files = [ name = "nest-asyncio" version = "1.5.6" description = "Patch asyncio to allow nested event loops" -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -1595,7 +1536,6 @@ files = [ name = "numpy" version = "1.25.1" description = "Fundamental package for array computing in Python" -category = "main" optional = false python-versions = ">=3.9" files = [ @@ -1630,7 +1570,6 @@ files = [ name = "orjson" version = "3.9.4" description = "Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1696,7 +1635,6 @@ files = [ name = "packaging" version = "23.1" description = "Core utilities for Python packages" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1708,7 +1646,6 @@ files = [ name = "pandas" version = "2.0.3" description = "Powerful data structures for data analysis, time series, and statistics" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1740,10 +1677,7 @@ files = [ ] [package.dependencies] -numpy = [ - {version = ">=1.21.0", markers = "python_version >= \"3.10\""}, - {version = ">=1.23.2", markers = "python_version >= \"3.11\""}, -] +numpy = {version = ">=1.23.2", markers = "python_version >= \"3.11\""} python-dateutil = ">=2.8.2" pytz = ">=2020.1" tzdata = ">=2022.1" @@ -1775,7 +1709,6 @@ xml = ["lxml (>=4.6.3)"] name = "pathspec" version = "0.11.1" description = "Utility library for gitignore style pattern matching of file paths." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1787,7 +1720,6 @@ files = [ name = "pint" version = "0.22" description = "Physical quantities module" -category = "main" optional = false python-versions = ">=3.9" files = [ @@ -1812,7 +1744,6 @@ xarray = ["xarray"] name = "pip" version = "23.2.1" description = "The PyPA recommended tool for installing Python packages." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1824,7 +1755,6 @@ files = [ name = "platformdirs" version = "3.8.1" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1840,7 +1770,6 @@ test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.3.1)", "pytest- name = "plotly" version = "5.15.0" description = "An open-source, interactive data visualization library for Python" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1856,7 +1785,6 @@ tenacity = ">=6.2.0" name = "pluggy" version = "1.2.0" description = "plugin and hook calling mechanisms for python" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1872,7 +1800,6 @@ testing = ["pytest", "pytest-benchmark"] name = "pprintpp" version = "0.4.0" description = "A drop-in replacement for pprint that's actually pretty" -category = "dev" optional = false python-versions = "*" files = [ @@ -1884,7 +1811,6 @@ files = [ name = "psutil" version = "5.9.5" description = "Cross-platform lib for process and system monitoring in Python." -category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -1911,7 +1837,6 @@ test = ["enum34", "ipaddress", "mock", "pywin32", "wmi"] name = "pyastgrep" version = "1.2.2" description = "A query tool for Python abstract syntax trees" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1930,7 +1855,6 @@ pathspec = "*" name = "pydantic" version = "2.0.3" description = "Data validation using Python type hints" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1950,7 +1874,6 @@ email = ["email-validator (>=2.0.0)"] name = "pydantic-core" version = "2.3.0" description = "" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2064,7 +1987,6 @@ typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" name = "pygments" version = "2.15.1" description = "Pygments is a syntax highlighting package written in Python." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2075,22 +1997,10 @@ files = [ [package.extras] plugins = ["importlib-metadata"] -[[package]] -name = "pysqlite3" -version = "0.5.1" -description = "DB-API 2.0 interface for Sqlite 3.x" -category = "main" -optional = false -python-versions = "*" -files = [ - {file = "pysqlite3-0.5.1.tar.gz", hash = "sha256:45496b7a5e5931afb9993f76ce48873d126abfc0fe70b65373970d353fca2c24"}, -] - [[package]] name = "pytest" version = "7.4.0" description = "pytest: simple powerful testing with Python" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2111,7 +2021,6 @@ testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "no name = "pytest-clarity" version = "1.0.1" description = "A plugin providing an alternative, colourful diff output for failing assertions." -category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -2127,7 +2036,6 @@ rich = ">=8.0.0" name = "pytest-cov" version = "4.1.0" description = "Pytest plugin for measuring coverage." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2146,7 +2054,6 @@ testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtuale name = "pytest-pretty" version = "1.2.0" description = "pytest plugin for printing summary data as I want it" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2162,7 +2069,6 @@ rich = ">=12" name = "pytest-randomly" version = "3.13.0" description = "Pytest plugin to randomly order tests and control random.seed." -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -2177,7 +2083,6 @@ pytest = "*" name = "pytest-xdist" version = "3.3.1" description = "pytest xdist plugin for distributed testing, most importantly across multiple CPUs" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2198,7 +2103,6 @@ testing = ["filelock"] name = "python-dateutil" version = "2.8.2" description = "Extensions to the standard Python datetime module" -category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" files = [ @@ -2213,7 +2117,6 @@ six = ">=1.5" name = "python-levenshtein" version = "0.21.1" description = "Python extension for computing string edit distances and similarities." -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -2228,7 +2131,6 @@ Levenshtein = "0.21.1" name = "python-multipart" version = "0.0.6" description = "A streaming multipart parser for Python" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2243,7 +2145,6 @@ dev = ["atomicwrites (==1.2.1)", "attrs (==19.2.0)", "coverage (==6.5.0)", "hatc name = "pytz" version = "2023.3" description = "World timezone definitions, modern and historical" -category = "main" optional = false python-versions = "*" files = [ @@ -2255,7 +2156,6 @@ files = [ name = "pyyaml" version = "6.0" description = "YAML parser and emitter for Python" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -2305,7 +2205,6 @@ files = [ name = "rapidfuzz" version = "3.1.2" description = "rapid fuzzy string matching" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2410,7 +2309,6 @@ full = ["numpy"] name = "referencing" version = "0.29.1" description = "JSON Referencing + Python" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -2426,7 +2324,6 @@ rpds-py = ">=0.7.0" name = "requests" version = "2.31.0" description = "Python HTTP for Humans." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2448,7 +2345,6 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] name = "retrying" version = "1.3.4" description = "Retrying" -category = "dev" optional = false python-versions = "*" files = [ @@ -2463,7 +2359,6 @@ six = ">=1.7.0" name = "rich" version = "13.4.2" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" -category = "main" optional = false python-versions = ">=3.7.0" files = [ @@ -2482,7 +2377,6 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"] name = "rpds-py" version = "0.8.11" description = "Python bindings to Rust's persistent data structures (rpds)" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -2589,7 +2483,6 @@ files = [ name = "ruff" version = "0.0.277" description = "An extremely fast Python linter, written in Rust." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2616,7 +2509,6 @@ files = [ name = "setuptools" version = "68.0.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2633,7 +2525,6 @@ testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs ( name = "shellingham" version = "1.5.0.post1" description = "Tool to Detect Surrounding Shell" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2645,7 +2536,6 @@ files = [ name = "six" version = "1.16.0" description = "Python 2 and 3 compatibility utilities" -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" files = [ @@ -2657,7 +2547,6 @@ files = [ name = "sniffio" version = "1.3.0" description = "Sniff out which async library your code is running under" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2669,7 +2558,6 @@ files = [ name = "sortedcontainers" version = "2.4.0" description = "Sorted Containers -- Sorted List, Sorted Dict, Sorted Set" -category = "dev" optional = false python-versions = "*" files = [ @@ -2681,7 +2569,6 @@ files = [ name = "sqlean-py" version = "0.21.5.3" description = "sqlite3 with extensions" -category = "main" optional = false python-versions = "*" files = [ @@ -2710,7 +2597,6 @@ files = [ name = "sqlite-fts4" version = "1.0.3" description = "Python functions for working with SQLite FTS4 search" -category = "main" optional = false python-versions = "*" files = [ @@ -2725,7 +2611,6 @@ test = ["pytest"] name = "sqlite-regex" version = "0.2.3" description = "" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2742,7 +2627,6 @@ test = ["pytest"] name = "sqlite-utils" version = "3.34" description = "CLI tool and Python library for manipulating SQLite databases" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2769,7 +2653,6 @@ tui = ["trogon"] name = "tabulate" version = "0.9.0" description = "Pretty-print tabular data" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2784,7 +2667,6 @@ widechars = ["wcwidth"] name = "taskipy" version = "1.11.0" description = "tasks runner for python projects" -category = "dev" optional = false python-versions = ">=3.6,<4.0" files = [ @@ -2802,7 +2684,6 @@ tomli = {version = ">=2.0.1,<3.0.0", markers = "python_version >= \"3.7\" and py name = "tenacity" version = "8.2.2" description = "Retry code until it succeeds" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -2817,7 +2698,6 @@ doc = ["reno", "sphinx", "tornado (>=4.5)"] name = "textual" version = "0.29.0" description = "Modern Text User Interface framework" -category = "main" optional = false python-versions = ">=3.7,<4.0" files = [ @@ -2835,7 +2715,6 @@ typing-extensions = ">=4.4.0,<5.0.0" name = "thefuzz" version = "0.19.0" description = "Fuzzy string matching in python" -category = "main" optional = false python-versions = "*" files = [ @@ -2850,7 +2729,6 @@ speedup = ["python-levenshtein (>=0.12)"] name = "tomli" version = "2.0.1" description = "A lil' TOML parser" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2862,7 +2740,6 @@ files = [ name = "trogon" version = "0.5.0" description = "Automatically generate a Textual TUI for your Click CLI" -category = "main" optional = false python-versions = ">=3.7,<4.0" files = [ @@ -2878,7 +2755,6 @@ textual = ">=0.26.0" name = "typer" version = "0.9.0" description = "Typer, build great CLIs. Easy to code. Based on Python type hints." -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -2903,7 +2779,6 @@ test = ["black (>=22.3.0,<23.0.0)", "coverage (>=6.2,<7.0)", "isort (>=5.0.6,<6. name = "types-jsonschema" version = "4.17.0.9" description = "Typing stubs for jsonschema" -category = "dev" optional = false python-versions = "*" files = [ @@ -2915,7 +2790,6 @@ files = [ name = "types-pyyaml" version = "6.0.12.10" description = "Typing stubs for PyYAML" -category = "dev" optional = false python-versions = "*" files = [ @@ -2927,7 +2801,6 @@ files = [ name = "typing-extensions" version = "4.7.1" description = "Backported and Experimental Type Hints for Python 3.7+" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2939,7 +2812,6 @@ files = [ name = "typing-inspect" version = "0.9.0" description = "Runtime inspection utilities for typing module." -category = "dev" optional = false python-versions = "*" files = [ @@ -2955,7 +2827,6 @@ typing-extensions = ">=3.7.4" name = "tzdata" version = "2023.3" description = "Provider of IANA time zone data" -category = "main" optional = false python-versions = ">=2" files = [ @@ -2967,7 +2838,6 @@ files = [ name = "uc-micro-py" version = "1.0.2" description = "Micro subset of unicode data files for linkify-it-py projects." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2982,7 +2852,6 @@ test = ["coverage", "pytest", "pytest-cov"] name = "urllib3" version = "2.0.3" description = "HTTP library with thread-safe connection pooling, file post, and more." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -3000,7 +2869,6 @@ zstd = ["zstandard (>=0.18.0)"] name = "uvicorn" version = "0.23.2" description = "The lightning-fast ASGI server." -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -3019,7 +2887,6 @@ standard = ["colorama (>=0.4)", "httptools (>=0.5.0)", "python-dotenv (>=0.13)", name = "werkzeug" version = "2.2.3" description = "The comprehensive WSGI web application library." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -3037,7 +2904,6 @@ watchdog = ["watchdog"] name = "zipp" version = "3.15.0" description = "Backport of pathlib-compatible object wrapper for zip files" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -3052,4 +2918,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more [metadata] lock-version = "2.0" python-versions = "^3.11" -content-hash = "d6232eab32445f6756dcc0cee8072288614047411fe6ebda3fcc002073bbb502" +content-hash = "d543b2ff6b6490d0ede0982b869d86dc8d10ead9bad55d082d3144d772257c08" diff --git a/pyproject.toml b/pyproject.toml index 38b700f0..0110f796 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,6 @@ datasette-search-all = "^1.1.1" sqlite-utils = "^3.34" sqlean-py = "^0.21.5.3" datasette-sqlite-regex = "^0.2.3" -pysqlite3 = "^0.5.1" sqlite-regex = "^0.2.3" datasette-publish-vercel = "^0.14.2" From ebf14f4a9b21a7b10aadcc96913706a435cc46bc Mon Sep 17 00:00:00 2001 From: Poiuy7312 Date: Mon, 18 Sep 2023 14:04:24 -0400 Subject: [PATCH 12/35] trying to change windows encoding --- .github/workflows/build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f6a60b79..a2f10835 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,7 @@ on: # This job performs all necessary checks jobs: build: - # Use the latest version of Ubuntu on Microsoft Azure + # Use the latest version of Ubuntu on MacOS and Windows runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -73,7 +73,8 @@ jobs: - name: Run program if: always() run: | - poetry run chasten analyze chasten --config $PWD/.chasten/ --debug-level ERROR --debug-dest CONSOLE --search-path . + poetry run chasten analyze chasten --config $PWD/.chasten/ --debug-level ERROR --debug-dest CONSOLE --search-path . /p:ConsoleEncoding=UTF8 + # Run the tests - name: Run Tests if: always() From bdf6ba3b8fd6d6f7b709a294917c3dc3249ee7de Mon Sep 17 00:00:00 2001 From: Poiuy7312 Date: Mon, 18 Sep 2023 14:13:00 -0400 Subject: [PATCH 13/35] Trying a different approach to change encoding --- .github/workflows/build.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a2f10835..447aabb6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -69,11 +69,15 @@ jobs: if: always() run: | poetry run task lint - # Run the program + - name: Encode Windows + if: matrix.os == 'windows-latest' + run: | + $OutputEncoding = [Console]::OutputEncoding = [Text.UTF8Encoding]::UTF8 + # Run the program - name: Run program if: always() run: | - poetry run chasten analyze chasten --config $PWD/.chasten/ --debug-level ERROR --debug-dest CONSOLE --search-path . /p:ConsoleEncoding=UTF8 + poetry run chasten analyze chasten --config $PWD/.chasten/ --debug-level ERROR --debug-dest CONSOLE --search-path . # Run the tests - name: Run Tests From 3bcd34533ec857156543e37d1812b0a37614db67 Mon Sep 17 00:00:00 2001 From: Poiuy7312 Date: Mon, 18 Sep 2023 14:27:48 -0400 Subject: [PATCH 14/35] Encoding Windows --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 447aabb6..dd1bd716 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -72,7 +72,7 @@ jobs: - name: Encode Windows if: matrix.os == 'windows-latest' run: | - $OutputEncoding = [Console]::OutputEncoding = [Text.UTF8Encoding]::UTF8 + $PSDefaultParameterValues['*:Encoding'] = 'utf8' # Run the program - name: Run program if: always() From fa53f10256b28efa4ac3b4b83c2481a7eb24271c Mon Sep 17 00:00:00 2001 From: Poiuy7312 Date: Mon, 18 Sep 2023 14:41:15 -0400 Subject: [PATCH 15/35] Removed Special characters --- .github/workflows/build.yml | 4 ---- chasten/main.py | 14 +++++++------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dd1bd716..50a73f0c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -69,10 +69,6 @@ jobs: if: always() run: | poetry run task lint - - name: Encode Windows - if: matrix.os == 'windows-latest' - run: | - $PSDefaultParameterValues['*:Encoding'] = 'utf8' # Run the program - name: Run program if: always() diff --git a/chasten/main.py b/chasten/main.py index f6ed91f6..124ddbf7 100644 --- a/chasten/main.py +++ b/chasten/main.py @@ -283,7 +283,7 @@ def display_serve_or_publish_details( @cli.command() def interact(ctx: typer.Context) -> None: - """🚀 Interactively configure and run.""" + """Interactively configure and run.""" # construct a Trogon object; this will create a # terminal-user interface that will allow the # person using chasten to pick a mode and then @@ -322,7 +322,7 @@ def configure( # noqa: PLR0913 ), verbose: bool = typer.Option(False, help="Display verbose debugging output"), ) -> None: - """🪂 Manage chasten's configuration.""" + """Manage chasten's configuration.""" # output the preamble, including extra parameters specific to this function output_preamble( verbose, @@ -440,7 +440,7 @@ def analyze( # noqa: PLR0913, PLR0915 verbose: bool = typer.Option(False, help="Enable verbose mode output."), save: bool = typer.Option(False, help="Enable saving of output file(s)."), ) -> None: - """💫 Analyze the AST of Python source code.""" + """Analyze the AST of Python source code.""" # output the preamble, including extra parameters specific to this function output_preamble( verbose, @@ -710,7 +710,7 @@ def integrate( # noqa: PLR0913 ), verbose: bool = typer.Option(False, help="Display verbose debugging output"), ) -> None: - """🚧 Integrate files and make a database.""" + """Integrate files and make a database.""" # output the preamble, including extra parameters specific to this function output_preamble( verbose, @@ -799,7 +799,7 @@ def datasette_serve( # noqa: PLR0913 ), verbose: bool = typer.Option(False, help="Display verbose debugging output"), ) -> None: - """🏃 Start a local datasette server.""" + """Start a local datasette server.""" # output the preamble, including extra parameters specific to this function output_preamble( verbose, @@ -868,7 +868,7 @@ def datasette_publish( # noqa: PLR0913 ), verbose: bool = typer.Option(False, help="Display verbose debugging output"), ) -> None: - """🌎 Publish a datasette to Fly or Vercel.""" + """Publish a datasette to Fly or Vercel.""" # output the preamble, including extra parameters specific to this function output_preamble( verbose, @@ -897,7 +897,7 @@ def datasette_publish( # noqa: PLR0913 @cli.command() def log() -> None: - """🦚 Start the logging server.""" + """Start the logging server.""" # display the header output.print_header() # display details about the server From d489d2324cfa625076ae1777fd35c7eacf6e722a Mon Sep 17 00:00:00 2001 From: Poiuy7312 Date: Mon, 18 Sep 2023 14:46:58 -0400 Subject: [PATCH 16/35] Removed sparkles --- chasten/main.py | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/chasten/main.py b/chasten/main.py index 124ddbf7..ea828240 100644 --- a/chasten/main.py +++ b/chasten/main.py @@ -115,7 +115,7 @@ def validate_file( # perform the validation of the configuration file (validated, errors) = validate.validate_configuration(yml_data_dict, json_schema) output.console.print( - f":sparkles: Validated {configuration_file_str}? {util.get_human_readable_boolean(validated)}" + f"Validated {configuration_file_str}? {util.get_human_readable_boolean(validated)}" ) # there was a validation error, so display the error report if not validated: @@ -124,7 +124,7 @@ def validate_file( else: output.opt_print_log(verbose, newline="") output.opt_print_log( - verbose, label=f":sparkles: Contents of {configuration_file_str}:\n" + verbose, label=f"Contents of {configuration_file_str}:\n" ) output.opt_print_log(verbose, config_file=configuration_file_yml) return validated @@ -161,7 +161,7 @@ def validate_configuration_files( application_author=constants.chasten.Application_Author, ) output.console.print( - ":sparkles: Configuration directory:" + "Configuration directory:" + constants.markers.Space + chasten_user_config_dir_str + constants.markers.Newline @@ -283,7 +283,7 @@ def display_serve_or_publish_details( @cli.command() def interact(ctx: typer.Context) -> None: - """Interactively configure and run.""" + """🚀 Interactively configure and run.""" # construct a Trogon object; this will create a # terminal-user interface that will allow the # person using chasten to pick a mode and then @@ -322,7 +322,7 @@ def configure( # noqa: PLR0913 ), verbose: bool = typer.Option(False, help="Display verbose debugging output"), ) -> None: - """Manage chasten's configuration.""" + """🪂 Manage chasten's configuration.""" # output the preamble, including extra parameters specific to this function output_preamble( verbose, @@ -365,7 +365,7 @@ def configure( # noqa: PLR0913 ) # display diagnostic information about the completed process output.console.print( - f":sparkles: Created configuration directory and file(s) in {created_directory_path}" + f"Created configuration directory and file(s) in {created_directory_path}" ) # cannot re-create the configuration directory, so display # a message and suggest the use of --force the next time; @@ -440,7 +440,7 @@ def analyze( # noqa: PLR0913, PLR0915 verbose: bool = typer.Option(False, help="Enable verbose mode output."), save: bool = typer.Option(False, help="Enable saving of output file(s)."), ) -> None: - """Analyze the AST of Python source code.""" + """💫 Analyze the AST of Python source code.""" # output the preamble, including extra parameters specific to this function output_preamble( verbose, @@ -518,7 +518,7 @@ def analyze( # noqa: PLR0913, PLR0915 valid_directories = [input_path] # output the list of directories subject to checking output.console.print() - output.console.print(f":sparkles: Analyzing Python source code in: {input_path}") + output.console.print(f"Analyzing Python source code in: {input_path}") # output the number of checks that will be performed output.console.print() output.console.print(f":tada: Performing {len(check_list)} check(s):") @@ -664,7 +664,7 @@ def analyze( # noqa: PLR0913, PLR0915 ) # output the name of the saved file if saving successfully took place if saved_file_name: - output.console.print(f"\n:sparkles: Saved the file '{saved_file_name}'") + output.console.print(f"\nSaved the file '{saved_file_name}'") # confirm whether or not all of the checks passed # and then display the appropriate diagnostic message all_checks_passed = all(check_status_list) @@ -710,7 +710,7 @@ def integrate( # noqa: PLR0913 ), verbose: bool = typer.Option(False, help="Display verbose debugging output"), ) -> None: - """Integrate files and make a database.""" + """🚧 Integrate files and make a database.""" # output the preamble, including extra parameters specific to this function output_preamble( verbose, @@ -723,7 +723,7 @@ def integrate( # noqa: PLR0913 ) # output the list of directories subject to checking output.console.print() - output.console.print(":sparkles: Combining data file(s) in:") + output.console.print("Combining data file(s) in:") output.console.print() output.print_list_contents(json_path) # extract all of the JSON dictionaries from the specified files @@ -736,7 +736,7 @@ def integrate( # noqa: PLR0913 ) # output the name of the saved file if saving successfully took place if combined_json_file_name: - output.console.print(f"\n:sparkles: Saved the file '{combined_json_file_name}'") + output.console.print(f"\nSaved the file '{combined_json_file_name}'") # "flatten" (i.e., "un-nest") the now-saved combined JSON file using flatterer # create the SQLite3 database and then configure the database for use in datasett combined_flattened_directory = filesystem.write_flattened_csv_and_database( @@ -747,7 +747,7 @@ def integrate( # noqa: PLR0913 # output the name of the saved file if saving successfully took place if combined_flattened_directory: output.console.print( - f"\n:sparkles: Created this directory structure in {Path(combined_flattened_directory).parent}:" + f"\nCreated this directory structure in {Path(combined_flattened_directory).parent}:" ) combined_directory_tree = filesystem.create_directory_tree_visualization( Path(combined_flattened_directory) @@ -799,7 +799,7 @@ def datasette_serve( # noqa: PLR0913 ), verbose: bool = typer.Option(False, help="Display verbose debugging output"), ) -> None: - """Start a local datasette server.""" + """🏃 Start a local datasette server.""" # output the preamble, including extra parameters specific to this function output_preamble( verbose, @@ -810,7 +810,7 @@ def datasette_serve( # noqa: PLR0913 metadata=metadata, ) # display diagnostic information about the datasette instance - label = ":sparkles: Starting a local datasette instance:" + label = "Starting a local datasette instance:" display_serve_or_publish_details( label, database_path, metadata, port, publish=False ) @@ -868,7 +868,7 @@ def datasette_publish( # noqa: PLR0913 ), verbose: bool = typer.Option(False, help="Display verbose debugging output"), ) -> None: - """Publish a datasette to Fly or Vercel.""" + """🌎 Publish a datasette to Fly or Vercel.""" # output the preamble, including extra parameters specific to this function output_preamble( verbose, @@ -882,7 +882,7 @@ def datasette_publish( # noqa: PLR0913 f":wave: Make sure that you have previously logged into the '{datasette_platform.value}' platform" ) # display details about the publishing step - label = f":sparkles: Publishing a datasette to {datasette_platform.value}:" + label = f"Publishing a datasette to {datasette_platform.value}:" display_serve_or_publish_details(label, database_path, metadata, publish=True) # publish the datasette instance using fly.io; # this passes control to datasette and then to @@ -897,7 +897,7 @@ def datasette_publish( # noqa: PLR0913 @cli.command() def log() -> None: - """Start the logging server.""" + """🦚 Start the logging server.""" # display the header output.print_header() # display details about the server From 669155005ab9bb66a9355efa1d6b2ff3a47f4a55 Mon Sep 17 00:00:00 2001 From: Poiuy7312 Date: Mon, 18 Sep 2023 14:52:54 -0400 Subject: [PATCH 17/35] Removed characters --- chasten/main.py | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/chasten/main.py b/chasten/main.py index ea828240..702f1b14 100644 --- a/chasten/main.py +++ b/chasten/main.py @@ -1,4 +1,4 @@ -"""💫 Chasten checks the AST of a Python program.""" +"""Chasten checks the AST of a Python program.""" import sys from pathlib import Path @@ -123,9 +123,7 @@ def validate_file( # validation worked correctly, so display the configuration file else: output.opt_print_log(verbose, newline="") - output.opt_print_log( - verbose, label=f"Contents of {configuration_file_str}:\n" - ) + output.opt_print_log(verbose, label=f"Contents of {configuration_file_str}:\n") output.opt_print_log(verbose, config_file=configuration_file_yml) return validated @@ -283,7 +281,7 @@ def display_serve_or_publish_details( @cli.command() def interact(ctx: typer.Context) -> None: - """🚀 Interactively configure and run.""" + """Interactively configure and run.""" # construct a Trogon object; this will create a # terminal-user interface that will allow the # person using chasten to pick a mode and then @@ -322,7 +320,7 @@ def configure( # noqa: PLR0913 ), verbose: bool = typer.Option(False, help="Display verbose debugging output"), ) -> None: - """🪂 Manage chasten's configuration.""" + """Manage chasten's configuration.""" # output the preamble, including extra parameters specific to this function output_preamble( verbose, @@ -440,7 +438,7 @@ def analyze( # noqa: PLR0913, PLR0915 verbose: bool = typer.Option(False, help="Enable verbose mode output."), save: bool = typer.Option(False, help="Enable saving of output file(s)."), ) -> None: - """💫 Analyze the AST of Python source code.""" + """Analyze the AST of Python source code.""" # output the preamble, including extra parameters specific to this function output_preamble( verbose, @@ -710,7 +708,7 @@ def integrate( # noqa: PLR0913 ), verbose: bool = typer.Option(False, help="Display verbose debugging output"), ) -> None: - """🚧 Integrate files and make a database.""" + """Integrate files and make a database.""" # output the preamble, including extra parameters specific to this function output_preamble( verbose, @@ -799,7 +797,7 @@ def datasette_serve( # noqa: PLR0913 ), verbose: bool = typer.Option(False, help="Display verbose debugging output"), ) -> None: - """🏃 Start a local datasette server.""" + """Start a local datasette server.""" # output the preamble, including extra parameters specific to this function output_preamble( verbose, @@ -868,7 +866,7 @@ def datasette_publish( # noqa: PLR0913 ), verbose: bool = typer.Option(False, help="Display verbose debugging output"), ) -> None: - """🌎 Publish a datasette to Fly or Vercel.""" + """Publish a datasette to Fly or Vercel.""" # output the preamble, including extra parameters specific to this function output_preamble( verbose, @@ -897,7 +895,7 @@ def datasette_publish( # noqa: PLR0913 @cli.command() def log() -> None: - """🦚 Start the logging server.""" + """Start the logging server.""" # display the header output.print_header() # display details about the server From b247a41d59e1c04b31712a26d7f23f4e620df8fd Mon Sep 17 00:00:00 2001 From: Poiuy7312 Date: Tue, 19 Sep 2023 11:34:55 -0400 Subject: [PATCH 18/35] Added special character back --- chasten/main.py | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/chasten/main.py b/chasten/main.py index 702f1b14..1909dbee 100644 --- a/chasten/main.py +++ b/chasten/main.py @@ -1,4 +1,4 @@ -"""Chasten checks the AST of a Python program.""" +"""💫 Chasten checks the AST of a Python program.""" import sys from pathlib import Path @@ -115,7 +115,7 @@ def validate_file( # perform the validation of the configuration file (validated, errors) = validate.validate_configuration(yml_data_dict, json_schema) output.console.print( - f"Validated {configuration_file_str}? {util.get_human_readable_boolean(validated)}" + f":sparkles: Validated {configuration_file_str}? {util.get_human_readable_boolean(validated)}" ) # there was a validation error, so display the error report if not validated: @@ -123,7 +123,9 @@ def validate_file( # validation worked correctly, so display the configuration file else: output.opt_print_log(verbose, newline="") - output.opt_print_log(verbose, label=f"Contents of {configuration_file_str}:\n") + output.opt_print_log( + verbose, label=f":sparkles: Contents of {configuration_file_str}:\n" + ) output.opt_print_log(verbose, config_file=configuration_file_yml) return validated @@ -159,7 +161,7 @@ def validate_configuration_files( application_author=constants.chasten.Application_Author, ) output.console.print( - "Configuration directory:" + ":sparkles: Configuration directory:" + constants.markers.Space + chasten_user_config_dir_str + constants.markers.Newline @@ -281,7 +283,7 @@ def display_serve_or_publish_details( @cli.command() def interact(ctx: typer.Context) -> None: - """Interactively configure and run.""" + """🚀 Interactively configure and run.""" # construct a Trogon object; this will create a # terminal-user interface that will allow the # person using chasten to pick a mode and then @@ -320,7 +322,7 @@ def configure( # noqa: PLR0913 ), verbose: bool = typer.Option(False, help="Display verbose debugging output"), ) -> None: - """Manage chasten's configuration.""" + """🪂 Manage chasten's configuration.""" # output the preamble, including extra parameters specific to this function output_preamble( verbose, @@ -363,7 +365,7 @@ def configure( # noqa: PLR0913 ) # display diagnostic information about the completed process output.console.print( - f"Created configuration directory and file(s) in {created_directory_path}" + f":sparkles: Created configuration directory and file(s) in {created_directory_path}" ) # cannot re-create the configuration directory, so display # a message and suggest the use of --force the next time; @@ -438,7 +440,7 @@ def analyze( # noqa: PLR0913, PLR0915 verbose: bool = typer.Option(False, help="Enable verbose mode output."), save: bool = typer.Option(False, help="Enable saving of output file(s)."), ) -> None: - """Analyze the AST of Python source code.""" + """💫 Analyze the AST of Python source code.""" # output the preamble, including extra parameters specific to this function output_preamble( verbose, @@ -516,7 +518,7 @@ def analyze( # noqa: PLR0913, PLR0915 valid_directories = [input_path] # output the list of directories subject to checking output.console.print() - output.console.print(f"Analyzing Python source code in: {input_path}") + output.console.print(f":sparkles: Analyzing Python source code in: {input_path}") # output the number of checks that will be performed output.console.print() output.console.print(f":tada: Performing {len(check_list)} check(s):") @@ -662,7 +664,7 @@ def analyze( # noqa: PLR0913, PLR0915 ) # output the name of the saved file if saving successfully took place if saved_file_name: - output.console.print(f"\nSaved the file '{saved_file_name}'") + output.console.print(f"\n:sparkles: Saved the file '{saved_file_name}'") # confirm whether or not all of the checks passed # and then display the appropriate diagnostic message all_checks_passed = all(check_status_list) @@ -708,7 +710,7 @@ def integrate( # noqa: PLR0913 ), verbose: bool = typer.Option(False, help="Display verbose debugging output"), ) -> None: - """Integrate files and make a database.""" + """🚧 Integrate files and make a database.""" # output the preamble, including extra parameters specific to this function output_preamble( verbose, @@ -721,7 +723,7 @@ def integrate( # noqa: PLR0913 ) # output the list of directories subject to checking output.console.print() - output.console.print("Combining data file(s) in:") + output.console.print(":sparkles: Combining data file(s) in:") output.console.print() output.print_list_contents(json_path) # extract all of the JSON dictionaries from the specified files @@ -734,7 +736,7 @@ def integrate( # noqa: PLR0913 ) # output the name of the saved file if saving successfully took place if combined_json_file_name: - output.console.print(f"\nSaved the file '{combined_json_file_name}'") + output.console.print(f"\n:sparkles: Saved the file '{combined_json_file_name}'") # "flatten" (i.e., "un-nest") the now-saved combined JSON file using flatterer # create the SQLite3 database and then configure the database for use in datasett combined_flattened_directory = filesystem.write_flattened_csv_and_database( @@ -745,7 +747,7 @@ def integrate( # noqa: PLR0913 # output the name of the saved file if saving successfully took place if combined_flattened_directory: output.console.print( - f"\nCreated this directory structure in {Path(combined_flattened_directory).parent}:" + f"\n:sparkles: Created this directory structure in {Path(combined_flattened_directory).parent}:" ) combined_directory_tree = filesystem.create_directory_tree_visualization( Path(combined_flattened_directory) @@ -797,7 +799,7 @@ def datasette_serve( # noqa: PLR0913 ), verbose: bool = typer.Option(False, help="Display verbose debugging output"), ) -> None: - """Start a local datasette server.""" + """🏃 Start a local datasette server.""" # output the preamble, including extra parameters specific to this function output_preamble( verbose, @@ -808,7 +810,7 @@ def datasette_serve( # noqa: PLR0913 metadata=metadata, ) # display diagnostic information about the datasette instance - label = "Starting a local datasette instance:" + label = ":sparkles: Starting a local datasette instance:" display_serve_or_publish_details( label, database_path, metadata, port, publish=False ) @@ -866,7 +868,7 @@ def datasette_publish( # noqa: PLR0913 ), verbose: bool = typer.Option(False, help="Display verbose debugging output"), ) -> None: - """Publish a datasette to Fly or Vercel.""" + """🌎 Publish a datasette to Fly or Vercel.""" # output the preamble, including extra parameters specific to this function output_preamble( verbose, @@ -880,7 +882,7 @@ def datasette_publish( # noqa: PLR0913 f":wave: Make sure that you have previously logged into the '{datasette_platform.value}' platform" ) # display details about the publishing step - label = f"Publishing a datasette to {datasette_platform.value}:" + label = f":sparkles: Publishing a datasette to {datasette_platform.value}:" display_serve_or_publish_details(label, database_path, metadata, publish=True) # publish the datasette instance using fly.io; # this passes control to datasette and then to @@ -895,7 +897,7 @@ def datasette_publish( # noqa: PLR0913 @cli.command() def log() -> None: - """Start the logging server.""" + """🦚 Start the logging server.""" # display the header output.print_header() # display details about the server @@ -911,4 +913,4 @@ def log() -> None: # --- # End region: Command-line interface functions }}} -# --- +# --- \ No newline at end of file From 0bd58bd2ebca7a2efb3e33964fdc1473bb5c7a15 Mon Sep 17 00:00:00 2001 From: Poiuy7312 Date: Tue, 19 Sep 2023 14:49:03 -0400 Subject: [PATCH 19/35] Reformatted Main.py --- chasten/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chasten/main.py b/chasten/main.py index 1909dbee..f6ed91f6 100644 --- a/chasten/main.py +++ b/chasten/main.py @@ -913,4 +913,4 @@ def log() -> None: # --- # End region: Command-line interface functions }}} -# --- \ No newline at end of file +# --- From 6a8acd9920945407fcae8950eeca83a905d36c3d Mon Sep 17 00:00:00 2001 From: Poiuy7312 Date: Tue, 19 Sep 2023 15:24:31 -0400 Subject: [PATCH 20/35] style: changed chasten.emoji in constants.py to * --- chasten/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chasten/constants.py b/chasten/constants.py index 51963182..0c4b14c1 100644 --- a/chasten/constants.py +++ b/chasten/constants.py @@ -29,7 +29,7 @@ class Chasten: Application_Name="chasten", Application_Author="ChastenedTeam", Chasten_Database_View="chasten_complete", - Emoji=":dizzy:", + Emoji="*", Executable_Fly="fly", Executable_Vercel="vercel", Https="https://", From bb211753c01c0623e795a5b141fe2a11f80e026a Mon Sep 17 00:00:00 2001 From: Poiuy7312 Date: Tue, 19 Sep 2023 15:57:59 -0400 Subject: [PATCH 21/35] style: removed link character from constants.py --- chasten/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chasten/constants.py b/chasten/constants.py index 0c4b14c1..f45091a4 100644 --- a/chasten/constants.py +++ b/chasten/constants.py @@ -40,7 +40,7 @@ class Chasten: Tagline="chasten: Analyze the AST of Python Source Code", Theme_Background="default", Theme_Colors="ansi_dark", - Website=":link: GitHub: https://github.com/gkapfham/chasten", + Website="GitHub: https://github.com/gkapfham/chasten", ) From 2505ec19d55cdc616df57d1373bbfb3c5bd81cff Mon Sep 17 00:00:00 2001 From: Poiuy7312 Date: Tue, 19 Sep 2023 16:03:38 -0400 Subject: [PATCH 22/35] style: removed :sparkles: from main.py --- chasten/main.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/chasten/main.py b/chasten/main.py index f6ed91f6..aa502baa 100644 --- a/chasten/main.py +++ b/chasten/main.py @@ -115,7 +115,7 @@ def validate_file( # perform the validation of the configuration file (validated, errors) = validate.validate_configuration(yml_data_dict, json_schema) output.console.print( - f":sparkles: Validated {configuration_file_str}? {util.get_human_readable_boolean(validated)}" + f"# Validated {configuration_file_str}? {util.get_human_readable_boolean(validated)}" ) # there was a validation error, so display the error report if not validated: @@ -124,7 +124,7 @@ def validate_file( else: output.opt_print_log(verbose, newline="") output.opt_print_log( - verbose, label=f":sparkles: Contents of {configuration_file_str}:\n" + verbose, label=f"# Contents of {configuration_file_str}:\n" ) output.opt_print_log(verbose, config_file=configuration_file_yml) return validated @@ -161,7 +161,7 @@ def validate_configuration_files( application_author=constants.chasten.Application_Author, ) output.console.print( - ":sparkles: Configuration directory:" + "# Configuration directory:" + constants.markers.Space + chasten_user_config_dir_str + constants.markers.Newline @@ -365,7 +365,7 @@ def configure( # noqa: PLR0913 ) # display diagnostic information about the completed process output.console.print( - f":sparkles: Created configuration directory and file(s) in {created_directory_path}" + f"# Created configuration directory and file(s) in {created_directory_path}" ) # cannot re-create the configuration directory, so display # a message and suggest the use of --force the next time; @@ -518,7 +518,7 @@ def analyze( # noqa: PLR0913, PLR0915 valid_directories = [input_path] # output the list of directories subject to checking output.console.print() - output.console.print(f":sparkles: Analyzing Python source code in: {input_path}") + output.console.print(f"# Analyzing Python source code in: {input_path}") # output the number of checks that will be performed output.console.print() output.console.print(f":tada: Performing {len(check_list)} check(s):") @@ -664,7 +664,7 @@ def analyze( # noqa: PLR0913, PLR0915 ) # output the name of the saved file if saving successfully took place if saved_file_name: - output.console.print(f"\n:sparkles: Saved the file '{saved_file_name}'") + output.console.print(f"\n# Saved the file '{saved_file_name}'") # confirm whether or not all of the checks passed # and then display the appropriate diagnostic message all_checks_passed = all(check_status_list) @@ -723,7 +723,7 @@ def integrate( # noqa: PLR0913 ) # output the list of directories subject to checking output.console.print() - output.console.print(":sparkles: Combining data file(s) in:") + output.console.print("# Combining data file(s) in:") output.console.print() output.print_list_contents(json_path) # extract all of the JSON dictionaries from the specified files @@ -736,7 +736,7 @@ def integrate( # noqa: PLR0913 ) # output the name of the saved file if saving successfully took place if combined_json_file_name: - output.console.print(f"\n:sparkles: Saved the file '{combined_json_file_name}'") + output.console.print(f"\n#Saved the file '{combined_json_file_name}'") # "flatten" (i.e., "un-nest") the now-saved combined JSON file using flatterer # create the SQLite3 database and then configure the database for use in datasett combined_flattened_directory = filesystem.write_flattened_csv_and_database( @@ -747,7 +747,7 @@ def integrate( # noqa: PLR0913 # output the name of the saved file if saving successfully took place if combined_flattened_directory: output.console.print( - f"\n:sparkles: Created this directory structure in {Path(combined_flattened_directory).parent}:" + f"\n# Created this directory structure in {Path(combined_flattened_directory).parent}:" ) combined_directory_tree = filesystem.create_directory_tree_visualization( Path(combined_flattened_directory) @@ -810,7 +810,7 @@ def datasette_serve( # noqa: PLR0913 metadata=metadata, ) # display diagnostic information about the datasette instance - label = ":sparkles: Starting a local datasette instance:" + label = "# Starting a local datasette instance:" display_serve_or_publish_details( label, database_path, metadata, port, publish=False ) @@ -882,7 +882,7 @@ def datasette_publish( # noqa: PLR0913 f":wave: Make sure that you have previously logged into the '{datasette_platform.value}' platform" ) # display details about the publishing step - label = f":sparkles: Publishing a datasette to {datasette_platform.value}:" + label = f"# Publishing a datasette to {datasette_platform.value}:" display_serve_or_publish_details(label, database_path, metadata, publish=True) # publish the datasette instance using fly.io; # this passes control to datasette and then to From 18e4190b5b8dceae16f9aa0d5800ea69de823361 Mon Sep 17 00:00:00 2001 From: Poiuy7312 Date: Tue, 19 Sep 2023 16:08:15 -0400 Subject: [PATCH 23/35] style: removed special characters from main.py --- chasten/main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chasten/main.py b/chasten/main.py index aa502baa..4039a60c 100644 --- a/chasten/main.py +++ b/chasten/main.py @@ -440,7 +440,7 @@ def analyze( # noqa: PLR0913, PLR0915 verbose: bool = typer.Option(False, help="Enable verbose mode output."), save: bool = typer.Option(False, help="Enable saving of output file(s)."), ) -> None: - """💫 Analyze the AST of Python source code.""" + """* Analyze the AST of Python source code.""" # output the preamble, including extra parameters specific to this function output_preamble( verbose, @@ -484,7 +484,7 @@ def analyze( # noqa: PLR0913, PLR0915 # valid, so exit early and signal an error if not validated: output.console.print( - "\n:person_shrugging: Cannot perform analysis due to configuration error(s).\n" + "\n# Cannot perform analysis due to configuration error(s).\n" ) sys.exit(constants.markers.Non_Zero_Exit) # extract the list of the specific patterns (i.e., the XPATH expressions) @@ -511,7 +511,7 @@ def analyze( # noqa: PLR0913, PLR0915 input_path ) and not filesystem.confirm_valid_file(input_path): output.console.print( - "\n:person_shrugging: Cannot perform analysis due to invalid search directory.\n" + "\n:# Cannot perform analysis due to invalid search directory.\n" ) sys.exit(constants.markers.Non_Zero_Exit) # create the list of directories @@ -521,7 +521,7 @@ def analyze( # noqa: PLR0913, PLR0915 output.console.print(f"# Analyzing Python source code in: {input_path}") # output the number of checks that will be performed output.console.print() - output.console.print(f":tada: Performing {len(check_list)} check(s):") + output.console.print(f"# Performing {len(check_list)} check(s):") output.console.print() # create a check_status list for all of the checks check_status_list: List[bool] = [] From 3703e4f705541787fd5b5c071eaf6b1152b75d42 Mon Sep 17 00:00:00 2001 From: Poiuy7312 Date: Tue, 19 Sep 2023 16:14:46 -0400 Subject: [PATCH 24/35] style: got rid of checkmarks in util.py --- chasten/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chasten/util.py b/chasten/util.py index 859cb42d..039c3382 100644 --- a/chasten/util.py +++ b/chasten/util.py @@ -21,8 +21,8 @@ def get_human_readable_boolean(answer: bool) -> str: def get_symbol_boolean(answer: bool) -> str: """Produce a symbol-formatted version of a boolean value of True or False.""" if answer: - return f"[green]{checkmark_unicode}[/green]" - return f"[red]{xmark_unicode}[/red]" + return "[green]Yes[/green]" + return "[red]No[/red]" def get_chasten_version() -> str: From 2394e3972d91f2ab357633edeb12032a2fdf76dd Mon Sep 17 00:00:00 2001 From: Poiuy7312 Date: Tue, 19 Sep 2023 16:19:45 -0400 Subject: [PATCH 25/35] style: removed emoji in main.py --- chasten/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chasten/main.py b/chasten/main.py index 4039a60c..e1799b95 100644 --- a/chasten/main.py +++ b/chasten/main.py @@ -671,7 +671,7 @@ def analyze( # noqa: PLR0913, PLR0915 if not all_checks_passed: output.console.print("\n:sweat: At least one check did not pass.") sys.exit(constants.markers.Non_Zero_Exit) - output.console.print("\n:joy: All checks passed.") + output.console.print("\n:) All checks passed.") @cli.command() From 58ca98f5a4536e22426a6741a809f2a560d3a33f Mon Sep 17 00:00:00 2001 From: Poiuy7312 Date: Tue, 19 Sep 2023 21:13:25 -0400 Subject: [PATCH 26/35] style: added special character back to main.py --- chasten/main.py | 42 +++++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/chasten/main.py b/chasten/main.py index e1799b95..dd458fbe 100644 --- a/chasten/main.py +++ b/chasten/main.py @@ -115,7 +115,7 @@ def validate_file( # perform the validation of the configuration file (validated, errors) = validate.validate_configuration(yml_data_dict, json_schema) output.console.print( - f"# Validated {configuration_file_str}? {util.get_human_readable_boolean(validated)}" + f":sparkles: Validated {configuration_file_str}? {util.get_human_readable_boolean(validated)}" ) # there was a validation error, so display the error report if not validated: @@ -124,7 +124,7 @@ def validate_file( else: output.opt_print_log(verbose, newline="") output.opt_print_log( - verbose, label=f"# Contents of {configuration_file_str}:\n" + verbose, label=f":sparkles: Contents of {configuration_file_str}:\n" ) output.opt_print_log(verbose, config_file=configuration_file_yml) return validated @@ -161,7 +161,7 @@ def validate_configuration_files( application_author=constants.chasten.Application_Author, ) output.console.print( - "# Configuration directory:" + ":sparkles: Configuration directory:" + constants.markers.Space + chasten_user_config_dir_str + constants.markers.Newline @@ -365,7 +365,7 @@ def configure( # noqa: PLR0913 ) # display diagnostic information about the completed process output.console.print( - f"# Created configuration directory and file(s) in {created_directory_path}" + f":sparkles: Created configuration directory and file(s) in {created_directory_path}" ) # cannot re-create the configuration directory, so display # a message and suggest the use of --force the next time; @@ -440,7 +440,7 @@ def analyze( # noqa: PLR0913, PLR0915 verbose: bool = typer.Option(False, help="Enable verbose mode output."), save: bool = typer.Option(False, help="Enable saving of output file(s)."), ) -> None: - """* Analyze the AST of Python source code.""" + """💫 Analyze the AST of Python source code.""" # output the preamble, including extra parameters specific to this function output_preamble( verbose, @@ -484,7 +484,7 @@ def analyze( # noqa: PLR0913, PLR0915 # valid, so exit early and signal an error if not validated: output.console.print( - "\n# Cannot perform analysis due to configuration error(s).\n" + "\n:person_shrugging: Cannot perform analysis due to configuration error(s).\n" ) sys.exit(constants.markers.Non_Zero_Exit) # extract the list of the specific patterns (i.e., the XPATH expressions) @@ -511,17 +511,17 @@ def analyze( # noqa: PLR0913, PLR0915 input_path ) and not filesystem.confirm_valid_file(input_path): output.console.print( - "\n:# Cannot perform analysis due to invalid search directory.\n" + "\n:person_shrugging: Cannot perform analysis due to invalid search directory.\n" ) sys.exit(constants.markers.Non_Zero_Exit) # create the list of directories valid_directories = [input_path] # output the list of directories subject to checking output.console.print() - output.console.print(f"# Analyzing Python source code in: {input_path}") + output.console.print(f":sparkles: Analyzing Python source code in: {input_path}") # output the number of checks that will be performed output.console.print() - output.console.print(f"# Performing {len(check_list)} check(s):") + output.console.print(f":tada: Performing {len(check_list)} check(s):") output.console.print() # create a check_status list for all of the checks check_status_list: List[bool] = [] @@ -664,14 +664,14 @@ def analyze( # noqa: PLR0913, PLR0915 ) # output the name of the saved file if saving successfully took place if saved_file_name: - output.console.print(f"\n# Saved the file '{saved_file_name}'") + output.console.print(f"\n:sparkles: Saved the file '{saved_file_name}'") # confirm whether or not all of the checks passed # and then display the appropriate diagnostic message all_checks_passed = all(check_status_list) if not all_checks_passed: output.console.print("\n:sweat: At least one check did not pass.") sys.exit(constants.markers.Non_Zero_Exit) - output.console.print("\n:) All checks passed.") + output.console.print("\n:joy: All checks passed.") @cli.command() @@ -723,7 +723,7 @@ def integrate( # noqa: PLR0913 ) # output the list of directories subject to checking output.console.print() - output.console.print("# Combining data file(s) in:") + output.console.print(":sparkles: Combining data file(s) in:") output.console.print() output.print_list_contents(json_path) # extract all of the JSON dictionaries from the specified files @@ -736,7 +736,7 @@ def integrate( # noqa: PLR0913 ) # output the name of the saved file if saving successfully took place if combined_json_file_name: - output.console.print(f"\n#Saved the file '{combined_json_file_name}'") + output.console.print(f"\n:sparkles: Saved the file '{combined_json_file_name}'") # "flatten" (i.e., "un-nest") the now-saved combined JSON file using flatterer # create the SQLite3 database and then configure the database for use in datasett combined_flattened_directory = filesystem.write_flattened_csv_and_database( @@ -747,7 +747,7 @@ def integrate( # noqa: PLR0913 # output the name of the saved file if saving successfully took place if combined_flattened_directory: output.console.print( - f"\n# Created this directory structure in {Path(combined_flattened_directory).parent}:" + f"\n:sparkles: Created this directory structure in {Path(combined_flattened_directory).parent}:" ) combined_directory_tree = filesystem.create_directory_tree_visualization( Path(combined_flattened_directory) @@ -810,7 +810,7 @@ def datasette_serve( # noqa: PLR0913 metadata=metadata, ) # display diagnostic information about the datasette instance - label = "# Starting a local datasette instance:" + label = ":sparkles: Starting a local datasette instance:" display_serve_or_publish_details( label, database_path, metadata, port, publish=False ) @@ -882,7 +882,7 @@ def datasette_publish( # noqa: PLR0913 f":wave: Make sure that you have previously logged into the '{datasette_platform.value}' platform" ) # display details about the publishing step - label = f"# Publishing a datasette to {datasette_platform.value}:" + label = f":sparkles: Publishing a datasette to {datasette_platform.value}:" display_serve_or_publish_details(label, database_path, metadata, publish=True) # publish the datasette instance using fly.io; # this passes control to datasette and then to @@ -910,7 +910,15 @@ def log() -> None: # of the chasten tool server.start_syslog_server() +@cli.command() +def version(): + """Display the version of Chasten.""" + # Get Chasten version from util file + version_string = util.get_chasten_version() + # output chasten version + typer.echo(f"{version_string}") + # --- # End region: Command-line interface functions }}} -# --- +# --- \ No newline at end of file From 92815b131b046bf1715c2835700b25cb892b996d Mon Sep 17 00:00:00 2001 From: Poiuy7312 Date: Tue, 19 Sep 2023 21:13:46 -0400 Subject: [PATCH 27/35] style: Added special characters back --- chasten/constants.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chasten/constants.py b/chasten/constants.py index f45091a4..51963182 100644 --- a/chasten/constants.py +++ b/chasten/constants.py @@ -29,7 +29,7 @@ class Chasten: Application_Name="chasten", Application_Author="ChastenedTeam", Chasten_Database_View="chasten_complete", - Emoji="*", + Emoji=":dizzy:", Executable_Fly="fly", Executable_Vercel="vercel", Https="https://", @@ -40,7 +40,7 @@ class Chasten: Tagline="chasten: Analyze the AST of Python Source Code", Theme_Background="default", Theme_Colors="ansi_dark", - Website="GitHub: https://github.com/gkapfham/chasten", + Website=":link: GitHub: https://github.com/gkapfham/chasten", ) From 23fff71f5711ca1a82b0c7b145d312b1b2185442 Mon Sep 17 00:00:00 2001 From: Poiuy7312 Date: Tue, 19 Sep 2023 21:14:06 -0400 Subject: [PATCH 28/35] style: added special characters back to util.py --- chasten/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chasten/util.py b/chasten/util.py index 039c3382..859cb42d 100644 --- a/chasten/util.py +++ b/chasten/util.py @@ -21,8 +21,8 @@ def get_human_readable_boolean(answer: bool) -> str: def get_symbol_boolean(answer: bool) -> str: """Produce a symbol-formatted version of a boolean value of True or False.""" if answer: - return "[green]Yes[/green]" - return "[red]No[/red]" + return f"[green]{checkmark_unicode}[/green]" + return f"[red]{xmark_unicode}[/red]" def get_chasten_version() -> str: From 9004f8428527bc59f8738718c2eb2cafd79f5550 Mon Sep 17 00:00:00 2001 From: Poiuy7312 Date: Tue, 19 Sep 2023 21:14:34 -0400 Subject: [PATCH 29/35] fix: trying to change encoding for workflow. --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 50a73f0c..13f6ddff 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,6 +4,7 @@ name: build # Use more columns for terminal output env: COLUMNS: 120 + PYTHONIOENCODING: utf8 # Controls when the action will run # Workflow begins with push or PR events From 6a4ce733562a56a2135f1a02d8150938ba9637db Mon Sep 17 00:00:00 2001 From: Poiuy7312 Date: Tue, 19 Sep 2023 21:19:31 -0400 Subject: [PATCH 30/35] style: fixed formatting in main.py --- chasten/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chasten/main.py b/chasten/main.py index dd458fbe..8d2b27bf 100644 --- a/chasten/main.py +++ b/chasten/main.py @@ -910,6 +910,7 @@ def log() -> None: # of the chasten tool server.start_syslog_server() + @cli.command() def version(): """Display the version of Chasten.""" @@ -921,4 +922,4 @@ def version(): # --- # End region: Command-line interface functions }}} -# --- \ No newline at end of file +# --- From 6459e7b022b47a4d4fa82c30fddafa18d72b4b15 Mon Sep 17 00:00:00 2001 From: Poiuy7312 Date: Tue, 19 Sep 2023 21:26:32 -0400 Subject: [PATCH 31/35] revert: removed Work-flow branch from workflow --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 13f6ddff..ae3fe94b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,7 @@ env: # Focuses on the master branch only on: push: - branches: [ master, Work-flow-changes-to-check-more-OS ] + branches: [ master ] pull_request: branches: [ master ] From 5a2b0ed9b9bb6130255fe50e9dd7d7a564908977 Mon Sep 17 00:00:00 2001 From: Poiuy7312 Date: Wed, 20 Sep 2023 08:57:05 -0400 Subject: [PATCH 32/35] style: reformatted main.py and util.py --- chasten/main.py | 8 -------- chasten/util.py | 6 ++++-- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/chasten/main.py b/chasten/main.py index 336ab9e1..8d2b27bf 100644 --- a/chasten/main.py +++ b/chasten/main.py @@ -910,14 +910,6 @@ def log() -> None: # of the chasten tool server.start_syslog_server() -@cli.command() -def version(): - """Display the version of Chasten.""" - # Get Chasten version from util file - version_string = util.get_chasten_version() - # output chasten version - typer.echo(f"{version_string}") - @cli.command() def version(): diff --git a/chasten/util.py b/chasten/util.py index 3a381947..12be6745 100644 --- a/chasten/util.py +++ b/chasten/util.py @@ -44,9 +44,11 @@ def get_chasten_version() -> str: try: # if importlib.metadata fails, try using pkg_resources # The 'distribution' variable holds information about the 'chasten' package - distribution= pkg_resources.get_distribution(constants.chasten.Application_Name) + distribution = pkg_resources.get_distribution( + constants.chasten.Application_Name + ) # Retrieve version information from distribution - version_string_of_foo= distribution.version + version_string_of_foo = distribution.version except pkg_resources.DistributionNotFound: # If both methods fail, return a default version version_string_of_foo = default_chasten_semver.version From 5b86af36c6a7b44ef34af234713b8e7e72de6b2f Mon Sep 17 00:00:00 2001 From: Poiuy7312 Date: Wed, 20 Sep 2023 08:59:53 -0400 Subject: [PATCH 33/35] fix: got rid of .version for a string in util.py --- chasten/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chasten/util.py b/chasten/util.py index 12be6745..7c6b7170 100644 --- a/chasten/util.py +++ b/chasten/util.py @@ -51,7 +51,7 @@ def get_chasten_version() -> str: version_string_of_foo = distribution.version except pkg_resources.DistributionNotFound: # If both methods fail, return a default version - version_string_of_foo = default_chasten_semver.version + version_string_of_foo = default_chasten_semver return version_string_of_foo From 0de2ae4a4d96bb5df57cd3f68167528783a0accc Mon Sep 17 00:00:00 2001 From: Poiuy7312 Date: Wed, 20 Sep 2023 10:13:20 -0400 Subject: [PATCH 34/35] fix: removed version command from main --- chasten/main.py | 10 ---------- chasten/util.py | 12 +----------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/chasten/main.py b/chasten/main.py index 8d2b27bf..20d22a9c 100644 --- a/chasten/main.py +++ b/chasten/main.py @@ -910,16 +910,6 @@ def log() -> None: # of the chasten tool server.start_syslog_server() - -@cli.command() -def version(): - """Display the version of Chasten.""" - # Get Chasten version from util file - version_string = util.get_chasten_version() - # output chasten version - typer.echo(f"{version_string}") - - # --- # End region: Command-line interface functions }}} # --- diff --git a/chasten/util.py b/chasten/util.py index 7c6b7170..af23d86d 100644 --- a/chasten/util.py +++ b/chasten/util.py @@ -1,7 +1,6 @@ """Utilities for use within chasten.""" import importlib.metadata -import pkg_resources from chasten import constants @@ -41,16 +40,7 @@ def get_chasten_version() -> str: # there is not a working package that importlib.metadata can access with a version; # in this situation the function should return the default value of 0.0.0 except importlib.metadata.PackageNotFoundError: - try: - # if importlib.metadata fails, try using pkg_resources - # The 'distribution' variable holds information about the 'chasten' package - distribution = pkg_resources.get_distribution( - constants.chasten.Application_Name - ) - # Retrieve version information from distribution - version_string_of_foo = distribution.version - except pkg_resources.DistributionNotFound: - # If both methods fail, return a default version + # If method fails, return a default version version_string_of_foo = default_chasten_semver return version_string_of_foo From 0861276dca70e5401c25df3c35d0998fcaa50ee7 Mon Sep 17 00:00:00 2001 From: Poiuy7312 Date: Wed, 20 Sep 2023 10:16:47 -0400 Subject: [PATCH 35/35] style: reformatted main & util --- chasten/main.py | 1 + chasten/util.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/chasten/main.py b/chasten/main.py index 20d22a9c..f6ed91f6 100644 --- a/chasten/main.py +++ b/chasten/main.py @@ -910,6 +910,7 @@ def log() -> None: # of the chasten tool server.start_syslog_server() + # --- # End region: Command-line interface functions }}} # --- diff --git a/chasten/util.py b/chasten/util.py index af23d86d..8269dfae 100644 --- a/chasten/util.py +++ b/chasten/util.py @@ -40,8 +40,8 @@ def get_chasten_version() -> str: # there is not a working package that importlib.metadata can access with a version; # in this situation the function should return the default value of 0.0.0 except importlib.metadata.PackageNotFoundError: - # If method fails, return a default version - version_string_of_foo = default_chasten_semver + # If method fails, return a default version + version_string_of_foo = default_chasten_semver return version_string_of_foo