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

Add a how-to on running the project #14

Closed
tracey-le opened this issue Jan 21, 2017 · 22 comments
Closed

Add a how-to on running the project #14

tracey-le opened this issue Jan 21, 2017 · 22 comments
Assignees

Comments

@tracey-le
Copy link
Collaborator

tracey-le commented Jan 21, 2017

The how-to will be for anyone to look at, like from other groups, or for example I'll look at it if I've forgotten how to do it at any point in future :)

@tracey-le
Copy link
Collaborator Author

tracey-le commented Jan 21, 2017

Are there conventions for this sort of thing? For example, is it usually done in the README.md, or is there another place where you could put it?

@tracey-le tracey-le self-assigned this Jan 21, 2017
@tracey-le
Copy link
Collaborator Author

tracey-le commented Jan 21, 2017

I'll just quickly note down things for the how-to.

Outline for how to run

  • this is quickly for in GitHub Desktop

  • Clone repo (Screenshot) only if first time

  • Open Terminal/Git Shell (Screenshot again)

  • basic command is python file.py to run a file named file.py

  • only if first time running, need to create the db. python db/db_create.py (Screenshot with note that python3 is for Mac for example)

  • each time you want to run the project you need the server, run python server.py (Screenshot)

  • open a browser, type in localhost:8888

  • (insert pic of site)

  • and can view in Atom by going to Repository>Open in Atom (Insert screenshot with note this is Mac version)

@lyneca
Copy link
Collaborator

lyneca commented Jan 21, 2017

Yes, this is normally done in the README.md. Here's an example (and a shameless self-promotion 😛).

@tracey-le
Copy link
Collaborator Author

tracey-le commented Jan 21, 2017

I'm gonna do a little draft here and put screenshots ^_^ this will be meant for totally starting at the start, like if I've forgotten everything or am doing it on another device

-this is free to edit at any point. I'm editing it too

How to run — Draft

