Skip to content

Commit 91acee6

Browse files
committed
Merge branch 'master' of https://github.com/creativecommons/creativecommons.github.io-source into add_reactivity_menu
2 parents 70c47a6 + f3ed490 commit 91acee6

File tree

7 files changed

+309
-97
lines changed

7 files changed

+309
-97
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
title: Add New Sections, Descriptions, Help Texts, Code Examples, Schemas, and Serializers
2+
3+
---
4+
categories:
5+
cc-catalog-api
6+
gsod
7+
gsod-2020
8+
open-source
9+
community
10+
---
11+
author: ariessa
12+
---
13+
series: gsod-2020-cccatalog-api-usage-guide
14+
---
15+
pub_date: 2020-10-21
16+
---
17+
body:
18+
19+
Welcome to my third blog entry! For week 5 and 6, I added new sections, descriptions, help texts, code examples, schemas, and serializers. I was so productive these past two weeks.
20+
21+
22+
### Week 5
23+
For this week, I managed to add a lot of stuff into the documentation.
24+
I figured out how to add help texts to classes and how to create serializers.
25+
I also managed to move all code examples under response samples.
26+
In order to do this, I created a new class called CustomAutoSchema to add [x-code-samples](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md#x-codesamples).
27+
Other stuff that I did include creating new sections such as “Register and Authenticate” and “Glossary”.
28+
The hardest part of this week is probably trying to figure out how to add request body examples and move code examples.
29+
30+
31+
### Week 6
32+
33+
For week 6, I added another section called Contribute that provides a todolist to start contributing on Github.
34+
I also wrote and published this blog post.
35+
36+
----
37+
38+
All caught up!
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
title: Add Response Samples and Descriptions for API Endpoints
2+
---
3+
categories:
4+
cc-catalog-api
5+
gsod
6+
gsod-2020
7+
open-source
8+
community
9+
---
10+
author: ariessa
11+
---
12+
series: gsod-2020-cccatalog-api-usage-guide
13+
---
14+
pub_date: 2020-10-09
15+
---
16+
body:
17+
18+
Well, hello again 👋! For week 3 and week 4, I added response samples and descriptions for API endpoints. Writing documentation feels a bit like coding at this point because I need to read a lot about drf-yasg, dig through issues and questions at Github / Stackoverflow to ensure that I don’t ask redundant (or even stupid) questions.
19+
20+
### Week 3
21+
22+
Week 3 was quite hectic. I moved back to my hometown during week 3.
23+
Took 3 days off to settle my stuff and set up a workspace.
24+
I worked on my GSoD project for only 2 days, Monday and Tuesday.
25+
I managed to create response samples for most API endpoints.
26+
Had a monthly video call with Kriti this week.
27+
28+
### Week 4
29+
30+
For this week, I reviewed what I’ve done and what I haven’t to estimate new completion time.
31+
Thank god, I have a buffer week in my GSoD timeline and deliverables.
32+
So yeah, all is good in terms of completion time.
33+
I started to write descriptions for API endpoints.
34+
Submitted first PR and published blog entry.
35+
36+
----
37+
38+
Over and out.
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
_model: page
2+
---
3+
_template: page-with-toc.html
4+
---
5+
title: Python Guidelines
6+
---
7+
description: These Python Guidelines (style guide) empower the community to
8+
focus on the intent of the code and work together with a minimum of friction.
9+
---
10+
body:
11+
12+
13+
## Code Formatting
14+
15+
### Overview
16+
17+
All Python code must be formatted using [Black][black], *the uncompromising
18+
Python code formatter*. Each project should contain a `pyproject.toml`
19+
configuration file that limits line length to 79 characters.
20+
21+
[black]: https://github.com/psf/black
22+
23+
### Examples
24+
25+
- Black configuration (`pyproject.toml`): [GitHub Search · org:creativecommons
26+
filename:pyproject.toml][blackconfig]
27+
- GitHub Actions workflow: [GitHub Search · org:creativecommons "pipenv run
28+
black"][blackactions]
29+
30+
[blackconfig]: https://github.com/search?q=org%3Acreativecommons+filename:pyproject.toml
31+
[blackactions]: https://github.com/search?q=org%3Acreativecommons+%22pipenv+run+black%22&type=code
32+
33+
34+
## Style and Quality
35+
36+
### Overview
37+
38+
All Python code must be checked using [flake8][flake8], *a python tool that
39+
glues together pep8, pyflakes, mccabe, and third-party plugins to check
40+
the style and quality of some python code.*
41+
42+
[flake8]: https://gitlab.com/pycqa/flake8
43+
44+
### Conflicts with Black
45+
46+
Where flake8 conflicts with Black, the flake8 check should be skipped. For
47+
example, there are instances where black formats code that generates flake8
48+
warning for [Whitespace before ':' (E203)][e203].
49+
50+
[e203]: https://www.flake8rules.com/rules/E203.html
51+
52+
53+
### Examples
54+
55+
- flake8 configuration (`.flake8`): [GitHub Search · org:creativecommons
56+
filename:.flake8][flake8conf]
57+
- flake8 skip E203 warning: [GitHub Search · org:creativecommons "noqa:
58+
E203"][skipe203]
59+
- GitHub Actions workflow: [GitHub Search · org:creativecommons "pipenv run
60+
flake8"][flake8actions]
61+
62+
[flake8conf]: https://github.com/search?q=org%3Acreativecommons+filename:.flake8
63+
[skipe203]: https://github.com/search?q=org%3Acreativecommons+%22noqa%3A+E203%22&type=code
64+
[flake8actions]: https://github.com/search?q=org%3Acreativecommons+%22pipenv+run+flake8%22&type=code
65+
66+
67+
## Development Environment
68+
69+
### Overview
70+
71+
Please work to minimize the number of development related technologies. This
72+
helps minimize the overhead of contributing to multiple projects. Most of our
73+
projects use either [Pipenv][pipenv], the Python Development Workflow for
74+
Humans, or [docker-compose][dockercompose], a tool for defining and running
75+
multi-container Docker applications.
76+
77+
[pipenv]: https://github.com/pypa/pipenv
78+
[dockercompose]: https://docs.docker.com/compose/
79+
80+
81+
### Examples
82+
83+
- Pipenv configuration: [GitHub Search · org:creativecommons
84+
filename:Pipfile][pipenvconf]
85+
- Docker-compose example: [docker-compose.yml for cccatalog][dockercomposeconf]
86+
and the [related README.md][relatedreadme]
87+
88+
[pipenvconf]: https://github.com/search?q=org%3Acreativecommons+filename:Pipfile
89+
[dockercomposeconf]: https://github.com/creativecommons/cccatalog/blob/master/src/cc_catalog_airflow/docker-compose.yml
90+
[relatedreadme]: https://github.com/creativecommons/cccatalog#development-setup-for-airflow-and-api-puller-scripts
91+
92+
93+
## Additional Guidance
94+
95+
Thankfully, Black removes a lot of style work and worry. Where there is room
96+
for developer discretion, the following guides are excellent resources:
97+
98+
- [Google Python Style Guide][googlestyle]
99+
- [Code Style — The Hitchhiker's Guide to Python][hitchhikers]
100+
101+
[googlestyle]: https://google.github.io/styleguide/pyguide.html
102+
[hitchhikers]: https://docs.python-guide.org/writing/style/

0 commit comments

Comments
 (0)