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

reworking wright-tools entry points #1152

Merged
merged 34 commits into from
Feb 21, 2024
Merged

reworking wright-tools entry points #1152

merged 34 commits into from
Feb 21, 2024

Conversation

ddkohler
Copy link
Contributor

@ddkohler ddkohler commented Jan 30, 2024

Changes

  • old entry point wt-tree removed
  • new entry point wt-convert for cli access to our unit conversions (resolves wt-convert entry point #653)
  • new entry point wt5 with commands tree, load, glob, explore
  • minor changes to print_tree formatting
  • kit: added directory search/query utilities for wt5 type files and wt5 entry point for such utilities

Checklist

  • added tests, if applicable
  • updated documentation, if applicable
  • updated CHANGELOG.md
  • tests pass

@ksunden
Copy link
Member

ksunden commented Jan 30, 2024

for the record, wt-tree is a reference to the unix command tree, which prints the similar format for directory trees in a file system:

I would lean towards conversions and loading being separate commands, personally, though I don't necessarily have a problem with extending wt-tree to look through directory structures (though you may wish to rework some of the formatting, including potentially looking at a dependency to help such as rich and differentiating style/icons/etc between directories and wt5 internal structures)

@ddkohler
Copy link
Contributor Author

for the record, wt-tree is a reference to the unix command tree, which prints the similar format for directory trees in a file system

yeah, I totally agree it's not right to call everything under wt-tree. I really wish I use wt as an entry point (and then have subcommands), but that isn't a great option for Windows...

I will definitely rework the namespace to make it fit better with the tools.

@ddkohler ddkohler changed the title [WIP] reworking wright-tools entry points reworking wright-tools entry points Feb 20, 2024
@ddkohler ddkohler marked this pull request as ready for review February 20, 2024 23:52
number = int(number)
sig_figs = len(str(number))
sig_figs -= 1 if "." in str(number) else 0

Copy link
Contributor

Choose a reason for hiding this comment

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

Guess we are presuming no Europeans who use commas instead of decimal points...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Europeans have to use . when working with python anyways (unless they change default formatting). In any case, I don't see our notation as a meaningful hindrance. I am fine with the syntax as is until someone raises an issue.



if __name__ == "__main__":
cli()
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need a CLI?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was a feature request (issue #653). A quick entry point to check how units convert (according to wright tools)

@kameyer226 kameyer226 merged commit 3c03f8e into master Feb 21, 2024
17 checks passed
@kameyer226 kameyer226 deleted the wt-tree branch February 21, 2024 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

wt-convert entry point
3 participants