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

Data transfer to user provided FTP #3

Merged
merged 4 commits into from
Nov 28, 2014
Merged

Data transfer to user provided FTP #3

merged 4 commits into from
Nov 28, 2014

Conversation

senthil10
Copy link
Contributor

Sometimes user outside sweden have problem with accessing data in UPPMAX, so they ask to upload the data in a FTP server which they setup. This is a standalone script which can be run and it uploads the data preserving the tree structure.

Though its not more often, it might come handy when the occasion comes and save lot of time in writing a script again.

password: xxxx
project: xxxx
uppmaxid: xxxx"""

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This format is not preserved in the help output i.e. I expect it to print as such but it collapses the yaml format and prints as one line. Any suggestions ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://docs.python.org/2/library/argparse.html#formatter-class

Passing RawDescriptionHelpFormatter as formatter_class= indicates that description and epilog are already correctly formatted and should not be line-wrapped:

formatter_class=argparse.RawDescriptionHelpFormatter,

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or you can use the syntax that @mariogiov discovered:

config_file_format = ("Input config file should be in following format, especially the key/header "
                        "names should be same as in the example, else the list 'config_keys' in "
                        "source code should be changed to match the key names as in config file"

                        "[ftp]"
                        "domain: xxxx"
                        "port: xxxx"
                        "username: xxxx"
                        "password: xxxx"
                        "project: xxxx"
                        "uppmaxid: xxxx")

Is not that nice, just that you know it exists, but better use @ewels ' syggestion

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!!! Thank you guys 😃 👍
Will fix it.

@ewels
Copy link
Contributor

ewels commented Nov 28, 2014

Cool - did that work then?

@senthil10
Copy link
Contributor Author

Yup!! It was super nice, but just a heads up formatter_class=argparse.RawDescriptionHelpFormatter preserves the intend and what so ever only for the Descriptiontext, than if we use formatter_class=argparse.RawTextHelpFormatter it preserves the styling (literally and overwhelming 😝) for all help text.

So for this context I moved the config format to description text. Now it looks neat.
Tack @ewels and @guillermo-carrasco :)

@ewels
Copy link
Contributor

ewels commented Nov 28, 2014

Great!

@ewels
Copy link
Contributor

ewels commented Nov 28, 2014

Oh - @guillermo-carrasco : I don't have write access to this repo..

ewels added a commit that referenced this pull request Nov 28, 2014
Data transfer to user provided FTP
@ewels ewels merged commit 0145fa8 into NationalGenomicsInfrastructure:master Nov 28, 2014
chuan-wang added a commit that referenced this pull request Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants