sugarlabs / sugar-docs

Documentation for Contributors and Developers
82 stars 103 forks source link

Add Python Coverage Guide #155

Closed quozl closed 6 years ago

quozl commented 6 years ago

How to test code coverage.

walterbender commented 6 years ago

Is it intended that this new page be linked to from the TOC?

quozl commented 6 years ago

@walterbender, thanks, a git add was neglected, fixed in 08d4b7e. A number of documents are not linked from the TOC, but are linked from How Can I Help or Contributing.

@Pro-Panda, thanks for the testng.

@vipulgupta2048, the & does fork and detach, and is common use of sh and bash for background processes, see man bash or the bash source (though this is not the most recent source). There are a set of associated built-in commands to learn at the same time, such as ctrl-z, fg, bg, and kill. I think it is fine to assume knowledge of how to use a shell.

The port number does not need to be specified in the command, as it defaults to port 8000. TCP/IP listening port number conflicts are usually considered outside the scope of such documentation, otherwise the documentation has to be even more detailed than the straightforward task. I think it is fine to assume knowledge of port numbers; in most cases it won't be a problem.

Thanks all for feedback.

walterbender commented 6 years ago

I didn't see the link in the How Can I Help page.. but that certainly is adequate. Orphan pages are not.

tony37 commented 6 years ago

The & means run the process in the background. The SimpleHTTPServer will monitor a default port if one is not specified. Adequate documentation is available by internet search.

Tony

On Tuesday, 15 May, 2018 02:25 AM, Vipul Gupta wrote:

@vipulgupta2048 commented on this pull request.


In src/python-coverage-guide.md https://github.com/sugarlabs/sugar-docs/pull/155#discussion_r188051791:

+ +python-coverage run /usr/bin/sugar-activity + + + run any test scripts, such as those using xdotool, + stop the activity, + generate annotated HTML listings, + + +python-coverage html + + + run the SimpleHTTPServer module in a background process, + +``` +python -m SimpleHTTPServer &

What is the |&| here, shouldn't it mention the port 8000.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sugarlabs/sugar-docs/pull/155#pullrequestreview-119953487, or mute the thread https://github.com/notifications/unsubscribe-auth/AAULksVQknjx12h3EOxgQnh0qHM9Ceyiks5tycwCgaJpZM4T9YAy.