CiscoDevNet / devnet-express-dna-issues

Suggested changes to the content of the learning labs for Devnet Express for DNA
Apache License 2.0
6 stars 2 forks source link

Overhaul of Programming Basics Primer content #65

Closed annegentle closed 6 years ago

annegentle commented 6 years ago

When delivering DevNet Express content, trainers have discovered a need to reset the foundation in Python, APIs and Data Formats written up in Learning Labs for delivery as Tracks (with Modules).

annegentle commented 6 years ago

These are the two team's reports from content analysis so far: Programming Fundamentals outline (from Hank's recent work at https://cisco.app.box.com/folder/34827797838): Data Formats - Understanding and using JSON XML and YAML APIs are Everywhere - What are they? REST APIs Part 1 - HTTP is for more than web browsing REST APIs Part 2 - Making REST API Calls with Postman Python Part 1 Python Language and Script Basics Python Part 2 Working with Libraries and Virtual Environments Python Part 3 Useful Python Libraries for Network Engineers

Learning Content Outline (from Consolidated Primer Feedback at https://cisco.app.box.com/notes/245578106389): Python Primer Part 1 - Python interpreter, virtual environments, IDLE/Bash, data types, variables, operations, conditionals Python Primer Part 2 - Python objects, libraries, structures, loops, functions, basic debugging Rest APIs - Getting started, client (Postman), parsing JSON with Python

annegentle commented 6 years ago

These are the existing collection of tracks and modules today:

Programming Primer Content as it exists today:

DNA Track: LM-4002: Event Preparation for DevNet Express for DNA v2.1 LM-1201: Intro To Python and Programming Basics for DevNet Express LM-4402: REST APIs

Cloud Collaboration Track: Pre-Event Preparation for IT Pros Python Programming Basics for Cloud Collab IT Pros

Data Center Infrastructure: LM-5001 - Pre-event information LM-1221: Intro To Git, Python, XML and Programming Basics for DevNet Express LM-4402: REST APIs

Intro to DevNet (not Express, standalone) Overview & DevNet Resources Beginner Intro to Coding Fundamentals Beginning APIs - Using Spark Network Programmability

What we're working on next is whether these current pieces (tracks, modules, and labs) can be edited as-is or do we need completely new tracks? New Modules? New Labs too?

annegentle commented 6 years ago

This is a first-pass through the repos that would need to change to update labs. However, I'm not sure if editing those repos gives the deliverable we want, which is a new outline. Posting here for an idea of sizing.

LM-1201 Introduction to Git Repo: https://github.com/CiscoDevNet/devnet-express-cloud-collab (private)

Python Primer Level 1 Repo: https://github.com/CiscoDevNet/devnet-express (private)

Python Primer Level 2 Repo: https://github.com/CiscoDevNet/devnet-express (private)

Parsing JSON with Python https://github.com/CiscoDevNet/devnet-express (private)

LM-4002 Pre-Event Preparation for Windows Users Running Exercises on dCloud Repo: https://github.com/CiscoDevNet/devnet-express (private)

Pre-Event Preparation for Windows Users Running Exercises on Local Hosts Repo: https://github.com/CiscoDevNet/devnet-express (private)

Pre-Event Preparation for Mac Users Running Exercises on dCloud Repo: https://github.com/CiscoDevNet/devnet-express (private)

Pre-Event Preparation for Mac Users Running Exercises on Local Hosts Repo: https://github.com/CiscoDevNet/devnet-express (private)

Pre-Event Preparation for Linux Users Running Exercises on dCloud Repo: https://github.com/CiscoDevNet/devnet-express (private)

Pre-Event Preparation for Linux Users Running Exercises on Local Hosts Repo: https://github.com/CiscoDevNet/devnet-express (private)

LM-1221 Introduction to Git Repo: https://github.com/CiscoDevNet/devnet-express-cloud-collab (private)

Python Primer Level 1 Repo: https://github.com/CiscoDevNet/api-coding-basics (private)

Python Primer Level 2 Repo: https://github.com/CiscoDevNet/api-coding-basics (private)

Using Python to Parse JSON Repo: https://github.com/CiscoDevNet/api-coding-basics (private)

Introduction to XML Repo: https://github.com/CiscoDevNet/api-coding-basics (private)

LM-4402 Overview of REST APIs Repo: https://github.com/CiscoDevNet/devnet-express (private)

Spark's REST API and Postman Repo: https://github.com/CiscoDevNet/devnet-express (private)

Using Python to Interface with REST APIs Repo: https://github.com/CiscoDevNet/devnet-express (private)

Coding and Parsing with Python Repo: https://github.com/CiscoDevNet/devnet-express (private)

Mission: Complete the Spark Script with Python Repo: https://github.com/CiscoDevNet/devnet-express (private)

annegentle commented 6 years ago

Ok, one more set of input, the Dec 2017 NetAcad training event: Day 1: An introduction to APIs and APIC-EM Making API calls in Postman Introduction to Git Introduction to coding in Python Coding in Python for APIC-EM Day 2: Cisco Meraki Integrations Cisco Spark Integrations Cisco Network Programmability with NetConf/RESTConf Cisco Security - Cisco Firepower Management Center platform and Cisco AMP Cloud

annegentle commented 6 years ago

🔎 🔬 Revisiting this strategy week of 1/2/18 in order to get revised content that won't be a repeat of last year's events. 🔬 🔍

In this revision:

Phase 1: Set up basic naming conventions and folder conventions. BUT do not break others and keep the labs we have.

Chris - go back with pep8 and re-space the Python files. Anne - Go through Issues already reported and see if they are fixed in source and published in output. Anne - Fix Issues in dna-express that are not fixed (that do not also break other labs using a specific desktop image, such as if folder structure is changed). Anne - Use better code samples that are more about networking than generic.

Phase 2: Convert screenshots that are code to text with backticks in markdown. Chris - rally some resources to fix the screenshots. Anne to merge quickly on the days you sprint on this. Updates across more of the tracks with folder structure we want.

annegentle commented 6 years ago

@austinMarcos Would love your input on these comparisons as you coordinate the collaboration. Let us know your thoughts.

annegentle commented 6 years ago

Outline for revisions for review by @hpreston, @aroach, @cmlccie and @denapom11 .

What gets removed from the module:

What gets added: Make all examples more network-centric.

Overall outline:

  1. Introduction to Git Workflow
  2. Python Part 1 Python Language, Python interpreter, IDLE/Bash, and Script Basics
  3. Python Part 2 Working with libraries, virtual environments, data types, variables, operations, conditionals
  4. Python Part 3 Useful Python libraries for Network Engineers, Python structures, loops, functions, basic debugging
  5. Data Formats - Understanding and using JSON XML and YAML
  6. APIs are Everywhere - What are they?
  7. REST APIs Part 1 - HTTP is for more than web browsing
  8. REST APIs Part 2 - Making REST API Calls with Postman, parsing JSON with Python

Detailed outline: LM-1201, LM-4002, LM-1221, LM-4402 output: https://learninglabs.cisco.com/modules/fundamentals with reuse in multiple locations for DevNet Express and other events.

LM-1201 Introduction to Git Repo: https://github.com/CiscoDevNet/devnet-express-cloud-collab (private) Step1: Intro to Git Step2: Getting Source Code Files with git clone Step3: Updating a Local Repository with git pull (@cmlccie to revise for workflow with git clone, git checkout, git pull, git commit, and so on, addressing issues from https://ahorribleprogrammer.wordpress.com/2017/06/16/my-thoughts-on-cisco-devnet-beginner-fundamentals-module/)

Python Primer Level 1 Repo: https://github.com/CiscoDevNet/devnet-express (private) Step1: Finding and Using the Python Interpreter (was:Versions and Python Interpreter) Step2: (new) Understanding Virtual Environments Step3: (new) Using IDLE: Run from Virtual Environment, Interactive Interpreter, Creating a Python File, Running a Python File Step4: Running a Python File from BASH was:Python Scripts and How they Run including sample Step5: (new) Using the Python Interactive Interpreter (Run, exit the interpreter) Step6: (revise)Basic Data Types(int, float, bool, str) Python Introspection type() was:Python Syntax, (revise) Introduction to Variables (Naming, Defining Python Introspection dir()) was:Scope, Variables, Operators and Simple Conditional Statements Step7: Conditionals (if statements), if syntax, Indentation) was:Python Operators and Conditional Statements Step8: (new) Basic Math Operations Step9: (revise) Basic String Operations was:Python String Concatenation

Python Primer Level 2 Repo: https://github.com/CiscoDevNet/devnet-express (private) Needs full rewriting. Here's the old outline, which could be reused and added to like above: Step1: was:Python Data Types Step2: was: Nested Data Types Step3: was:Python Loops Step4: was:Writing Your Own Python Functions

New outline for Python Primer 2:

  1. What are Libraries and How to Use Them
  2. Using pip to Install Libraries
  3. Virtual Environments
  4. Foundational Libraries (pretty print, sys, os, datetime)
  5. Introduction to Objects
  6. Data Structures (List Tuple Dict, Syntax)
  7. Loops (Iterating through a dictionary)
  8. Nested data (Inspecting type(), access, decomposing, chaining)
  9. Functions
  10. Variable Scope and Script execution/flow (__main__()
  11. Basic Debugging

Parsing JSON with Python (Should this remain as-is?) https://github.com/CiscoDevNet/devnet-express (private) Step1: was: JSON Basics Step2: was: Paring More Complex JSON Structures

LM-4002 (Needs revision, but general outline can remain) Pre-Event Preparation for Windows Users Running Exercises on dCloud Repo: https://github.com/CiscoDevNet/devnet-express (private)

Pre-Event Preparation for Windows Users Running Exercises on Local Hosts Repo: https://github.com/CiscoDevNet/devnet-express (private)

Pre-Event Preparation for Mac Users Running Exercises on dCloud Repo: https://github.com/CiscoDevNet/devnet-express (private)

Pre-Event Preparation for Mac Users Running Exercises on Local Hosts Repo: https://github.com/CiscoDevNet/devnet-express (private)

Pre-Event Preparation for Linux Users Running Exercises on dCloud Repo: https://github.com/CiscoDevNet/devnet-express (private)

Pre-Event Preparation for Linux Users Running Exercises on Local Hosts Repo: https://github.com/CiscoDevNet/devnet-express (private)

LM-1221 (Only difference between this and the LM-1201 is the source repo and the Introduction to XML. So, I ask, is there a need for two different Python Primer sources, since the outlines are identical?) Introduction to Git Repo: https://github.com/CiscoDevNet/devnet-express-cloud-collab (private)

Python Primer Level 1 Repo: https://github.com/CiscoDevNet/api-coding-basics (private)

Python Primer Level 2 Repo: https://github.com/CiscoDevNet/api-coding-basics (private)

Using Python to Parse JSON Repo: https://github.com/CiscoDevNet/api-coding-basics (private)

Introduction to XML (no revisions) Repo: https://github.com/CiscoDevNet/api-coding-basics (private) Step 1. Understanding the Purpose of XML Step 2. Understanding XML Data Models and Structure Step 3. Create an XML Payload Step 4. Comparing XML and JSON Step 5. Using Python to parse an XML payload Step 6. Going Further (reference info with links)

LM-4402 Overview of REST APIs (source) Repo: https://github.com/CiscoDevNet/devnet-express (private) was:Overview of APIs was:Step 1. Get Access To The Spark REST APIs was:Step 2. What is a REST web service? was:Step 3. The Anatomy of a REST API Request was:Step 4. Use Postman to Call the Spark API

Revise Overview of REST APIs with these topics: What is REST? - Use for the HTTP protocol, REpresentational State Transfer A Look Under the Hood at REST - URI (endpoints), resources, parameters, headers, auth, data CRUD REST Verbs - Post Get Put Delete Payloads - JSON, XML Some REST Examples - Chuck Norris database and RESTCONF Getting Started with an API - Docs, Auth, Endpoints, Verbs, Parameters, Payloads REST API Tools - curl, Postman, Requests Python library, Swagger/OpenAPI for Dynamic API Documentation, Browser Developer Tools

(remove?) Spark's REST API and Postman Repo: https://github.com/CiscoDevNet/devnet-express (private) Step 1. Sign up for Cisco Spark and take a tour (repeated above) Step 2: Listing Spark Rooms Spark API with Postman

Using Python to Interface with REST APIs (Seems overly simple?) Repo: https://github.com/CiscoDevNet/devnet-express (private) Step1: Introduction to Python Step 2. Generating Code Using Postman

Coding and Parsing with Python (Uses Spark as example, might be fine) Repo: https://github.com/CiscoDevNet/devnet-express (private) Step 1. Python Spark Review Step 2. Iterating Through Spark Response Data Step 3. Writing Python Script

(remove?) Mission: Complete the Spark Script with Python Repo: https://github.com/CiscoDevNet/devnet-express (private)

Still needed: APIs are Everywhere + Data Formats fit into a new Intro to APIs and Data Formats LL REST APIs Part 1 + REST APIs part 2 fit into Intro to REST APIs LL

And one additional question: What can we reuse from the NetAcademy code examples?

cmlccie commented 6 years ago

My feedback:

Order: (I would recommend the following grouping and ordering of the content.)

  1. Python Part 1 - A Basic Python Development Environment
    • Bash
    • Python Interpreter
    • IDLE
    • Script Basics
    • Working with Libraries
    • Virtual Environments
  2. Python Part 2 - Python Language
    • Basic Data Types
    • Variables
    • Operations
    • Conditionals
  3. Python Part 3
    • Useful Python libraries for Network Engineers (Move to a reference-able "Awesome" list?)
    • Container Data Types
    • Loops
    • Functions
    • Basic Debugging
  4. Data Formats - Understanding and using (atomic and plug-able - include as needed per module/track)
    • JSON
    • XML
    • YAML
  5. API Introduction
    • REST APIs Part 1 - HTTP is for more than Web Browsing
    • REST APIs Part 2 - Making REST API Calls with Postman -> Moving to Code
annegentle commented 6 years ago

Thanks @cmlccie -- I'm revising with more detail about module and lab levels as well and will incorporate in the comment above.

annegentle commented 6 years ago

Summary proposal:

1. Revise Intro to Git - Chris and Anne

Repo: https://github.com/CiscoDevNet/devnet-express-cloud-collab (private) Step1: Intro to Git Step2: Getting Source Code Files with git clone Step3: Updating a Local Repository with git pull (@cmlccie to revise for workflow with git clone, git checkout, git pull, git commit, and so on, addressing issues from https://ahorribleprogrammer.wordpress.com/2017/06/16/my-thoughts-on-cisco-devnet-beginner-fundamentals-module/)

2. Revise Intro to REST API - Anne

Repo: https://github.com/CiscoDevNet/devnet-express (private) New topics: What is REST? - Use for the HTTP protocol, REpresentational State Transfer A Look Under the Hood at REST - URI (endpoints), resources, parameters, headers, auth, data was:Overview of APIs Some REST Examples - Chuck Norris database and Spark API was:Step 1. Get Access To The Spark REST APIs (Change to show Chuck Norris example and then a Spark API example) was:Step 2. What is a REST web service? New topic: Payloads - JSON, XML Getting Started with an API - Docs, Auth, Endpoints, Verbs, Parameters, Payloads was:Step 3. The Anatomy of a REST API Request REST API Tools - curl, Postman, Requests Python library, Swagger/OpenAPI for Dynamic API Documentation, Browser Developer Tools was:Step 4. Use Postman to Call the Spark API CRUD REST Verbs - Post Get Put Delete

3. Hank, Ashley, Matt review all Pull Requests for the new changes and guide as needed.

4. Revise Python 1, 2, add 3? - Get agreement on topics, find an owner/author. Anne can test and review as needed.

annegentle commented 6 years ago

Status update:

annegentle commented 6 years ago

Closing issue as the reviews are ongoing in email and in preparation for the content sprint.