From 533899485a0432e6b9dc8f9daffad36a31b6757e Mon Sep 17 00:00:00 2001 From: Anas Iqbal Date: Thu, 28 Aug 2025 23:00:02 +0530 Subject: [PATCH 1/5] testing the upgrade to 3.11 with some file changes --- .github/workflows/continuous-integration.yaml | 4 +- .github/workflows/modify-assignments.yaml | 2 +- .github/workflows/sync_content.yml | 2 +- .../Contest-Start/statements/es.markdown | 2 +- utils/Pipfile | 4 +- utils/Pipfile.lock | 259 +++++++++++------- utils/update_assignment_problems.py | 15 +- 7 files changed, 181 insertions(+), 107 deletions(-) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 1d2b2e9..bb2e86c 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -52,7 +52,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.8' + python-version: '3.11' - uses: actions/checkout@v2 with: @@ -151,7 +151,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.8' + python-version: '3.11' - name: Validate content structure run: | diff --git a/.github/workflows/modify-assignments.yaml b/.github/workflows/modify-assignments.yaml index bedf12d..e05b99b 100644 --- a/.github/workflows/modify-assignments.yaml +++ b/.github/workflows/modify-assignments.yaml @@ -24,7 +24,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.8' + python-version: '3.11' - name: Set up pipenv run: | diff --git a/.github/workflows/sync_content.yml b/.github/workflows/sync_content.yml index 50ffb6e..dbbb600 100644 --- a/.github/workflows/sync_content.yml +++ b/.github/workflows/sync_content.yml @@ -24,7 +24,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.8' + python-version: '3.11' - name: Set up pipenv run: | diff --git a/Courses/omi-public-course/practice/Contest-Start/statements/es.markdown b/Courses/omi-public-course/practice/Contest-Start/statements/es.markdown index 2b3e58c..0cce341 100644 --- a/Courses/omi-public-course/practice/Contest-Start/statements/es.markdown +++ b/Courses/omi-public-course/practice/Contest-Start/statements/es.markdown @@ -6,7 +6,7 @@ There are n Duration of contest is t minutes for each participant, so the first participant finishes the contest at time t, the second β€” at time t+x, and so on. When a participant finishes the contest, their dissatisfaction equals to the number of participants that started the contest (or starting it now), but haven't yet finished it. -Determine the sum of dissatisfaction of all participants. new update 100 +Determine the sum of dissatisfaction of all participants. new update 60 # Input The first line contains a single integer k (1≀k≀1000) β€” the number of test cases. diff --git a/utils/Pipfile b/utils/Pipfile index 331f1f9..17d93e4 100644 --- a/utils/Pipfile +++ b/utils/Pipfile @@ -14,9 +14,9 @@ pycodestyle = ">=2.6.0" [packages] libkarel = ">=1.0.2" -omegaup = ">=1.3.0" +omegaup = ">=2.0.18" [requires] -python_version = "3.8" +python_version = "3.11" diff --git a/utils/Pipfile.lock b/utils/Pipfile.lock index 28b8919..d5df661 100644 --- a/utils/Pipfile.lock +++ b/utils/Pipfile.lock @@ -1,11 +1,11 @@ { "_meta": { "hash": { - "sha256": "c86a154ae724da2e2f59aa29e35340e6acbc7224154b3f7af6fe33cfe7b46e77" + "sha256": "b67c81a9ecbd6c6e0d3360aee9da1cb7f2c35af3bf80625aea876014f07817d1" }, "pipfile-spec": 6, "requires": { - "python_version": "3.8" + "python_version": "3.11" }, "sources": [ { @@ -18,143 +18,218 @@ "default": { "certifi": { "hashes": [ - "sha256:2bbf76fd432960138b3ef6dda3dde0544f27cbf8546c458e60baf371917ba9ee", - "sha256:50b1e4f8446b06f41be7dd6338db18e0990601dce795c2b1686458aa7e8fa7d8" + "sha256:e564105f78ded564e3ae7c923924435e1daa7463faeab5bb932bc53ffae63407", + "sha256:f6c12493cfb1b06ba2ff328595af9350c65d6644968e5d3a2ffd78699af217a5" ], - "version": "==2021.5.30" + "markers": "python_version >= '3.7'", + "version": "==2025.8.3" }, - "chardet": { + "charset-normalizer": { "hashes": [ - "sha256:0d6f53a15db4120f2b08c94f11e7d93d2c911ee118b6b30a04ec3ee8310179fa", - "sha256:f864054d66fd9118f2e67044ac8981a54775ec5b67aed0441892edb553d21da5" + "sha256:00237675befef519d9af72169d8604a067d92755e84fe76492fef5441db05b91", + "sha256:02425242e96bcf29a49711b0ca9f37e451da7c70562bc10e8ed992a5a7a25cc0", + "sha256:027b776c26d38b7f15b26a5da1044f376455fb3766df8fc38563b4efbc515154", + "sha256:07a0eae9e2787b586e129fdcbe1af6997f8d0e5abaa0bc98c0e20e124d67e601", + "sha256:0cacf8f7297b0c4fcb74227692ca46b4a5852f8f4f24b3c766dd94a1075c4884", + "sha256:0e78314bdc32fa80696f72fa16dc61168fda4d6a0c014e0380f9d02f0e5d8a07", + "sha256:0f2be7e0cf7754b9a30eb01f4295cc3d4358a479843b31f328afd210e2c7598c", + "sha256:13faeacfe61784e2559e690fc53fa4c5ae97c6fcedb8eb6fb8d0a15b475d2c64", + "sha256:14c2a87c65b351109f6abfc424cab3927b3bdece6f706e4d12faaf3d52ee5efe", + "sha256:1606f4a55c0fd363d754049cdf400175ee96c992b1f8018b993941f221221c5f", + "sha256:16a8770207946ac75703458e2c743631c79c59c5890c80011d536248f8eaa432", + "sha256:18343b2d246dc6761a249ba1fb13f9ee9a2bcd95decc767319506056ea4ad4dc", + "sha256:18b97b8404387b96cdbd30ad660f6407799126d26a39ca65729162fd810a99aa", + "sha256:1bb60174149316da1c35fa5233681f7c0f9f514509b8e399ab70fea5f17e45c9", + "sha256:1e8ac75d72fa3775e0b7cb7e4629cec13b7514d928d15ef8ea06bca03ef01cae", + "sha256:1ef99f0456d3d46a50945c98de1774da86f8e992ab5c77865ea8b8195341fc19", + "sha256:2001a39612b241dae17b4687898843f254f8748b796a2e16f1051a17078d991d", + "sha256:23b6b24d74478dc833444cbd927c338349d6ae852ba53a0d02a2de1fce45b96e", + "sha256:252098c8c7a873e17dd696ed98bbe91dbacd571da4b87df3736768efa7a792e4", + "sha256:257f26fed7d7ff59921b78244f3cd93ed2af1800ff048c33f624c87475819dd7", + "sha256:2c322db9c8c89009a990ef07c3bcc9f011a3269bc06782f916cd3d9eed7c9312", + "sha256:30a96e1e1f865f78b030d65241c1ee850cdf422d869e9028e2fc1d5e4db73b92", + "sha256:30d006f98569de3459c2fc1f2acde170b7b2bd265dc1943e87e1a4efe1b67c31", + "sha256:31a9a6f775f9bcd865d88ee350f0ffb0e25936a7f930ca98995c05abf1faf21c", + "sha256:320e8e66157cc4e247d9ddca8e21f427efc7a04bbd0ac8a9faf56583fa543f9f", + "sha256:34a7f768e3f985abdb42841e20e17b330ad3aaf4bb7e7aeeb73db2e70f077b99", + "sha256:3653fad4fe3ed447a596ae8638b437f827234f01a8cd801842e43f3d0a6b281b", + "sha256:3cd35b7e8aedeb9e34c41385fda4f73ba609e561faedfae0a9e75e44ac558a15", + "sha256:3cfb2aad70f2c6debfbcb717f23b7eb55febc0bb23dcffc0f076009da10c6392", + "sha256:416175faf02e4b0810f1f38bcb54682878a4af94059a1cd63b8747244420801f", + "sha256:41d1fc408ff5fdfb910200ec0e74abc40387bccb3252f3f27c0676731df2b2c8", + "sha256:42e5088973e56e31e4fa58eb6bd709e42fc03799c11c42929592889a2e54c491", + "sha256:4ca4c094de7771a98d7fbd67d9e5dbf1eb73efa4f744a730437d8a3a5cf994f0", + "sha256:511729f456829ef86ac41ca78c63a5cb55240ed23b4b737faca0eb1abb1c41bc", + "sha256:53cd68b185d98dde4ad8990e56a58dea83a4162161b1ea9272e5c9182ce415e0", + "sha256:585f3b2a80fbd26b048a0be90c5aae8f06605d3c92615911c3a2b03a8a3b796f", + "sha256:5b413b0b1bfd94dbf4023ad6945889f374cd24e3f62de58d6bb102c4d9ae534a", + "sha256:5d8d01eac18c423815ed4f4a2ec3b439d654e55ee4ad610e153cf02faf67ea40", + "sha256:6aab0f181c486f973bc7262a97f5aca3ee7e1437011ef0c2ec04b5a11d16c927", + "sha256:6cf8fd4c04756b6b60146d98cd8a77d0cdae0e1ca20329da2ac85eed779b6849", + "sha256:6fb70de56f1859a3f71261cbe41005f56a7842cc348d3aeb26237560bfa5e0ce", + "sha256:6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14", + "sha256:70bfc5f2c318afece2f5838ea5e4c3febada0be750fcf4775641052bbba14d05", + "sha256:73dc19b562516fc9bcf6e5d6e596df0b4eb98d87e4f79f3ae71840e6ed21361c", + "sha256:74d77e25adda8581ffc1c720f1c81ca082921329452eba58b16233ab1842141c", + "sha256:78deba4d8f9590fe4dae384aeff04082510a709957e968753ff3c48399f6f92a", + "sha256:86df271bf921c2ee3818f0522e9a5b8092ca2ad8b065ece5d7d9d0e9f4849bcc", + "sha256:88ab34806dea0671532d3f82d82b85e8fc23d7b2dd12fa837978dad9bb392a34", + "sha256:8999f965f922ae054125286faf9f11bc6932184b93011d138925a1773830bbe9", + "sha256:8dcfc373f888e4fb39a7bc57e93e3b845e7f462dacc008d9749568b1c4ece096", + "sha256:939578d9d8fd4299220161fdd76e86c6a251987476f5243e8864a7844476ba14", + "sha256:96b2b3d1a83ad55310de8c7b4a2d04d9277d5591f40761274856635acc5fcb30", + "sha256:a2d08ac246bb48479170408d6c19f6385fa743e7157d716e144cad849b2dd94b", + "sha256:b256ee2e749283ef3ddcff51a675ff43798d92d746d1a6e4631bf8c707d22d0b", + "sha256:b5e3b2d152e74e100a9e9573837aba24aab611d39428ded46f4e4022ea7d1942", + "sha256:b89bc04de1d83006373429975f8ef9e7932534b8cc9ca582e4db7d20d91816db", + "sha256:bd28b817ea8c70215401f657edef3a8aa83c29d447fb0b622c35403780ba11d5", + "sha256:c60e092517a73c632ec38e290eba714e9627abe9d301c8c8a12ec32c314a2a4b", + "sha256:c6dbd0ccdda3a2ba7c2ecd9d77b37f3b5831687d8dc1b6ca5f56a4880cc7b7ce", + "sha256:c6e490913a46fa054e03699c70019ab869e990270597018cef1d8562132c2669", + "sha256:c6f162aabe9a91a309510d74eeb6507fab5fff92337a15acbe77753d88d9dcf0", + "sha256:c6fd51128a41297f5409deab284fecbe5305ebd7e5a1f959bee1c054622b7018", + "sha256:cc34f233c9e71701040d772aa7490318673aa7164a0efe3172b2981218c26d93", + "sha256:cc9370a2da1ac13f0153780040f465839e6cccb4a1e44810124b4e22483c93fe", + "sha256:ccf600859c183d70eb47e05a44cd80a4ce77394d1ac0f79dbd2dd90a69a3a049", + "sha256:ce571ab16d890d23b5c278547ba694193a45011ff86a9162a71307ed9f86759a", + "sha256:cf1ebb7d78e1ad8ec2a8c4732c7be2e736f6e5123a4146c5b89c9d1f585f8cef", + "sha256:d0e909868420b7049dafd3a31d45125b31143eec59235311fc4c57ea26a4acd2", + "sha256:d22dbedd33326a4a5190dd4fe9e9e693ef12160c77382d9e87919bce54f3d4ca", + "sha256:d716a916938e03231e86e43782ca7878fb602a125a91e7acb8b5112e2e96ac16", + "sha256:d79c198e27580c8e958906f803e63cddb77653731be08851c7df0b1a14a8fc0f", + "sha256:d95bfb53c211b57198bb91c46dd5a2d8018b3af446583aab40074bf7988401cb", + "sha256:e28e334d3ff134e88989d90ba04b47d84382a828c061d0d1027b1b12a62b39b1", + "sha256:ec557499516fc90fd374bf2e32349a2887a876fbf162c160e3c01b6849eaf557", + "sha256:fb6fecfd65564f208cbf0fba07f107fb661bcd1a7c389edbced3f7a493f70e37", + "sha256:fb731e5deb0c7ef82d698b0f4c5bb724633ee2a489401594c5c88b02e6cb15f7", + "sha256:fb7f67a1bfa6e40b438170ebdc8158b78dc465a5a67b6dde178a46987b244a72", + "sha256:fd10de089bcdcd1be95a2f73dbe6254798ec1bda9f450d5828c96f93e2536b9c", + "sha256:fdabf8315679312cfa71302f9bd509ded4f2f263fb5b765cf1433b39106c3cc9" ], - "version": "==4.0.0" + "markers": "python_version >= '3.7'", + "version": "==3.4.3" }, "idna": { "hashes": [ - "sha256:b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6", - "sha256:b97d804b1e9b523befed77c48dacec60e6dcb0b5391d57af6a65a312a90648c0" + "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9", + "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3" ], - "version": "==2.10" + "markers": "python_version >= '3.6'", + "version": "==3.10" }, "libkarel": { "hashes": [ - "sha256:45ddc5c3807aeec754b43f12eea363c9c334b5e4844242e08a2ce028566d68df", - "sha256:fdc30745ee1b1cf2bb5d2a5318fefebf52a207ade7b3164ede46d0b9a1a8bfba" + "sha256:415341c2dc6e563bfc2e9af2f651eeb2075c0cc88af5774ef4dfd2e189ad32ad", + "sha256:a06316a7c8f9a5e75ced3ada894f6656a6cb1a37d8b60c1e796c4da8da8c16cf" ], "index": "pypi", - "version": "==1.0.2" + "markers": "python_version >= '3.6'", + "version": "==1.1.2" }, "omegaup": { "hashes": [ - "sha256:13f1e0afc5a4b4cd0118e3ad81c6c6f8a4a4b52a6405e3d84d0febf7fb1ecf3d", - "sha256:438ab9a32e2f046a679e8aebec128d11ab9795f77786c74a3c60a5396f8e775f" + "sha256:c0c8c5da94544eb1b490aeaccf03c4489e7c27551947a77ace9641ec061af28a", + "sha256:c9de8b76ea8f38ecdadbb2f8f052dfaac9b9eff41f0250486215958113f48736" ], "index": "pypi", - "version": "==1.3.0" + "markers": "python_version >= '3.6'", + "version": "==2.0.18" }, "requests": { "hashes": [ - "sha256:27973dd4a904a4f13b263a19c866c13b92a39ed1c964655f025f3f8d3d75b804", - "sha256:c210084e36a42ae6b9219e00e48287def368a26d03a048ddad7bfee44f75871e" + "sha256:2462f94637a34fd532264295e186976db0f5d453d1cdd31473c85a6a161affb6", + "sha256:dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" ], - "version": "==2.25.1" + "markers": "python_version >= '3.9'", + "version": "==2.32.5" }, "urllib3": { "hashes": [ - "sha256:753a0374df26658f99d826cfe40394a686d05985786d946fbe4165b5148f5a7c", - "sha256:a7acd0977125325f516bda9735fa7142b909a8d01e8b2e4c8108d0984e6e0098" + "sha256:3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760", + "sha256:e6b01673c0fa6a13e374b50871808eb3bf7046c4b125b216f6bf1cc604cff0dc" ], - "index": "pypi", - "version": "==1.26.5" + "markers": "python_version >= '3.9'", + "version": "==2.5.0" } }, "develop": { "mypy": { "hashes": [ - "sha256:0d0a87c0e7e3a9becdfbe936c981d32e5ee0ccda3e0f07e1ef2c3d1a817cf73e", - "sha256:25adde9b862f8f9aac9d2d11971f226bd4c8fbaa89fb76bdadb267ef22d10064", - "sha256:28fb5479c494b1bab244620685e2eb3c3f988d71fd5d64cc753195e8ed53df7c", - "sha256:2f9b3407c58347a452fc0736861593e105139b905cca7d097e413453a1d650b4", - "sha256:33f159443db0829d16f0a8d83d94df3109bb6dd801975fe86bacb9bf71628e97", - "sha256:3f2aca7f68580dc2508289c729bd49ee929a436208d2b2b6aab15745a70a57df", - "sha256:499c798053cdebcaa916eef8cd733e5584b5909f789de856b482cd7d069bdad8", - "sha256:4eec37370483331d13514c3f55f446fc5248d6373e7029a29ecb7b7494851e7a", - "sha256:552a815579aa1e995f39fd05dde6cd378e191b063f031f2acfe73ce9fb7f9e56", - "sha256:5873888fff1c7cf5b71efbe80e0e73153fe9212fafdf8e44adfe4c20ec9f82d7", - "sha256:61a3d5b97955422964be6b3baf05ff2ce7f26f52c85dd88db11d5e03e146a3a6", - "sha256:674e822aa665b9fd75130c6c5f5ed9564a38c6cea6a6432ce47eafb68ee578c5", - "sha256:7ce3175801d0ae5fdfa79b4f0cfed08807af4d075b402b7e294e6aa72af9aa2a", - "sha256:9743c91088d396c1a5a3c9978354b61b0382b4e3c440ce83cf77994a43e8c521", - "sha256:9f94aac67a2045ec719ffe6111df543bac7874cee01f41928f6969756e030564", - "sha256:a26f8ec704e5a7423c8824d425086705e381b4f1dfdef6e3a1edab7ba174ec49", - "sha256:abf7e0c3cf117c44d9285cc6128856106183938c68fd4944763003decdcfeb66", - "sha256:b09669bcda124e83708f34a94606e01b614fa71931d356c1f1a5297ba11f110a", - "sha256:cd07039aa5df222037005b08fbbfd69b3ab0b0bd7a07d7906de75ae52c4e3119", - "sha256:d23e0ea196702d918b60c8288561e722bf437d82cb7ef2edcd98cfa38905d506", - "sha256:d65cc1df038ef55a99e617431f0553cd77763869eebdf9042403e16089fe746c", - "sha256:d7da2e1d5f558c37d6e8c1246f1aec1e7349e4913d8fb3cb289a35de573fe2eb" + "sha256:03b6d0ed2b188e35ee6d5c36b5580cffd6da23319991c49ab5556c023ccf1341", + "sha256:064e2ff508e5464b4bd807a7c1625bc5047c5022b85c70f030680e18f37273a5", + "sha256:099b9a5da47de9e2cb5165e581f158e854d9e19d2e96b6698c0d64de911dd849", + "sha256:15a83369400454c41ed3a118e0cc58bd8123921a602f385cb6d6ea5df050c733", + "sha256:15d54056f7fe7a826d897789f53dd6377ec2ea8ba6f776dc83c2902b899fee81", + "sha256:1b16708a66d38abb1e6b5702f5c2c87e133289da36f6a1d15f6a5221085c6403", + "sha256:209a58fed9987eccc20f2ca94afe7257a8f46eb5df1fb69958650973230f91e6", + "sha256:25e01ec741ab5bb3eec8ba9cdb0f769230368a22c959c4937360efb89b7e9f01", + "sha256:397fba5d7616a5bc60b45c7ed204717eaddc38f826e3645402c426057ead9a91", + "sha256:3fbe6d5555bf608c47203baa3e72dbc6ec9965b3d7c318aa9a4ca76f465bd972", + "sha256:43808d9476c36b927fbcd0b0255ce75efe1b68a080154a38ae68a7e62de8f0f8", + "sha256:55b918670f692fc9fba55c3298d8a3beae295c5cded0a55dccdc5bbead814acd", + "sha256:5d1092694f166a7e56c805caaf794e0585cabdbf1df36911c414e4e9abb62ae9", + "sha256:62761474061feef6f720149d7ba876122007ddc64adff5ba6f374fda35a018a0", + "sha256:665afab0963a4b39dff7c1fa563cc8b11ecff7910206db4b2e64dd1ba25aed19", + "sha256:69e83ea6553a3ba79c08c6e15dbd9bfa912ec1e493bf75489ef93beb65209aeb", + "sha256:70401bbabd2fa1aa7c43bb358f54037baf0586f41e83b0ae67dd0534fc64edfd", + "sha256:79d44f9bfb004941ebb0abe8eff6504223a9c1ac51ef967d1263c6572bbebc99", + "sha256:80ef5c058b7bce08c83cac668158cb7edea692e458d21098c7d3bce35a5d43e7", + "sha256:89e972c0035e9e05823907ad5398c5a73b9f47a002b22359b177d40bdaee7056", + "sha256:93378d3203a5c0800c6b6d850ad2f19f7a3cdf1a3701d3416dbf128805c6a6a7", + "sha256:9a2b7d9180aed171f033c9f2fc6c204c1245cf60b0cb61cf2e7acc24eea78e0a", + "sha256:9d6b20b97d373f41617bd0708fd46aa656059af57f2ef72aa8c7d6a2b73b74ed", + "sha256:a76906f26bd8d51ea9504966a9c25419f2e668f012e0bdf3da4ea1526c534d94", + "sha256:a9f52c0351c21fe24c21d8c0eb1f62967b262d6729393397b6f443c3b773c3b9", + "sha256:ad37544be07c5d7fba814eb370e006df58fed8ad1ef33ed1649cb1889ba6ff58", + "sha256:b01586eed696ec905e61bd2568f48740f7ac4a45b3a468e6423a03d3788a51a8", + "sha256:c1fdf4abb29ed1cb091cf432979e162c208a5ac676ce35010373ff29247bcad5", + "sha256:c49562d3d908fd49ed0938e5423daed8d407774a479b595b143a3d7f87cdae6a", + "sha256:c4a580f8a70c69e4a75587bd925d298434057fe2a428faaf927ffe6e4b9a98df", + "sha256:c837b896b37cd103570d776bda106eabb8737aa6dd4f248451aecf53030cdbeb", + "sha256:d7598cf74c3e16539d4e2f0b8d8c318e00041553d83d4861f87c7a72e95ac24d", + "sha256:dd86bb649299f09d987a2eebb4d52d10603224500792e1bee18303bbcc1ce390", + "sha256:e79311f2d904ccb59787477b7bd5d26f3347789c06fcd7656fa500875290264b", + "sha256:e92bdc656b7757c438660f775f872a669b8ff374edc4d18277d86b63edba6b8b", + "sha256:fa6ffadfbe6994d724c5a1bb6123a7d27dd68fc9c059561cd33b664a79578e14", + "sha256:feb8cc32d319edd5859da2cc084493b3e2ce5e49a946377663cc90f6c15fb259", + "sha256:ff2933428516ab63f961644bc49bc4cbe42bbffb2cd3b71cc7277c07d16b1a8b" ], "index": "pypi", - "version": "==0.812" + "markers": "python_version >= '3.9'", + "version": "==1.17.1" }, "mypy-extensions": { "hashes": [ - "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d", - "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8" + "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505", + "sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558" ], - "version": "==0.4.3" + "markers": "python_version >= '3.8'", + "version": "==1.1.0" }, - "pycodestyle": { + "pathspec": { "hashes": [ - "sha256:514f76d918fcc0b55c6680472f0a37970994e07bbb80725808c17089be302068", - "sha256:c389c1d06bf7904078ca03399a4816f974a1d590090fecea0c63ec26ebaf1cef" + "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08", + "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712" ], - "index": "pypi", - "version": "==2.7.0" + "markers": "python_version >= '3.8'", + "version": "==0.12.1" }, - "typed-ast": { + "pycodestyle": { "hashes": [ - "sha256:01ae5f73431d21eead5015997ab41afa53aa1fbe252f9da060be5dad2c730ace", - "sha256:067a74454df670dcaa4e59349a2e5c81e567d8d65458d480a5b3dfecec08c5ff", - "sha256:0fb71b8c643187d7492c1f8352f2c15b4c4af3f6338f21681d3681b3dc31a266", - "sha256:1b3ead4a96c9101bef08f9f7d1217c096f31667617b58de957f690c92378b528", - "sha256:2068531575a125b87a41802130fa7e29f26c09a2833fea68d9a40cf33902eba6", - "sha256:209596a4ec71d990d71d5e0d312ac935d86930e6eecff6ccc7007fe54d703808", - "sha256:2c726c276d09fc5c414693a2de063f521052d9ea7c240ce553316f70656c84d4", - "sha256:398e44cd480f4d2b7ee8d98385ca104e35c81525dd98c519acff1b79bdaac363", - "sha256:52b1eb8c83f178ab787f3a4283f68258525f8d70f778a2f6dd54d3b5e5fb4341", - "sha256:5feca99c17af94057417d744607b82dd0a664fd5e4ca98061480fd8b14b18d04", - "sha256:7538e495704e2ccda9b234b82423a4038f324f3a10c43bc088a1636180f11a41", - "sha256:760ad187b1041a154f0e4d0f6aae3e40fdb51d6de16e5c99aedadd9246450e9e", - "sha256:777a26c84bea6cd934422ac2e3b78863a37017618b6e5c08f92ef69853e765d3", - "sha256:95431a26309a21874005845c21118c83991c63ea800dd44843e42a916aec5899", - "sha256:9ad2c92ec681e02baf81fdfa056fe0d818645efa9af1f1cd5fd6f1bd2bdfd805", - "sha256:9c6d1a54552b5330bc657b7ef0eae25d00ba7ffe85d9ea8ae6540d2197a3788c", - "sha256:aee0c1256be6c07bd3e1263ff920c325b59849dc95392a05f258bb9b259cf39c", - "sha256:af3d4a73793725138d6b334d9d247ce7e5f084d96284ed23f22ee626a7b88e39", - "sha256:b36b4f3920103a25e1d5d024d155c504080959582b928e91cb608a65c3a49e1a", - "sha256:b9574c6f03f685070d859e75c7f9eeca02d6933273b5e69572e5ff9d5e3931c3", - "sha256:bff6ad71c81b3bba8fa35f0f1921fb24ff4476235a6e94a26ada2e54370e6da7", - "sha256:c190f0899e9f9f8b6b7863debfb739abcb21a5c054f911ca3596d12b8a4c4c7f", - "sha256:c907f561b1e83e93fad565bac5ba9c22d96a54e7ea0267c708bffe863cbe4075", - "sha256:cae53c389825d3b46fb37538441f75d6aecc4174f615d048321b716df2757fb0", - "sha256:dd4a21253f42b8d2b48410cb31fe501d32f8b9fbeb1f55063ad102fe9c425e40", - "sha256:dde816ca9dac1d9c01dd504ea5967821606f02e510438120091b84e852367428", - "sha256:f2362f3cb0f3172c42938946dbc5b7843c2a28aec307c49100c8b38764eb6927", - "sha256:f328adcfebed9f11301eaedfa48e15bdece9b519fb27e6a8c01aa52a17ec31b3", - "sha256:f8afcf15cc511ada719a88e013cec87c11aff7b91f019295eb4530f96fe5ef2f", - "sha256:fb1bbeac803adea29cedd70781399c99138358c26d05fcbd23c13016b7f5ec65" + "sha256:c4b5b517d278089ff9d0abdec919cd97262a3367449ea1c8b49b91529167b783", + "sha256:dd6bf7cb4ee77f8e016f9c8e74a35ddd9f67e1d5fd4184d86c3b98e07099f42d" ], - "version": "==1.4.3" + "index": "pypi", + "markers": "python_version >= '3.9'", + "version": "==2.14.0" }, "typing-extensions": { "hashes": [ - "sha256:0ac0f89795dd19de6b97debb0c6af1c70987fd80a2d62d1958f7e56fcc31b497", - "sha256:50b6f157849174217d0656f99dc82fe932884fb250826c18350e159ec6cdf342", - "sha256:779383f6086d90c99ae41cf0ff39aac8a7937a9283ce0a414e5dd782f4c94a84" + "sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466", + "sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548" ], - "version": "==3.10.0.0" + "markers": "python_version >= '3.9'", + "version": "==4.15.0" } } } diff --git a/utils/update_assignment_problems.py b/utils/update_assignment_problems.py index 7645693..0691e3d 100644 --- a/utils/update_assignment_problems.py +++ b/utils/update_assignment_problems.py @@ -67,8 +67,8 @@ def handle_input() -> Tuple[str, str, str]: return args.api_token, args.url, args.input -def assignment_exists(assignments: List[Dict[str, Any]], alias: str) -> bool: - return any(a["alias"] == alias for a in assignments) +def assignment_exists(assignments: List[Any], alias: str) -> bool: + return any(a.alias == alias for a in assignments) def create_assignment( @@ -211,8 +211,8 @@ def process_add( ) try: - assignments = client.course.listAssignments( - course_alias=course).get("assignments", []) + assignments_response = client.course.listAssignments(course_alias=course) + assignments = assignments_response.assignments if not assignment_exists(assignments, assignment): LOG.warning( f"πŸ“‚ Assignment '{assignment}' not found in course " @@ -278,8 +278,8 @@ def process_remove( ) try: - assignments = client.course.listAssignments( - course_alias=course).get("assignments", []) + assignments_response = client.course.listAssignments(course_alias=course) + assignments = assignments_response.assignments if not assignment_exists(assignments, assignment): LOG.warning( f"⚠️ Assignment '{assignment}' not found in course " @@ -389,8 +389,7 @@ def main(): f, indent=2, ensure_ascii=False) - LOG.info(f"🧹 Cleared 'add_problem' and 'remove_problem' arrays in { - input_path}") + LOG.info(f"🧹 Cleared 'add_problem' and 'remove_problem' arrays in {input_path}") except (IOError, json.JSONDecodeError) as e: LOG.error(f"❌ Failed to reset {input_path}: {e}") From 1ccd6548d0cd4a2d1f3113cf93862862558f7c53 Mon Sep 17 00:00:00 2001 From: Anas Iqbal Date: Thu, 28 Aug 2025 23:28:04 +0530 Subject: [PATCH 2/5] fix lint --- utils/update_assignment_problems.py | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/utils/update_assignment_problems.py b/utils/update_assignment_problems.py index 0691e3d..d87db75 100644 --- a/utils/update_assignment_problems.py +++ b/utils/update_assignment_problems.py @@ -211,7 +211,9 @@ def process_add( ) try: - assignments_response = client.course.listAssignments(course_alias=course) + assignments_response = client.course.listAssignments( + course_alias=course, + ) assignments = assignments_response.assignments if not assignment_exists(assignments, assignment): LOG.warning( @@ -278,7 +280,9 @@ def process_remove( ) try: - assignments_response = client.course.listAssignments(course_alias=course) + assignments_response = client.course.listAssignments( + course_alias=course, + ) assignments = assignments_response.assignments if not assignment_exists(assignments, assignment): LOG.warning( @@ -388,10 +392,17 @@ def main(): {"add_problem": [], "remove_problem": []}, f, indent=2, - ensure_ascii=False) - LOG.info(f"🧹 Cleared 'add_problem' and 'remove_problem' arrays in {input_path}") + ensure_ascii=False, + ) + LOG.info( + f"🧹 Cleared 'add_problem' and 'remove_problem' arrays in " + f"{input_path}" + ) except (IOError, json.JSONDecodeError) as e: - LOG.error(f"❌ Failed to reset {input_path}: {e}") + LOG.info( + f"🧹 Cleared 'add_problem' and 'remove_problem' arrays in " + f"{input_path}" + ) if __name__ == "__main__": From ba5d9fed1b8a6f9bdf2f897b1ed72f1767460611 Mon Sep 17 00:00:00 2001 From: Anas Iqbal Date: Sat, 30 Aug 2025 19:13:40 +0530 Subject: [PATCH 3/5] adding updated readme and documentation --- DOCUMENTATION.md | 184 +++++++++++++++++++++++++++++++++++++++++++++++ README.md | 60 ++++++++++------ 2 files changed, 222 insertions(+), 22 deletions(-) create mode 100644 DOCUMENTATION.md diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md new file mode 100644 index 0000000..f011eea --- /dev/null +++ b/DOCUMENTATION.md @@ -0,0 +1,184 @@ +# Comprehensive Documentation + + +## Index + +- [Comprehensive Documentation](#comprehensive-documentation) + - [Index](#index) + - [Introduction](#introduction) + - [Project Structure](#project-structure) + - [`.github`](#github) + - [`Courses Folder`](#courses-folder) + - [`Utils Folder`](#utils-folder) + - [`problems.json`](#problemsjson) + - [`sync-course.json`](#sync-coursejson) + - [Getting Started](#getting-started) + - [Syncing Content from omegaup.com to this repository](#syncing-content-from-omegaupcom-to-this-repository) + - [Modifying existing Problems Content](#modifying-existing-problems-content) + - [Adding or removing problems to the Couse:](#adding-or-removing-problems-to-the-couse) + +## Introduction + +Welcome to the comprehensive documentation for this project. This document provides a detailed overview of the project, its structure, and how to contribute. + +## Project Structure + +The project is organized into the following main directories: + +### `.github` +This directory contains GitHub-specific files, such as issue and pull request templates, as well as workflow definitions. The workflows are: + - **continuous-integration.yaml**: Runs continuous integration checks on pull requests. + - **modify-assignments.yaml**: Modifies assignments based on issue comments. + - **sync_content.yml**: Syncs content from a remote source. + +### `Courses Folder` + +This folder contains the omegaUp's Public Courses. The folers inside the `Courses` folder are named by their aliases. +Each `course-alias` folder contains a `course_settings.json` file and a list of `assignment-alias` folders them each assignment contains a list of `problem-alias` folder in them, +now each of the `problem-alias` is the extracted zip of the actual problem which we download from omegaup.com. + +``` +πŸ“ Courses/ +β”œβ”€β”€ πŸ“ course-1-alias/ +β”‚ β”œβ”€β”€ πŸ“„ course_settings.json +β”‚ └── πŸ“ assignment-1-alias/ +β”‚ └── πŸ“ problem-1-alias/ +β”‚ β”œβ”€β”€ πŸ“„ settings.json +β”‚ β”œβ”€β”€ πŸ“„ settings.distrib.json +β”‚ └── πŸ“ statements/ +β”‚ └── πŸ“„ es.markdown +``` + +### `Utils Folder` + +This directory contains utility scripts for managing the courses. The most important scripts are: + - **container.py**: Manages containerized environments for running and testing code. + - **download_and_sync_courses.py**: Downloads and syncs course materials from a remote source. + - **generateresources.py**: Generates static resources for the courses. + - **lint**: A script for linting the course materials. + - **problems.py**: A script for managing problems within the courses. + - **runtests.py**: Runs tests for the course materials. + - **update_assignment_problems.py**: Updates the problems in a specific assignment. + - **upload.py**: Uploads course materials to a remote server. + - **validate_content.py**: Validates the content of the course materials. + +### `problems.json` + +This is a **autogenerated** file contains a list of all the problems in the courses. Each problem is represented by an object with a `path` key, which specifies the path to the problem's directory. This file is used by the utility scripts to manage the problems in the courses. + +### `sync-course.json` + +This file is used to request a synchronization of a course with the omegaup.com platform. To request a sync, you need to add an object to the `requests` array with your OmegaUp username, your GitHub username, and the pull request number of your sync request. + + +## Getting Started + +To get started with this project, you will need to have the following prerequisites installed: + +- Python 3 +- Pip +- Git + +Once you have the prerequisites installed, you can clone the repository and install the dependencies: + +```bash +git clone https://github.com/omegaup/public-courses.git +cd public-courses +pip install -r utils/requirements.txt +``` + +## Syncing Content from omegaup.com to this repository +The github actions are configured to push the latest content whenever some changes are pushed in the `sync-course` branch only + +**For Admin:** +If a admin want to sync the content from omegaup.com to course github repo, they can run the following commands: +1. Checkout to the branch `sync-course`: +``` +git checkout sync-course +``` +2. Reset the branch with the main branch: +``` +git reset --hard origin/main +``` +3. Push the changes +``` +git push --force +``` +This will push the changes to sync-course branch, now the github action `Sync Course Content` will run which will add a commit made by the Github Actions bot with the latest content from omegaup.com. + +**For Contributors:** +If a contributor want to request syncing of content from the omegaup.com to the course repo in the github, they can raise a pr to targetting the `sync-course` branch with the changes in the `sync-course.json` file to keep a log of the sync request. Once the pr gets merged the `sync-courses` branch will have the a commit made by Github Actions bot containg the latest content from omegaup.com. + +## Modifying existing Problems Content + +**For Admin:** +If you want to modify the content of an existing problem in the course (eg: typo fixes, test case addition etc), you can change do the respected changes in the problem folder in the course's assignment folder and push the changes to the `main` branch. + +**For Contributors:** +If you want to request a change in the content of an existing problem in the course (eg: typo fixes, test case addition etc), you can raise a pull request with the changes to the `main` branch. + +## Adding or removing problems to the Couse: +The github actions are configured to add/remove the problems from the course on omegaup.com only when changes are pushed to the `modify-assignments` branch. + +**IMPORTANT** - If you want to add a problem to the course and you want to have the problem contents to be in the repective course's assignment folder in the github repo as well then admin permissions need to be provided for that problem for the user - `CourseBot` + +**For Admin:** +If a admin wants to add/remove problem from the course they should do the following step: +1. Checkout to the branch `modify-assignments`: +``` +git checkout modify-assignments +``` +1. Reset the branch with the main branch: +``` +git reset --hard origin/main +``` +1. Update the `adding_removing_problems.json` by adding the details of the problems, eg: +``` +{ + "add_problem":[ + { + "course_alias": "omi-public-course", + "assignment_alias": "intro", + "problem_alias": "demo-de-objetivo", + "points": 100 + } + ], + "remove_problem":[ + "course_alias": "omi-public-course", + "assignment_alias": "practice", + "problem_alias": "Contest-Start", + } + ] +} +``` +4. Commit and push the changes: +``` +git push --force +``` +This will push the changes to `modify-assignments` branch, now the github action `Modify Course Assignments` will go through the `adding_removing_problems.json` in order to know what problems to add/remove: + - If a problem is added and the admin permissions are provided for the problem to the `CourseBot` user then the problem zip file will be downloaded for the problem and will be extracted and added the respective course's assignment folder. + - If a problem is removed then if the problem folder is present in the course's assignment folder in the github repo then it will be removed as well. + - In both cases a commit will be added by the Github Bot, which would do the aforesaid changes. + +**For Contributors:** +If a contributor wants to request a problem to be added or removed then they can populate the `modify-assignments` accordingly, eg: +``` +{ + "add_problem":[ + { + "course_alias": "omi-public-course", + "assignment_alias": "intro", + "problem_alias": "demo-de-objetivo", + "points": 100 + } + ], + "remove_problem":[ + "course_alias": "omi-public-course", + "assignment_alias": "practice", + "problem_alias": "Contest-Start", + } + ] +} +``` +and raise a pull request targeting `modify-assignments` branch. When this pull request gets merged then the Github Actions Bot will add a commit to the branch for the desired changes. + diff --git a/README.md b/README.md index 386f3f2..0277671 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,38 @@ -# Public Courses on Omegaup -This repository contains the course content for the public courses on Omegaup. - -## How to Contribute -You can contribute to the courses by adding new content, fixing typos, or improving existing materials. To do so, please follow these steps: -1. Fork the repository. -2. Create a new branch for your changes. -3. Make your changes and commit them with a clear message. -4. Push your changes to your forked repository. -5. Create a pull request to the main repository. - -## How to Sync Courses: -If you think that a course content in this repository has ran out of sync with the omegaup.com you can raise a pull request to sync the content. -To do this, follow these steps: -1. Fork the repository. -2. Create a new branch for your changes. -3. Edit the `sync-course.json` file to include the course name and the specific content that is out of sync. -4. Commit your changes with a clear message. -5. Push your changes to your forked repository. -6. Create a pull request to the main repository with target branch sync-course. -7. When your pull request is merged a github action will run to sync the course content with omegaup.com and add commit to your pull request. -8. Now the admins will merge this pull request to the main branch. \ No newline at end of file +# omegaUp Public Courses on GitHub + +This repository hosts **omegaUp’s Public Courses**, managed through GitHub to enable open collaboration. +Contributors can suggest improvements via **pull requests**, and GitHub Actions will validate and deploy changes to [omegaUp.com](https://omegaup.com). + +--- + +## πŸ“– Documentation + +A complete guide is available in [Comprehensive Documentation](./DOCUMENTATION.md). +It covers setup, workflows, contribution guidelines, and detailed instructions. + +--- + +## πŸ“‚ Repository Overview + +- `.github/` β†’ Workflows for CI, syncing, and modifying assignments +- `Courses/` β†’ Public course content (courses, assignments, problems) +- `utils/` β†’ Helper scripts for syncing, validation, and uploads +- `problems.json` β†’ Auto-generated list of all problems +- `sync-course.json` β†’ Log of course sync requests + +--- + +## πŸ”‘ Key Sections + +1. [Getting Started](./DOCUMENTATION.md#getting-started) +2. [Syncing Content](./DOCUMENTATION.md#syncing-content-from-omegaupcom-to-this-repository) +3. [Modifying Problems](./DOCUMENTATION.md#modifying-existing-problems-content) +4. [Adding/Removing Problems](./DOCUMENTATION.md#adding-or-removing-problems-to-the-couse) +5. [Contributing](./DOCUMENTATION.md#contributing) + + +--- + +## πŸ“œ License + +This project is licensed under the [MIT License](LICENSE). From 365e923f36958ad78efb7690ae5a0453c48a6c25 Mon Sep 17 00:00:00 2001 From: Anas Iqbal Date: Sat, 30 Aug 2025 19:26:32 +0530 Subject: [PATCH 4/5] updating readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0277671..3492b8b 100644 --- a/README.md +++ b/README.md @@ -35,4 +35,4 @@ It covers setup, workflows, contribution guidelines, and detailed instructions. ## πŸ“œ License -This project is licensed under the [MIT License](LICENSE). +This project is licensed under the [License](LICENSE). From 752230317850b59513114292f63320f6d4cd77af Mon Sep 17 00:00:00 2001 From: Anas Iqbal Date: Mon, 1 Sep 2025 21:50:31 +0530 Subject: [PATCH 5/5] updated documentation --- DOCUMENTATION.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index f011eea..78c232e 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -14,6 +14,7 @@ - [`sync-course.json`](#sync-coursejson) - [Getting Started](#getting-started) - [Syncing Content from omegaup.com to this repository](#syncing-content-from-omegaupcom-to-this-repository) + - [Important](#important) - [Modifying existing Problems Content](#modifying-existing-problems-content) - [Adding or removing problems to the Couse:](#adding-or-removing-problems-to-the-couse) @@ -78,13 +79,14 @@ To get started with this project, you will need to have the following prerequisi - Python 3 - Pip - Git +- Pipenv Once you have the prerequisites installed, you can clone the repository and install the dependencies: ```bash git clone https://github.com/omegaup/public-courses.git cd public-courses -pip install -r utils/requirements.txt +pipenv install ``` ## Syncing Content from omegaup.com to this repository @@ -106,6 +108,10 @@ git push --force ``` This will push the changes to sync-course branch, now the github action `Sync Course Content` will run which will add a commit made by the Github Actions bot with the latest content from omegaup.com. +### Important + - ```--hard``` flag is required to avoid any merge conflicts if the main branch has some changes which are not in the `sync-course` branch and also to update the `sync-course` branch with the latest changes from the `main` branch. + - ```-force``` flag is required to push the changes to the `sync-course` branch as we are resetting the branch to main branch and hence the history of the `sync-course` branch will be different from the remote `sync-course` branch. + **For Contributors:** If a contributor want to request syncing of content from the omegaup.com to the course repo in the github, they can raise a pr to targetting the `sync-course` branch with the changes in the `sync-course.json` file to keep a log of the sync request. Once the pr gets merged the `sync-courses` branch will have the a commit made by Github Actions bot containg the latest content from omegaup.com.