-
Notifications
You must be signed in to change notification settings - Fork 0
Entrypoint #38
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
Merged
Merged
Entrypoint #38
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
168baa8
:bug: update how to run example, set default
0953cba
:art: also print instructions to stdout
2d6a3e0
:sparkles: add entrypoint to package
9befb3c
:wrench: extend integration testing to quarto
3a56a0a
:wrench: add all report types (based on quatro)
7aa15dd
:art: prepare entrypoint (needs a fct)
176981a
:art: add entry point to script
712274d
:art: display help message if no config or dir is given.
d1a4497
🐛 Fix(quarto_reportview): Fix jupyter report errro by using the quart…
sayalaruano 4fed80b
🎨 Style(cdci.yml, pyproject.toml): Fix typos, unnecesary spaces and u…
sayalaruano File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| import sys | ||
| from pathlib import Path | ||
|
|
||
| from vuegen import report_generator | ||
| from vuegen.utils import get_logger, get_parser | ||
|
|
||
|
|
||
| def main(): | ||
| # Parse command-line arguments | ||
| parser = get_parser(prog_name="VueGen") | ||
| args = parser.parse_args() | ||
|
|
||
| # Determine the vuegen arguments | ||
| config_path = args.config | ||
| dir_path = args.directory | ||
| report_type = args.report_type | ||
| streamlit_autorun = args.streamlit_autorun | ||
|
|
||
| # Determine the report name for logger suffix | ||
| if config_path: | ||
| report_name = Path(config_path).stem | ||
| elif dir_path: | ||
| report_name = Path(dir_path).name | ||
| else: | ||
| print("Please provide a configuration file or directory path:\n") | ||
| # https://docs.python.org/3/library/argparse.html#printing-help | ||
| parser.print_help() | ||
| sys.exit(1) | ||
|
|
||
| if config_path and dir_path: | ||
| print("Please provide only one of configuration file or directory path:\n") | ||
| parser.print_help() | ||
| sys.exit(1) # otherwise could resort to either or ? | ||
|
|
||
| # Define logger suffix based on report type and name | ||
| logger_suffix = f"{report_type}_report_{str(report_name)}" | ||
|
|
||
| # Initialize logger | ||
| logger = get_logger(f"{logger_suffix}") | ||
|
|
||
| # Generate the report | ||
| report_generator.get_report(report_type=report_type, | ||
| logger=logger, | ||
| config_path=config_path, | ||
| dir_path=dir_path, | ||
| streamlit_autorun=streamlit_autorun) | ||
|
|
||
| if __name__ == '__main__': | ||
| main() |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey! Why is it necessary to change the directory to docs? In my local environment, it's working when I execute the program from the base folder, not from docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to check when I am back, but you could double check in a clean environment within a code space on that branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I will check that out. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tested in a code space clean environment and it works without changing the directory to docs. Also, I identified some errors with the docx, odt, and pdf formats when converting a df into an image:
OSError: Chrome executable not able to be found on your machine
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well. Then this is another requirement. So which tool relies on chronium? Probably something for the interactive dataframes (itables)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why
cd docs:vuegenis on the main folder, not jet using thesrclayout, i.e. moving the packages into a separatesrcfolder.docs/conf.pyfile. In the end someone who uses the report generator will have only a folder resembling the docs.In short: yes we can remove the docs, but let's to it in a separate PR where we change the layout of the repo.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that
dataframe_imageis the one that relies on chromium.It's ok to remove the cd docs in an independent PR. And should we merge the current PR into the meain with the
cd docs?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will do it now.