diff options
author | 2021-03-30 13:26:11 +0300 | |
---|---|---|
committer | 2021-03-30 13:26:11 +0300 | |
commit | 397d143161563fcdfcec32637e8d4d03dd6541f2 (patch) | |
tree | f2d32e6f9b8dae443ab8936cbcd4d03bc78fcaa4 | |
parent | Fix applying description changes to wrong places (diff) | |
parent | Merge pull request #393 from ks129/guides-app (diff) |
Merge branch 'dewikification' into resources-lists
63 files changed, 2734 insertions, 179 deletions
@@ -18,6 +18,8 @@ pyyaml = "~=5.1" pyuwsgi = {version = "~=2.0", sys_platform = "!='win32'"} sentry-sdk = "~=0.14" gitpython = "~=3.1.7" +markdown = "~=3.3.4" +python-frontmatter = "~=1.0" [dev-packages] coverage = "~=5.0" @@ -34,6 +36,7 @@ mccabe = "~=0.6.1" pep8-naming = "~=0.9" pre-commit = "~=2.1" unittest-xml-reporting = "~=3.0" +pyfakefs = "~=4.4.0" [requires] python_version = "3.7" diff --git a/Pipfile.lock b/Pipfile.lock index 02c588af..bf11b2a8 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "bab754fef6dcbe3cebcf486de2811830476ef1123a34bbeedeeb6e3b488c5f1f" + "sha256": "dc85f4f1b6ef58c2832d79542d6e88729cd2464bdf9324fef4d0757561f07ca7" }, "pipfile-spec": 6, "requires": { @@ -26,25 +26,26 @@ }, "certifi": { "hashes": [ - "sha256:1f422849db327d534e3d0c5f02a263458c3955ec0aae4ff09b95f195c59f4edd", - "sha256:f05def092c44fbf25834a51509ef6e631dc19765ab8a57b4e7ab85531f0a9cf4" + "sha256:1a4995114262bffbc2413b159f2a1a480c969de6e6eb13ee966d470af86af59c", + "sha256:719a74fb9e33b9bd44cc7f3a8d94bc35e4049deebe19ba7d8e108280cfd59830" ], - "version": "==2020.11.8" + "version": "==2020.12.5" }, "chardet": { "hashes": [ - "sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae", - "sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691" + "sha256:0d6f53a15db4120f2b08c94f11e7d93d2c911ee118b6b30a04ec3ee8310179fa", + "sha256:f864054d66fd9118f2e67044ac8981a54775ec5b67aed0441892edb553d21da5" ], - "version": "==3.0.4" + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", + "version": "==4.0.0" }, "django": { "hashes": [ - "sha256:8c334df4160f7c89f6a8a359dd4e95c688ec5ac0db5db75fcc6fec8f590dc8cf", - "sha256:96436d3d2f744d26e193bfb5a1cff3e01b349f835bb0ea16f71743accf9c6fa9" + "sha256:2afe4900667bcceac792fa34b4fb25448c4fd950d8b32c5508b3442c4b10442a", + "sha256:6f13c3e8109236129c49d65a42fbf30c928e66b05ca6862246061b9343ecbaf2" ], "index": "pypi", - "version": "==3.0.11" + "version": "==3.0.13" }, "django-environ": { "hashes": [ @@ -103,11 +104,11 @@ }, "gitpython": { "hashes": [ - "sha256:6eea89b655917b500437e9668e4a12eabdcf00229a0df1762aabd692ef9b746b", - "sha256:befa4d101f91bad1b632df4308ec64555db684c360bd7d2130b4807d49ce86b8" + "sha256:3283ae2fba31c913d857e12e5ba5f9a7772bbc064ae2bb09efafa71b0dd4939b", + "sha256:be27633e7509e58391f10207cd32b2a6cf5b908f92d9cd30da2e514e1137af61" ], "index": "pypi", - "version": "==3.1.11" + "version": "==3.1.14" }, "idna": { "hashes": [ @@ -117,6 +118,14 @@ "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==2.10" }, + "importlib-metadata": { + "hashes": [ + "sha256:742add720a20d0467df2f444ae41704000f50e1234f46174b51f9c6031a1bd71", + "sha256:b74159469b464a99cb8cc3e21973e4d96e05d3024d337313fedb618a6e86e6f4" + ], + "markers": "python_version < '3.8'", + "version": "==3.7.3" + }, "libsass": { "hashes": [ "sha256:1521d2a8d4b397c6ec90640a1f6b5529077035efc48ef1c2e53095544e713d1b", @@ -135,15 +144,35 @@ ], "version": "==0.20.1" }, + "markdown": { + "hashes": [ + "sha256:31b5b491868dcc87d6c24b7e3d19a0d730d59d3e46f4eea6430a321bed387a49", + "sha256:96c3ba1261de2f7547b46a00ea8463832c921d3f9d6aba3f255a6f71386db20c" + ], + "index": "pypi", + "version": "==3.3.4" + }, "psycopg2-binary": { "hashes": [ "sha256:f5ab93a2cb2d8338b1674be43b442a7f544a0971da062a5da774ed40587f18f5", "sha256:ba381aec3a5dc29634f20692349d73f2d21f17653bda1decf0b52b11d694541f", "sha256:e82aba2188b9ba309fd8e271702bd0d0fc9148ae3150532bbb474f4590039ffb", "sha256:0e4dc3d5996760104746e6cfcdb519d9d2cd27c738296525d5867ea695774e67", - "sha256:e74a55f6bad0e7d3968399deb50f61f4db1926acf4a6d83beaaa7df986f48b1c", - "sha256:b8a3715b3c4e604bcc94c90a825cd7f5635417453b253499664f784fc4da0152", + "sha256:11b9c0ebce097180129e422379b824ae21c8f2a6596b159c7659e2e5a00e1aa0", + "sha256:15978a1fbd225583dd8cdaf37e67ccc278b5abecb4caf6b2d6b8e2b948e953f6", + "sha256:1fabed9ea2acc4efe4671b92c669a213db744d2af8a9fc5d69a8e9bc14b7a9db", + "sha256:2dac98e85565d5688e8ab7bdea5446674a83a3945a8f416ad0110018d1501b94", + "sha256:42ec1035841b389e8cc3692277a0bd81cdfe0b65d575a2c8862cec7a80e62e52", + "sha256:6422f2ff0919fd720195f64ffd8f924c1395d30f9a495f31e2392c2efafb5056", + "sha256:6a32f3a4cb2f6e1a0b15215f448e8ce2da192fd4ff35084d80d5e39da683e79b", + "sha256:7312e931b90fe14f925729cde58022f5d034241918a5c4f9797cac62f6b3a9dd", + "sha256:7d92a09b788cbb1aec325af5fcba9fed7203897bbd9269d5691bb1e3bce29550", "sha256:833709a5c66ca52f1d21d41865a637223b368c0ee76ea54ca5bad6f2526c7679", + "sha256:89705f45ce07b2dfa806ee84439ec67c5d9a0ef20154e0e475e2b2ed392a5b83", + "sha256:8cd0fb36c7412996859cb4606a35969dd01f4ea34d9812a141cd920c3b18be77", + "sha256:950bc22bb56ee6ff142a2cb9ee980b571dd0912b0334aa3fe0fe3788d860bea2", + "sha256:a0c50db33c32594305b0ef9abc0cb7db13de7621d2cadf8392a1d9b3c437ef77", + "sha256:a0eb43a07386c3f1f1ebb4dc7aafb13f67188eab896e7397aa1ee95a9c884eb2", "sha256:aaa4213c862f0ef00022751161df35804127b78adf4a2755b9f991a507e425fd", "sha256:7d92a09b788cbb1aec325af5fcba9fed7203897bbd9269d5691bb1e3bce29550", "sha256:15978a1fbd225583dd8cdaf37e67ccc278b5abecb4caf6b2d6b8e2b948e953f6", @@ -176,16 +205,25 @@ "index": "pypi", "version": "==2.8.6" }, + "python-frontmatter": { + "hashes": [ + "sha256:766ae75f1b301ffc5fe3494339147e0fd80bc3deff3d7590a93991978b579b08", + "sha256:e98152e977225ddafea6f01f40b4b0f1de175766322004c826ca99842d19a7cd" + ], + "index": "pypi", + "version": "==1.0.0" + }, "pytz": { "hashes": [ - "sha256:3e6b7dd2d1e0a59084bcee14a17af60c5c562cdc16d828e8eba2e683d3a7e268", - "sha256:5c55e189b682d420be27c6995ba6edce0c0a77dd67bfbe2ae6607134d5851ffd" + "sha256:83a4a90894bf38e243cf052c8b58f381bfe9a7a483f6a9cab140bc7f702ac4da", + "sha256:eb10ce3e7736052ed3623d49975ce333bcd712c7bb19a58b9e2089d4057d0798" ], - "version": "==2020.4" + "version": "==2021.1" }, "pyuwsgi": { "hashes": [ "sha256:0bd14517398f494d828d77a9bf72b5a6cbef0112e1cc05e9a0080fa8828ccfa0", + "sha256:149675b2e020b0e833e8b871a545751ca346cbfed85c8fd2b320a01d40dc3d8f", "sha256:285e263a9094389f13cfdefd033a4e99fbed3ad120dba9ac5093846cc03ac5ab", "sha256:297d1d0b8c472374b12eda7f17a9f5de67cf516612e42b71a7636afb9d1e3974", "sha256:5439f0f3ef5d6bf1622f341662d04c1d92b88889db40b295419e5fe75a7c7d45", @@ -195,6 +233,7 @@ "sha256:90e4235020048456ad867aefc383cdf5528b7f6e327555ceec579c428a828759", "sha256:94d4287b155aa789ce4b6f671c981f7d6c58fc3113330e2f29ac7926cb854645", "sha256:a425f562f382a097ca49df26b70d47d12f0cf0abf233610f3f58b1f7f780355e", + "sha256:ac79dead0685beab5ecfe0926426849a44c5572528f89bb17f6ecf5eb561024e", "sha256:bddeb8df77010d0f842068765a0b3155fdcfd847f14bc1ba89fc7e37914a13d2", "sha256:dac4a04dc0f69d641dba984e83214d2c2cc098496c5d5585e7d3f4e7a9190f84" ], @@ -204,36 +243,54 @@ }, "pyyaml": { "hashes": [ - "sha256:06a0d7ba600ce0b2d2fe2e78453a470b5a6e000a985dd4a4e54e436cc36b0e97", - "sha256:240097ff019d7c70a4922b6869d8a86407758333f02203e0fc6ff79c5dcede76", - "sha256:4f4b913ca1a7319b33cfb1369e91e50354d6f07a135f3b901aca02aa95940bd2", - "sha256:69f00dca373f240f842b2931fb2c7e14ddbacd1397d57157a9b005a6a9942648", - "sha256:73f099454b799e05e5ab51423c7bcf361c58d3206fa7b0d555426b1f4d9a3eaf", - "sha256:74809a57b329d6cc0fdccee6318f44b9b8649961fa73144a98735b0aaf029f1f", - "sha256:7739fc0fa8205b3ee8808aea45e968bc90082c10aef6ea95e855e10abf4a37b2", - "sha256:95f71d2af0ff4227885f7a6605c37fd53d3a106fcab511b8860ecca9fcf400ee", - "sha256:b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d", - "sha256:cc8955cfbfc7a115fa81d85284ee61147059a753344bc51098f3ccd69b0d7e0c", - "sha256:d13155f591e6fcc1ec3b30685d50bf0711574e2c0dfffd7644babf8b5102ca1a" + "sha256:08682f6b72c722394747bddaf0aa62277e02557c0fd1c42cb853016a38f8dedf", + "sha256:0f5f5786c0e09baddcd8b4b45f20a7b5d61a7e7e99846e3c799b05c7c53fa696", + "sha256:129def1b7c1bf22faffd67b8f3724645203b79d8f4cc81f674654d9902cb4393", + "sha256:294db365efa064d00b8d1ef65d8ea2c3426ac366c0c4368d930bf1c5fb497f77", + "sha256:3b2b1824fe7112845700f815ff6a489360226a5609b96ec2190a45e62a9fc922", + "sha256:3bd0e463264cf257d1ffd2e40223b197271046d09dadf73a0fe82b9c1fc385a5", + "sha256:4465124ef1b18d9ace298060f4eccc64b0850899ac4ac53294547536533800c8", + "sha256:49d4cdd9065b9b6e206d0595fee27a96b5dd22618e7520c33204a4a3239d5b10", + "sha256:4e0583d24c881e14342eaf4ec5fbc97f934b999a6828693a99157fde912540cc", + "sha256:5accb17103e43963b80e6f837831f38d314a0495500067cb25afab2e8d7a4018", + "sha256:607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e", + "sha256:6c78645d400265a062508ae399b60b8c167bf003db364ecb26dcab2bda048253", + "sha256:72a01f726a9c7851ca9bfad6fd09ca4e090a023c00945ea05ba1638c09dc3347", + "sha256:74c1485f7707cf707a7aef42ef6322b8f97921bd89be2ab6317fd782c2d53183", + "sha256:895f61ef02e8fed38159bb70f7e100e00f471eae2bc838cd0f4ebb21e28f8541", + "sha256:8c1be557ee92a20f184922c7b6424e8ab6691788e6d86137c5d93c1a6ec1b8fb", + "sha256:bb4191dfc9306777bc594117aee052446b3fa88737cd13b7188d0e7aa8162185", + "sha256:bfb51918d4ff3d77c1c856a9699f8492c612cde32fd3bcd344af9be34999bfdc", + "sha256:c20cfa2d49991c8b4147af39859b167664f2ad4561704ee74c1de03318e898db", + "sha256:cb333c16912324fd5f769fff6bc5de372e9e7a202247b48870bc251ed40239aa", + "sha256:d2d9808ea7b4af864f35ea216be506ecec180628aced0704e34aca0b040ffe46", + "sha256:d483ad4e639292c90170eb6f7783ad19490e7a8defb3e46f97dfe4bacae89122", + "sha256:dd5de0646207f053eb0d6c74ae45ba98c3395a571a2891858e87df7c9b9bd51b", + "sha256:e1d4970ea66be07ae37a3c2e48b5ec63f7ba6804bdddfdbd3cfd954d25a82e63", + "sha256:e4fac90784481d221a8e4b1162afa7c47ed953be40d31ab4629ae917510051df", + "sha256:fa5ae20527d8e831e8230cbffd9f8fe952815b2b7dae6ffec25318803a7528fc", + "sha256:fd7f6999a8070df521b6384004ef42833b9bd62cfee11a09bda1079b4b704247", + "sha256:fdc842473cd33f45ff6bce46aea678a54e3d21f1b61a7750ce3c498eedfe25d6", + "sha256:fe69978f3f768926cfa37b867e3843918e012cf83f680806599ddce33c2c68b0" ], "index": "pypi", - "version": "==5.3.1" + "version": "==5.4.1" }, "requests": { "hashes": [ - "sha256:b3559a131db72c33ee969480840fff4bb6dd111de7dd27c8ee1f820f4f00231b", - "sha256:fe75cc94a9443b9246fc7049224f75604b113c36acb93f87b80ed42c44cbb898" + "sha256:27973dd4a904a4f13b263a19c866c13b92a39ed1c964655f025f3f8d3d75b804", + "sha256:c210084e36a42ae6b9219e00e48287def368a26d03a048ddad7bfee44f75871e" ], "index": "pypi", - "version": "==2.24.0" + "version": "==2.25.1" }, "sentry-sdk": { "hashes": [ - "sha256:17b725df2258354ccb39618ae4ead29651aa92c01a92acf72f98efe06ee2e45a", - "sha256:9040539485226708b5cad0401d76628fba4eed9154bf301c50579767afe344fd" + "sha256:4ae8d1ced6c67f1c8ea51d82a16721c166c489b76876c9f2c202b8a50334b237", + "sha256:e75c8c58932bda8cd293ea8e4b242527129e1caaec91433d21b8b2f20fee030b" ], "index": "pypi", - "version": "==0.19.2" + "version": "==0.20.3" }, "six": { "hashes": [ @@ -245,11 +302,11 @@ }, "smmap": { "hashes": [ - "sha256:54c44c197c819d5ef1991799a7e30b662d1e520f2ac75c9efbeb54a742214cf4", - "sha256:9c98bbd1f9786d22f14b3d4126894d56befb835ec90cef151af566c7e19b5d24" + "sha256:7bfcf367828031dc893530a29cb35eb8c8f2d7c8f2d0989354d75d24c8573714", + "sha256:84c2751ef3072d4f6b2785ec7ee40244c6f45eb934d9e543e2c51f1bd3d54c50" ], "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==3.0.4" + "version": "==3.0.5" }, "sqlparse": { "hashes": [ @@ -259,13 +316,22 @@ "markers": "python_version >= '3.5'", "version": "==0.4.1" }, + "typing-extensions": { + "hashes": [ + "sha256:7cb407020f00f7bfc3cb3e7881628838e69d8f3fcab2f64742a5e76b2f841918", + "sha256:99d4073b617d30288f569d3f13d2bd7548c3a7e4c8de87db09a9d29bb3a4a60c", + "sha256:dafc7639cde7f1b6e1acc0f457842a83e722ccca8eef5270af2d74792619a89f" + ], + "markers": "python_version < '3.8'", + "version": "==3.7.4.3" + }, "urllib3": { "hashes": [ - "sha256:8d7eaa5a82a1cac232164990f04874c594c9453ec55eef02eab885aa02fc17a2", - "sha256:f5321fbe4bf3fefa0efd0bfe7fb14e90909eb62a48ccda331726b4319897dd5e" + "sha256:2f4da4594db7e1e110a944bb1b551fdf4e6c136ad42e4234131391e21eb5b0df", + "sha256:e7b021f7241115872f92f43c6508082facffbd1c048e3c6e2bb9c2a157e28937" ], "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'", - "version": "==1.25.11" + "version": "==1.26.4" }, "whitenoise": { "hashes": [ @@ -274,6 +340,14 @@ ], "index": "pypi", "version": "==5.2.0" + }, + "zipp": { + "hashes": [ + "sha256:3607921face881ba3e026887d8150cca609d517579abe052ac81fc5aeffdbd76", + "sha256:51cb66cc54621609dd593d1787f286ee42a5c0adbb4b29abea5a63edc3e03098" + ], + "markers": "python_version >= '3.6'", + "version": "==3.4.1" } }, "develop": { @@ -294,10 +368,10 @@ }, "bandit": { "hashes": [ - "sha256:336620e220cf2d3115877685e264477ff9d9abaeb0afe3dc7264f55fa17a3952", - "sha256:41e75315853507aa145d62a78a2a6c5e3240fe14ee7c601459d0df9418196065" + "sha256:216be4d044209fa06cf2a3e51b319769a51be8318140659719aa7a115c35ed07", + "sha256:8a4c7415254d75df8ff3c3b15cfe9042ecee628a1e40b44c15a98890fbfc2608" ], - "version": "==1.6.2" + "version": "==1.7.0" }, "cfgv": { "hashes": [ @@ -309,43 +383,61 @@ }, "coverage": { "hashes": [ - "sha256:0203acd33d2298e19b57451ebb0bed0ab0c602e5cf5a818591b4918b1f97d516", - "sha256:0f313707cdecd5cd3e217fc68c78a960b616604b559e9ea60cc16795c4304259", - "sha256:1c6703094c81fa55b816f5ae542c6ffc625fec769f22b053adb42ad712d086c9", - "sha256:1d44bb3a652fed01f1f2c10d5477956116e9b391320c94d36c6bf13b088a1097", - "sha256:280baa8ec489c4f542f8940f9c4c2181f0306a8ee1a54eceba071a449fb870a0", - "sha256:29a6272fec10623fcbe158fdf9abc7a5fa032048ac1d8631f14b50fbfc10d17f", - "sha256:2b31f46bf7b31e6aa690d4c7a3d51bb262438c6dcb0d528adde446531d0d3bb7", - "sha256:2d43af2be93ffbad25dd959899b5b809618a496926146ce98ee0b23683f8c51c", - "sha256:381ead10b9b9af5f64646cd27107fb27b614ee7040bb1226f9c07ba96625cbb5", - "sha256:47a11bdbd8ada9b7ee628596f9d97fbd3851bd9999d398e9436bd67376dbece7", - "sha256:4d6a42744139a7fa5b46a264874a781e8694bb32f1d76d8137b68138686f1729", - "sha256:50691e744714856f03a86df3e2bff847c2acede4c191f9a1da38f088df342978", - "sha256:530cc8aaf11cc2ac7430f3614b04645662ef20c348dce4167c22d99bec3480e9", - "sha256:582ddfbe712025448206a5bc45855d16c2e491c2dd102ee9a2841418ac1c629f", - "sha256:63808c30b41f3bbf65e29f7280bf793c79f54fb807057de7e5238ffc7cc4d7b9", - "sha256:71b69bd716698fa62cd97137d6f2fdf49f534decb23a2c6fc80813e8b7be6822", - "sha256:7858847f2d84bf6e64c7f66498e851c54de8ea06a6f96a32a1d192d846734418", - "sha256:78e93cc3571fd928a39c0b26767c986188a4118edc67bc0695bc7a284da22e82", - "sha256:7f43286f13d91a34fadf61ae252a51a130223c52bfefb50310d5b2deb062cf0f", - "sha256:86e9f8cd4b0cdd57b4ae71a9c186717daa4c5a99f3238a8723f416256e0b064d", - "sha256:8f264ba2701b8c9f815b272ad568d555ef98dfe1576802ab3149c3629a9f2221", - "sha256:9342dd70a1e151684727c9c91ea003b2fb33523bf19385d4554f7897ca0141d4", - "sha256:9361de40701666b034c59ad9e317bae95c973b9ff92513dd0eced11c6adf2e21", - "sha256:9669179786254a2e7e57f0ecf224e978471491d660aaca833f845b72a2df3709", - "sha256:aac1ba0a253e17889550ddb1b60a2063f7474155465577caa2a3b131224cfd54", - "sha256:aef72eae10b5e3116bac6957de1df4d75909fc76d1499a53fb6387434b6bcd8d", - "sha256:bd3166bb3b111e76a4f8e2980fa1addf2920a4ca9b2b8ca36a3bc3dedc618270", - "sha256:c1b78fb9700fc961f53386ad2fd86d87091e06ede5d118b8a50dea285a071c24", - "sha256:c3888a051226e676e383de03bf49eb633cd39fc829516e5334e69b8d81aae751", - "sha256:c5f17ad25d2c1286436761b462e22b5020d83316f8e8fcb5deb2b3151f8f1d3a", - "sha256:c851b35fc078389bc16b915a0a7c1d5923e12e2c5aeec58c52f4aa8085ac8237", - "sha256:cb7df71de0af56000115eafd000b867d1261f786b5eebd88a0ca6360cccfaca7", - "sha256:cedb2f9e1f990918ea061f28a0f0077a07702e3819602d3507e2ff98c8d20636", - "sha256:e8caf961e1b1a945db76f1b5fa9c91498d15f545ac0ababbe575cfab185d3bd8" - ], - "index": "pypi", - "version": "==5.3" + "sha256:004d1880bed2d97151facef49f08e255a20ceb6f9432df75f4eef018fdd5a78c", + "sha256:01d84219b5cdbfc8122223b39a954820929497a1cb1422824bb86b07b74594b6", + "sha256:040af6c32813fa3eae5305d53f18875bedd079960822ef8ec067a66dd8afcd45", + "sha256:06191eb60f8d8a5bc046f3799f8a07a2d7aefb9504b0209aff0b47298333302a", + "sha256:13034c4409db851670bc9acd836243aeee299949bd5673e11844befcb0149f03", + "sha256:13c4ee887eca0f4c5a247b75398d4114c37882658300e153113dafb1d76de529", + "sha256:184a47bbe0aa6400ed2d41d8e9ed868b8205046518c52464fde713ea06e3a74a", + "sha256:18ba8bbede96a2c3dde7b868de9dcbd55670690af0988713f0603f037848418a", + "sha256:1aa846f56c3d49205c952d8318e76ccc2ae23303351d9270ab220004c580cfe2", + "sha256:217658ec7187497e3f3ebd901afdca1af062b42cfe3e0dafea4cced3983739f6", + "sha256:24d4a7de75446be83244eabbff746d66b9240ae020ced65d060815fac3423759", + "sha256:2910f4d36a6a9b4214bb7038d537f015346f413a975d57ca6b43bf23d6563b53", + "sha256:2949cad1c5208b8298d5686d5a85b66aae46d73eec2c3e08c817dd3513e5848a", + "sha256:2a3859cb82dcbda1cfd3e6f71c27081d18aa251d20a17d87d26d4cd216fb0af4", + "sha256:2cafbbb3af0733db200c9b5f798d18953b1a304d3f86a938367de1567f4b5bff", + "sha256:2e0d881ad471768bf6e6c2bf905d183543f10098e3b3640fc029509530091502", + "sha256:30c77c1dc9f253283e34c27935fded5015f7d1abe83bc7821680ac444eaf7793", + "sha256:3487286bc29a5aa4b93a072e9592f22254291ce96a9fbc5251f566b6b7343cdb", + "sha256:372da284cfd642d8e08ef606917846fa2ee350f64994bebfbd3afb0040436905", + "sha256:41179b8a845742d1eb60449bdb2992196e211341818565abded11cfa90efb821", + "sha256:44d654437b8ddd9eee7d1eaee28b7219bec228520ff809af170488fd2fed3e2b", + "sha256:4a7697d8cb0f27399b0e393c0b90f0f1e40c82023ea4d45d22bce7032a5d7b81", + "sha256:51cb9476a3987c8967ebab3f0fe144819781fca264f57f89760037a2ea191cb0", + "sha256:52596d3d0e8bdf3af43db3e9ba8dcdaac724ba7b5ca3f6358529d56f7a166f8b", + "sha256:53194af30d5bad77fcba80e23a1441c71abfb3e01192034f8246e0d8f99528f3", + "sha256:5fec2d43a2cc6965edc0bb9e83e1e4b557f76f843a77a2496cbe719583ce8184", + "sha256:6c90e11318f0d3c436a42409f2749ee1a115cd8b067d7f14c148f1ce5574d701", + "sha256:74d881fc777ebb11c63736622b60cb9e4aee5cace591ce274fb69e582a12a61a", + "sha256:7501140f755b725495941b43347ba8a2777407fc7f250d4f5a7d2a1050ba8e82", + "sha256:796c9c3c79747146ebd278dbe1e5c5c05dd6b10cc3bcb8389dfdf844f3ead638", + "sha256:869a64f53488f40fa5b5b9dcb9e9b2962a66a87dab37790f3fcfb5144b996ef5", + "sha256:8963a499849a1fc54b35b1c9f162f4108017b2e6db2c46c1bed93a72262ed083", + "sha256:8d0a0725ad7c1a0bcd8d1b437e191107d457e2ec1084b9f190630a4fb1af78e6", + "sha256:900fbf7759501bc7807fd6638c947d7a831fc9fdf742dc10f02956ff7220fa90", + "sha256:92b017ce34b68a7d67bd6d117e6d443a9bf63a2ecf8567bb3d8c6c7bc5014465", + "sha256:970284a88b99673ccb2e4e334cfb38a10aab7cd44f7457564d11898a74b62d0a", + "sha256:972c85d205b51e30e59525694670de6a8a89691186012535f9d7dbaa230e42c3", + "sha256:9a1ef3b66e38ef8618ce5fdc7bea3d9f45f3624e2a66295eea5e57966c85909e", + "sha256:af0e781009aaf59e25c5a678122391cb0f345ac0ec272c7961dc5455e1c40066", + "sha256:b6d534e4b2ab35c9f93f46229363e17f63c53ad01330df9f2d6bd1187e5eaacf", + "sha256:b7895207b4c843c76a25ab8c1e866261bcfe27bfaa20c192de5190121770672b", + "sha256:c0891a6a97b09c1f3e073a890514d5012eb256845c451bd48f7968ef939bf4ae", + "sha256:c2723d347ab06e7ddad1a58b2a821218239249a9e4365eaff6649d31180c1669", + "sha256:d1f8bf7b90ba55699b3a5e44930e93ff0189aa27186e96071fac7dd0d06a1873", + "sha256:d1f9ce122f83b2305592c11d64f181b87153fc2c2bbd3bb4a3dde8303cfb1a6b", + "sha256:d314ed732c25d29775e84a960c3c60808b682c08d86602ec2c3008e1202e3bb6", + "sha256:d636598c8305e1f90b439dbf4f66437de4a5e3c31fdf47ad29542478c8508bbb", + "sha256:deee1077aae10d8fa88cb02c845cfba9b62c55e1183f52f6ae6a2df6a2187160", + "sha256:ebe78fe9a0e874362175b02371bdfbee64d8edc42a044253ddf4ee7d3c15212c", + "sha256:f030f8873312a16414c0d8e1a1ddff2d3235655a2174e3648b4fa66b3f2f1079", + "sha256:f0b278ce10936db1a37e6954e15a3730bea96a0997c26d7fee88e6c396c2086d", + "sha256:f11642dddbb0253cc8853254301b51390ba0081750a8ac03f20ea8103f0c56b6" + ], + "index": "pypi", + "version": "==5.5" }, "distlib": { "hashes": [ @@ -363,19 +455,19 @@ }, "flake8": { "hashes": [ - "sha256:749dbbd6bfd0cf1318af27bf97a14e28e5ff548ef8e5b1566ccfb25a11e7c839", - "sha256:aadae8761ec651813c24be05c6f7b4680857ef6afaae4651a4eccaef97ce6c3b" + "sha256:12d05ab02614b6aee8df7c36b97d1a3b2372761222b19b58621355e82acddcff", + "sha256:78873e372b12b093da7b5e5ed302e8ad9e988b38b063b61ad937f26ca58fc5f0" ], "index": "pypi", - "version": "==3.8.4" + "version": "==3.9.0" }, "flake8-annotations": { "hashes": [ - "sha256:0bcebb0792f1f96d617ded674dca7bf64181870bfe5dace353a1483551f8e5f1", - "sha256:bebd11a850f6987a943ce8cdff4159767e0f5f89b3c88aca64680c2175ee02df" + "sha256:40a4d504cdf64126ea0bdca39edab1608bc6d515e96569b7e7c3c59c84f66c36", + "sha256:eabbfb2dd59ae0e9835f509f930e79cd99fa4ff1026fe6ca073503a57407037c" ], "index": "pypi", - "version": "==2.4.1" + "version": "==2.6.1" }, "flake8-bandit": { "hashes": [ @@ -386,19 +478,19 @@ }, "flake8-bugbear": { "hashes": [ - "sha256:a3ddc03ec28ba2296fc6f89444d1c946a6b76460f859795b35b77d4920a51b63", - "sha256:bd02e4b009fb153fe6072c31c52aeab5b133d508095befb2ffcf3b41c4823162" + "sha256:528020129fea2dea33a466b9d64ab650aa3e5f9ffc788b70ea4bc6cf18283538", + "sha256:f35b8135ece7a014bc0aee5b5d485334ac30a6da48494998cc1fabf7ec70d703" ], "index": "pypi", - "version": "==20.1.4" + "version": "==20.11.1" }, "flake8-docstrings": { "hashes": [ - "sha256:3d5a31c7ec6b7367ea6506a87ec293b94a0a46c0bce2bb4975b7f1d09b6f3717", - "sha256:a256ba91bc52307bef1de59e2a009c3cf61c3d0952dbe035d6ff7208940c2edc" + "sha256:99cac583d6c7e32dd28bbfbef120a7c0d1b6dde4adb5a9fd441c4227a6534bde", + "sha256:9fe7c6a306064af8e62a055c2f61e9eb1da55f84bb39caef2b84ce53708ac34b" ], "index": "pypi", - "version": "==1.5.0" + "version": "==1.6.0" }, "flake8-import-order": { "hashes": [ @@ -425,11 +517,11 @@ }, "flake8-tidy-imports": { "hashes": [ - "sha256:62059ca07d8a4926b561d392cbab7f09ee042350214a25cf12823384a45d27dd", - "sha256:c30b40337a2e6802ba3bb611c26611154a27e94c53fc45639e3e282169574fd3" + "sha256:52e5f2f987d3d5597538d5941153409ebcab571635835b78f522c7bf03ca23bc", + "sha256:76e36fbbfdc8e3c5017f9a216c2855a298be85bc0631e66777f4e6a07a859dc4" ], "index": "pypi", - "version": "==4.1.0" + "version": "==4.2.1" }, "flake8-todo": { "hashes": [ @@ -448,27 +540,27 @@ }, "gitpython": { "hashes": [ - "sha256:6eea89b655917b500437e9668e4a12eabdcf00229a0df1762aabd692ef9b746b", - "sha256:befa4d101f91bad1b632df4308ec64555db684c360bd7d2130b4807d49ce86b8" + "sha256:3283ae2fba31c913d857e12e5ba5f9a7772bbc064ae2bb09efafa71b0dd4939b", + "sha256:be27633e7509e58391f10207cd32b2a6cf5b908f92d9cd30da2e514e1137af61" ], "index": "pypi", - "version": "==3.1.11" + "version": "==3.1.14" }, "identify": { "hashes": [ - "sha256:5dd84ac64a9a115b8e0b27d1756b244b882ad264c3c423f42af8235a6e71ca12", - "sha256:c9504ba6a043ee2db0a9d69e43246bc138034895f6338d5aed1b41e4a73b1513" + "sha256:39c0b110c9d0cd2391b6c38cd0ff679ee4b4e98f8db8b06c5d9d9e502711a1e1", + "sha256:efbf090a619255bc31c4fbba709e2805f7d30913fd4854ad84ace52bd276e2f6" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==1.5.9" + "markers": "python_full_version >= '3.6.1'", + "version": "==2.2.0" }, "importlib-metadata": { "hashes": [ - "sha256:77a540690e24b0305878c37ffd421785a6f7e53c8b5720d211b211de8d0e95da", - "sha256:cefa1a2f919b866c5beb7c9f7b0ebb4061f30a8a9bf16d609b000e2dfaceb9c3" + "sha256:742add720a20d0467df2f444ae41704000f50e1234f46174b51f9c6031a1bd71", + "sha256:b74159469b464a99cb8cc3e21973e4d96e05d3024d337313fedb618a6e86e6f4" ], "markers": "python_version < '3.8'", - "version": "==2.0.0" + "version": "==3.7.3" }, "mccabe": { "hashes": [ @@ -503,52 +595,78 @@ }, "pre-commit": { "hashes": [ - "sha256:22e6aa3bd571debb01eb7d34483f11c01b65237be4eebbf30c3d4fb65762d315", - "sha256:905ebc9b534b991baec87e934431f2d0606ba27f2b90f7f652985f5a5b8b6ae6" + "sha256:94c82f1bf5899d56edb1d926732f4e75a7df29a0c8c092559c77420c9d62428b", + "sha256:de55c5c72ce80d79106e48beb1b54104d16495ce7f95b0c7b13d4784193a00af" ], "index": "pypi", - "version": "==2.8.2" + "version": "==2.11.1" }, "pycodestyle": { "hashes": [ - "sha256:2295e7b2f6b5bd100585ebcb1f616591b652db8a741695b3d8f5d28bdc934367", - "sha256:c58a7d2815e0e8d7972bf1803331fb0152f867bd89adf8a01dfd55085434192e" + "sha256:514f76d918fcc0b55c6680472f0a37970994e07bbb80725808c17089be302068", + "sha256:c389c1d06bf7904078ca03399a4816f974a1d590090fecea0c63ec26ebaf1cef" ], "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==2.6.0" + "version": "==2.7.0" }, "pydocstyle": { "hashes": [ - "sha256:19b86fa8617ed916776a11cd8bc0197e5b9856d5433b777f51a3defe13075325", - "sha256:aca749e190a01726a4fb472dd4ef23b5c9da7b9205c0a7857c06533de13fd678" + "sha256:164befb520d851dbcf0e029681b91f4f599c62c5cd8933fd54b1bfbd50e89e1f", + "sha256:d4449cf16d7e6709f63192146706933c7a334af7c0f083904799ccb851c50f6d" ], - "markers": "python_version >= '3.5'", - "version": "==5.1.1" + "markers": "python_version >= '3.6'", + "version": "==6.0.0" + }, + "pyfakefs": { + "hashes": [ + "sha256:082d863e0e2a74351f697da404e329a91e18e5055942e59d1b836e8459b2c94c", + "sha256:1ac3b2845dabe69af56c20691b9347914581195ccdde352535fb7d4ff0055c19" + ], + "index": "pypi", + "version": "==4.4.0" }, "pyflakes": { "hashes": [ - "sha256:0d94e0e05a19e57a99444b6ddcf9a6eb2e5c68d3ca1e98e90707af8152c90a92", - "sha256:35b2d75ee967ea93b55750aa9edbbf72813e06a66ba54438df2cfac9e3c27fc8" + "sha256:910208209dcea632721cb58363d0f72913d9e8cf64dc6f8ae2e02a3609aba40d", + "sha256:e59fd8e750e588358f1b8885e5a4751203a0516e0ee6d34811089ac294c8806f" ], "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==2.2.0" + "version": "==2.3.0" }, "pyyaml": { "hashes": [ - "sha256:06a0d7ba600ce0b2d2fe2e78453a470b5a6e000a985dd4a4e54e436cc36b0e97", - "sha256:240097ff019d7c70a4922b6869d8a86407758333f02203e0fc6ff79c5dcede76", - "sha256:4f4b913ca1a7319b33cfb1369e91e50354d6f07a135f3b901aca02aa95940bd2", - "sha256:69f00dca373f240f842b2931fb2c7e14ddbacd1397d57157a9b005a6a9942648", - "sha256:73f099454b799e05e5ab51423c7bcf361c58d3206fa7b0d555426b1f4d9a3eaf", - "sha256:74809a57b329d6cc0fdccee6318f44b9b8649961fa73144a98735b0aaf029f1f", - "sha256:7739fc0fa8205b3ee8808aea45e968bc90082c10aef6ea95e855e10abf4a37b2", - "sha256:95f71d2af0ff4227885f7a6605c37fd53d3a106fcab511b8860ecca9fcf400ee", - "sha256:b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d", - "sha256:cc8955cfbfc7a115fa81d85284ee61147059a753344bc51098f3ccd69b0d7e0c", - "sha256:d13155f591e6fcc1ec3b30685d50bf0711574e2c0dfffd7644babf8b5102ca1a" + "sha256:08682f6b72c722394747bddaf0aa62277e02557c0fd1c42cb853016a38f8dedf", + "sha256:0f5f5786c0e09baddcd8b4b45f20a7b5d61a7e7e99846e3c799b05c7c53fa696", + "sha256:129def1b7c1bf22faffd67b8f3724645203b79d8f4cc81f674654d9902cb4393", + "sha256:294db365efa064d00b8d1ef65d8ea2c3426ac366c0c4368d930bf1c5fb497f77", + "sha256:3b2b1824fe7112845700f815ff6a489360226a5609b96ec2190a45e62a9fc922", + "sha256:3bd0e463264cf257d1ffd2e40223b197271046d09dadf73a0fe82b9c1fc385a5", + "sha256:4465124ef1b18d9ace298060f4eccc64b0850899ac4ac53294547536533800c8", + "sha256:49d4cdd9065b9b6e206d0595fee27a96b5dd22618e7520c33204a4a3239d5b10", + "sha256:4e0583d24c881e14342eaf4ec5fbc97f934b999a6828693a99157fde912540cc", + "sha256:5accb17103e43963b80e6f837831f38d314a0495500067cb25afab2e8d7a4018", + "sha256:607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e", + "sha256:6c78645d400265a062508ae399b60b8c167bf003db364ecb26dcab2bda048253", + "sha256:72a01f726a9c7851ca9bfad6fd09ca4e090a023c00945ea05ba1638c09dc3347", + "sha256:74c1485f7707cf707a7aef42ef6322b8f97921bd89be2ab6317fd782c2d53183", + "sha256:895f61ef02e8fed38159bb70f7e100e00f471eae2bc838cd0f4ebb21e28f8541", + "sha256:8c1be557ee92a20f184922c7b6424e8ab6691788e6d86137c5d93c1a6ec1b8fb", + "sha256:bb4191dfc9306777bc594117aee052446b3fa88737cd13b7188d0e7aa8162185", + "sha256:bfb51918d4ff3d77c1c856a9699f8492c612cde32fd3bcd344af9be34999bfdc", + "sha256:c20cfa2d49991c8b4147af39859b167664f2ad4561704ee74c1de03318e898db", + "sha256:cb333c16912324fd5f769fff6bc5de372e9e7a202247b48870bc251ed40239aa", + "sha256:d2d9808ea7b4af864f35ea216be506ecec180628aced0704e34aca0b040ffe46", + "sha256:d483ad4e639292c90170eb6f7783ad19490e7a8defb3e46f97dfe4bacae89122", + "sha256:dd5de0646207f053eb0d6c74ae45ba98c3395a571a2891858e87df7c9b9bd51b", + "sha256:e1d4970ea66be07ae37a3c2e48b5ec63f7ba6804bdddfdbd3cfd954d25a82e63", + "sha256:e4fac90784481d221a8e4b1162afa7c47ed953be40d31ab4629ae917510051df", + "sha256:fa5ae20527d8e831e8230cbffd9f8fe952815b2b7dae6ffec25318803a7528fc", + "sha256:fd7f6999a8070df521b6384004ef42833b9bd62cfee11a09bda1079b4b704247", + "sha256:fdc842473cd33f45ff6bce46aea678a54e3d21f1b61a7750ce3c498eedfe25d6", + "sha256:fe69978f3f768926cfa37b867e3843918e012cf83f680806599ddce33c2c68b0" ], "index": "pypi", - "version": "==5.3.1" + "version": "==5.4.1" }, "six": { "hashes": [ @@ -560,26 +678,26 @@ }, "smmap": { "hashes": [ - "sha256:54c44c197c819d5ef1991799a7e30b662d1e520f2ac75c9efbeb54a742214cf4", - "sha256:9c98bbd1f9786d22f14b3d4126894d56befb835ec90cef151af566c7e19b5d24" + "sha256:7bfcf367828031dc893530a29cb35eb8c8f2d7c8f2d0989354d75d24c8573714", + "sha256:84c2751ef3072d4f6b2785ec7ee40244c6f45eb934d9e543e2c51f1bd3d54c50" ], "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==3.0.4" + "version": "==3.0.5" }, "snowballstemmer": { "hashes": [ - "sha256:209f257d7533fdb3cb73bdbd24f436239ca3b2fa67d56f6ff88e86be08cc5ef0", - "sha256:df3bac3df4c2c01363f3dd2cfa78cce2840a79b9f1c2d2de9ce8d31683992f52" + "sha256:b51b447bea85f9968c13b650126a888aabd4cb4463fca868ec596826325dedc2", + "sha256:e997baa4f2e9139951b6f4c631bad912dfd3c792467e2f03d7239464af90e914" ], - "version": "==2.0.0" + "version": "==2.1.0" }, "stevedore": { "hashes": [ - "sha256:5e1ab03eaae06ef6ce23859402de785f08d97780ed774948ef16c4652c41bc62", - "sha256:f845868b3a3a77a2489d226568abe7328b5c2d4f6a011cc759dfa99144a521f0" + "sha256:3a5bbd0652bf552748871eaa73a4a8dc2899786bc497a2aa1fcb4dcdb0debeee", + "sha256:50d7b78fbaf0d04cd62411188fa7eedcb03eb7f4c4b37005615ceebe582aa82a" ], "markers": "python_version >= '3.6'", - "version": "==3.2.2" + "version": "==3.3.0" }, "toml": { "hashes": [ @@ -591,39 +709,48 @@ }, "typed-ast": { "hashes": [ - "sha256:0666aa36131496aed8f7be0410ff974562ab7eeac11ef351def9ea6fa28f6355", - "sha256:0c2c07682d61a629b68433afb159376e24e5b2fd4641d35424e462169c0a7919", - "sha256:0d8110d78a5736e16e26213114a38ca35cb15b6515d535413b090bd50951556d", - "sha256:249862707802d40f7f29f6e1aad8d84b5aa9e44552d2cc17384b209f091276aa", - "sha256:24995c843eb0ad11a4527b026b4dde3da70e1f2d8806c99b7b4a7cf491612652", - "sha256:269151951236b0f9a6f04015a9004084a5ab0d5f19b57de779f908621e7d8b75", - "sha256:3742b32cf1c6ef124d57f95be609c473d7ec4c14d0090e5a5e05a15269fb4d0c", - "sha256:4083861b0aa07990b619bd7ddc365eb7fa4b817e99cf5f8d9cf21a42780f6e01", - "sha256:498b0f36cc7054c1fead3d7fc59d2150f4d5c6c56ba7fb150c013fbc683a8d2d", - "sha256:4e3e5da80ccbebfff202a67bf900d081906c358ccc3d5e3c8aea42fdfdfd51c1", - "sha256:6daac9731f172c2a22ade6ed0c00197ee7cc1221aa84cfdf9c31defeb059a907", - "sha256:715ff2f2df46121071622063fc7543d9b1fd19ebfc4f5c8895af64a77a8c852c", - "sha256:73d785a950fc82dd2a25897d525d003f6378d1cb23ab305578394694202a58c3", - "sha256:7e4c9d7658aaa1fc80018593abdf8598bf91325af6af5cce4ce7c73bc45ea53d", - "sha256:8c8aaad94455178e3187ab22c8b01a3837f8ee50e09cf31f1ba129eb293ec30b", - "sha256:8ce678dbaf790dbdb3eba24056d5364fb45944f33553dd5869b7580cdbb83614", - "sha256:92c325624e304ebf0e025d1224b77dd4e6393f18aab8d829b5b7e04afe9b7a2c", - "sha256:aaee9905aee35ba5905cfb3c62f3e83b3bec7b39413f0a7f19be4e547ea01ebb", - "sha256:b52ccf7cfe4ce2a1064b18594381bccf4179c2ecf7f513134ec2f993dd4ab395", - "sha256:bcd3b13b56ea479b3650b82cabd6b5343a625b0ced5429e4ccad28a8973f301b", - "sha256:c9e348e02e4d2b4a8b2eedb48210430658df6951fa484e59de33ff773fbd4b41", - "sha256:d205b1b46085271b4e15f670058ce182bd1199e56b317bf2ec004b6a44f911f6", - "sha256:d43943ef777f9a1c42bf4e552ba23ac77a6351de620aa9acf64ad54933ad4d34", - "sha256:d5d33e9e7af3b34a40dc05f498939f0ebf187f07c385fd58d591c533ad8562fe", - "sha256:d648b8e3bf2fe648745c8ffcee3db3ff903d0817a01a12dd6a6ea7a8f4889072", - "sha256:f208eb7aff048f6bea9586e61af041ddf7f9ade7caed625742af423f6bae3298", - "sha256:fac11badff8313e23717f3dada86a15389d0708275bddf766cca67a84ead3e91", - "sha256:fc0fea399acb12edbf8a628ba8d2312f583bdbdb3335635db062fa98cf71fca4", - "sha256:fcf135e17cc74dbfbc05894ebca928ffeb23d9790b3167a674921db19082401f", - "sha256:fe460b922ec15dd205595c9b5b99e2f056fd98ae8f9f56b888e7a17dc2b757e7" + "sha256:07d49388d5bf7e863f7fa2f124b1b1d89d8aa0e2f7812faff0a5658c01c59aa1", + "sha256:14bf1522cdee369e8f5581238edac09150c765ec1cb33615855889cf33dcb92d", + "sha256:240296b27397e4e37874abb1df2a608a92df85cf3e2a04d0d4d61055c8305ba6", + "sha256:36d829b31ab67d6fcb30e185ec996e1f72b892255a745d3a82138c97d21ed1cd", + "sha256:37f48d46d733d57cc70fd5f30572d11ab8ed92da6e6b28e024e4a3edfb456e37", + "sha256:4c790331247081ea7c632a76d5b2a265e6d325ecd3179d06e9cf8d46d90dd151", + "sha256:5dcfc2e264bd8a1db8b11a892bd1647154ce03eeba94b461effe68790d8b8e07", + "sha256:7147e2a76c75f0f64c4319886e7639e490fee87c9d25cb1d4faef1d8cf83a440", + "sha256:7703620125e4fb79b64aa52427ec192822e9f45d37d4b6625ab37ef403e1df70", + "sha256:8368f83e93c7156ccd40e49a783a6a6850ca25b556c0fa0240ed0f659d2fe496", + "sha256:84aa6223d71012c68d577c83f4e7db50d11d6b1399a9c779046d75e24bed74ea", + "sha256:85f95aa97a35bdb2f2f7d10ec5bbdac0aeb9dafdaf88e17492da0504de2e6400", + "sha256:8db0e856712f79c45956da0c9a40ca4246abc3485ae0d7ecc86a20f5e4c09abc", + "sha256:9044ef2df88d7f33692ae3f18d3be63dec69c4fb1b5a4a9ac950f9b4ba571606", + "sha256:963c80b583b0661918718b095e02303d8078950b26cc00b5e5ea9ababe0de1fc", + "sha256:987f15737aba2ab5f3928c617ccf1ce412e2e321c77ab16ca5a293e7bbffd581", + "sha256:9ec45db0c766f196ae629e509f059ff05fc3148f9ffd28f3cfe75d4afb485412", + "sha256:9fc0b3cb5d1720e7141d103cf4819aea239f7d136acf9ee4a69b047b7986175a", + "sha256:a2c927c49f2029291fbabd673d51a2180038f8cd5a5b2f290f78c4516be48be2", + "sha256:a38878a223bdd37c9709d07cd357bb79f4c760b29210e14ad0fb395294583787", + "sha256:b4fcdcfa302538f70929eb7b392f536a237cbe2ed9cba88e3bf5027b39f5f77f", + "sha256:c0c74e5579af4b977c8b932f40a5464764b2f86681327410aa028a22d2f54937", + "sha256:c1c876fd795b36126f773db9cbb393f19808edd2637e00fd6caba0e25f2c7b64", + "sha256:c9aadc4924d4b5799112837b226160428524a9a45f830e0d0f184b19e4090487", + "sha256:cc7b98bf58167b7f2db91a4327da24fb93368838eb84a44c472283778fc2446b", + "sha256:cf54cfa843f297991b7388c281cb3855d911137223c6b6d2dd82a47ae5125a41", + "sha256:d003156bb6a59cda9050e983441b7fa2487f7800d76bdc065566b7d728b4581a", + "sha256:d175297e9533d8d37437abc14e8a83cbc68af93cc9c1c59c2c292ec59a0697a3", + "sha256:d746a437cdbca200622385305aedd9aef68e8a645e385cc483bdc5e488f07166", + "sha256:e683e409e5c45d5c9082dc1daf13f6374300806240719f95dc783d1fc942af10" + ], + "markers": "python_version < '3.8'", + "version": "==1.4.2" + }, + "typing-extensions": { + "hashes": [ + "sha256:7cb407020f00f7bfc3cb3e7881628838e69d8f3fcab2f64742a5e76b2f841918", + "sha256:99d4073b617d30288f569d3f13d2bd7548c3a7e4c8de87db09a9d29bb3a4a60c", + "sha256:dafc7639cde7f1b6e1acc0f457842a83e722ccca8eef5270af2d74792619a89f" ], "markers": "python_version < '3.8'", - "version": "==1.4.1" + "version": "==3.7.4.3" }, "unittest-xml-reporting": { "hashes": [ @@ -635,19 +762,19 @@ }, "virtualenv": { "hashes": [ - "sha256:b0011228208944ce71052987437d3843e05690b2f23d1c7da4263fde104c97a2", - "sha256:b8d6110f493af256a40d65e29846c69340a947669eec8ce784fcf3dd3af28380" + "sha256:49ec4eb4c224c6f7dd81bb6d0a28a09ecae5894f4e593c89b0db0885f565a107", + "sha256:83f95875d382c7abafe06bd2a4cdd1b363e1bb77e02f155ebe8ac082a916b37c" ], "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==20.1.0" + "version": "==20.4.3" }, "zipp": { "hashes": [ - "sha256:102c24ef8f171fd729d46599845e95c7ab894a4cf45f5de11a44cc7444fb1108", - "sha256:ed5eee1974372595f9e416cc7bbeeb12335201d8081ca8a0743c954d4446e5cb" + "sha256:3607921face881ba3e026887d8150cca609d517579abe052ac81fc5aeffdbd76", + "sha256:51cb66cc54621609dd593d1787f286ee42a5c0adbb4b29abea5a63edc3e03098" ], "markers": "python_version >= '3.6'", - "version": "==3.4.0" + "version": "==3.4.1" } } } diff --git a/pydis_site/apps/content/__init__.py b/pydis_site/apps/content/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/pydis_site/apps/content/__init__.py diff --git a/pydis_site/apps/content/apps.py b/pydis_site/apps/content/apps.py new file mode 100644 index 00000000..1e300a48 --- /dev/null +++ b/pydis_site/apps/content/apps.py @@ -0,0 +1,7 @@ +from django.apps import AppConfig + + +class ContentConfig(AppConfig): + """Django AppConfig for content app.""" + + name = 'content' diff --git a/pydis_site/apps/content/migrations/__init__.py b/pydis_site/apps/content/migrations/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/pydis_site/apps/content/migrations/__init__.py diff --git a/pydis_site/apps/content/resources/_info.yml b/pydis_site/apps/content/resources/_info.yml new file mode 100644 index 00000000..583cab18 --- /dev/null +++ b/pydis_site/apps/content/resources/_info.yml @@ -0,0 +1,2 @@ +name: Pages +description: Guides, articles, and pages hosted on the site. diff --git a/pydis_site/apps/content/resources/guides/_info.yml b/pydis_site/apps/content/resources/guides/_info.yml new file mode 100644 index 00000000..59c60a7b --- /dev/null +++ b/pydis_site/apps/content/resources/guides/_info.yml @@ -0,0 +1,2 @@ +name: Guides +description: Made by us, for you. diff --git a/pydis_site/apps/content/resources/guides/pydis-guides/_info.yml b/pydis_site/apps/content/resources/guides/pydis-guides/_info.yml new file mode 100644 index 00000000..7c9a2225 --- /dev/null +++ b/pydis_site/apps/content/resources/guides/pydis-guides/_info.yml @@ -0,0 +1,2 @@ +name: Python Discord Guides +description: Guides related to the Python Discord server and community. diff --git a/pydis_site/apps/content/resources/guides/pydis-guides/how-to-contribute-a-page.md b/pydis_site/apps/content/resources/guides/pydis-guides/how-to-contribute-a-page.md new file mode 100644 index 00000000..f258ef74 --- /dev/null +++ b/pydis_site/apps/content/resources/guides/pydis-guides/how-to-contribute-a-page.md @@ -0,0 +1,143 @@ +--- +title: How to Contribute a Page +description: Learn how to write and publish a page to this website. +icon_class: fas +icon: fa-info +relevant_links: + Contributing to Site: https://pythondiscord.com/pages/contributing/site/ + Using Git: https://pythondiscord.com/pages/contributing/working-with-git/ +--- + +Pages, which include guides, articles, and other static content, are stored in markdown files in the `site` repository on Github. +If you are interested in writing or modifying pages seen here on the site, follow the steps below. + +For further assistance and help with contributing pages, send a message to the `#dev-contrib` channel in the Discord server! + +## Prerequisites +Before working on a new page, you have to [setup the site project locally](https://pythondiscord.com/pages/contributing/site/). +It is also a good idea to familiarize yourself with the [git workflow](https://pythondiscord.com/pages/contributing/working-with-git/), as it is part of the contribution workflow. + +Additionally, please submit your proposed page or modification to a page as an [issue in the site repository](https://github.com/python-discord/site/issues), or discuss it in the `#dev-contrib` channel in the server. +As website changes require staff approval, discussing the page content beforehand helps with accelerating the contribution process, and avoids wasted work in the event the proposed page is not accepted. + +## Creating the Page +All pages are located in the `site` repo, at the path `pydis_site/apps/content/resources/`. This is the root folder, which corresponds to the URL `www.pythondiscord.com/pages/`. +For example, the file `pydis_site/apps/content/resources/hello-world.md` will result in a page available at `www.pythondiscord.com/pages/hello-world`. + +Nested folders represent page categories on the website. Each folder under the root folder must include a `_info.yml` file with the following: + +```yml +name: Category name +description: Category description +``` + +All the markdown files in this folder will then be under this category. + +## Writing the Page +Files representing pages are in `.md` (Markdown) format, with all-lowercase filenames and spaces replaced with `-` characters. + +Each page must include required metadata, and optionally additional metadata to modify the appearance of the page. +The metadata is written in YAML, and should be enclosed in triple dashes `---` *at the top of the markdown file*. + +**Example:** +```yaml +--- +title: How to Contribute a Page +description: Learn how to write and publish a page to this website. +icon_class: fas +icon: fa-info +relevant_links: + Contributing to Site: https://pythondiscord.com/pages/contributing/site/ + Using Git: https://pythondiscord.com/pages/contributing/working-with-git/ +--- + +Pages, which include guides, articles, and other static content,... +``` + +### Required Fields +- **title:** Easily-readable title for your article. +- **description:** Short, 1-2 line description of the page's content. + +### Optional Fields +- **icon_class:** Favicon class for the category entry for the page. Default: `fab` +- **icon:** Favicon for the category entry for the page. Default: `fa-python` <i class="fab fa-python is-black" aria-hidden="true"></i> +- **relevant_links:** A YAML dictionary containing `text:link` pairs. See the example above. + +## Extended Markdown + +Apart from standard Markdown, certain additions are available: + +### Abbreviations +HTML `<abbr>` tags can be used in markdown using this format: + +**Markdown:** +```nohighlight +This website is HTML generated from YAML and Markdown. + +*[HTML]: Hyper Text Markup Language +*[YAML]: YAML Ain't Markup Language +``` + +**Output:** + +This website is <abbr title="Hyper Text Markup Language">HTML</abbr> +generated from <abbr title="YAML Ain't Markup Language">YAML</abbr> and Markdown. + +--- + +### Footnotes +**Markdown:** +```nohighlight +This footnote[^1] links to the bottom[^custom_label] of the page[^3]. + +[^1]: Footnote labels start with a caret `^`. +[^3]: The footnote link is numbered based on the order of the labels. +[^custom label]: Footnote labels can contain any text within square brackets. +``` + +**Output:** + +This footnote[^1] links to the bottom[^custom label] of the page[^3]. + +[^1]: Footnote labels start with a caret `^`. +[^3]: The footnote link is numbered based on the order of the labels. +[^custom label]: Footnote labels can contain any text within square brackets. + +--- + +### Tables + +**Markdown:** +```nohighlight +| This is header | This is another header | +| -------------- | ---------------------- | +| An item | Another item | +``` + +**Output:** + +| This is header | This is another header | +| -------------- | ---------------------- | +| An item | Another item | + +--- + +### Codeblock Syntax Highlighting +Syntax highlighting is provided by `highlight.js`. +To activate syntax highlighting, put the language directly after the starting backticks. + +**Markdown:** +````nohighlight +```python +import os + +path = os.path.join("foo", "bar") +``` +```` + +**Output:** +```python +import os + +path = os.path.join("foo", "bar") +``` diff --git a/pydis_site/apps/content/tests/__init__.py b/pydis_site/apps/content/tests/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/pydis_site/apps/content/tests/__init__.py diff --git a/pydis_site/apps/content/tests/helpers.py b/pydis_site/apps/content/tests/helpers.py new file mode 100644 index 00000000..4e0cca34 --- /dev/null +++ b/pydis_site/apps/content/tests/helpers.py @@ -0,0 +1,84 @@ +from pyfakefs.fake_filesystem_unittest import TestCase + +# Valid markdown content with YAML metadata +MARKDOWN_WITH_METADATA = """ +--- +title: TestTitle +description: TestDescription +relevant_links: + Python Discord: https://pythondiscord.com + Discord: https://discord.com +--- +# This is a header. +""" + +MARKDOWN_WITHOUT_METADATA = """#This is a header.""" + +# Valid YAML in a _info.yml file +CATEGORY_INFO = """ +name: Category Name +description: Description +""" + +# The HTML generated from the above markdown data +PARSED_HTML = ( + '<h1 id="this-is-a-header">This is a header.' + '<a class="headerlink" href="#this-is-a-header" title="Permanent link">¶</a></h1>' +) + +# The YAML metadata parsed from the above markdown data +PARSED_METADATA = { + "title": "TestTitle", "description": "TestDescription", + "relevant_links": { + "Python Discord": "https://pythondiscord.com", + "Discord": "https://discord.com" + } +} + +# The YAML data parsed from the above _info.yml file +PARSED_CATEGORY_INFO = {"name": "Category Name", "description": "Description"} + + +class MockPagesTestCase(TestCase): + """ + TestCase with a fake filesystem for testing. + + Structure: + ├── _info.yml + ├── root.md + ├── root_without_metadata.md + ├── not_a_page.md + ├── tmp + |  ├── _info.yml + |  └── category_without_info + └── category +   ├── _info.yml +   ├── with_metadata.md +   └── subcategory +   ├── with_metadata.md +     └── without_metadata.md + """ + + def setUp(self): + """Create the fake filesystem.""" + self.setUpPyfakefs() + + self.fs.create_file("_info.yml", contents=CATEGORY_INFO) + self.fs.create_file("root.md", contents=MARKDOWN_WITH_METADATA) + self.fs.create_file("root_without_metadata.md", contents=MARKDOWN_WITHOUT_METADATA) + self.fs.create_file("not_a_page.md/_info.yml", contents=CATEGORY_INFO) + self.fs.create_file("category/_info.yml", contents=CATEGORY_INFO) + self.fs.create_file("category/with_metadata.md", contents=MARKDOWN_WITH_METADATA) + self.fs.create_file("category/subcategory/_info.yml", contents=CATEGORY_INFO) + self.fs.create_file( + "category/subcategory/with_metadata.md", contents=MARKDOWN_WITH_METADATA + ) + self.fs.create_file( + "category/subcategory/without_metadata.md", contents=MARKDOWN_WITHOUT_METADATA + ) + + # There is always a `tmp` directory in the filesystem, so make it a category + # for testing purposes. + # See: https://jmcgeheeiv.github.io/pyfakefs/release/usage.html#os-temporary-directories + self.fs.create_file("tmp/_info.yml", contents=CATEGORY_INFO) + self.fs.create_dir("tmp/category_without_info") diff --git a/pydis_site/apps/content/tests/test_utils.py b/pydis_site/apps/content/tests/test_utils.py new file mode 100644 index 00000000..58175d6f --- /dev/null +++ b/pydis_site/apps/content/tests/test_utils.py @@ -0,0 +1,91 @@ +from pathlib import Path + +from django.http import Http404 + +from pydis_site.apps.content import utils +from pydis_site.apps.content.tests.helpers import ( + MockPagesTestCase, PARSED_CATEGORY_INFO, PARSED_HTML, PARSED_METADATA +) + + +class GetCategoryTests(MockPagesTestCase): + """Tests for the get_category function.""" + + def test_get_valid_category(self): + result = utils.get_category(Path("category")) + + self.assertEqual(result, {"name": "Category Name", "description": "Description"}) + + def test_get_nonexistent_category(self): + with self.assertRaises(Http404): + utils.get_category(Path("invalid")) + + def test_get_category_with_path_to_file(self): + # Valid categories are directories, not files + with self.assertRaises(Http404): + utils.get_category(Path("root.md")) + + def test_get_category_without_info_yml(self): + # Categories should provide an _info.yml file + with self.assertRaises(FileNotFoundError): + utils.get_category(Path("tmp/category_without_info")) + + +class GetCategoriesTests(MockPagesTestCase): + """Tests for the get_categories function.""" + + def test_get_root_categories(self): + result = utils.get_categories(Path(".")) + + info = PARSED_CATEGORY_INFO + self.assertEqual(result, {"category": info, "tmp": info, "not_a_page.md": info}) + + def test_get_categories_with_subcategories(self): + result = utils.get_categories(Path("category")) + + self.assertEqual(result, {"subcategory": PARSED_CATEGORY_INFO}) + + def test_get_categories_without_subcategories(self): + result = utils.get_categories(Path("category/subcategory")) + + self.assertEqual(result, {}) + + +class GetCategoryPagesTests(MockPagesTestCase): + """Tests for the get_category_pages function.""" + + def test_get_pages_in_root_category_successfully(self): + """The method should successfully retrieve page metadata.""" + root_category_pages = utils.get_category_pages(Path(".")) + self.assertEqual( + root_category_pages, {"root": PARSED_METADATA, "root_without_metadata": {}} + ) + + def test_get_pages_in_subcategories_successfully(self): + """The method should successfully retrieve page metadata.""" + category_pages = utils.get_category_pages(Path("category")) + + # Page metadata is properly retrieved + self.assertEqual(category_pages, {"with_metadata": PARSED_METADATA}) + + +class GetPageTests(MockPagesTestCase): + """Tests for the get_page function.""" + + def test_get_page(self): + cases = [ + ("Root page with metadata", "root.md", PARSED_HTML, PARSED_METADATA), + ("Root page without metadata", "root_without_metadata.md", PARSED_HTML, {}), + ("Page with metadata", "category/with_metadata.md", PARSED_HTML, PARSED_METADATA), + ("Page without metadata", "category/subcategory/without_metadata.md", PARSED_HTML, {}), + ] + + for msg, page_path, expected_html, expected_metadata in cases: + with self.subTest(msg=msg): + html, metadata = utils.get_page(Path(page_path)) + self.assertEqual(html, expected_html) + self.assertEqual(metadata, expected_metadata) + + def test_get_nonexistent_page_returns_404(self): + with self.assertRaises(Http404): + utils.get_page(Path("invalid")) diff --git a/pydis_site/apps/content/tests/test_views.py b/pydis_site/apps/content/tests/test_views.py new file mode 100644 index 00000000..560378bc --- /dev/null +++ b/pydis_site/apps/content/tests/test_views.py @@ -0,0 +1,145 @@ +from pathlib import Path +from unittest import TestCase + +from django.http import Http404 +from django.test import RequestFactory, SimpleTestCase, override_settings +from pyfakefs import fake_filesystem_unittest + +from pydis_site.apps.content.tests.helpers import ( + MockPagesTestCase, PARSED_CATEGORY_INFO, PARSED_HTML, PARSED_METADATA +) +from pydis_site.apps.content.views import PageOrCategoryView + + +# Set the module constant within Patcher to use the fake filesystem +# https://jmcgeheeiv.github.io/pyfakefs/master/usage.html#modules-to-reload +with fake_filesystem_unittest.Patcher() as _: + BASE_PATH = Path(".") + + +@override_settings(PAGES_PATH=BASE_PATH) +class PageOrCategoryViewTests(MockPagesTestCase, SimpleTestCase, TestCase): + """Tests for the PageOrCategoryView class.""" + + def setUp(self): + """Set test helpers, then set up fake filesystem.""" + self.factory = RequestFactory() + self.view = PageOrCategoryView.as_view() + self.ViewClass = PageOrCategoryView() + super().setUp() + + # Integration tests + def test_valid_page_or_category_returns_200(self): + cases = [ + ("Page at root", "root"), + ("Category page", "category"), + ("Page in category", "category/with_metadata"), + ("Subcategory page", "category/subcategory"), + ("Page in subcategory", "category/subcategory/with_metadata"), + ] + for msg, path in cases: + with self.subTest(msg=msg, path=path): + request = self.factory.get(f"/{path}") + response = self.view(request, location=path) + self.assertEqual(response.status_code, 200) + + def test_nonexistent_page_returns_404(self): + with self.assertRaises(Http404): + request = self.factory.get("/invalid") + self.view(request, location="invalid") + + # Unit tests + def test_get_template_names_returns_correct_templates(self): + category_template = "content/listing.html" + page_template = "content/page.html" + cases = [ + ("root", page_template), + ("root_without_metadata", page_template), + ("category/with_metadata", page_template), + ("category/subcategory/with_metadata", page_template), + ("category", category_template), + ("category/subcategory", category_template), + ] + + for path, expected_template in cases: + with self.subTest(path=path, expected_template=expected_template): + self.ViewClass.full_location = Path(path) + self.assertEqual(self.ViewClass.get_template_names(), [expected_template]) + + def test_get_template_names_with_nonexistent_paths_returns_404(self): + for path in ("invalid", "another_invalid", "nonexistent"): + with self.subTest(path=path): + self.ViewClass.full_location = Path(path) + with self.assertRaises(Http404): + self.ViewClass.get_template_names() + + def test_get_context_data_with_valid_page(self): + """The method should return required fields in the template context.""" + request = self.factory.get("/root") + self.ViewClass.setup(request) + self.ViewClass.dispatch(request, location="root") + + cases = [ + ("Context includes HTML page content", "page", PARSED_HTML), + ("Context includes page title", "page_title", PARSED_METADATA["title"]), + ( + "Context includes page description", + "page_description", + PARSED_METADATA["description"] + ), + ( + "Context includes relevant link names and URLs", + "relevant_links", + PARSED_METADATA["relevant_links"] + ), + ] + context = self.ViewClass.get_context_data() + for msg, key, expected_value in cases: + with self.subTest(msg=msg): + self.assertEqual(context[key], expected_value) + + def test_get_context_data_with_valid_category(self): + """The method should return required fields in the template context.""" + request = self.factory.get("/category") + self.ViewClass.setup(request) + self.ViewClass.dispatch(request, location="category") + + cases = [ + ( + "Context includes subcategory names and their information", + "categories", + {"subcategory": PARSED_CATEGORY_INFO} + ), + ( + "Context includes page names and their metadata", + "pages", + {"with_metadata": PARSED_METADATA} + ), + ( + "Context includes page description", + "page_description", + PARSED_CATEGORY_INFO["description"] + ), + ("Context includes page title", "page_title", PARSED_CATEGORY_INFO["name"]), + ] + + context = self.ViewClass.get_context_data() + for msg, key, expected_value in cases: + with self.subTest(msg=msg): + self.assertEqual(context[key], expected_value) + + def test_get_context_data_breadcrumbs(self): + """The method should return correct breadcrumbs.""" + request = self.factory.get("/category/subcategory/with_metadata") + self.ViewClass.setup(request) + self.ViewClass.dispatch(request, location="category/subcategory/with_metadata") + + context = self.ViewClass.get_context_data() + self.assertEquals( + context["breadcrumb_items"], + [ + {"name": PARSED_CATEGORY_INFO["name"], "path": "."}, + {"name": PARSED_CATEGORY_INFO["name"], "path": "category"}, + {"name": PARSED_CATEGORY_INFO["name"], "path": "category/subcategory"}, + ] + ) diff --git a/pydis_site/apps/content/urls.py b/pydis_site/apps/content/urls.py new file mode 100644 index 00000000..c11b222a --- /dev/null +++ b/pydis_site/apps/content/urls.py @@ -0,0 +1,9 @@ +from django.urls import path + +from . import views + +app_name = "content" +urlpatterns = [ + path("", views.PageOrCategoryView.as_view(), name='pages'), + path("<path:location>/", views.PageOrCategoryView.as_view(), name='page_category'), +] diff --git a/pydis_site/apps/content/utils.py b/pydis_site/apps/content/utils.py new file mode 100644 index 00000000..726c991f --- /dev/null +++ b/pydis_site/apps/content/utils.py @@ -0,0 +1,57 @@ +from pathlib import Path +from typing import Dict, Tuple + +import frontmatter +import markdown +import yaml +from django.http import Http404 +from markdown.extensions.toc import TocExtension + + +def get_category(path: Path) -> Dict[str, str]: + """Load category information by name from _info.yml.""" + if not path.is_dir(): + raise Http404("Category not found.") + + return yaml.safe_load(path.joinpath("_info.yml").read_text(encoding="utf-8")) + + +def get_categories(path: Path) -> Dict[str, Dict]: + """Get information for all categories.""" + categories = {} + + for item in path.iterdir(): + if item.is_dir(): + categories[item.name] = get_category(item) + + return categories + + +def get_category_pages(path: Path) -> Dict[str, Dict]: + """Get all page names and their metadata at a category path.""" + pages = {} + + for item in path.glob("*.md"): + if item.is_file(): + pages[item.stem] = frontmatter.load(item).metadata + + return pages + + +def get_page(path: Path) -> Tuple[str, Dict]: + """Get one specific page.""" + if not path.is_file(): + raise Http404("Page not found.") + + metadata, content = frontmatter.parse(path.read_text(encoding="utf-8")) + html = markdown.markdown( + content, + extensions=[ + "extra", + # Empty string for marker to disable text searching for [TOC] + # By using a metadata key instead, we save time on long markdown documents + TocExtension(title="Table of Contents:", permalink=True, marker="") + ] + ) + + return str(html), metadata diff --git a/pydis_site/apps/content/views/__init__.py b/pydis_site/apps/content/views/__init__.py new file mode 100644 index 00000000..70ea1c7a --- /dev/null +++ b/pydis_site/apps/content/views/__init__.py @@ -0,0 +1,3 @@ +from .page_category import PageOrCategoryView + +__all__ = ["PageOrCategoryView"] diff --git a/pydis_site/apps/content/views/page_category.py b/pydis_site/apps/content/views/page_category.py new file mode 100644 index 00000000..eec4e7e5 --- /dev/null +++ b/pydis_site/apps/content/views/page_category.py @@ -0,0 +1,61 @@ +import typing as t +from pathlib import Path + +from django.conf import settings +from django.http import Http404 +from django.views.generic import TemplateView + +from pydis_site.apps.content import utils + + +class PageOrCategoryView(TemplateView): + """Handles pages and page categories.""" + + def dispatch(self, request: t.Any, *args, **kwargs) -> t.Any: + """Conform URL path location to the filesystem path.""" + self.location = Path(kwargs.get("location", "")) + self.full_location = settings.PAGES_PATH / self.location + + return super().dispatch(request, *args, **kwargs) + + def get_template_names(self) -> t.List[str]: + """Checks if the view uses the page template or listing template.""" + if self.full_location.is_dir(): + template_name = "content/listing.html" + elif self.full_location.with_suffix(".md").is_file(): + template_name = "content/page.html" + else: + raise Http404 + + return [template_name] + + def get_context_data(self, **kwargs) -> t.Dict[str, t.Any]: + """Assign proper context variables based on what resource user requests.""" + context = super().get_context_data(**kwargs) + + if self.full_location.is_dir(): + context["categories"] = utils.get_categories(self.full_location) + context["pages"] = utils.get_category_pages(self.full_location) + + category = utils.get_category(self.full_location) + context["page_title"] = category["name"] + context["page_description"] = category["description"] + + context["path"] = f"{self.location}/" # Add trailing slash here to simplify template + elif self.full_location.with_suffix(".md").is_file(): + page, metadata = utils.get_page(self.full_location.with_suffix(".md")) + context["page"] = page + context["page_title"] = metadata["title"] + context["page_description"] = metadata["description"] + context["relevant_links"] = metadata.get("relevant_links", {}) + else: + raise Http404 + + context["breadcrumb_items"] = [ + { + "name": utils.get_category(settings.PAGES_PATH / location)["name"], + "path": str(location) + } for location in reversed(self.location.parents) + ] + + return context diff --git a/pydis_site/apps/events/__init__.py b/pydis_site/apps/events/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/pydis_site/apps/events/__init__.py diff --git a/pydis_site/apps/events/apps.py b/pydis_site/apps/events/apps.py new file mode 100644 index 00000000..a1cf09ef --- /dev/null +++ b/pydis_site/apps/events/apps.py @@ -0,0 +1,7 @@ +from django.apps import AppConfig + + +class EventsConfig(AppConfig): + """Django AppConfig for events app.""" + + name = 'events' diff --git a/pydis_site/apps/events/migrations/__init__.py b/pydis_site/apps/events/migrations/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/pydis_site/apps/events/migrations/__init__.py diff --git a/pydis_site/apps/events/tests/__init__.py b/pydis_site/apps/events/tests/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/pydis_site/apps/events/tests/__init__.py diff --git a/pydis_site/apps/events/tests/test_views.py b/pydis_site/apps/events/tests/test_views.py new file mode 100644 index 00000000..0db0ef9a --- /dev/null +++ b/pydis_site/apps/events/tests/test_views.py @@ -0,0 +1,42 @@ +from pathlib import Path + +from django.conf import settings +from django.test import TestCase, override_settings +from django_hosts.resolvers import reverse + + +PAGES_PATH = Path(settings.BASE_DIR, "pydis_site", "templates", "events", "test-pages") + + +class IndexTests(TestCase): + def test_events_index_response_200(self): + """Should return response code 200 when visiting index of events.""" + url = reverse("events:index") + resp = self.client.get(url) + self.assertEqual(resp.status_code, 200) + + +class PageTests(TestCase): + @override_settings(PAGES_PATH=PAGES_PATH) + def test_valid_event_page_reponse_200(self): + """Should return response code 200 when visiting valid event page.""" + pages = ( + reverse("events:page", ("my-event",)), + reverse("events:page", ("my-event/subpage",)), + ) + for page in pages: + with self.subTest(page=page): + resp = self.client.get(page) + self.assertEqual(resp.status_code, 200) + + @override_settings(PAGES_PATH=PAGES_PATH) + def test_invalid_event_page_404(self): + """Should return response code 404 when visiting invalid event page.""" + pages = ( + reverse("events:page", ("invalid",)), + reverse("events:page", ("invalid/invalid",)) + ) + for page in pages: + with self.subTest(page=page): + resp = self.client.get(page) + self.assertEqual(resp.status_code, 404) diff --git a/pydis_site/apps/events/urls.py b/pydis_site/apps/events/urls.py new file mode 100644 index 00000000..9a65cf1f --- /dev/null +++ b/pydis_site/apps/events/urls.py @@ -0,0 +1,9 @@ +from django.urls import path + +from pydis_site.apps.events.views import IndexView, PageView + +app_name = "events" +urlpatterns = [ + path("", IndexView.as_view(), name="index"), + path("<path:path>/", PageView.as_view(), name="page"), +] diff --git a/pydis_site/apps/events/views/__init__.py b/pydis_site/apps/events/views/__init__.py new file mode 100644 index 00000000..8a107e2f --- /dev/null +++ b/pydis_site/apps/events/views/__init__.py @@ -0,0 +1,4 @@ +from .index import IndexView +from .page import PageView + +__all__ = ["IndexView", "PageView"] diff --git a/pydis_site/apps/events/views/index.py b/pydis_site/apps/events/views/index.py new file mode 100644 index 00000000..7ffba74a --- /dev/null +++ b/pydis_site/apps/events/views/index.py @@ -0,0 +1,7 @@ +from django.views.generic import TemplateView + + +class IndexView(TemplateView): + """Events index page view.""" + + template_name = "events/index.html" diff --git a/pydis_site/apps/events/views/page.py b/pydis_site/apps/events/views/page.py new file mode 100644 index 00000000..f4c37aeb --- /dev/null +++ b/pydis_site/apps/events/views/page.py @@ -0,0 +1,25 @@ +from typing import List + +from django.conf import settings +from django.http import Http404 +from django.views.generic import TemplateView + + +class PageView(TemplateView): + """Handles event pages showing.""" + + def get_template_names(self) -> List[str]: + """Get specific template names.""" + path: str = self.kwargs['path'] + page_path = settings.PAGES_PATH / path + if page_path.is_dir(): + page_path = page_path / "_index.html" + path = f"{path}/_index.html" + else: + page_path = settings.PAGES_PATH / f"{path}.html" + path = f"{path}.html" + + if not page_path.exists(): + raise Http404 + + return [f"events/{settings.PAGES_PATH.name}/{path}"] diff --git a/pydis_site/apps/home/urls.py b/pydis_site/apps/home/urls.py index 1578e0ac..3c716875 100644 --- a/pydis_site/apps/home/urls.py +++ b/pydis_site/apps/home/urls.py @@ -8,4 +8,6 @@ urlpatterns = [ path('', HomeView.as_view(), name='home'), path('admin/', admin.site.urls), path('resources/', include('pydis_site.apps.resources.urls')), + path('pages/', include('pydis_site.apps.content.urls')), + path('events/', include('pydis_site.apps.events.urls', namespace='events')), ] diff --git a/pydis_site/settings.py b/pydis_site/settings.py index 9211d02c..47750a47 100644 --- a/pydis_site/settings.py +++ b/pydis_site/settings.py @@ -13,6 +13,7 @@ https://docs.djangoproject.com/en/2.1/ref/settings/ import os import secrets import sys +from pathlib import Path import environ import sentry_sdk @@ -84,6 +85,8 @@ INSTALLED_APPS = [ 'pydis_site.apps.home', 'pydis_site.apps.staff', 'pydis_site.apps.resources', + 'pydis_site.apps.content', + 'pydis_site.apps.events', 'django.contrib.admin', 'django.contrib.auth', @@ -116,6 +119,9 @@ MIDDLEWARE = [ ] ROOT_URLCONF = 'pydis_site.urls' +# Path for events pages +PAGES_PATH = Path(BASE_DIR, "pydis_site", "templates", "events", "pages") + TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', @@ -276,3 +282,10 @@ BULMA_SETTINGS = { "tooltip-max-width": "30rem", }, } + +# Information about site repository +SITE_REPOSITORY_OWNER = "python-discord" +SITE_REPOSITORY_NAME = "site" +SITE_REPOSITORY_BRANCH = "master" + +PAGES_PATH = Path(BASE_DIR, "pydis_site", "apps", "content", "resources") diff --git a/pydis_site/static/css/content/page.css b/pydis_site/static/css/content/page.css new file mode 100644 index 00000000..57d7472b --- /dev/null +++ b/pydis_site/static/css/content/page.css @@ -0,0 +1,31 @@ +.breadcrumb-section { + padding: 1rem; +} + +i.has-icon-padding { + padding: 0 10px 25px 0; +} + +/* + * Move padding padding from <pre> tag to hljs <code> tags so the padding + * space is colored the same as the background of hljs <code> blocks. + */ +.content pre { + padding: 0; +} + +code.hljs { + padding: 1.75em 2em; +} + +/* + * Show header permalink on hover. + */ +.headerlink { + display: none; + padding-left: 0.5em; +} + +:is(h1, h2, h3, h4, h5, h6):hover > .headerlink { + display: inline; +} diff --git a/pydis_site/static/css/events/base.css b/pydis_site/static/css/events/base.css new file mode 100644 index 00000000..266bca1d --- /dev/null +++ b/pydis_site/static/css/events/base.css @@ -0,0 +1,12 @@ +.breadcrumb-section { + padding: 1rem; +} + +pre { + /* + * Style it the same as the <code> tag, since highlight.js does not style + * backgrounds of <pre> tags but bulma does, resulting in a weird off-white + * border. + */ + background-color: #282c34; +} diff --git a/pydis_site/templates/content/base.html b/pydis_site/templates/content/base.html new file mode 100644 index 00000000..19eec5d4 --- /dev/null +++ b/pydis_site/templates/content/base.html @@ -0,0 +1,36 @@ +{% extends 'base/base.html' %} +{% load static %} + +{% block title %}{{ page_title }}{% endblock %} +{% block head %} + <meta property="og:title" content="Python Discord - {{ page_title }}" /> + <meta property="og:type" content="website" /> + <meta property="og:description" content="{{ page_description }}" /> + <link rel="stylesheet" href="{% static "css/content/page.css" %}"> +{% endblock %} + +{% block content %} + {% include "base/navbar.html" %} + + <section class="breadcrumb-section section"> + <div class="container"> + <nav class="breadcrumb is-pulled-left" aria-label="breadcrumbs"> + <ul> + {% for item in breadcrumb_items %} + <li><a href="{% url "content:page_category" location=item.path %}">{{ item.name }}</a></li> + {% endfor %} + <li class="is-active"><a href="#">{{ page_title }}</a></li> + </ul> + </nav> + </div> + </section> + + <section class="section"> + <div class="container"> + <div class="content"> + <h1 class="title">{{ page_title }}</h1> + {% block page_content %}{% endblock %} + </div> + </div> + </section> +{% endblock %} diff --git a/pydis_site/templates/content/listing.html b/pydis_site/templates/content/listing.html new file mode 100644 index 00000000..6de306b0 --- /dev/null +++ b/pydis_site/templates/content/listing.html @@ -0,0 +1,27 @@ +{% extends 'content/base.html' %} + +{% block page_content %} + {% for category, data in categories.items %} + <div class="box" style="max-width: 800px;"> + <span class="icon is-size-4 is-medium"> + <i class="fas fa-folder is-size-3 is-black has-icon-padding" aria-hidden="true"></i> + </span> + + <a href="{% url "content:page_category" location=path|add:category %}"> + <span class="is-size-4 has-text-weight-bold">{{ data.name }}</span> + </a> + <p class="is-italic">{{ data.description }}</p> + </div> + {% endfor %} + {% for page, data in pages.items %} + <div class="box" style="max-width: 800px;"> + <span class="icon is-size-4 is-medium"> + <i class="{{ data.icon_class|default:"fab" }} {{ data.icon|default:"fa-python" }} is-size-3 is-black has-icon-padding" aria-hidden="true"></i> + </span> + <a href="{% url "content:page_category" location=path|add:page %}"> + <span class="is-size-4 has-text-weight-bold">{{ data.title }}</span> + </a> + <p class="is-italic">{{ data.description }}</p> + </div> + {% endfor %} +{% endblock %} diff --git a/pydis_site/templates/content/page.html b/pydis_site/templates/content/page.html new file mode 100644 index 00000000..06d74208 --- /dev/null +++ b/pydis_site/templates/content/page.html @@ -0,0 +1,31 @@ +{% extends 'content/base.html' %} + +{% block head %} + {{ block.super }} + <link rel="stylesheet" + href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.1/styles/atom-one-dark-reasonable.min.css"> + <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.1/highlight.min.js"></script> + <script>hljs.initHighlightingOnLoad();</script> +{% endblock %} + +{% block page_content %} + {% if relevant_links|length > 0 %} + <div class="columns is-variable is-8"> + <div class="column is-two-thirds"> + {{ page|safe }} + </div> + <div class="column"> + <div class="box"> + <p class="menu-label">Relevant links</p> + <ul class="menu-list"> + {% for value, link in relevant_links.items %} + <li><a class="has-text-link" href="{{link}}">{{ value }}</a></li> + {% endfor %} + </ul> + </div> + </div> + </div> + {% else %} + <div>{{ page|safe }}</div> + {% endif %} +{% endblock %} diff --git a/pydis_site/templates/events/_base.html b/pydis_site/templates/events/_base.html new file mode 100644 index 00000000..08fd8ae1 --- /dev/null +++ b/pydis_site/templates/events/_base.html @@ -0,0 +1,33 @@ +{% extends "base/base.html" %} +{% load static %} + +{% block head %} + <link rel="stylesheet" href="{% static "css/events/base.css" %}"> + <link rel="stylesheet" + href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.4.0/styles/atom-one-dark-reasonable.min.css"> + <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.4.0/highlight.min.js"></script> + <script>hljs.initHighlightingOnLoad();</script> +{% endblock %} + +{% block content %} + {% include "base/navbar.html" %} + + <section class="breadcrumb-section section"> + <div class="container"> + <nav class="breadcrumb is-pulled-left" aria-label="breadcrumbs"> + <ul> + {% block breadcrumb %}{% endblock %} + </ul> + </nav> + </div> + </section> + + <section class="section"> + <div class="container"> + <div class="content"> + <h1>{% block title %}{% endblock %}</h1> + <div>{% block event_base_content %}{% endblock %}</div> + </div> + </div> + </section> +{% endblock %} diff --git a/pydis_site/templates/events/base.html b/pydis_site/templates/events/base.html new file mode 100644 index 00000000..c9a963e7 --- /dev/null +++ b/pydis_site/templates/events/base.html @@ -0,0 +1,7 @@ +{% extends "events/_base.html" %} + +{% block event_base_content %} +<div> + {% block event_content %}{% endblock %} +</div> +{% endblock %} diff --git a/pydis_site/templates/events/base_sidebar.html b/pydis_site/templates/events/base_sidebar.html new file mode 100644 index 00000000..8ce6ad65 --- /dev/null +++ b/pydis_site/templates/events/base_sidebar.html @@ -0,0 +1,12 @@ +{% extends "events/base.html" %} + +{% block event_base_content %} +<div class="columns is-variable is-8"> + <div class="column is-two-thirds"> + {% block event_content %}{% endblock %} + </div> + <div class="column"> + {% block sidebar %}{% endblock %} + </div> +</div> +{% endblock %} diff --git a/pydis_site/templates/events/index.html b/pydis_site/templates/events/index.html new file mode 100644 index 00000000..024e7fdc --- /dev/null +++ b/pydis_site/templates/events/index.html @@ -0,0 +1,123 @@ +{% extends "events/base_sidebar.html" %} + +{% block title %}Events{% endblock %} + +{% block breadcrumb %} + <li class="is-active"><a href="#">Events</a></li> +{% endblock %} + +{% block event_content %} + <div class="box"> + <h2 class="title is-4">Code Jams</h2> + <p>Each year, we organize a Winter Code Jam and a Summer Code Jam. During these events, members of our community will work together in teams to create something amazing using a technology we picked for them. One such technology that was picked for the Winter Code Jam 2020 was Kivy, a cross-platform GUI framework.</p> + <p>To help fuel the creative process, we provide a specific theme, like <strong>Ancient Technology</strong> or <strong>This App Hates You</strong>. At the end of the Code Jam, the projects are judged by Python Discord server staff members and guest judges from the larger Python community. The judges will consider creativity, code quality, teamwork, and adherence to the theme.</p> + <p>If you want to read more about Code Jams, visit our <a href="{% url "events:page" path="code-jams" %}">Code Jam info page</a> or watch this video showcasing the best projects created during the <strong>Winter Code Jam 2020: Ancient Technology</strong>:</p> + <iframe width="560" height="315" src="https://www.youtube.com/embed/8fbZsGrqBzo" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe> + </div> + + <div class="box"> + <h2 class="title is-4">Game Jam</h2> + <div class="columns is-3" style="--columnGap: 0.75rem;"> + <div class="column"> + <p> + The Game Jam is similar to our Code Jams, but smaller in scope. Instead of having to complete a qualifier + and being teamed up with random strangers, members of our community can just sign-up individually or pair up + with whoever they like. + </p> + <p> + The participants will have ten days to create a game using the technology we've selected, and drawing + inspiration from a provided theme. After the event, a panel of judges will play all the games and select a + winner. The top 5 will featured in a special video on our <a href="https://www.youtube.com/channel/UCQsrA4xo6jvdgsJZhKaBL6w">YouTube channel</a>. + </p> + <p> + The <a class="has-text-link" href="{% url "events:page" path="game-jams/2020" %}">first edition of the Game Jam</a> ran from + <strong>April 17, 2020 to April 26, 2020</strong>. + </p> + </div> + <div class="column is-3"> + <img src="https://user-images.githubusercontent.com/33516116/77593036-5fb09780-6eeb-11ea-9feb-336b2e5e23de.png" style="border-radius: 10px;" alt=""> + </div> + </div> + </div> + + <div class="box"> + <h2 class="title is-4">Hacktoberfest</h2> + <div class="columns is-3" style="--columnGap: 0.75rem;"> + <div class="column"> + <p> + This event revolves around the annual <a href="https://hacktoberfest.digitalocean.com/">Hacktoberfest + event</a> organized by Digital Ocean. In addition to promoting Hacktoberfest in our community and supporting + those who choose to take their first steps into the world of open source, we will also ease our members into + contributing to open source by starting a low-entry, beginner-friendly open source project where we will + guide our members through the open source process in a safe environment. + </p> + <p> + The exact form this event will take has not been decided yet, but we'll make sure to keep you updated in + our community announcements! + </p> + </div> + <div class="column is-3"> + <img src="https://raw.githubusercontent.com/python-discord/branding/master/seasonal/halloween/hacktoberfest/2020/animated_server_icon.gif" style="border-radius: 10px;" alt=""> + </div> + </div> + </div> + + <div class="box"> + <h2 class="title is-4">Advent of Code</h2> + <div class="columns is-3" style="--columnGap: 0.75rem;"> + <div class="column"> + <p> + Each year, many of our members take part of an online coding competition called + <a href="https://adventofcode.com/">Advent of Code</a> that takes place in December. Advent of Code is an + Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved + in any programming language you like, including Python. + </p> + <p> + During the event, we will open a special discussion channel in which our members can discuss the puzzles + and compare their solutions. We will also open a private leaderboard and may even reward the best scoring + members on that board with prizes! + </p> + <p> + However, this event isn't purely competitive. You can also join in just to see how far you'll get, to + challenge yourself, as a way of learning Python, or just for the fun of it. In 2019, almost 200 members + signed up for our private leaderboard, but many more took on the challenge without focusing on the + competitive aspect. + </p> + </div> + <div class="column is-3"> + <img src="https://raw.githubusercontent.com/python-discord/branding/master/seasonal/christmas/2019/festive_256.gif" style="border-radius: 10px;" alt=""> + </div> + </div> + </div> + + <div class="box"> + <h2 class="title is-4">PyWeek</h2> + <div class="columns is-3" style="--columnGap: 0.75rem;"> + <div class="column"> + <p> + For the past 15 years, <a href="https://pyweek.org">PyWeek</a> has been running a bi-annual game jam for the + Python language. As of 2020, we are excited to say we are officially partnered with PyWeek to co-run these + events. + </p> + <p> + During each PyWeek event, we open a special discussion channel in which our members can discuss their + submissions, meet other participants, and talk to PyWeek staff. The PyWeek organizer, + Daniel Pope (<a href="https://twitter.com/lordmauve">@lordmauve</a>) will be present during the entire event to answer + questions and post announcements and information in our community. + </p> + <p> + Unlike our other events, the <strong>community</strong> will select the winner from all the submissions + during PyWeek. We may release YouTube content showcasing the best submissions after the events are finished. + </p> + </div> + <div class="column is-3"> + <img src="https://pyweek.readthedocs.io/en/latest/_static/pyweek.svg" style="border-radius: 10px;" alt=""> + </div> + </div> + </div> +{% endblock %} + +{% block sidebar %} + {% include "events/sidebar/upcoming-event.html" %} + {% include "events/sidebar/events-list.html" %} +{% endblock %} diff --git a/pydis_site/templates/events/pages/code-jams/1.html b/pydis_site/templates/events/pages/code-jams/1.html new file mode 100644 index 00000000..bde4e0b4 --- /dev/null +++ b/pydis_site/templates/events/pages/code-jams/1.html @@ -0,0 +1,82 @@ +{% extends "events/base.html" %} + +{% block title %}Code Jam 1: Snakes{% endblock %} + +{% block breadcrumb %} + <li><a href="{% url "events:index" %}">Events</a></li> + <li><a href="{% url "events:page" path="code-jams" %}">Code Jams</a></li> + <li class="is-active"><a href="#">Code Jam 1: Snakes</a></li> +{% endblock %} + +{% block event_content %} + <p> + The theme of the code jam was <strong>snakes</strong> Participants were assigned a random partner, + and used Git to submit code to us. Staff members reviewed the code both during and after the code jam, + and provided suggestions for changes and improvements. + The best submissions were implemented into our community bot. + Winners recieved a special Code Jam Champion title. + </p> + + <h2 id="task-description" class="title is-4"><a href="#task-description">Task description</a></h2> + <p>Here is the original task description which was posted on the code-jam-1 GitHub repo:</p> + + <blockquote> + <p> + For this code jam, your task will be to create a Snake cog for a Discord.py rewrite bot. + <a href="https://discordpy.readthedocs.io/en/rewrite/">You can find the documentation for Discord.py rewrite here</a>. + The best cog commands will be added to the official Python Discord bot and made available to everyone on the server. + The overall best cog will be awarded custom Code Jam Champion roles, + but the best commands from the teams who did not win will also be added to our bot, + and any users who write something that ends up in the bot will be awarded Contributor roles on the server. + </p> + <p> + Your initial task will be to write <code>get_snek()</code>. This is the minimum requirement for this contest, + and everyone must do it. <code>get_snek()</code> should be a method that goes online and fetches information about a snake. + If you run it without providing an argument, it should fetch information about a random snake, + including the name of the snake, a picture of the snake, and various information about it. + Is it venomous? Where can it be found? What information you choose to get is up to you. + </p> + <p> + <code>get_snek()</code> should also take an optional argument name, which should be a string that represents the name of a snake. + For example, the call <code>get_snek('cobra')</code> should get information about a cobra. name should be case insensitive. + </p> + <p> + If <code>get_snek('Python')</code> is called, the method should instead return information about the programming language, + but making sure to return the same type of information as for all the other snakes. + Fill in this information in any way you want, try to have some fun with it. + </p> + <p> + Once you have finished <code>get_snek()</code>, you should make at least two bot commands. + The first command, <code>get()</code>, should simply call <code>get_snek()</code> with whatever arguments the user provided, + and then make a nice embed that it returns to Discord. + For example, if the user in the Discord channel says bot.snakes.get('anaconda'), + the bot should post an embed that shows a picture of an anaconda and some information about the snake. + </p> + <p> + The second command is entirely up to you. You can choose to use <code>get_snek</code> for this command as well, + or you can come up with something entirely different. + The only requirement is that it is snake related in some way or other. + Here is your chance to be creative. It is these commands that will win or lose you this code jam. + The best original ideas for these commands will walk away with the victory. + </p> + </blockquote> + + <h2 id="result" class="title is-4"><a href="#result">Result</a></h2> + <p><strong>The Winning Team: Team 23, kel and Momo!</strong></p> + <p> + These two experts worked together to create what can only be described as a flawless submission. + The staff were unable to find a single thing to complain about in the 1100 lines that were committed. + Here are some of the features they created for their snake cog: + </p> + <ul> + <li>A fully functional implementation of Snakes and Ladders</li> + <li>A feature that uses perlin noise to draw a random snake, and posts the picture in the chat.</li> + <li>Hatch your very own baby snake!</li> + <li>Snakify your post history with a Markov chain</li> + <li>Rattlesnake sound effects in the voice channels</li> + </ul> + <p> + These features, as well as the best ones from the other teams, + have been implemented into our community bot. Use <code>.snakes</code> in <code>#sir-lancebot-commands</code> to play with it. + </p> +{% endblock %} diff --git a/pydis_site/templates/events/pages/code-jams/2.html b/pydis_site/templates/events/pages/code-jams/2.html new file mode 100644 index 00000000..602a1c66 --- /dev/null +++ b/pydis_site/templates/events/pages/code-jams/2.html @@ -0,0 +1,72 @@ +{% extends "events/base.html" %} + +{% block title %}Code Jam 2: Mythological API{% endblock %} + +{% block breadcrumb %} + <li><a href="{% url "events:index" %}">Events</a></li> + <li><a href="{% url "events:page" path="code-jams" %}">Code Jams</a></li> + <li class="is-active"><a href="#">Code Jam 2: Mythological API</a></li> +{% endblock %} + +{% block event_content %} + <p> + The theme for this code jam will be <strong>mythology</strong>. + That means you're going to be creating a <strong>RESTful API in Flask with a mythology theme</strong>. + </p> + <p> + For example, you might create the The MimÃr API, + an API used to look up information about norse gods and godesses. + </p> + + <pre><code class="lang-json">{ + "name": "Kvasir", + "parents": "Born from the saliva of the Æsir and the Vanir", + "type": "A god of wisdom and knowledge" +}</code></pre> + + <p> + The API must respond with json data, but this is not limited to text. + It could respond with bytedata, with a URL to an image, a video or some audio, + or with any other form of data you deem interesting. + </p> + <p> + The API should accept at least a GET or a POST request with JSON data. + You are allowed to use any third party libraries you want. + </p> + <p> + Remember, creativity counts. Try to have fun with it. + We're not necessarily looking for dead serious solutions only, + and it's okay if your solution is only tangentially related to the theme, + so long as there's a relationship of some sort. + </p> + + <h2 id="results" class="title is-4"><a href="#results">Results</a></h2> + <p>The winner of the second code jam is <strong>Defiant Sails</strong>, with Momo, WrongEnd, and SharpBit! Congratulations!</p> + + <p> + They've written a phenomenal API with OAuth authentication, a multiplayer RPG, + and a feature to procedurally generate a random mythologically themed story. + This story can be played as a video, + where they use Text-To-Speech to read the story out loud while epic music plays in the background. + The music is different for each play, and the audio is visualized in a video. + </p> + <p> + The team will receive the grand prize of 12-month PyCharm Pro licenses, + and will also receive the honorary Code Jam Champions role. + </p> + <hr> + <p> + In second place with another really excellent submission, we have the team <strong>Rude Interests</strong>, + consisting of Lord Bisk, Runew0lf and Nix. They've got procedurally generated rune images, + procedural mythologies with gods with procedural relationships, descriptions, genders, and names. + A super fun idea which nearly ended up taking the first place. + </p> + <hr> + <p> + In third place, we have <strong>Overconfident Ideas</strong>, with Martmists, Casterly and eivl. + They did relationship trees with a number of different visualization options, + a fantastic myth lookup feature to find a great deal of details about a mythological figure, + a mythology trivia feature, and a markov chain string generator. + It also had a very comprehensive framework and it was clear that a great deal of work had gone into it. + </p> +{% endblock %} diff --git a/pydis_site/templates/events/pages/code-jams/3.html b/pydis_site/templates/events/pages/code-jams/3.html new file mode 100644 index 00000000..0bd293db --- /dev/null +++ b/pydis_site/templates/events/pages/code-jams/3.html @@ -0,0 +1,81 @@ +{% extends "events/base.html" %} + +{% block title %}Code Jam 3: Games!{% endblock %} + +{% block breadcrumb %} + <li><a href="{% url "events:index" %}">Events</a></li> + <li><a href="{% url "events:page" path="code-jams" %}">Code Jams</a></li> + <li class="is-active"><a href="#">Code Jam 3: Games!</a></li> +{% endblock %} + +{% block event_content %} + <p> + The theme for code jam 3 was creating a <strong>game</strong> with the theme <strong>the world ends in 10 minutes</strong>. + The teams of three could live out their creativity here - any form of game was fine, + as long as they fit the theme. The jam started at <strong>Monday, the 22nd October 2018, 12:00 PM UTC</strong>. + </p> + + <h2 id="task-description" class="title is-4"><a href="#task-description">Task Description</a></h2> + <p>The <a href="https://github.com/python-discord/code-jam-3">original task description</a> was as follows:</p> + <blockquote> + <p> + This task is a little more freeform than the other code jams we've had so far - + we're happy to accept games in any form, as long as they fit that theme. + You may use PyGame, Kivy, Curses/Unicurses, Pyxel, web frameworks like Flask, + or anything else your team desires. + Please provide instructions on how to set up and run your game within the README where necessary. + Remember that teamwork is paramount - You will need to work together. + For this jam, we've assigned a leader for each team based on their responses to the application form. + Remember to listen to your leader, and communicate with the rest of your team! + </p> + </blockquote> + + <h2 id="results" class="title is-4"><a href="#results">Results</a></h2> + <p> + The <strong>winning team</strong> for this jam was Certain Horses, consisting of Wattle, Scragly, and Mark. + They made a 2D platformer where the player had to collect lemons in order to earn points. + Below the player was an ocean of lemon juice that caused instant death if you touched it. + </p> + <p> + Every time you collected a lemon, the lemon juice water level would raise up, + so you had to be tactical about which lemons you could collect + without dying and which of the branching paths you'd have to select to avoid the sea of lemon juice rushing up to meet you. + </p> + <p> + You can play the game by yourself here: + <a href="https://github.com/MarkKoz/code-jam-3">https://github.com/MarkKoz/code-jam-3</a> + </p> + + <h2 id="runner-up-1" class="title is-4"><a href="#runner-up-1">Runner up 1: Successful Toads</a></h2> + <p> + The <strong>first runner up</strong> for this jam was team Successful Toads, + whose code can be found at <a href="https://gitlab.com/biskette/code-jam-3/">https://gitlab.com/biskette/code-jam-3/</a>. + They wrote a flask app game which was about deciding who to let into the last nuclear bunker on the planet. + Like Tinder, but for nuclear holocaust gatekeepers. + The game had procedurally generated graphics which were absolutely hilarious, + and you would swipe right or left to decide whether or not to let someone into your bunker. + Each person had certain traits which could either save or destroy your bunker. + </p> + <p> + In order to win, you had to balance stuff like medical expertise with combat experience + and make sure that your bunker would survive into the post-apocalypse. + </p> + + <h2 id="runner-up-2" class="title is-4"><a href="#runner-up-2">Runner up 2: Misty Hats</a></h2> + <p> + The second runner up for this jam was team Misty Hats, + with code available at <a href="https://gitlab.com/JannesJ/code-jam-3">https://gitlab.com/JannesJ/code-jam-3</a>. + They made an excellent shoot-em-up in the style of Gradius, + with a long intro cinematic, lots of original graphics assets, + and a whole bunch of different power-ups. Other features included: + </p> + <ul> + <li><p>Fighter enemy: A tiny spaceship that will follow you and try to take you down.</p></li> + <li><p>Pythonic mines: Space mines shaped like Python logos that damage you if you touch them.</p></li> + <li><p>Defensive Structures: Semi-Stationary defensive structures that will shoot you on sight</p></li> + <li><p>8 different power-ups: Extra damage, armor, hp, shield, double shot.. and more!</p></li> + <li><p>Timers: A ten minute timer and small timers for temporary power ups.</p></li> + <li><p>Different size/color blaster projectiles</p></li> + <li><p>Wave system</p></li> + </ul> +{% endblock %} diff --git a/pydis_site/templates/events/pages/code-jams/4.html b/pydis_site/templates/events/pages/code-jams/4.html new file mode 100644 index 00000000..f3d750bc --- /dev/null +++ b/pydis_site/templates/events/pages/code-jams/4.html @@ -0,0 +1,93 @@ +{% extends "events/base.html" %} + +{% block title %}Code Jam 4: This Apps Hates You{% endblock %} + +{% block breadcrumb %} + <li><a href="{% url "events:index" %}">Events</a></li> + <li><a href="{% url "events:page" path="code-jams" %}">Code Jams</a></li> + <li class="is-active"><a href="#">Code Jam 4: This Apps Hates You</a></li> +{% endblock %} + +{% block event_content %} + <p> + The theme for code jam 4 was creating a <strong>GUI application</strong> with the theme <strong>this app hates you</strong>. + 19 randomly assembled teams worked on this task for three days from the 22nd of February, 00:00 UTC. + </p> + + <h2 id="task-description" class="title is-4"><a href="#task-description">Task Description</a></h2> + <p> + The original task description, + as found in the <a href="https://github.com/python-discord/code-jam-4">repository</a> was as follows: + </p> + <blockquote> + <p> + The theme for this code jam will be <strong>This app hates you!</strong>. + You will be creating an application using a GUI library of your choice in Python. + The application must serve a real purpose, but must also fit the theme. + </p> + <p> + Here are a couple of examples of what we mean by an application that "serves a real purpose but also fits the theme": + </p> + <ul> + <li><p>A calculator app that calculates the right answers, but represents the answer in a way that's completely impractical.</p></li> + <li> + <p> + An image resizer where you have to specify which part of the image to resize, + specify how much force to apply to the resize operation in newtons, + and then manually resize the image by turning a crank. + </p> + </li> + <li> + <p> + An alarm clock app that plays a very loud sound effect every 5 minutes reminding you that your alarm will ring in 6 hours. + The closer it gets to the 6 hour mark, the lower the volume of the sound effect. + When the time is up, the sound effect is virtually inaudible. + </p> + </li> + </ul> + </blockquote> + + <h2 id="judging-stream" class="title is-4"><a href="#judging-stream">Judging stream</a></h2> + <p> + If you want to watch the original code jam judging stream, + you can find it on YouTube - all of the submissions are showcased in the stream. + The winning project is showcased at around the 40 minute mark. + </p> + <iframe width="560" height="315" src="https://www.youtube.com/embed/TlU6GPGbSuY?start=805" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> + + <h2 id="results" class="title is-4"><a href="#results">Results</a></h2> + <p> + The <strong>winning team</strong> for this code jam was the team <strong>Cool Crocodiles</strong>, + consisting of Runew0lf, gl4cial, and syntaxaire. + They created a text editor called CrocPad++ featuring an infuriating troubleshooter that would pop up every five or so characters, + sound effects when you type, the ability to insert symbols by turning a dial, + a theme "for blind users", and many more features. + </p> + + <h2 id="runner-up-1" class="title is-4"><a href="#runner-up-1">Runner up 1: Team Enthusiastic Electricians</a></h2> + <p> + The <strong>first runner up</strong> for this code jam was the team <strong>Enthusiastic Electricians</strong>, + who made a paint tool called <i>ArtiQule</i> where the pencil point would break, + colors would blend together on your palette, and the paint brush would drip onto the canvas. + </p> + + <h2 id="runner-up-2" class="title is-4"><a href="#runner-up-2">Runner up 2: Team Slithering Snacks</a></h2> + <p> + The <strong>second runner up</strong> for this code jam was the team <strong>Slithering Snacks</strong>. + They ade a media player where you had to fill out a CAPTCHA every time you wanted to load a file, + register an account, and confirm your password to log in by typing it with all the characters <i>in alphabetic order</i>. + </p> + + <h2 id="honorable-mentions" class="title is-4"><a href="#honorable-mentions">Honorable mentions</a></h2> + <p>While they didn't make it on top of the ladder, the following submissions have stood out exceptionally:</p> + <ul> + <li><p>Team <strong>Blue Buckets</strong> won best code quality with their <i>Tinder for Cats</i>.</p></li> + <li> + <p> + Team <strong>Overjoyed <a href="https://wiki.teamfortress.com/wiki/Otolaryngologist%27s_Mirror">Otolaryngologists</a></strong> + won best looking UI with their sleek <i>Minesweeper</i> game where you had to press each tile up to 100 times to break it and only got one flag. + </p> + </li> + <li><p>Team <strong>High Houses</strong> won best idea with an <i>on-screen keyboard</i> where you only got some of the keys and additional keys had to be unlocked by gaining XP, leveling up, and getting loot boxes.</p></li> + </ul> +{% endblock %} diff --git a/pydis_site/templates/events/pages/code-jams/5.html b/pydis_site/templates/events/pages/code-jams/5.html new file mode 100644 index 00000000..ba6928c7 --- /dev/null +++ b/pydis_site/templates/events/pages/code-jams/5.html @@ -0,0 +1,80 @@ +{% extends "events/base.html" %} + +{% block title %}Code Jam 5: Climate Change{% endblock %} + +{% block breadcrumb %} + <li><a href="{% url "events:index" %}">Events</a></li> + <li><a href="{% url "events:page" path="code-jams" %}">Code Jams</a></li> + <li class="is-active"><a href="#"></a>Code Jam 5: Climate Change</li> +{% endblock %} + +{% block event_content %} + <p> + The theme for code jam 5 was <strong>climate change</strong>. + Similar to <a href="https://pythondiscord.com/pages/code-jams/code-jam-3/">code jam 3</a>, + teams could live out their creativity here, as long as it fits the theme. + The code jam started on July 20, 2019 at 12 PM UTC, + and with more than 117 sign-ups and 27 teams competing, + this was our biggest code jam ever (so far)! + </p> + + <h2 id="task-description" class="title is-4"><a href="#task-description">Task Description</a></h2> + <p>The original task description, as found in <a href="https://github.com/python-discord/code-jam-5">the repository</a>, was as follows:</p> + <blockquote> + <p> + Your theme for this code jam is <strong>climate change</strong>. + </p> + <p> + Because this is a free-for-all, you are free to make anything you want, + as long as it fits this theme. + We'd love if you created something that might help raise awareness, + but first and foremost, we want you to create something <i>fun</i>. + </p> + </blockquote> + + <h2 id="judging-stream" class="title is-4"><a href="#judging-stream">Judging stream</a></h2> + <p> + If you want to watch the original code jam judging stream, + you can find it on YouTube - all of the submissions are showcased in the stream. + The winning project is showcased at around the 30 minute mark. + </p> + <iframe width="560" height="315" src="https://www.youtube.com/embed/drBKNU73Ss4" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> + + <h2 id="results" class="title is-4"><a href="#results">Results</a></h2> + <p> + While it was a difficult decision, the winners were Team <strong>Combined Crusader</strong>, + consisting of Makusu, Mahabama, and missingfragment. + They made a really addicting <i>Climate Clicker game</i> that surprised us for being extremely responsive, + having beautiful, original art assets, and, most of all, being really fun to play. + The code quality of this project was good and they used Pythonic techniques like the LRU cache to make the game behave extremely snappy. + </p> + <p> + You can check out their entry in the + <a href="https://github.com/python-discord/code-jam-5/tree/master/combined_crusaders">repository</a> + and watch us doing so in the <a href="https://www.youtube.com/watch?v=drBKNU73Ss4&t=1815s">livestream</a>. + </p> + + <h2 id="runner-up-1" class="title is-4"><a href="#runner-up-1">Runner up 1: Various Vipers</a></h2> + <p> + Team <strong>Various Vipers</strong> produced a game consisting of various mini-games that had an excellent graphical user interface. + The fact that the project had accompanying game design documents showed how well-organized this project was. + Combined with good code quality, this thematic project deserves the second place in this code jam. + </p> + <p> + Feel free to check out their submission in the code jam <a href="https://github.com/python-discord/code-jam-5/tree/master/various_vipers">repository</a> + and watch us inspecting it in the <a href="https://www.youtube.com/watch?time_continue=1&v=drBKNU73Ss4&feature=emb_logo">livestream</a>. + </p> + + <h2 id="runner-up-2" class="title is-4"><a href="#runner-up-2">Runner up 2: Gentle Gnomes</a></h2> + <p> + The <strong>Gentle Gnomes</strong> ended up in the third spot. + Their web app allowed the user to search for a location and would then show climate-related statistics, + plots as well as projections for the future for the specified location. + The code quality of this project was outstanding and the web app was extremely useful and interesting. + </p> + <p> + Again, you can view their submission on the + <a href="https://github.com/python-discord/code-jam-5/tree/master/gentle_gnomes">repository</a> + or view it live on the <a href="https://www.youtube.com/watch?v=drBKNU73Ss4&t=7800s">livestream</a>. + </p> +{% endblock %} diff --git a/pydis_site/templates/events/pages/code-jams/6/_index.html b/pydis_site/templates/events/pages/code-jams/6/_index.html new file mode 100644 index 00000000..256914b6 --- /dev/null +++ b/pydis_site/templates/events/pages/code-jams/6/_index.html @@ -0,0 +1,93 @@ +{% extends "events/base_sidebar.html" %} + +{% block title %}Winter Code Jam 2020: Ancient Technology{% endblock %} + +{% block breadcrumb %} + <li><a href="{% url "events:index" %}">Events</a></li> + <li><a href="{% url "events:page" path="code-jams" %}">Code Jams</a></li> + <li class="is-active"><a href="#"></a>Winter Code Jam 2020: Ancient Technology</li> +{% endblock %} + +{% block event_content %} + <p> + The theme for the Winter Code Jam 2020, the sixth Python Discord Code Jam, + was utilizing the <strong>Kivy Framework</strong> to create <strong>Ancient Technology</strong>. + The jam lasted for 9 days from January 17, 2020 to January 26, 2020 with 16 teams competing against each other. + </p> + + <h2 id="task-description" class="title is-4"><a href="#task-description">Task Description</a></h2> + <p> + The original task description, as found in the <a href="https://github.com/python-discord/code-jam-6">repository</a>, was as follows: + </p> + <blockquote> + <p>By popular choice, the theme for this code jam is <strong>Ancient Technology</strong>.</p> + <p> + What you do with this theme or how you interpret it is up to you, + but it will be your task to come up with something fun using this theme. + </p> + </blockquote> + + <h2 id="judging-stream" class="title is-4"><a href="#judging-stream">Judging Stream</a></h2> + <p> + If you want to watch the original code jam judging stream, + you can find it on YouTube - all of the submissions are showcased in the stream. + The winning project is showcased at the <a href="https://youtu.be/I97L_Y3rhvc?t=13710">03:48:30</a> timestamp. + </p> + <iframe width="560" height="315" src="https://www.youtube.com/embed/I97L_Y3rhvc" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> + + <h2 id="results" class="title is-4"><a href="#results">Results</a></h2> + <p> + The <strong>winning team</strong> for this code jam was team <strong>Tactless Tricksters</strong>, + consisting of GoBig87, Kan, sposker, DomicidalManiac, and Inventor. + They created an incredible morse code chatting app, with a plethora of different features. + Morse code training, morse code audio encoding/decoding, audio input sensitivity calibration, + and a morse code messaging system are all features of this project. + The beautiful and intuitive UI paired with all these features was what won them this jam. + With the given amount of time during this jam, this was quite the impressive project. + </p> + <p> + You can check out their entry in the + <a href="https://github.com/python-discord/code-jam-6/tree/master/tactless-tricksters">repository</a> + and watch us doing so in the <a href="https://youtu.be/I97L_Y3rhvc?t=13710">livestream</a>. + The top 3 winning teams' projects are also displayed on the <a href="https://kivy.org#gallery">Kivy Gallery</a>. + </p> + + <h2 id="runner-up-1" class="title is-4"><a href="#runner-up-1">Runner up 1: Circumstancial Champions</a></h2> + <p> + The <strong>Circumstantial Champions</strong> (salt-die, david987, & Music) + created a game in which players go back in time to smash and carve out rocks, + just like cavemen. The combination of their execellent graphical interface, animations, + and satisfying sounds made this one of the most polished projects in the jam. + </p> + <p> + Check out their submission in the code jam + <a href="https://github.com/python-discord/code-jam-6/tree/master/circumstantial-companions">repository</a> + and view it live on the <a href="https://youtu.be/I97L_Y3rhvc?t=2854">livestream</a>. + </p> + + <h2 id="runner-up-2" class="title is-4"><a href="#runner-up-2">Runner up 2: Inquisitive Investigators</a></h2> + <p> + Team <strong>Inquisitive Investigators</strong> (f1re & Monika) ended up in third place with their retro TUI file explorer. + The simple, easy-to-use file explorer along with their built-in terminal, text editor, + and photo viewer made this a very feature packed project. + </p> + <p> + Feel free to view their submission on the + <a href="https://github.com/python-discord/code-jam-6/tree/master/inquisitive-investigators">repository</a> + and watch us review it on the <a href="https://youtu.be/I97L_Y3rhvc?t=6545">livestream</a>. + </p> + + <img src="https://raw.githubusercontent.com/python-discord/code-jam-6/master/ancient%20tech.png?token=AAQAKVPQ55SEFWYYLYO5YV26ETLTC" alt="Code Jam Banner" style="max-width:100%;"> +{% endblock %} + +{% block sidebar %} + {% include "events/sidebar/code-jams/6.html" %} + <div class="box"> + <p class="menu-label">Relevant Links</p> + <ul class="menu-list"> + <li><a class="has-text-link" href="{% url "events:page" path="code-jams/6/rules" %}">Rules</a></li> + <li><a class="has-text-link" href="https://github.com/python-discord/code-jam-6-qualifier">Qualifier</a></li> + <li><a class="has-text-link" href="{% url "events:page" path="code-jams" %}">About Code Jams</a></li> + </ul> + </div> +{% endblock %} diff --git a/pydis_site/templates/events/pages/code-jams/6/rules.html b/pydis_site/templates/events/pages/code-jams/6/rules.html new file mode 100644 index 00000000..727d98be --- /dev/null +++ b/pydis_site/templates/events/pages/code-jams/6/rules.html @@ -0,0 +1,81 @@ +{% extends "events/base_sidebar.html" %} + +{% block title %}Rules{% endblock %} + +{% block breadcrumb %} + <li><a href="{% url "events:index" %}">Events</a></li> + <li><a href="{% url "events:page" path="code-jams" %}">Code Jams</a></li> + <li><a href="{% url "events:page" path="code-jams/6" %}">Winter Code Jam 2020: Ancient Technology</a></li> + <li class="is-active"><a href="#">Rules</a></li> +{% endblock %} + +{% block event_content %} + <ol> + <li> + <p> + The majority of your project must be Python. + We will use the GitHub language details for this, + so just <strong>make sure your repo contains at least 51% Python</strong>, and you'll be okay. + </p> + </li> + <li> + <p> + Your solution must use the Kivy framework. + It is not permitted to work around this by e.g. using Kivy as a wrapper for another framework. + </p> + </li> + <li> + <p> + Your solution should be platform agnostic. + For example, if you use filepaths in your submission, + use <code>pathlib</code> to create platform agnostic Path objects instead of hardcoding the paths. + </p> + </li> + <li> + <p> + Your project must be feasible to run and simple to set up <strong>on a desktop computer</strong> + - which means you should almost certainly use some sort of dependency manager, + like <code>pipenv</code>, <code>poetry</code>, or a strictly pinned <code>requirements.txt</code>. + </p> + </li> + <li> + <p> + You must get contributions from every member of your team, + if you have an issue with someone on your team please contact a member of the administration team. + These contributions do not necessarily have to be code, + for example it's absolutely fine for someone to contribute management, documentation, graphics or audio. + <strong> + Team members that do not contribute will be removed from the Code Jam, + and will not receive their share of any prizes the team may win. + They may also be barred from entering future events. + </strong>. + </p> + </li> + <li> + <p>You must use GitHub as source control.</p> + </li> + <li> + <p> + All code must be written and committed within the time constrictions of the jam + <ul><li>Late commits may be reverted, so make sure you leave enough time to bug test your program</li></ul> + </p> + </li> + </ol> + + <!-- TODO: After code of conduct and rules page is migrated, change these URLs. --> + <blockquote> + Please note that our regular <a href="/pages/rules/">community rules</a> and <a href="/pages/code-of-conduct/">code of conduct</a> + also apply during the event and that we reserve the right to make changes to these rules at any time. + </blockquote> +{% endblock %} + +{% block sidebar %} + {% include "events/sidebar/code-jams/6.html" %} + <div class="box"> + <p class="menu-label">Relevant Links</p> + <ul class="menu-list"> + <li><a class="has-text-link" href="{% url "events:page" path="code-jams/6" %}">Winter Code Jam 2020</a></li> + <li><a class="has-text-link" href="https://github.com/python-discord/code-jam-6-qualifier">Code Jam Qualifier</a></li> + </ul> + </div> +{% endblock %} diff --git a/pydis_site/templates/events/pages/code-jams/7/_index.html b/pydis_site/templates/events/pages/code-jams/7/_index.html new file mode 100644 index 00000000..1f0b0909 --- /dev/null +++ b/pydis_site/templates/events/pages/code-jams/7/_index.html @@ -0,0 +1,85 @@ +{% extends "events/base_sidebar.html" %} + +{% block title %}Summer Code Jam 2020: Early Internet{% endblock %} + +{% block breadcrumb %} + <li><a href="{% url "events:index" %}">Events</a></li> + <li><a href="{% url "events:page" path="code-jams" %}">Code Jams</a></li> + <li class="is-active"><a href="#">Summer Code Jam 2020: Early Internet</a></li> +{% endblock %} + +{% block event_content %} + <p> + For Python Discord's 7<sup>th</sup> biannual code jam, contestants utilized the <strong>Django</strong> framework + to create a web application. The theme for this event was <strong>Early Internet</strong>, lasting from + July 31<sup>st</sup> to August 9<sup>th</sup>. This was our largest event ever, with over 50 teams competing + for prizes from our prize pool along with the illustrious role of <code>Code Jam Champions</code> on our server. + </p> + + <h3 id="task-description"><a href="#task-description">Task Description</a></h3> + <p> + The original task description, as found in the <a href="https://github.com/python-discord/summer-code-jam-2020">repository</a>, was as follows: + </p> + <blockquote> + <strong>The theme for this code jam is Early Internet.</strong> + <p> + What you do with this theme or how you interpret it is up to you, but it will be your task to come up with something fun using this theme. + </p> + + <strong>The chosen technology for this game jam is <a href="https://www.djangoproject.com/">Django</a>.</strong> + <p> + Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. It comes "batteries included" with a slew of incredibly polished features, including database migrations, an excellent CRM, access control, security features to prevent you from making expensive mistakes, and + <a href="https://docs.djangoproject.com/en/3.0/">probably the best documentation on the internet</a>. + </p> + </blockquote> + + <h3 id="judging-stream"><a href="#judging-stream">Judging Stream</a></h3> + <p> + If you want to watch the original code jam judging stream, you can find it on YouTube - all of the submissions are showcased in the stream. The winning project is showcased at the <a href="https://youtu.be/OFtm8f2iu6c?t=6443">01:47:23</a> timestamp. + </p> + + <iframe width="560" height="315" src="https://www.youtube.com/embed/OFtm8f2iu6c" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> + + <h3 id="results"><a href="#results">Results</a></h3> + <p> + The <strong>winning team</strong> for this code jam was the <strong>Juicy Jaguars</strong>, consisting of charlotte, joshuqa, and dang. + They created an incredible Windows 95 web application, named Web95. It included a plethora of features, such as movable windows, + a start menu, a recreation of Internet Explorer, different themes & wallpapers, and a couple of fun easter eggs. The killer feature of this project was Internet Explorer. It processed the fonts, images, and colors of each webpage visited to make the experience feel as if + it were from the 90s! This was an incredibly novel idea, which was executed beautifully. + </p> + <p> + Check out their submission in our <a href="https://github.com/python-discord/summer-code-jam-2020/tree/master/juicy-jaguars">repository</a> + and watch us review it on the <a href="https://youtu.be/OFtm8f2iu6c?t=6443">livestream</a>! + </p> + + <h3 id="runner-up-1"><a href="#runner-up-1">Runner up 1: Annoyed Alligators</a></h3> + <p> + The <strong>Annoyed Alligators</strong> (i..kun, gkrou, SurvivingOnNaps, corner, and pykam) created a social media platform which is controllable by + a command line interface, named SoCommandLine Media (SoCL). Users can signup to create posts and view what others have posted already, all via the + command line. It evens supports direct messaging other users and getting the latest news articles for you to read! + </p> + <p> + Have a look at their submission in our <a href="https://github.com/python-discord/summer-code-jam-2020/tree/master/annoyed-alligators">repository</a> + and view it on the <a href="https://youtu.be/OFtm8f2iu6c?t=2200">livestream</a>! + </p> + + <h3 id="runner-up-2"><a href="#runner-up-2">Runner up 2: Mysterious Mice</a></h3> + <p> + The <strong>Mysterious Mice</strong> (rryyaann, onatoko, n0remac, and venturafranklin) created a social media site for NASA's rovers, named SpaceBook. It included profiles and photos of each rover, showed what the weather was like on Mars, and even had a text-based adventure game in a terminal! The beautiful, retro UI along with the animated space background made it a pleasure to use. + </p> + <p> + Feel free to check out their submission in our <a href="https://github.com/python-discord/summer-code-jam-2020/tree/master/mysterious-mice">repository</a> + and watch us use it on the <a href="https://youtu.be/OFtm8f2iu6c?t=7624">livestream</a>! + </p> +{% endblock %} + +{% block sidebar %} + {% include "events/sidebar/code-jams/7.html" %} + <div class="box"> + <p class="menu-label">Relevant Links</p> + <ul class="menu-list"> + <!-- Add other items when they become available --> + <li><a class="has-text-link" href="{% url "events:page" path="code-jams/7/rules" %}">Rules</a></li> + </ul> + </div> +{% endblock %} diff --git a/pydis_site/templates/events/pages/code-jams/7/rules.html b/pydis_site/templates/events/pages/code-jams/7/rules.html new file mode 100644 index 00000000..5979fbe6 --- /dev/null +++ b/pydis_site/templates/events/pages/code-jams/7/rules.html @@ -0,0 +1,68 @@ +{% extends "events/base_sidebar.html" %} + +{% block title %}Rules{% endblock %} + +{% block breadcrumb %} + <li><a href="{% url "events:index" %}">Events</a></li> + <li><a href="{% url "events:page" path="code-jams" %}">Code Jams</a></li> + <li><a href="{% url "events:page" path="code-jams/7" %}">Summer Code Jam 2020</a></li> + <li class="is-active"><a href="#">Rules</a></li> +{% endblock %} + +{% block event_content %} + <ol> + <li><p>Your solution must use the Django framework. It is not permitted to circumvent this rule by e.g. using Django as a wrapper for another framework.</p></li> + <li><p>Your solution should be platform agnostic. For example, if you use filepaths in your submission, use <code>pathlib</code> to create platform agnostic Path objects instead of hardcoding the paths.</p></li> + <li><p>Your project should be a web app which can be run in a <em>standard web browser</em>.</p></li> + <li> + <p> + You must document precisely how to install and run your project. + This should be as easy as possible, which means you should consider using dependency managers like <code>pipenv</code>, and <code>npm</code>. + We would also encourage you to use <code>docker</code> and <code>docker-compose</code> to containerize your project, but this isn't a requirement. + </p> + </li> + <li> + You must get contributions from every member of your team, if you have an issue with someone on your team please contact a member of the administration team. + These contributions do not necessarily have to be code, for example it's absolutely fine for someone to contribute management, documentation, graphics or audio. + <strong> + Team members that do not contribute will be removed from the Code Jam, and will not receive their share of any prizes the team may win. + They may also be barred from entering future events. + </strong> + </li> + <li><p>You must use GitHub as source control.</p></li> + <li> + <p> + All code and assets must be compatible with the <a href="https://en.wikipedia.org/wiki/MIT_License">MIT license</a>. + This is because we will be merging your submission into our <code>summer-code-jam-2020</code> repo at the end of the jam, + and this repo is licensed with the MIT license. + <strong>Projects that include assets that are incompatible with this license may be disqualified.</strong> + </p> + </li> + <li><p>All code must be written and committed within the time constrictions of the jam. Late commits may be reverted, so make sure you leave enough time to bug test your program.</p></li> + <li> + <p> + Use English as the main language for your project, including names, comments, documentation, and commit messages. + The text displayed in your web application should also be in English, + although you are allowed to provide the user with options for internationalisation and translation. + </p> + </li> + </ol> + + <!-- Change links after migrating them is done. --> + <blockquote> + Please note that our regular + <a href="/pages/rules">community rules</a> and <a href="/pages/code-of-conduct">code of conduct</a> + also apply during the event and that we reserve the right to make changes to these rules at any time. + </blockquote> +{% endblock %} + +{% block sidebar %} + {% include "events/sidebar/code-jams/7.html" %} + <div class="box"> + <p class="menu-label">Relevant Links</p> + <ul class="menu-list"> + <li><a class="has-text-link" href="{% url "events:page" path="code-jams/7" %}">Summer Code Jam 2020</a></li> + <li><a class="has-text-link" href="https://github.com/python-discord/summer-code-jam-2020-qualifier/">Code Jam Qualifier</a></li> + </ul> + </div> +{% endblock %} diff --git a/pydis_site/templates/events/pages/code-jams/_index.html b/pydis_site/templates/events/pages/code-jams/_index.html new file mode 100644 index 00000000..fcbfa4d9 --- /dev/null +++ b/pydis_site/templates/events/pages/code-jams/_index.html @@ -0,0 +1,72 @@ +{% extends "events/base_sidebar.html" %} + +{% block breadcrumb %} + <li><a href="{% url "events:index" %}">Events</a></li> + <li class="is-active"><a href="#">Code Jams</a></li> +{% endblock %} + +{% block title %}Code Jams{% endblock %} + +{% block event_content %} + <p> + If you've been around the server for a while, or you just happened to join at the right time, + you may have heard of something known as a Code Jam. + This page will help answer some questions you may have about them. + </p> + + <h2 class="title is-4" id="what-is-code-jam"><a href="#what-is-code-jam">What is a Code Jam?</a></h2> + <p> + This is the question you might be asking yourself right now. + A Code Jam is a chance to create something with a team. + In each jam, you are paired up with a group of other users just like yourself who will then be given a type of program to make and a theme to help guide it. + You then have a little over a week's time to create the best project you can. + </p> + + <h2 class="title is-4" id="how-do-i-join"><a href="#how-do-i-join">How do I join?</a></h2> + <p> + Before each Code Jam, we open up a Qualifier. + The Qualifier is a challenge program that you have to write yourself and has to meet certain criteria in order to, well, qualify. + The kinds of qualifiers can vary from something like making an RPG inventory layout to making a password generator that meets certain conditions. + </p> + + <h2 class="title is-4" id="how-often-do-these-happen"><a href="#how-often-do-these-happen">How often do these happen?</a></h2> + <p> + Our Code Jams happen twice a year. We have a Winter Jam and a Summer Jam. + </p> + + <h2 class="title is-4" id="what-happens-if-i-have-to-drop-out"><a href="#what-happens-if-i-have-to-drop-out">What happens if I have to drop out?</a></h2> + <p> + This does happen from time to time. + Life gets in the way, we find out that relative passed away or your significant other RSVP'd you to a wedding you didn't know about until a week before. + Ideally we'd like to know about dropouts before the jam starts. + But if something does come up, please make sure to communicate that fact to any of our Event Coordinators, Moderators, or Admins. + The worst thing you could do is simply abandon your team, and doing so may hurt your chances for participating in future jams. + </p> + + <h2 class="title is-4" id="how-experienced-do-i-need-to-be-to-join-a-code-jam"> + <a href="#how-experienced-do-i-need-to-be-to-join-a-code-jam">How experienced do I need to be to join a Code Jam?</a> + </h2> + <p> + This is a question that we get asked a lot but is very difficult to answer. + Creating something fun with a team can be a great experience for almost everyone, + including relative beginners and more experienced developers. + That said, to make it a fun experience for everyone in the team, + we do require participants to complete a qualifier task so we can ensure that everyone + who enters the jam knows enough of the basics to activily participate in the development process. + </p> + <p> + Participating in a Code Jam often turns out to be a great learning experience. + Not only do you typically get to use packages and libraries you haven't touched before, + it will also increase your experience with developing an application in a team. + If you have never really done this before, + then you'll notice that collaborating with others adds a whole new dimension to the development process. + Even if you do have a lot of experience with working in teams, + having to collaborate with relative strangers of varying skill levels may provide a different experience than what you're used to. + </p> +{% endblock %} + +{% block sidebar %} + {% include "events/sidebar/code-jams/upcoming-code-jam.html" %} + {% include "events/sidebar/code-jams/previous-code-jams.html" %} + {% include "events/sidebar/code-jams/useful-information.html" %} +{% endblock %} diff --git a/pydis_site/templates/events/pages/code-jams/judging.html b/pydis_site/templates/events/pages/code-jams/judging.html new file mode 100644 index 00000000..6c6531d9 --- /dev/null +++ b/pydis_site/templates/events/pages/code-jams/judging.html @@ -0,0 +1,110 @@ +{% extends "events/base_sidebar.html" %} + +{% block breadcrumb %} + <li><a href="{% url "events:index" %}">Events</a></li> + <li><a href="{% url "events:page" path="code-jams" %}">Code Jams</a></li> + <li class="is-active"><a href="#">How does judging work?</a></li> +{% endblock %} + +{% block title %}How does judging work?{% endblock %} + +{% block event_content %} + <p> + Here at Python Discord, judging the code jam is a process that continues throughout the entire event. + This document seeks to detail exactly what the judges will consider when attempting to determine the winner of the code jam. + </p> + <p> + Because programming is full of subtleties and judging is not an exact science, this document will inevitably fall short of being an exact guide for how to win, but it should at least give you an idea of what you should be mindful of as a participant. + </p> + + <h2 class="title is-4" id="style"><a href="#style">Style</a></h2> + <p> + Python is a language in which code style matters more than what someone might be used to coming from other languages. + We believe that good code is code that is easy to read, pleasant to work with, + and self-documenting. Here are some of the things we'll consider when judging your submission: + </p> + <ul> + <li> + Do variables have good names that make it obvious what they are going to be used for? + </li> + <li> + Are files organized in a way that makes the project easy to navigate? + </li> + <li> + Does the code follow the conventions of <a href="https://www.python.org/dev/peps/pep-0008/">the official Python style guide</a>? + </li> + <li> + Does your project have good git commit messages that explain not only what you were doing, but why? + </li> + <li> + Are there enough comments in the code? + A good rule of thumb for this is to make sure it's easy to <em>skim through the code</em>. + Another programmer should not have to read every line of code in a section in order to determine what it does. + </li> + <li> + Does your code use blank lines and block comments in order to split up large chunks of code into smaller, logically separated sections? + </li> + <li> + Are your comments and docstrings free of poor formulations and typos? + </li> + </ul> + <p> + If you can answer yes to all of the above, you will probably score well on style. + Using a linter (such as <code>flake8</code>) can be an easy way to greatly improve your style. + </p> + <p> + If your submission contains other languages than Python, + <em>please keep in mind that we will only review the Python code</em>. + This means that it is a good idea for you to solve as much of your submission as possible using Python. + For example, if you're making a webapp with a Python backend, make sure you solve all the interesting stuff in the backend, not in the frontend. + </p> + + <h2 class="title is-4" id="originality"><a href="#originality">Originality</a></h2> + <p> + In order to level the playing field a bit, we've decided that this is the most important factor of all in our code jams. + If your idea is an exceptionally good one and you are a beginner, + we will cut you some slack on style and execution. + You may be able to walk away victorious even though the other teams have far more experienced Python professionals. + It is therefore crucial that you consider <em>what to do more</em> carefully than exactly <em>how to do it</em>. + </p> + <p> + That said, experienced Python developers will always have an advantage, + so don't expect to win with a lazy or ugly implementation just because your idea is brilliant. + </p> + + <h2 class="title is-4" id="execution"><a href="#execution">Execution</a></h2> + <p> + An important factor is whether your solution is the best solution to the problem you are solving. + If your solution is overly convoluted, this will count against you in our evaluation. + </p> + <p> + While the code jam is ongoing, staff will be available to you both inside your team channel and in the common code jam channels. + Staff may drop by your team channel to make helpful suggestions, answer questions, or just ask you how it's going. + Feel free to grab a staff member and ask a question at any point if you're unsure about something. + </p> + <p> + Our talented team of Helpers will also be available during the code jam, + so if there is a part of your code you're unsure about, feel free to bring it to a help channel. + We will be happy to provide advice on how to improve it. + Do not, however, post your entire program; help requests should be bite-sized. + </p> + + <h2 class="title is-4" id="teamwork"><a href="#teamwork">Teamwork</a></h2> + <p> + During the code jam, you will be assigned teammates. It is crucial that you find a way to work with your teammates, + as we will be evaluating your ability to work as a team. + Team members who constantly bicker, complain about each other, + or fail to divide up tasks so that everyone can contribute will be penalized when we evaluate the code jam. + </p> + <p> + This does not, however, mean that a team that has a "bad egg" will automatically be unable to win the code-jam. + If a team member refuses to play well with the rest of the team or does not participate in the jam, + we will usually remove that person from the team and attempt to find a new teammate for the team to replace them. + This will also lead to an infraction against the offending team member, + which may make it impossible for them to join some (or all) future code jams. + </p> +{% endblock %} + +{% block sidebar %} + {% include "events/sidebar/code-jams/useful-information.html" %} +{% endblock %} diff --git a/pydis_site/templates/events/pages/code-jams/pull-request.html b/pydis_site/templates/events/pages/code-jams/pull-request.html new file mode 100644 index 00000000..c276fd12 --- /dev/null +++ b/pydis_site/templates/events/pages/code-jams/pull-request.html @@ -0,0 +1,235 @@ +{% extends "events/base_sidebar.html" %} + +{% block breadcrumb %} + <li><a href="{% url "events:index" %}">Events</a></li> + <li><a href="{% url "events:page" path="code-jams" %}">Code Jams</a></li> + <li class="is-active"><a href="#">Opening a Pull Request</a></li> +{% endblock %} + +{% block title %}Opening a Pull Request{% endblock %} + +{% block event_content %} + <p> + When you start out with a jam we ask your team leader to fork the code jam brief repository to their account for your to work on your code. + </p> + <p> + In this guide we're going to go over: + </p> + <ul> + <li> + <a href="#forking-the-repository">Forking the repository</a> + </li> + <li> + <a href="#opening-a-pull-request">Opening a pull request back to the code jam brief on python-discord</a> + </li> + <li> + <a href="#adding-collaborators">Adding collaborators</a> + </li> + <li> + <a href="#adding-a-github-webhook">Adding a GitHub webhook to your teams Discord channel</a> + </li> + </ul> + + <h2 class="title is-4" id="forking-the-repository"><a href="#forking-the-repository">Forking the repository</a></h2> + <p> + When you browse to the code jam brief repository you will be presented with the project root. + </p> + <p> + You want to fork the repository to your account using the button shown in the image below: + </p> + <p> + <img alt="fork button" src="https://raw.githubusercontent.com/wiki/python-discord/code-jam-5/images/fork-button.png"> + </p> + <p> + If you see a dialog like this one, just select your user. + </p> + <p> + <img alt="where to fork" src="https://raw.githubusercontent.com/wiki/python-discord/code-jam-5/images/where-to-fork.png"> + </p> + <p> + Once you've done this you'll be redirected to a page like this: + </p> + <p> + <img alt="example fork" src="https://raw.githubusercontent.com/wiki/python-discord/code-jam-5/images/my-fork.png"> + </p> + <p> + And that's it! You've forked the repo! + </p> + + <h2 class="title is-4" id="opening-a-pull-request"><a href="#opening-a-pull-request">Opening a Pull Request</a></h2> + <p> + Before we can open a Pull Request you need to have something to actually compare against the brief repo. + </p> + <p> + In the actual jam you should fill in the Project information section of the README.md, but for now I'm just going to add a line to the README. + </p> + <p> + <img alt="image" src="https://raw.githubusercontent.com/wiki/python-discord/code-jam-5/images/commit.png"> + </p> + <p> + Once you've made your commit, navigate back to the project root where you will see this button above your commit bar: + </p> + <p> + <img alt="image" src="https://raw.githubusercontent.com/wiki/python-discord/code-jam-5/images/pull-request-button.png"> + </p> + <p> + You should click on this pull request button. When you do you will see something like this, just click the Create pull request button: + </p> + <p> + <img alt="image" src="https://raw.githubusercontent.com/wiki/python-discord/code-jam-5/images/compare-changes.png"> + </p> + <p> + Next up you'll see a form like this: + </p> + <p> + <img alt="image" src="https://raw.githubusercontent.com/wiki/python-discord/code-jam-5/images/pull-request-form.png"> + </p> + <p> + You should fill it in like so: + </p> + <li> + <strong>Title</strong> should be your team's name + </li> + <li> + <strong>Description</strong> does not have to be filled in + </li> + <li> + Make sure to <strong>select the "allow edits from maintainers" option</strong> + </li> + <li> + Make sure to open a pull request and not a draft pull request + </li> + <p> + That's it! You've opened your pull request and should see something like this: + </p> + <p> + <img alt="image" src="https://raw.githubusercontent.com/wiki/python-discord/code-jam-5/images/pull-request.png"> + </p> + + <h2 class="title is-4" id="adding-collaborators"><a href="#adding-collaborators">Adding collaborators</a></h2> + <p> + Obviously your fork is no good if your team members cannot make edits to it. + To allow your team mates to edit you need to add them to the project as collaborators. + </p> + <p> + We're going to start off by heading to our fork of the repository (this is the one with your username in it, not python-discord) and head to the settings page. + </p> + <p> + <img alt="image" src="https://raw.githubusercontent.com/wiki/python-discord/code-jam-5/images/settings-page.png"> + </p> + <p> + Click on collaborators. GitHub will ask you to enter your password now for security. Enter it and proceed. + </p> + <p> + You should see a page like this: + </p> + <p> + <img alt="image" src="https://raw.githubusercontent.com/wiki/python-discord/code-jam-5/images/collabs-page.png"> + </p> + <p> + Add your team members using this form and use the copy invite button to copy an invite link they can then use. + You should send this to them in your team channel on Discord. + </p> + <p> + <img alt="image" src="https://raw.githubusercontent.com/wiki/python-discord/code-jam-5/images/invites.png"> + </p> + <p> + <img alt="image" src="https://raw.githubusercontent.com/wiki/python-discord/code-jam-5/images/invited-discord.png"> + </p> + <p> + Once your team mates have joined you'll see this: + </p> + <p> + <img alt="image" src="https://raw.githubusercontent.com/wiki/python-discord/code-jam-5/images/accepted.png"> + </p> + <p> + That's all! Your teammates have access to the repository now! + </p> + + <h2 class="title is-4" id="adding-a-github-webhook"><a href="#adding-a-github-webhook">Add a GitHub webhook to Discord</a></h2> + <p> + It may be useful to keep up on your GitHub repository updates right from your Discord channel. + For that reason, we've assigned all team leaders webhook creation permissions inside your team channel. + </p> + <h3 class="title is-5">Webhook creation</h3> + <p> + To make use of this we're going to start out by making a webhook inside the channel. + </p> + <p> + To do this go to your team channel and click on the gear that appears when you mouse-over it. + </p> + <p> + <img alt="image" src="https://raw.githubusercontent.com/wiki/python-discord/code-jam-5/images/channel-gear.png"> + </p> + <p> + Navigate to the Webhooks section of the settings page and click <code>Create Webhook</code>. + </p> + <p> + <img alt="image" src="https://raw.githubusercontent.com/wiki/python-discord/code-jam-5/images/webhook-creation-page.png"> + </p> + <p> + You'll see something like this: + </p> + <p> + <img alt="image" src="https://raw.githubusercontent.com/wiki/python-discord/code-jam-5/images/webhook-modal.png"> + </p> + <p> + You can edit the name to 'GitHub' or anything, but GitHub will do this anyway. + </p> + <p> + Copy the link to the clipboard, you will get something like this: + </p> + <p> + <code>https://canary.discordapp.com/api/webhooks/548221675087462410/h7lkQ7cX5-95J8CLMNCGXTEBrWOmXYFWv7N4MqsFtV-D8F0W8Rf3rWj4dPAEFGspm7EZ</code> + </p> + <p> + By default this is not configured to respond to GitHub payloads so you will need to add a <code>/github</code> to the end of the URL. + </p> + <p> + Your new URL should look like: + </p> + <p> + <code>https://canary.discordapp.com/api/webhooks/548221675087462410/h7lkQ7cX5-95J8CLMNCGXTEBrWOmXYFWv7N4MqsFtV-D8F0W8Rf3rWj4dPAEFGspm7EZ/github</code> + </p> + <h3 class="title is-5">Adding to GitHub</h3> + <p> + Next up we will head over to our GitHub project settings (on our fork) and go to the webhooks section: + </p> + <p> + <img alt="image" src="https://raw.githubusercontent.com/wiki/python-discord/code-jam-5/images/webhooks-settings.png"> + </p> + <p> + Click on the Add Webhook button and paste in your URL to the <code>Payload URL</code> section. + </p> + <p> + Set the <code>Content Type</code> to <code>application/json</code> otherwise Discord cannot interpret your request. + </p> + <p> + You can select either just the push or everything depending on how much information you want. + </p> + <p> + Make sure <code>Active</code> is ticked and click <code>Add webhook</code>. + </p> + <p> + And that's it! You've added a Discord webhook to your GitHub repository! + </p> + <p> + <img alt="image" src="https://raw.githubusercontent.com/wiki/python-discord/code-jam-5/images/added.png"> + </p> + <p> + As you can see here, my teammate has commited a change to our fork: + </p> + <p> + <img alt="image" src="https://raw.githubusercontent.com/wiki/python-discord/code-jam-5/images/aperture-commit.png"> + </p> + <p> + In our Discord channel, you can see the following: + </p> + <p> + <img alt="image" src="https://raw.githubusercontent.com/wiki/python-discord/code-jam-5/images/webhook-channel.png"> + </p> +{% endblock %} + +{% block sidebar %} + {% include "events/sidebar/code-jams/useful-information.html" %} +{% endblock %} diff --git a/pydis_site/templates/events/pages/code-jams/using-git.html b/pydis_site/templates/events/pages/code-jams/using-git.html new file mode 100644 index 00000000..19c4a08f --- /dev/null +++ b/pydis_site/templates/events/pages/code-jams/using-git.html @@ -0,0 +1,61 @@ +{% extends "events/base_sidebar.html" %} + +{% block breadcrumb %} + <li><a href="{% url "events:index" %}">Events</a></li> + <li><a href="{% url "events:page" path="code-jams" %}">Code Jams</a></li> + <li class="is-active"><a href="#">How to use git</a></li> +{% endblock %} + +{% block title %}How to use git{% endblock %} + +{% block event_content %} + <p> + We require all participants to use Git for source control. + This means that you will need to learn a bit of Git to participate in the code jam, + if you're not already familiar with it. Git is incredibly useful, + and an essential skill to master if you ever want to write code out there in the real world. + If you don't yet have Git installed... + </p> + + <ul> + <li> + <strong>Windows</strong>: Install git using <a href="https://gitforwindows.org/">Git for Windows</a> - you can leave all of the options at their defaults, if you wish + </li> + <li> + <strong>Mac</strong>: Install git using <a href="https://brew.sh/">Homebrew</a> + </li> + <li> + <strong>Linux</strong>: Install git using your Linux distro's package manager + </li> + </ul> + + <p> + In order to make the learning process easier, we've included some Git learning resources below... + </p> + <ul> + <li> + Roger Dudler has <a href="https://rogerdudler.github.io/git-guide/">an excellent crash</a> course that will show you the most important commands. This can be used as a cheat sheet once you're starting to actually use Git. + </li> + <li> + If you'd like a wordier introduction, Prithaj Nath (who participated in our first code jam) wrote a more in-depth guide called <a href="https://medium.com/@prithajnath/getting-started-with-git-7aae82dd3599">Let's Git Started!</a> for <a href="https://medium.com">medium.com</a> that might be worth a read. + </li> + <li> + The ever-excellent Corey Schafer has a 30-minute YouTube tutorial called <a href="https://www.youtube.com/watch?v=HVsySz-h9r4">Git Tutorial for Beginners</a> which should teach you everything you need to know to participate in our jams. + </li> + </ul> + + <p> + Optionally, certain IDEs and editors will be able to handle Git for you, + and tools like GitKraken are also permitted. + Make sure you familiarize yourself with the client of your choice before the code jam starts + so you don't need to spend time learning this while the clock is running. + </p> + <p> + For more information on GUI clients you can use, + <a href="https://about.gitlab.com/applications/#gui-git-clients">please see this page</a>. + </p> +{% endblock %} + +{% block sidebar %} + {% include "events/sidebar/code-jams/useful-information.html" %} +{% endblock %} diff --git a/pydis_site/templates/events/pages/game-jams/2020/_index.html b/pydis_site/templates/events/pages/game-jams/2020/_index.html new file mode 100644 index 00000000..136c9f4d --- /dev/null +++ b/pydis_site/templates/events/pages/game-jams/2020/_index.html @@ -0,0 +1,104 @@ +{% extends "events/base_sidebar.html" %} + +{% block title %}Game Jam 2020: Three of a Kind{% endblock %} + +{% block breadcrumb %} + <li><a href="{% url "events:index" %}">Events</a></li> + <li><a href="{% url "events:page" path="game-jams" %}">Game Jams</a></li> + <li class="is-active"><a href="#">Game Jam 2020: Three of a Kind</a></li> +{% endblock %} + +{% block event_content %} + <p> + During the first ever Python Discord Game Jam, + 23 teams signed up to create a game using the <a href="https://arcade.academy/">Python Arcade Library</a>. + Each team consisted of 1-3 people and teammates were chosen by the participants themselves, + unlike in our <a href="{% url "events:page" path="code-jams" %}">Code Jams</a>. + The Game Jam ran from <strong>April 17, 12:00 UTC to April 26, 18:00 UTC</strong>. + </p> + + <h2 class="title is-4" id="task-description"><a href="#task-description">Task Description</a></h2> + <blockquote> + <p>The theme for this game jam is <strong>Three-of-a-kind</strong>.</p> + <p> + What you do with this theme or how you interpret it is up to you, + but it will be your task to come up with something fun using this theme. + </p> + </blockquote> + + <h2 class="title is-4" id="judging-stream"><a href="#judging-stream">Judging Stream and Interview</a></h2> + <p> + The original Game Jam live stream is shown below, + where the top ten submissions were reviewed and showcased. + There was also an interview with <strong>Paul Craven</strong>, + the creator of the <a href="https://arcade.academy/">Python Arcade Library</a>, + where he answered many questions about his origin/backstory, + the development of the Arcade library, and general programming. + </p> + <iframe width="560" height="315" src="https://www.youtube.com/embed/KkLXMvKfEgs" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> + + <blockquote> + <p> + You can also see the top ten submissions shown + <a href="https://arcade.academy/game_jam_2020.html">here</a> + on the Arcade website and all submissions were submitted + <a href="https://github.com/python-discord/game-jam-2020">here</a> to the repository. + </p> + </blockquote> + + <h2 class="title is-4" id="results"><a href="#results">Results</a></h2> + <p> + The <strong>winning team</strong> for our first ever Game Jam was team <strong>Score AAA</strong>, + consisting of one person, <strong>EmberDuck</strong>. He created a very polished game, + focusing in on one core idea and just nailing it perfectly. + This is a game where the player controls <strong>3</strong> different characters which need to jump over obstacles. + The concept itself may seem simple, but EmberDuck kept iterating on the idea, making it better and better, + taking it to the point of perfection. The graphics were phenomenal, the UI was beautiful and intuitive, and the animations were just fantastic. + The parallax effect in the background was mesmerizing, which was an element that was unique and different from other submissions. + Taking this project to another level, all art assets for this submission were made by EmberDuck himself. + This was an incredible project, especially for a one-man-team. <strong>Congratulations EmberDuck!</strong> + </p> + + <p> + Check out their submission + <a href="https://github.com/python-discord/game-jam-2020/tree/master/Finalists/Score_AAA/">here</a> + and watch it being played live <a href="https://youtu.be/KkLXMvKfEgs?t=7600">here</a>! + </p> + + <h2 class="title is-4" id="runner-up-1"><a href="#runner-up-1">Runner Up 1: Gamer Gang</a></h2> + <p> + The <strong>Gamer Gang</strong> (SansPapyrus683, Blue Bird, & SimplyNarwell) created a platformer game where the player controls + <strong>3</strong> different slimes to get through 6 different levels. + The slimes can either move together in a stack, or the player can split them apart to control each of them one by one. + The physics in this game was a nice addition and tied the game together nicely. + The graphics in this game were quite beautiful and the UI complemented it well. + This game scored quite high on many factors, and was a very fun game overall. Excellent job! + </p> + <p> + Feel free to look at their submission + <a href="https://github.com/python-discord/game-jam-2020/tree/master/Finalists/gamer_gang/">here</a> + and watch it being played on stream <a href="https://youtu.be/KkLXMvKfEgs?t=3812">here</a>! + </p> + + <h2 class="title is-4" id="runner-up-2"><a href="#runner-up-2">Runner Up 2: Monkeys and Frogs on Fire</a></h2> + <p> + Team <strong>Monkeys and Frogs on Fire</strong> (BrainDead, F4zi, & f1re) + created a dungeon-crawler type of game where the player can switch between + <strong>3</strong> different wizards, each having their own special abilities. + The red wizard has great strength, while the green wizard has a lot of defense and the blue wizard is quick and fast. + A unique and exceptional feature of this game was the backend server which allowed a player to register/login. + The goal of this game was to survive as long as you can to get the highest score, + which is then uploaded to the server and can be seen on the leaderboard. + This game had a crisp and smooth UI along with nice graphics and fantastic animations, + bringing this game together. Phenomenol work! + </p> + <p> + Have a look at this submission <a href="https://github.com/Den4200/game-jam-2020">here</a> + and watch this game played live on stream <a href="https://youtu.be/KkLXMvKfEgs?t=5188">here</a>! + </p> + <img src="https://user-images.githubusercontent.com/33516116/77762078-e02ce080-7030-11ea-947a-9c6733d4f33d.png" alt=""> +{% endblock %} + +{% block sidebar %} + {% include "events/sidebar/game-jams/2020.html" %} +{% endblock %} diff --git a/pydis_site/templates/events/pages/game-jams/_index.html b/pydis_site/templates/events/pages/game-jams/_index.html new file mode 100644 index 00000000..85048cf1 --- /dev/null +++ b/pydis_site/templates/events/pages/game-jams/_index.html @@ -0,0 +1,12 @@ +{% extends "events/base.html" %} + +{% block title %}Game Jams{% endblock %} + +{% block breadcrumb %} + <li><a href="{% url "events:index" %}">Events</a></li> + <li class="is-active"><a href="#">Game Jams</a></li> +{% endblock %} + +{% block event_content %} + <p>Sorry, this page is not ready yet.</p> +{% endblock %} diff --git a/pydis_site/templates/events/sidebar/code-jams/6.html b/pydis_site/templates/events/sidebar/code-jams/6.html new file mode 100644 index 00000000..95a1f247 --- /dev/null +++ b/pydis_site/templates/events/sidebar/code-jams/6.html @@ -0,0 +1,6 @@ +<div class="box"> + <img src="https://raw.githubusercontent.com/python-discord/branding/master/events/winer_code_jam_2020/code%20jam%206%20-%20website%20banner.png" alt=""> + <p class="menu-label">Sponsors:</p> + <p><a href="https://do.co/devmeetup" target="_new"><img src="https://d9hhrg4mnvzow.cloudfront.net/try.digitalocean.com/developer-cloud/3f06d1cb-do-logo-blue-svg.svg" style="width: 100%;" alt=""></a></p> + <p><a href="https://jetbrains.com" target="_new"><img src="https://pythondiscord.com/static/images/sponsors/jetbrains.png" alt=""></a></p> +</div> diff --git a/pydis_site/templates/events/sidebar/code-jams/7.html b/pydis_site/templates/events/sidebar/code-jams/7.html new file mode 100644 index 00000000..d4615c2a --- /dev/null +++ b/pydis_site/templates/events/sidebar/code-jams/7.html @@ -0,0 +1,12 @@ +{% load static %} + +<div class="box"> + <img src="https://raw.githubusercontent.com/python-discord/branding/master/events/summer_code_jam_2020/summer%20cj%202020%20discord%20banner.png" alt="Summer Code Jam 2020"> + <p class="menu-label">Sponsors</p> + <a href="https://www.djangoproject.com/" target="_blank"> + <img src="https://static.djangoproject.com/img/logos/django-logo-positive.png" alt="Django"> + </a> + <a href="https://jetbrains.com" target="_blank"> + <img src="{% static "images/sponsors/jetbrains.png" %}" alt="JetBrains"> + </a> +</div> diff --git a/pydis_site/templates/events/sidebar/code-jams/previous-code-jams.html b/pydis_site/templates/events/sidebar/code-jams/previous-code-jams.html new file mode 100644 index 00000000..154f6ac4 --- /dev/null +++ b/pydis_site/templates/events/sidebar/code-jams/previous-code-jams.html @@ -0,0 +1,11 @@ +<div class="box"> + <p class="menu-label">Previous Code Jams</p> + <ul class="menu-list"> + <li><a class="has-text-link" href="{% url "events:page" path="code-jams/6" %}">Code Jam 6: Ancient Technology</a></li> + <li><a class="has-text-link" href="{% url "events:page" path="code-jams/5" %}">Code Jam 5: Climate Change</a></li> + <li><a class="has-text-link" href="{% url "events:page" path="code-jams/4" %}">Code Jam 4: This App Hates You</a></li> + <li><a class="has-text-link" href="{% url "events:page" path="code-jams/3" %}">Code Jam 3: Games!</a></li> + <li><a class="has-text-link" href="{% url "events:page" path="code-jams/2" %}">Code Jam 2: Mythology API</a></li> + <li><a class="has-text-link" href="{% url "events:page" path="code-jams/1" %}">Code Jam 1: Snake Bot</a></li> + </ul> +</div> diff --git a/pydis_site/templates/events/sidebar/code-jams/upcoming-code-jam.html b/pydis_site/templates/events/sidebar/code-jams/upcoming-code-jam.html new file mode 100644 index 00000000..914a9545 --- /dev/null +++ b/pydis_site/templates/events/sidebar/code-jams/upcoming-code-jam.html @@ -0,0 +1,8 @@ +{% load static %} + +<div class="box"> + <p class="menu-label">Upcoming Code Jam</p> + <a href="{% url "events:page" path="code-jams/7" %}"> + <img src="{% static "images/events/summer_code_jam_2020.png" %}" alt=""> + </a> +</div> diff --git a/pydis_site/templates/events/sidebar/code-jams/useful-information.html b/pydis_site/templates/events/sidebar/code-jams/useful-information.html new file mode 100644 index 00000000..c4e665e6 --- /dev/null +++ b/pydis_site/templates/events/sidebar/code-jams/useful-information.html @@ -0,0 +1,8 @@ +<div class="box"> + <p class="menu-label">Useful information for code jam participants</p> + <ul class="menu-list"> + <li><a class="has-text-link" href="{% url "events:page" path="code-jams/using-git" %}">How to use git</a></li> + <li><a class="has-text-link" href="{% url "events:page" path="code-jams/judging" %}">How does judging work?</a></li> + <li><a class="has-text-link" href="{% url "events:page" path="code-jams/pull-request" %}">Opening a Pull Request</a></li> + </ul> +</div> diff --git a/pydis_site/templates/events/sidebar/events-list.html b/pydis_site/templates/events/sidebar/events-list.html new file mode 100644 index 00000000..327b0e77 --- /dev/null +++ b/pydis_site/templates/events/sidebar/events-list.html @@ -0,0 +1,10 @@ +<div class="box"> + <p class="menu-label">Event Calendar 2020</p> + <ul class="menu-list"> + <li><a class="has-text-link" href="{% url "events:page" path="code-jams/6" %}">January 17-January 26: Winter Code Jam</a></li> + <li><a class="has-text-link" href="{% url "events:page" path="game-jams/2020" %}">April 17-April 26: Game Jam</a></li> + <li><a class="has-text-link" href="{% url "events:page" path="code-jams/7" %}">July 31-August 9: Summer Code Jam</a></li> + <li><a class="has-text-black" style="cursor: default;">October: Hacktoberfest</a></li> + <li><a class="has-text-black" style="cursor: default;">December: Advent of Code</a></li> + </ul> +</div> diff --git a/pydis_site/templates/events/sidebar/game-jams/2020.html b/pydis_site/templates/events/sidebar/game-jams/2020.html new file mode 100644 index 00000000..549c0922 --- /dev/null +++ b/pydis_site/templates/events/sidebar/game-jams/2020.html @@ -0,0 +1,4 @@ +<div class="box"> + <p class="menu-label">Partners</p> + <p><a href="https://arcade.academy/" target="_new"><img src="https://i.imgur.com/CtY3Siv.png" style="width: 100%;" alt=""></a></p> +</div> diff --git a/pydis_site/templates/events/sidebar/upcoming-event.html b/pydis_site/templates/events/sidebar/upcoming-event.html new file mode 100644 index 00000000..5c1d925a --- /dev/null +++ b/pydis_site/templates/events/sidebar/upcoming-event.html @@ -0,0 +1,8 @@ +{% load static %} + +<div class="box"> + <p class="menu-label">Upcoming Event</p> + <a href="{% url "events:page" path="code-jams/7" %}"> + <img src="{% static "images/events/summer_code_jam_2020.png" %}" alt=""> + </a> +</div> diff --git a/pydis_site/templates/events/test-pages/my-event/_index.html b/pydis_site/templates/events/test-pages/my-event/_index.html new file mode 100644 index 00000000..1a859fdd --- /dev/null +++ b/pydis_site/templates/events/test-pages/my-event/_index.html @@ -0,0 +1 @@ +{% extends "events/base.html" %} diff --git a/pydis_site/templates/events/test-pages/my-event/subpage.html b/pydis_site/templates/events/test-pages/my-event/subpage.html new file mode 100644 index 00000000..1a859fdd --- /dev/null +++ b/pydis_site/templates/events/test-pages/my-event/subpage.html @@ -0,0 +1 @@ +{% extends "events/base.html" %} diff --git a/pydis_site/templates/resources/resources.html b/pydis_site/templates/resources/resources.html index 7b044f06..f1f487cf 100644 --- a/pydis_site/templates/resources/resources.html +++ b/pydis_site/templates/resources/resources.html @@ -15,7 +15,7 @@ <h1>Resources</h1> <div class="tile is-ancestor"> - <a class="tile is-parent" href="/articles/category/guides"> + <a class="tile is-parent" href="{% url "content:page_category" location="guides" %}"> <article class="tile is-child box hero is-primary is-bold"> <p class="title is-size-1"><i class="fad fa-info-circle" aria-hidden="true"></i> Guides</p> <p class="subtitle is-size-4">Made by us, for you</p> |