This is quickly for GitHub Desktop.

  • After setting up GitHub desktop, click the + button in the top left corner. Log into GitHub account if you haven't already.
    Clicking plus button in top left corner of GitHub desktop

  • After clicking the + button, from options of [Add | Create | Clone], choose Clone to clone the repository only if first time
    Clone repo
    (If the group project 3 doesn't show here as an option for cloning, you would have to go to GitHub projects 2017 group 3 link I think??)

  • Once the project has finished cloning, it will appear in the left panel under GitHub. Open in Terminal/Git Shell by right-clicking on project name:
    Right click on project name with mouse hovering over 'Open in Terminal'
    (The name of the option 'Open in Terminal/Git Shell' is just dependent on whichever Operating System you are using. I am using a Mac here.)

In shell, if you want to run a Python file named file.py for example, you can type in python db_create.pyonce you're in the directory of the file.

  • Only if first time running, we need to create the database (this also contains the dummy data). python db/db_create.py is the command to run the file that creates the database (on at least Windows I think).
    Here is a screenshot (this is for Mac where python3 is for running python3)
    Running python db/db_create.py in terminal

  • Now, each time you want to run the project, you need the server. Run python server.py
    Running python server.py in terminal
    If it worked and the server's working, you'll see the Reloading... waiting for requests on http://localhost:8888 message appear.

  • After you have the server, open a browser and type in localhost:8888 to see our awesome site
    Screenshot of website with localhost:8888 in the URL bar

Messages will keep appearing in the shell as you do things on the site, this is expected.

  • And you can view code in Atom by going to Repository>Open in Atom on Mac, I think there's a button on Windows with the Atom icon.
    Screenshot for Mac:
    Screenshot of GitHub Desktop zoomed in on Repository>Open in Atom
    or you can also right-click on the project name and then Open in Atom:
    Screenshot of GitHub Desktop zoomed in on right-click project name and mouse hover over 'Open in Atom'

If you have any ideas or comments on this tutorial, please feel very free to add.

@tracey-le
Copy link
Collaborator Author

@lyneca 👍

@lyneca
Copy link
Collaborator

lyneca commented Jan 21, 2017

I've done some stuff in pull request #15

@tracey-le
Copy link
Collaborator Author

tracey-le commented Jan 21, 2017

That's awesome 👍 we just need to create the database the first time running the project though — for the dummy data I think, so I think we can just mention python db_create.py is for the first time, and each time afterwards you just need python server.py

@tracey-le
Copy link
Collaborator Author

tracey-le commented Jan 21, 2017

just curious, I've heard of bash but not sure what it does, what does it do? 😊

@lyneca
Copy link
Collaborator

lyneca commented Jan 22, 2017

bash is a linux shell - like a language for terminals

@tracey-le
Copy link
Collaborator Author

oh okay, thank you 😊 I'm not quite sure still but it's okay 👍

@tracey-le
Copy link
Collaborator Author

tracey-le commented Jan 22, 2017

Okay I think I'm done with the how-to draft for now ☺️ I can just put it as a more in-depth/newbie-friendly version somewhere, don't know where though. I don't know how the images will load if I put it in a file?

edit: I don't think the images will work in a file, maybe I could put it somewhere here on GitHub.

what is Wiki usually used for? It looks more for documenting and managing project but happy to put it there if that's okay

@lyneca
Copy link
Collaborator

lyneca commented Jan 22, 2017

Images can be put in a readme.

![Alt text](http://full/path/to/img.jpg "Optional title")

Put the images on imgur or something and put the full image URL in that bit of code, such as this:

![picture of a cat](https://i.imgur.com/F60i2Ga.jpg "Cat Photo")

picture of a cat

Get the full image path by right clicking on the image and hitting "copy image address".

EDIT

You can just copy the image and paste it into GitHub's editor as well 😛

@lyneca
Copy link
Collaborator

lyneca commented Jan 22, 2017

Wikis are used for making user-created documentation for a project. Probably not what we're looking for in this case.

@tracey-le
Copy link
Collaborator Author

Oooh okay thank you for the how-to on images in Markdown 😄 oh okay, I see for wikis now, yep probably not for this.

hmm I was thinking about either updating README.md with that extra info, or I could add it to /documentation? I don't know

@lyneca
Copy link
Collaborator

lyneca commented Jan 22, 2017

I think put it in README.md; it's the document that shows up when you first look at the project.

@tracey-le
Copy link
Collaborator Author

cool thanks Luke :D

tracey-le added a commit that referenced this issue Jan 22, 2017
The images are a bit big and some of the spacing is off but here is the
edited draft from #14
@tracey-le tracey-le changed the title Make a how-to on running the project Add a how-to on running the project Jan 22, 2017
@tracey-le
Copy link
Collaborator Author

tracey-le commented Jan 22, 2017

Once this is merged here #17, I'll close this issue 😃 (but always feel free to edit and add things to the how-to)

@tracey-le
Copy link
Collaborator Author

tracey-le commented Jan 22, 2017

— as I mentioned in last commit description

The images are a bit big and some of the spacing is off

so always free to edit :) the main things are there so I'm just gonna leave it for now

@tracey-le
Copy link
Collaborator Author

just updating the how-to with another image instead, uploading it here so I can use the link hehe..

screen shot 2017-01-22 at 2 17 06 pm

@tracey-le
Copy link
Collaborator Author

Now it's merged into master thanks to @juliawong 😄

@tracey-le
Copy link
Collaborator Author

tracey-le commented Jan 24, 2017

basic how-to is there so I closed this

ideas for improvement (can re-open issue or make another one):

  • upload smaller images and re-link the image links in README.md (or experiment and see if html <img> elements work?)
  • fix some of the spacing (try <br>?)

tracey-le added a commit that referenced this issue Jan 26, 2017
minor formatting changes 

#14
@tracey-le
Copy link
Collaborator Author

yay I've done those little changes now, with the resized images and the spacing :) :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants