GithubHelp home page GithubHelp logo

pjmeyer / conduit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gothinkster/django-realworld-example-app

0.0 0.0 0.0 48.57 MB

An awesome blogging platform, written in Python, and super hard to setup. At least it used to be!

Python 78.89% JavaScript 20.68% Dockerfile 0.43%

conduit's Introduction

Setup

  1. Install the JSON Formatter extension for Chrome
  2. Ensure you've already authenticated with VSO + GitHub once, so that you can push changes during the demo, without needing to auth
  3. Ensure that you've opened up the conduit/apps/articles/views.py file once, and leave it open, so that VSO will default it to be open for you when you create a new environment

Onboarding

  1. Developer sees an issue on GitHub and clicks a link to deep link into an instance. The issue mentions that the REST API no longer returns articles, even though they're in the database - Create VSO Environment
    1. Show that they don’t have Python installed on their local machine
  2. They create the environment and are taken into the web editor, with…
    1. The repo automatically cloned
    2. Their Python dependencies installed (Python/PIP are now available in the terminal) - Run “python —version” from the terminal
    3. Their extensions automatically installed (the Python extension) - Switch to the extensions tab and show it (May need to reload)
    4. The app automatically built (PIP install was run) - Show the VSO terminal instance
    5. Their dot files automatically roamed (shell aliases are available) - Run the “party” command
  3. Full fidelity tools
    1. File access/Search
    2. Extensions (show GitLens?)
    3. Terminals (run a command such as “ls”)
  4. Debugging/Port forwarding
    1. Set a breakpoint on line 30 of articles/views.py
    2. Hit F5, then select “Python: Django"
    3. CTRL+Click the URL in the terminal
    4. Launch the URL and hit “/api/articles”…No articles (!)
    5. The breakpoint will be hit
    6. Step the debugger, see the issue and then correct it
    7. Change line 30 to “if author is not None:” and then re-run the app. You’ll now see the article data returned
    8. Remove the breakpoint on line 30, hit the debug refresh button, and refresh the browser window to show the article data correctly being returned
  5. Git operations
    1. Commit the changes you made and highlight that you're Git identity was roamed
    2. Push the changes back to the remote, to highlight you automatically have permissions to the repo
  6. “It’s just like developing with VS Code, but without any of the setup, and accessible from anywhere”
    1. If I need to open it in desktop, I can (seamless interop, so you can choose how to work)
      1. Show the change on line 30 in articles/views.py
    2. When I’m done, I can shut it down, or let it automatically go to sleep
  7. With that done, return to the GitHub issue, ready to close it, only to realize that the issue asked you to handle some todos...

Dev starts to make their intended change, and is assisted along the way by IntelliCode…

AI-assistance

  1. Open up the Todo Tree activity bar, and display the flattened view (the second toolbar icon)

  2. Click on the first TODO item, and add the following code in symposion/reviews/forms.py

     ```python
     Class StaffRequestForm(forms.Form):
     	staffIDs = forms.CharField(label=_(“Command separated list of IDs”, max_length=5000)
     ```
    
  3. After completing the above, delete the comment

  4. Click on the second todo, and then add the following code to the bottom of symposion/reviews/views.py file (within the last function's if statement)

     ```python
     if form.is_valid():
     staff_ids = form.cleaned_data.get(“staff_ids”).split(“,”)
     for staff_ids in staff_ids:
     	accept_staff_suggestion(staff_ids)
     ```
    
  5. After completing the above, delete the comment. All todos are done!

  6. Refactorings (still in views.py)

    1. Replace the call to render on line 520 with a call to `access_not_permitted'
      return access_not_permitted(request_review_staff_comment, "you do not have permission to accept staff reviews")
    2. Scroll up to line 470, and replace a second instance
    3. Notice that IntelliCode has detected the repeated edits and is suggesting other locations
    4. Click one of the suggestions in the Problems pane and accept it
    5. Select another one, but this time, choose to have IntelliCode submit a PR on your behalf (!)
    6. When the PR page is launched, highlight that it took care of all of the refactorings, and allowed you to keep your changes focused

Dev wants to get some early feedback on their change, so they invite their mentor into an LS session…

Real-time Collaboration

  1. Direct invite (via Contacts pane)
  2. Chat (via the LS Chat extension being installed)
  3. Inline code comments (doing a lightweight code review)
  4. Guest IntelliCode (Optional)
  5. Debugging/Port forwarding (Optional) - “These work, despite the fact that the host is actually running in the cloud!”

conduit's People

Contributors

brwr avatar davidobando avatar ericsimons avatar jamesbrewerdev avatar lostintangent avatar nikmd23 avatar priyadhoundiyal avatar shengyfu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.