Skip to content

Commit 342f435

Browse files
committed
Initialize Content
0 parents  commit 342f435

File tree

10 files changed

+265
-0
lines changed

10 files changed

+265
-0
lines changed

.github/workflows/canvas-sync.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Sync with Canvas
2+
3+
on:
4+
push:
5+
branches: [master, main]
6+
paths:
7+
- "README.md"
8+
9+
jobs:
10+
sync:
11+
name: Sync with Canvas
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
18+
- name: Set up Ruby
19+
uses: ruby/setup-ruby@v1
20+
with:
21+
ruby-version: 2.6
22+
23+
- name: Install github-to-canvas
24+
run: gem install github-to-canvas
25+
26+
# Secret stored in learn-co-curriculum Settings/Secrets
27+
- name: Sync from .canvas file
28+
run: github-to-canvas -a -lr
29+
env:
30+
CANVAS_API_KEY: ${{ secrets.CANVAS_API_KEY }}
31+
CANVAS_API_PATH: ${{ secrets.CANVAS_API_PATH }}

.gitignore

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Created by https://www.gitignore.io/api/node
2+
3+
.DS_Store
4+
.vscode
5+
6+
### Node ###
7+
# Logs
8+
logs
9+
*.log
10+
npm-debug.log*
11+
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
17+
# Directory for instrumented libs generated by jscoverage/JSCover
18+
lib-cov
19+
20+
# Compiled binary addons (http://nodejs.org/api/addons.html)
21+
build/Release
22+
23+
# Dependency directories
24+
node_modules
25+
jspm_packages
26+
27+
# Optional npm cache directory
28+
.npm
29+
30+
# Optional REPL history
31+
.node_repl_history
32+
33+
# Learn-specific .results.json
34+
.results.json
35+
36+
# Ignore bundler config.
37+
/.bundle
38+
39+
# Ignore the default SQLite database.
40+
/db/*.sqlite3
41+
/db/*.sqlite3-journal
42+
43+
# Ignore all logfiles and tempfiles.
44+
/log/*
45+
!/log/.keep
46+
/tmp
47+
48+
# Virtual env metadata
49+
.venv
50+
51+
# pytest cache
52+
.pytest_cache

CONTRIBUTING.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Contributing to Learn.co Curriculum
2+
3+
We're really exited that you're about to contribute to the [open
4+
curriculum](https://learn.co/content-license) on [Learn.co](https://learn.co).
5+
If this is your first time contributing, please continue reading to learn how to
6+
make the most meaningful and useful impact possible.
7+
8+
## Raising an Issue to Encourage a Contribution
9+
10+
If you notice a problem with the curriculum that you believe needs improvement
11+
but you're unable to make the change yourself, you should raise a Github issue
12+
containing a clear description of the problem. Include relevant snippets of the
13+
content and/or screenshots if applicable. Curriculum owners regularly review
14+
issue lists and your issue will be prioritized and addressed as appropriate.
15+
16+
## Submitting a Pull Request to Suggest an Improvement
17+
18+
If you see an opportunity for improvement and can make the change yourself go
19+
ahead and use a typical git workflow to make it happen:
20+
21+
- Fork this curriculum repository
22+
- Make the change on your fork, with descriptive commits in the standard format
23+
- Open a Pull Request against this repo
24+
25+
A curriculum owner will review your change and approve or comment on it in due
26+
course.
27+
28+
## Why Contribute?
29+
30+
Curriculum on Learn is publicly and freely available under Learn's
31+
[Educational Content License](https://learn.co/content-license). By embracing an
32+
open-source contribution model, our goal is for the curriculum on Learn to
33+
become, in time, the best educational content the world has ever seen.
34+
35+
We need help from the community of Learners to maintain and improve the
36+
educational content. Everything from fixing typos, to correcting out-dated
37+
information, to improving exposition, to adding better examples, to fixing
38+
tests—all contributions to making the curriculum more effective are welcome.

LICENSE.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Learn.co Educational Content License
2+
3+
Copyright (c) 2021 Flatiron School, Inc
4+
5+
The Flatiron School, Inc. owns this Educational Content. However, the Flatiron
6+
School supports the development and availability of educational materials in the
7+
public domain. Therefore, the Flatiron School grants Users of the Flatiron
8+
Educational Content set forth in this repository certain rights to reuse, build
9+
upon and share such Educational Content subject to the terms of the Educational
10+
Content License set forth [here](http://learn.co/content-license)
11+
(http://learn.co/content-license). You must read carefully the terms and
12+
conditions contained in the Educational Content License as such terms govern
13+
access to and use of the Educational Content.
14+
15+
Flatiron School is willing to allow you access to and use of the Educational
16+
Content only on the condition that you accept all of the terms and conditions
17+
contained in the Educational Content License set forth
18+
[here](http://learn.co/content-license) (http://learn.co/content-license). By
19+
accessing and/or using the Educational Content, you are agreeing to all of the
20+
terms and conditions contained in the Educational Content License. If you do not
21+
agree to any or all of the terms of the Educational Content License, you are
22+
prohibited from accessing, reviewing or using in any way the Educational
23+
Content.

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Deserialization : Code-Along
2+
3+
## Learning Goals
4+
5+
- Goal 1
6+
7+
---
8+
9+
## Key Vocab
10+
11+
- **term**: definition
12+
13+
---
14+
15+
## Introduction
16+
17+
Introduce topic
18+
---
19+
20+
## Conclusion
21+
22+
23+
## Solution Code
24+
25+
```
26+
27+
---
28+
29+
## Resources

lib/__init__.py

Whitespace-only changes.

lib/testing/__init__.py

Whitespace-only changes.

lib/testing/class_test.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
"""
2+
pytest requires that all testing modules, classes, methods, and functions
3+
contain the word "test" somewhere within them.
4+
5+
The conventions for naming tests in the Python curriculum are as follows:
6+
7+
- One test module should be created for each class. If there are no classes
8+
to test, one test module should be created for each module being tested.
9+
- Test modules should be named {classname}_test.py, or {modulename}_test.py
10+
if necessary.
11+
- Test modules should be located at the base of the "testing" package.
12+
13+
In {classname}_test.py:
14+
- There should be one testing class, named Test{Classname}.
15+
- The testing class should contain the following docstring:
16+
17+
'''Class {Classname} in {modulename}.py'''
18+
19+
- There should be at least one testing method for each instance, class,
20+
or static method belonging to the class being tested, including
21+
__init__.
22+
- Each testing method should be named test_{performs/does_behavior},
23+
where {performs/does_behavior} is a clear and concise description of
24+
the desired behavior.
25+
- Each testing method should only test one behavior.
26+
- Each testing method should contain the following docstring:
27+
28+
'''performs/does behavior when {x} happens.'''
29+
30+
...where {x} describes the manipulation that takes place within
31+
the test.
32+
"""
33+
34+
class TestClass:
35+
'''Class {Classname} in {modulename}.py'''
36+
37+
def test_performs_behavior(self):
38+
'''performs behavior when something happens.'''
39+
assert(False)

lib/testing/conftest.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env python3
2+
3+
def pytest_itemcollected(item):
4+
par = item.parent.obj
5+
node = item.obj
6+
pref = par.__doc__.strip() if par.__doc__ else par.__class__.__name__
7+
suf = node.__doc__.strip() if node.__doc__ else node.__name__
8+
if pref or suf:
9+
item._nodeid = ' '.join((pref, suf))

lib/testing/module_test.py

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
"""
2+
pytest requires that all testing modules, classes, methods, and functions
3+
contain the word "test" somewhere within them.
4+
5+
The conventions for naming tests in the Python curriculum are as follows:
6+
7+
- One test module should be created for each class. If there are no classes
8+
to test, one test module should be created for each module being tested.
9+
- Test modules should be named {classname}_test.py, or {modulename}_test.py
10+
if necessary.
11+
- Test modules should be located at the base of the "testing" package.
12+
13+
In {modulename}_test.py:
14+
- There should be one testing class for each function, named
15+
Test{Functionname}.
16+
- Each testing class should contain the following docstring:
17+
18+
'''Function {functionname}() in {modulename}.py'''
19+
20+
- Each testing method should be named test_{performs/does_behavior},
21+
where {performs/does_behavior} is a clear and concise description of
22+
the desired behavior.
23+
- Each testing method should only test one behavior.
24+
- Each testing method should contain the following docstring:
25+
26+
'''performs/does behavior when {x} happens.'''
27+
28+
...where {x} describes the manipulation that takes place within
29+
the test.
30+
"""
31+
32+
class TestFunctionA:
33+
'''Function {functionname}() in {modulename}.py'''
34+
35+
def test_performs_behavior(self):
36+
'''performs behavior when something happens.'''
37+
assert(False)
38+
39+
class TestFunctionB:
40+
'''Function {functionname}() in {modulename}.py'''
41+
42+
def test_performs_behavior(self):
43+
'''performs behavior when something happens.'''
44+
assert(False)

0 commit comments

Comments
 (0)