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

#Feature: Auto json conversion using pipe(|). #68

Closed
ghost opened this issue Apr 11, 2018 · 24 comments
Closed

#Feature: Auto json conversion using pipe(|). #68

ghost opened this issue Apr 11, 2018 · 24 comments

Comments

@ghost
Copy link

ghost commented Apr 11, 2018

Read-Me:

  • As per discussion with @prashanthellina while running the Basescript code intially it will write pretty format logs to the console.
    screen shot 2018-04-11 at 3 15 36 pm
  • If we specify pipe(|) after the command it must print json format to the console.
    ex: python test.py run | jq -C . | less -R
@ghost ghost added the Type: Enhancement label Apr 11, 2018
@supriyopaul
Copy link
Contributor

Can you do the reverse too?
Like for a given log file I can pipe it with basescript pretty
image
image

Below is the code for pretty.py can you please make it a command line tool?

import sys                                                                                                                                                                               
import ujson as json                                                                                                                                                                     
from structlog.dev import ConsoleRenderer                                                                                                                                                
                                                                                                                                                                                         
def main():                                                                                                                                                                              
    c = ConsoleRenderer()                                                                                                                                                                
    for line in sys.stdin:                                                                                                                                                               
        d = json.loads(line)                                                                                                                                                             
        print(c(None, None, d))                                                                                                                                                          
                                                                                                                                                                                         
if __name__ == '__main__':                                                                                                                                                               
    main()

@supriyopaul
Copy link
Contributor

Any status on the feature of making basescript logs inside files more readable? I need it for debugging.

@ghost
Copy link
Author

ghost commented Nov 23, 2018

@supriyopaul

  • We have a high priority works of deepfetch because of that we didn't work on it yet. so will do it later or else if you are free you can do it and give me a pull I will review it.

@jaswanth098
Copy link
Contributor

Not working on this actively

@sundarrajan78
Copy link
Contributor

@jaswanth098 I am snoozing this for 1 month.

prashanthellina added a commit that referenced this issue Jul 7, 2021
references #68, basescript is now a command-line tool which supports …
@prashanthellina
Copy link
Member

Even to make a manual Github release merging is blocked because the Travis checks didn't happen. We will have to change the settings of repo to remove the constraint of checks to be passed for merges. For this, we don't have proper permissions.

Gave admin access to @sundarrajan78. I force merged and made a github release. Please ensure that PyPI release was done for this too if not go ahead and do it.

@shivam05011996
Copy link
Contributor

I Will look into it later today, working on priority on https://github.com/nudjur/backend/issues/644.

@shivam05011996
Copy link
Contributor

Looking into this.

@shivam05011996
Copy link
Contributor

Made the test release to https://test.pypi.org/legacy/ upload and installation was successful
Made the release to private PyPI at http://pypi.deepcompute.com/simple upload and installation was successful

Uploading to global PyPI did not go through because of some authentication errors and few invalid URLs -
image

@shivam05011996
Copy link
Contributor

Have uploaded to global PyPi, I was using the wrong credentials. @prashanthellina Can we close this.?

@prashanthellina
Copy link
Member

@shivam05011996 Thank you. Will upload to PyPI happen automatically next time?

@shivam05011996
Copy link
Contributor

We need to configure GitHub actions for that @prashanthellina . Earlier we used to have Travis for this.

@prashanthellina
Copy link
Member

Thank you @shivam05011996

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants