Skip to content

Commit

Permalink
Milestone 1 (#20)
Browse files Browse the repository at this point in the history
* Add Tenants list functionality; Change tenant in settings to base_url

* Fixing authentication error

* Can now upload all contents of a folder to a system at once

* update base url to remove env name if env name is prod

* Add message on individual file uploads

* grant user perms in systems

* Adding permissions and ownership changing between users for systems and apps.

* Why waste time use more word when less word do trick

* Giving a user the option to revoke permissions on a system or app

* Create a name and description from datetime-appid-user. If user passes additional args, use those to create username and password instead

* Users can search for systems via system attributes, enable/disable systems, and check system availability.

* Adding PATCH functions for systems and apps; adding documentation to each function; fixing some formatting errors

* Update README.md; change credentials.ini to configs.ini and update refs to that file; Clean settings.py

* Refactor auth and config

* Remove bug in credential check in authenticator

* Update readme

* Readme update

* Updating documentation and layout.

* Disable readcheck and similar methods on the TapisCommand class

* Rename Command to Category and action to command

* Apply Command->Category rename to Auth category

* Adding more documentation and tweaking formatting.

* Refactor Logger from core to utils

* Remove templates

* Rename Resolver->Reouter; TapisCommand->TapipyCategory. Start to implment default TapipyCategory no  user-defined category exists

* More documentation and formatting.

* Adding the rest of the documentation needed thus far and tweaked import order.

* A small update to file upload complete and error messages.

* Add base errors; Start handling for generic category

* Comment in settings.py

* Task/1  generic category command handling (#5)

* Space in comment

* Handle for generic categories and commands that have not been set by the user

* Parse command-line keyword args, positional args, and options, and pass them to OpenApiCategory commands

* Add error handling in OpenApiCategory execution method

* Add github pull request template

* Check provided keyword args against the operations required path_parameters (#12)

* Removing the spaces at the beginning and end of the single-line docstrings to conform to standards; also adding missing docstrings. (#13)

* Task/15  convert prints to logger newlines (#16)

* Added a warning to upload_folder telling the user that subfolders won't be uploaded (to be added later).

* Converting print() newline statements in category modules to new logger method: Logger.newline()

* Task/7  argument options (#18)

* Check provided keyword args against the operations required path_parameters

* Parse for and set argument options

* Isolate arg_options from positional args. Create variables for regex patterns

* Re-add commend

* Implement arg option handler class in OpenApiCategory

* Task/17  display logic abstraction (#19)

* Replace tapipy category inheritence with client initialization logic in OpenApiCategory constructor

* Decouple options from the handler; Options object; OptionRegistrar; Move handlers to a file as standalone functions

* OpenApiCategory to use new option handling mechanism

* Change set_options to set_cmd_options. Add 'dependencies' attribute to Option

* Update every instance of option to cmd_option in the Router

* Move options to configs dir. Add core.all category and start 'use' functionality in OptionRegistrar

* cleanup old handlers. Update refs to old category props.

* fix .gitignore. fix handlers

* Bugfix: handle for spaces in arguments

* Debug and comment updates

* Move options to core

* Run handlers in order based on Option.context

* Add OptionSet class. Remove args as theyre parsed. Move arg_option parsing to Category class.

* Rename TapipyCategory -> TapisCategory; Update import statements

* Rename OpenApiCategory -> TapipyCategory; Update import statements

* Rename OpenApiCategory->TapipyCategory

* Explicitly set state in OptionSet __init__

* Explicitly set state in Category __init__

* Remove logging statements

* Explicitly set state in Router __init__

* Explicitly set state in Router __init__

* Remove debug statements; Parse command args and validate them against provided options for the invoked category

* Fix bad spelling. indicies->indices

* Restructure arg options; Handle for multiple params for a given option.

* Move application code to src

* Explicitly set state in __init__ of Authenticator

* Move option_sets and handlers to src/options

* Rename Category to Controller to reflect its role in the architecture; Update all references to category

* Updated tapipy

* Rename cmd context to generic; Start Views: AbstractView and TableView

* Add module_loader util. Add 2 TapisResult views.

* Update categories to controllers in main; Rename execute method in Controller to invoke. Add -s option and handler.

* Add opts and handlers for -t,-r,-s. Rename contexts to generic, args, and result to properly relect the parts of the controller they act upon

* Show missing keyword arguments in TapipyController

* Fix spelling mistakes and error in Local Setup section

Co-authored-by: Tyler Clemens <[email protected]>
Co-authored-by: Tyler-Clemens <[email protected]>
  • Loading branch information
3 people authored Oct 7, 2021
1 parent 9e00a51 commit 0764f61
Show file tree
Hide file tree
Showing 45 changed files with 1,767 additions and 688 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Auth credentials
configs/tacc_credentials
configs/credentials.ini
src/configs/*
!src/configs/settings.py
!src/configs/options.py

# Definitions for tapis entities
definitions
Expand Down
33 changes: 31 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
#TapisV3 CLI#
# TapisV3 CLI

TapisV3 CLI is a command line interface tool written in python that wraps the tapipy library to enable user to make fast and efficient calls to tapisv3 APIs.

## Installation
tapis-cli can be set up and run in 2 ways; Locally, and in a Docker container.

### Local setup
**Clone the repo**\
`git clone https://github.com/nathandf/tapis-cli.git`

**Navigate to the 'src' directory of the project where tapis.sh is found**\
`cd ./tapis-cli/src`

**Initialize a virtual env**\
`pipenv shell`

**Install Tapipy**\
`pip install tapipy`

**Add the following line in your .bashrc file**
`alias tapis="<path/to/tapis_cli_project>/src/tapis.sh"`

### Container setup

## Configuring Tapis CLI
Tapis CLI must first be configured. Run the following command and add your credentials\
$`tapis auth configure`

### General Usage
$`tapis [category] [command] [args]`

TapisV3 CLI is a command line interface tool written in python that wraps the tapipy library to enable user to make fast and efficient calls to tapisv3 APIs.
91 changes: 0 additions & 91 deletions commands/Apps.py

This file was deleted.

57 changes: 0 additions & 57 deletions commands/Files.py

This file was deleted.

63 changes: 0 additions & 63 deletions commands/Jobs.py

This file was deleted.

91 changes: 0 additions & 91 deletions commands/Systems.py

This file was deleted.

18 changes: 0 additions & 18 deletions configs/settings.py

This file was deleted.

Loading

0 comments on commit 0764f61

Please sign in to comment.