question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add default `frictionless` CLI command

See original GitHub issue

Overview

Currently, we have these commands:

  • frictionless describe
  • frictionless extract
  • frictionless validate
  • [coming] frictionless analyze
  • etc

We’d like to have (note there is no action):

$ frictionless table.csv

# Describe

[resource/schema as a table]

# Extract

[first X lines of the data as a table]

# Validate

## Summary

[validation summary table]

## Errors 

[validation errors table]

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
rollcommented, Jun 6, 2022

@shashigharti As a current quick-fix:

you can use this in `program.main’ for program creation

# Program


# TODO: remove this hack when Typer supports not-found commands catching
# <link to the typer issue>
class Program(typer.Typer):
    def __call__(self, *args, **kwargs):
        if sys.argv[1].count("."):
            sys.argv = [sys.argv[0], "summary", sys.argv[1]]
        return super().__call__(*args, **kwargs)


program = Program()

Can you please also create a feature request for Typer? I would say that we’d like to have an ability to catch not found commands or something like this

1reaction
rollcommented, Jun 6, 2022

Currently, it doesn’t seem to be possible to provide a default command the way we want with Typer - https://github.com/tiangolo/typer/issues/18

We will implement a normal command “summary” - frictionless summary table.csv - and then @roll will think how we can call it also as the default

Read more comments on GitHub >

github_iconTop Results From Across the Web

Running CLI - Frictionless Framework
For the describe command you get a metadata back and you can choose in what format to return it: CLI. frictionless describe #...
Read more >
[FEATURE] Set a defaut command in multiple commands #18
I wanna to be able to set a default command when I have multiples commands. For example, with: import typer app = typer....
Read more >
data: Command Line Tool - Docs - DataHub
It is a command line tool that helps you to publish (and get) data. ... Note: by default, findability flag for your dataset...
Read more >
Set defaults for gcloud commands | Artifact Registry ...
A default configuration is created when you initialize Google Cloud CLI and you can ... To set default project for all gcloud commands,...
Read more >
Command line options - AWS Documentation
In the AWS CLI, command line options are global parameters you can use to override the default configuration settings, any corresponding profile setting, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found