Skip to content
This repository has been archived by the owner on Apr 27, 2022. It is now read-only.

DOCS MATTER! #951

Merged
merged 23 commits into from
Feb 15, 2018
Merged

DOCS MATTER! #951

merged 23 commits into from
Feb 15, 2018

Conversation

xuhang57
Copy link
Contributor

@xuhang57 xuhang57 commented Feb 1, 2018

@xuhang57 xuhang57 requested a review from naved001 February 2, 2018 16:21
@xuhang57
Copy link
Contributor Author

xuhang57 commented Feb 5, 2018

For #648, I don't know anything about multi-processes in HIL. Any idea how could I proceed? Or should someone else do it?

@xuhang57 xuhang57 changed the title WIP: DOCS MATTER! DOCS MATTER! Feb 5, 2018
Copy link
Contributor

@naved001 naved001 left a comment

Choose a reason for hiding this comment

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

Thanks a lot for taking this up!

I think it would be nice to see if the commands that we are telling people to issue when installing HIL are consistent. I pointed out one instance; we tell them to become root yet still run the subsequent commands with sudo (which is not needed). I think there might be more instances, do you mind just having a look at it while you are at it?

AUTHORS Outdated
Logan Bernard <bernard.logan4@gmail.com>
Lucas Xu <xuh@massopen.cloud>
Naved Ansari <naved001@massopen.cloud>
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't have that email address. you could put my gmail or bu email, it's naved001@gmail.com/bu.edu

Copy link
Contributor Author

Choose a reason for hiding this comment

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

free like everybody is not using their regular email addresses here. You sure you want to use the gmail? Why not get a massopen.cloud email from Rado just saying ;)

Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure I follow the point about "everybody is not using their regular email addresses here". I only see three massopen.cloud addresses, and all of them are introduced by this patch.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry for the confusion. I meant many people are using the email addresses that they don't check on a regular basis. And IMHO, hardcoded email addresses is very bad since it is very easy to be scraped and receive spams.

@@ -16,11 +16,11 @@ Prerequisite Software
HIL requires a number of packages available through the CentOS RPM
repositories, as well as the EPEL repository. EPEL can be enabled via::

yum install epel-release
$ yum install epel-release
Copy link
Contributor

Choose a reason for hiding this comment

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

oh boy, you went through all the trouble of adding the $ sign everywhere. Sorry I wasn't paying attention that you were taking this up. But if you think about it putting the dollar sign kinda makes it harder to copy and paste it. Earlier, I could triple click and copy the whole line and paste it into a terminal, but with this I would have to remove the dollar sign each time. :(

Don't make this change yet, maybe I copy paste wrong and what you are doing is right. I want to hear from other reviewers or whoever suggested putting the dolla sign there.

Copy link
Contributor

Choose a reason for hiding this comment

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

Don't make this change yet,

I mean, don't undo your changes yet.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hah, thought we had a conclusion on that issue.
@shwsun ping~

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't quite understand the debate. It is convention to have a $ denote that it is a command rather something that you should put into a file. We need to distinguish things should be in the config file from commands we want users to run.

@xuhang57 thank you for your time to clean the HIL doc. While you are at it, could you fix this too? It annoys me a while.

Copy link
Contributor Author

@xuhang57 xuhang57 Feb 6, 2018

Choose a reason for hiding this comment

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

@shwsun sure, "user needS" and export before each line? That's all right?
@naved001 once we have a conclusion, I will change the docs accordingly.
ping @zenhack @Izhmash @SahilTikale

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't quite understand the debate. It is convention to have a $ denote that it is a command rather something that you should put into a file.

I guess I am not a fan of that convention then, for the reasons I mentioned in my comment.

We need to distinguish things should be in the config file from commands we want users to run.

I don't know, but I feel it's apparent from the context and that the fact that we mention on top of the block of lines if it goes into a file.

In any case, I'll wait to hear what others have to say; but now I am inclined to follow the convention just because that's the convention.

Copy link
Contributor

Choose a reason for hiding this comment

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

@Izhmash @zenhack @SahilTikale @knikolla anyone want to weigh in?

Copy link
Contributor

Choose a reason for hiding this comment

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

No strong opinion, but my inclination is to include the $, as these are meant to be instructions, not a script -- we should be optimizing for understanding, not copy & paste. The $ is conventional and provides a useful cue to the reader, even if we do mention above that it's a shell command.

Copy link
Contributor

Choose a reason for hiding this comment

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

I am used to seeing $ when reading documentation. It helps when you need to quickly scan through a wall of text to piece out what needs to be run in the terminal.

docs/INSTALL.rst Outdated
$ cd /root
$ git clone https://github.com/CCI-MOC/hil
$ cd hil
$ sudo python setup.py install
Copy link
Contributor

