Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

chore: ruff improvements #359

Merged
merged 13 commits into from
Nov 23, 2023
Merged

chore: ruff improvements #359

merged 13 commits into from
Nov 23, 2023

Conversation

negar-abbasi
Copy link
Contributor

@negar-abbasi negar-abbasi commented Nov 21, 2023

Fixes #

Proposed Changes

  • updating vscode setting as formatting/linting have been deprecated in favour of dedicated extensions
  • working with ruff formatter instead of black

Copy link

github-actions bot commented Nov 21, 2023

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/algokit
   __init__.py15753%6–13, 17–24, 32–34
   __main__.py220%1–3
src/algokit/cli
   completions.py108298%83, 98
   deploy.py72790%44, 46, 92–94, 158, 182
   dispenser.py118199%75
   doctor.py48394%142–144
   explore.py501276%34–39, 41–46
   generate.py63198%118
   goal.py39197%57
   init.py1901692%273–274, 324, 327–329, 340, 384, 410, 450, 459–461, 464–469, 482
   localnet.py93397%162, 183–184
src/algokit/cli/common
   utils.py26292%120, 123
src/algokit/cli/tasks
   assets.py821384%65–66, 72, 74–75, 105, 119, 125–126, 132, 134, 136–137
   ipfs.py541180%54, 84, 89–91, 96, 98–99, 109–111
   mint.py66494%48, 70, 91, 250
   send_transaction.py651085%52–53, 57, 89, 158, 170–174
   sign_transaction.py59886%21, 28–30, 71–72, 109, 123
   transfer.py37392%25, 89, 116
   utils.py994555%26–34, 40–43, 75–76, 100–101, 125–133, 152–162, 209, 258–259, 279–290, 297–299
   vanity_address.py561082%41, 45–48, 112, 114, 121–123
   wallet.py79495%21, 66, 136, 162
src/algokit/core
   bootstrap.py1612485%103–104, 126, 149, 214, 217, 223–237, 246–251
   conf.py54885%10, 24, 28, 36, 38, 71–73
   deploy.py691184%61–64, 73–75, 79, 84, 91–93
   dispenser.py2022687%91, 123–124, 141–149, 191–192, 198–200, 218–219, 259–260, 318, 332–334, 345–346, 356, 369, 384
   doctor.py65789%67–69, 92–94, 134
   generate.py41295%68, 86
   goal.py60395%30–31, 41
   log_handlers.py68790%50–51, 63, 112–116, 125
   proc.py45198%98
   sandbox.py1991692%70, 116–123, 134, 429, 445, 460–462, 478
   typed_client_generation.py80594%55–57, 70, 75
   utils.py18289%27–28
   version_prompt.py72889%26–27, 39, 58–61, 79, 108
src/algokit/core/tasks
   ipfs.py57493%133, 137, 139, 145
   nfd.py491373%25, 31, 34–41, 70–72, 99–101
   vanity_address.py903462%49–50, 54, 59–75, 92–108, 128–131
   wallet.py71593%37, 129, 155–157
src/algokit/core/tasks/mint
   mint.py781087%123–133, 187
   models.py901188%50, 52, 57, 71–74, 85–88
TOTAL318436289% 

Tests Skipped Failures Errors Time
382 0 💤 0 ❌ 0 🔥 13.338s ⏱️

@negar-abbasi negar-abbasi marked this pull request as ready for review November 21, 2023 05:30
.vscode/settings.json Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
src/algokit/core/proc.py Outdated Show resolved Hide resolved
tests/init/test_init.py Outdated Show resolved Hide resolved
tests/init/test_init.py Outdated Show resolved Hide resolved
debug.py Outdated Show resolved Hide resolved
@negar-abbasi negar-abbasi changed the title refactor: Refactor/ruff improvements chore: Refactor/ruff improvements Nov 22, 2023
@negar-abbasi negar-abbasi changed the title chore: Refactor/ruff improvements chore: ruff improvements Nov 22, 2023
@robdmoore
Copy link
Contributor

Closes #356

@negar-abbasi
Copy link
Contributor Author

negar-abbasi commented Nov 23, 2023

@robdmoore, in updating our templates, we got a warning regarding the ruff format:

warning: ruff format is a work-in-progress, subject to change at any time, and intended for internal use only.

reviewing this with @neilcampbell, we realized that ruff is in a beta version but production ready state. Given this uncertainty, it seems better to continue using the Black formatter for now and hold off on integrating ruff into our templates until it reaches a more stable release phase.

@neilcampbell
Copy link
Contributor

neilcampbell commented Nov 23, 2023

Just to add a bit more context to the above, we are planning to switch to Ruff for formatting in the repos we control and can easily handle any breaking changes in. We will however hold off on updating the templates until there is a stable release of the Ruff formatter, as to minimise any potential impact to developer projects created from the templates.

@achidlow
Copy link
Contributor

Yep, that's a good plan - that's what I thought we'd be doing :)

@negar-abbasi negar-abbasi merged commit e0f5a55 into main Nov 23, 2023
3 checks passed
@@ -3,7 +3,8 @@
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
// Don't want to use isort because it conflicts with Ruff - see run on save below
"source.organizeImports": false
"source.organizeImports": true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can probably remove the comment now.

@negar-abbasi negar-abbasi deleted the refactor/ruff-improvements branch November 24, 2023 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants