Changelog
Sean Collings edited this page Jul 17, 2021
·
14 revisions
Check out the most recent, and all, versions of Arc.
- Removed
arc.convert
- Moved conversion functionality into the
arc.types
package - Removed
File
,Range
,ValidPath
, use their callback counterparts instead - Changed
arg_aliases
toshort_args
and only allow single-character entries - Fish autcompletions reimplemented
- Help documentation Arguments section parsing
- Added
stdin
andstderr
callbacks - Made the
StandardParser
the default parser
- StandardParser now accepts **kwargs
- When a command or argument is not valid, arc can now perform a quick check to see if it's likely a misspelling, then suggest the alternative. This can be toggled on and off in the configuration.
- Renamed
@cli.base
to@cli.default
, removedCommand.base
- Added
@command
decorator - Fixed bug that caused
@cli.default
to not check args properly - added
color.colorize()
- Added Standard Parsing Method (
--name value --other-name value2
) - Added back Raw parser
- Improved generation of usage docs
- Improved Formatting for
help
command
- Changes the way that arc handles logging
- Major improvements / house-cleaning of most of the infrastructure
- CommandType has been renamted to ParsingMethod
- Implemented callback system
- Simplified the Configuration object
- Implemented command aliases and argument aliases
- added
arc
executable - Tests written using
pytest
- API Docs!
- More data types are available
- Fixed bug where a the list converter could not accept only a single item
- Moved the internals for locating the command to excute, and printing out the help information
- Added Command Aliases
- Added
arc.prompt
- Can modify the behavior of the tool when no command is provided with
@cli.base
- Multiple Commands can be installed for the same function
- Adds autocompletion support for the fish shell
- Adds Command autoloading support
- Beefed up the Config
- Config is internally more rigidly defined
- Exposes it's functionality for making tool-related config objects
- Fixed issue with emojis not being parsed properly (probably happened with other Unicode characters too)
-
fg.hex
andbg.hex
- Improves error handling for type conversion errors
- Adds the
presenter
package. Still in dev, so documentation non-existant currently
- Context can now be subclassed for typing and extra functionality
- Arc support kebab-case on the command line
- Calling
Command#base
now internal data based on the new function provided
- Fixed an issue where installing subcommands into a namespace, then installing that namespace into parent would cause the context to not propagate properly.
- Added
Command#install_commands
as a wrapper aroundCommand#install_command
for installing multiple commands at once. Returns a tuple containing all the command objects
- Renamed scripts to comands
- Ditched the Concept of scripts and script containers. Commands contain their own subcommands
- Commands can be arbitrarily nested
- added
namespace
function for creating a subcommand not attached to the CLI - Got rid of the Utility class (use
namespace
) instead - Added
context
- Improved parser
- Tons of general code improvement
- Fixed a bug with the
SelectionMenu
UI where state from a previous class instance would persist into a new class instance
- Improved Error handling
- replaced
debug
andlog
config options with a singleloglevel
that expects one of the standard python loglevels (loggin.DEBUG
,logging.WARNING
etc...) - When
loglevel
is not set explictly, it is set tologging.WARNGING
. All exceptions will just log the error message. When set to debug, tracebacks will be logged along with error messages
- replaced
- Added UI package and a basic
SelectionMenu
class. Check here for details. - Modified the
color
module- Removed the
background
method on foreground colors. Now bacground colors are only available through thebg
class - added an
rgb
function to bothfg
andbg
which take in values for Red, Green, and Blue in range [0, 255]
- Removed the
- Added File type
- General code improvements
- Implmented different ScriptTypes that interpret input differently
- Added supprot for Type Alias conversions, like
List[int]
currently only supports Union, List, Set, and Tuple Alias - Quoted options (option_name="option with spaces") function properly again
- Parser now enables the use of anon scripts
- Arc no longer errors when a .arc file is not present (whoops)
- Users can now implement a custom script class to handle user input
- Implemented a parsing engine for the user input
- Removed no_args special script (can just use a anon script with no args)
- Input functions for each converter (convert_to_<converter_name>)
- Removed
pass_args
andpass_kwargs
- Added
convert
paramater to scripts
- Implemented No arg scripts
- Implemented anonymous scripts
- Abstracted timer to decorator, so it can be used to test the speed of any function
- Fixed the mess that is the logger
- Implemented interactive mode (
-i
) - Expanded script options to be their own class
- Implemented boolean flags
- Rethought how to manage args and kwargs (pass_args, pass_kwargs)
- added tests for examples, builtin utilities, and the script class
- Rethink of the Config design. Now works soleyly as a module
- Introduced the .arc file for setting loading
- Major refactor for scripts to be instances of a Script class rather than have all the data in one dictionary
- CLI refactored accordingly to handle this changed
- I honestly think I messed up the tags on this one since 0.4 and 0.5 are right next to each other
- Implemented Type converters
- Huge amount of documentation added
- Various cleanups
- Added Tests
Intial terrible design for the CLI used in one of my work projects (not even worth talking about honestly)