Choose a reason for hiding this comment

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

if you are root at this point, you don't need to sudo.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

true. But how could you even cd /root if you a not a root user? hmm.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nvm. sudo su-

Copy link
Contributor

Choose a reason for hiding this comment

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

Related to the convention discussion above, A common convention is to display root prompts with # rather than $, which I think is a good idea if we go with the prompt indicators.

Copy link
Contributor

@zenhack zenhack left a comment

Choose a reason for hiding this comment

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

A few comments.

AUTHORS Outdated
Andrew Mohn <AndrewMohn@gmail.com>
George Silvis, III <george.iii.silvis@gmail.com>
Ian Ballou ianballou67@gmail.com
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing brackets.

docs/USING.rst Outdated
^^^^^^^^^^^^^^^^^^^^^^^^^^^


Eg> Node name: mocknode01
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't render particularly well; all of the fields get wrapped on to one line. Also the Eg> notation is weird to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, I am trying to follow the previous examples. And we actually have two different formats in those two existing examples. I am gonna reformat them then and try to come up with one clean format.

Copy link
Contributor

Choose a reason for hiding this comment

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

I hadn't noticed it was existing notation, but yeah, let's improve upon it.

@@ -0,0 +1,24 @@
### HIL Python Client API
Copy link
Contributor

Choose a reason for hiding this comment

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

  • Start with level 1 headings (one #)
  • This should go under docs somewhere.
  • Probably should call it "client library"
  • This could use some introductory verbiage; You're kindof just plopping some code down without any overall context. Also, we don't describe the design of the library at all; it would be good to briefly describe the important objects and sketch its structure (docstrings can serve as comprehensive reference docs, but we should give an overview).

Copy link
Contributor Author

@xuhang57 xuhang57 Feb 6, 2018

Choose a reason for hiding this comment

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

This should go under docs somewhere.

Personally, I don't like putting this under /docs since there are too many docs there already and people probably won't read it. So I put it in the client directory. But if it is the best practice then I will move it there. Maybe creating a new folder called /client?

Point 1 & 3 sound good to me.

As for the point 4, I thought we have the overview description when the client library first got introduced to the code base. Will discuss with @naved001 and try to come up with an overview. The idea sounds good to me, but I don't have a plan on how to write one atm.

Copy link
Contributor

Choose a reason for hiding this comment

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

Re: /docs, this is where all of our high-level docs have gone. Maybe we should update the README at the root of the repo to provide a more thorough index, if we want stuff to be easier to find.

I'm looking at the client library as something that people who don't hack on HIL itself might hypothetically use; having it buried inside of the source code doesn't make much sense. It might be more reasonable if this were an internal-use-only module.

Re (4): if we have overview docs, I don't know where they are.

@xuhang57
Copy link
Contributor Author

xuhang57 commented Feb 8, 2018

@zenhack pushed a brief description of the client library. Please let me know if you think it needs to be improved. 👍

@shwsun @naved001 done.

Copy link
Contributor

@ianballou ianballou left a comment

Choose a reason for hiding this comment

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

I think it's looking good, just one fix and a comment. Also we'll want to make sure the $ convention is consistent though all the documentation if we decide to change to that.

@@ -0,0 +1,28 @@
# HIL Client Library

##Description
Copy link
Contributor

Choose a reason for hiding this comment

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

You need a space here between the ## and Description

```
pip install git+https://github.com/cci-moc/hil
```

Copy link
Contributor

Choose a reason for hiding this comment

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

We might want to document which client library commands are available if we don't want users to have to look through the source.

@xuhang57
Copy link
Contributor Author

@zenhack @naved001 done.

Copy link
Contributor

@ianballou ianballou left a comment

Choose a reason for hiding this comment

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

Alright, looks good to me!

Copy link
Contributor

@zenhack zenhack left a comment

Choose a reason for hiding this comment

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

One minor thing, otherwise I'm happy.

docs/USING.rst Outdated
- **Switch type:** mock
- **Host name:** switchhost01
- **User name:** switchuser01
- **Password:** password1234
Copy link
Contributor

Choose a reason for hiding this comment

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

This is currently being rendered as a block comment; you should un-indent it. There are a couple of other instances of this problem elsewhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Was doing that on purpose since that's what one of the examples did previously. Hmm, I think you ar right and it doesn't make sense to block comment them.

@xuhang57
Copy link
Contributor Author

@zenhack done.

@zenhack
Copy link
Contributor

zenhack commented Feb 15, 2018

Great, merging.

@zenhack zenhack merged commit b2fdec6 into CCI-MOC:master Feb 15, 2018
@xuhang57 xuhang57 deleted the docs-cleanup branch February 16, 2018 14:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants