From 4b0b5c4c45b3a709d4970fa9adf661b4acccce37 Mon Sep 17 00:00:00 2001 From: ems9856-lgtm Date: Thu, 30 Oct 2025 22:24:06 -0400 Subject: [PATCH 01/61] package-try1 --- Pipfile | 17 ++ Pipfile.lock | 375 +++++++++++++++++++++++++++++++++ pyproject.toml | 33 +++ snacktime/__init__.py | 10 + snacktime/__main__.py | 63 ++++++ snacktime/core.py | 75 +++++++ tests/test_random_snack.py | 11 + tests/test_random_treat.py | 12 ++ tests/test_random_vegetable.py | 11 + tests/test_recipe_salad.py | 17 ++ 10 files changed, 624 insertions(+) create mode 100644 Pipfile create mode 100644 Pipfile.lock create mode 100644 pyproject.toml create mode 100644 snacktime/__init__.py create mode 100644 snacktime/__main__.py create mode 100644 snacktime/core.py create mode 100644 tests/test_random_snack.py create mode 100644 tests/test_random_treat.py create mode 100644 tests/test_random_vegetable.py create mode 100644 tests/test_recipe_salad.py diff --git a/Pipfile b/Pipfile new file mode 100644 index 0000000..6b93f48 --- /dev/null +++ b/Pipfile @@ -0,0 +1,17 @@ +[[source]] +url = "https://pypi.org/simple" +verify_ssl = true +name = "pypi" + +[packages] + +[dev-packages] +pytest = "*" +build = "*" +twine = "*" + +[requires] +python_version = "3.14" + +[scripts] +snacktime = "python -m snacktime" diff --git a/Pipfile.lock b/Pipfile.lock new file mode 100644 index 0000000..88d604a --- /dev/null +++ b/Pipfile.lock @@ -0,0 +1,375 @@ +{ + "_meta": { + "hash": { + "sha256": "5fc24172ffa2e2febe7d5c3e453edbbae7a8933fa625d96c07ab624f10146c4c" + }, + "pipfile-spec": 6, + "requires": { + "python_version": "3.14" + }, + "sources": [ + { + "name": "pypi", + "url": "https://pypi.org/simple", + "verify_ssl": true + } + ] + }, + "default": {}, + "develop": { + "build": { + "hashes": [ + "sha256:698edd0ea270bde950f53aed21f3a0135672206f3911e0176261a31e0e07b397", + "sha256:7145f0b5061ba90a1500d60bd1b13ca0a8a4cebdd0cc16ed8adf1c0e739f43b4" + ], + "index": "pypi", + "markers": "python_version >= '3.9'", + "version": "==1.3.0" + }, + "certifi": { + "hashes": [ + "sha256:0f212c2744a9bb6de0c56639a6f68afe01ecd92d91f14ae897c4fe7bbeeef0de", + "sha256:47c09d31ccf2acf0be3f701ea53595ee7e0b8fa08801c6624be771df09ae7b43" + ], + "markers": "python_version >= '3.7'", + "version": "==2025.10.5" + }, + "charset-normalizer": { + "hashes": [ + "sha256:027f6de494925c0ab2a55eab46ae5129951638a49a34d87f4c3eda90f696b4ad", + "sha256:077fbb858e903c73f6c9db43374fd213b0b6a778106bc7032446a8e8b5b38b93", + "sha256:0a98e6759f854bd25a58a73fa88833fba3b7c491169f86ce1180c948ab3fd394", + "sha256:0d3d8f15c07f86e9ff82319b3d9ef6f4bf907608f53fe9d92b28ea9ae3d1fd89", + "sha256:0f04b14ffe5fdc8c4933862d8306109a2c51e0704acfa35d51598eb45a1e89fc", + "sha256:11d694519d7f29d6cd09f6ac70028dba10f92f6cdd059096db198c283794ac86", + "sha256:194f08cbb32dc406d6e1aea671a68be0823673db2832b38405deba2fb0d88f63", + "sha256:1bee1e43c28aa63cb16e5c14e582580546b08e535299b8b6158a7c9c768a1f3d", + "sha256:21d142cc6c0ec30d2efee5068ca36c128a30b0f2c53c1c07bd78cb6bc1d3be5f", + "sha256:2437418e20515acec67d86e12bf70056a33abdacb5cb1655042f6538d6b085a8", + "sha256:244bfb999c71b35de57821b8ea746b24e863398194a4014e4c76adc2bbdfeff0", + "sha256:2677acec1a2f8ef614c6888b5b4ae4060cc184174a938ed4e8ef690e15d3e505", + "sha256:277e970e750505ed74c832b4bf75dac7476262ee2a013f5574dd49075879e161", + "sha256:2aaba3b0819274cc41757a1da876f810a3e4d7b6eb25699253a4effef9e8e4af", + "sha256:2b7d8f6c26245217bd2ad053761201e9f9680f8ce52f0fcd8d0755aeae5b2152", + "sha256:2c9d3c380143a1fedbff95a312aa798578371eb29da42106a29019368a475318", + "sha256:3162d5d8ce1bb98dd51af660f2121c55d0fa541b46dff7bb9b9f86ea1d87de72", + "sha256:31fd66405eaf47bb62e8cd575dc621c56c668f27d46a61d975a249930dd5e2a4", + "sha256:362d61fd13843997c1c446760ef36f240cf81d3ebf74ac62652aebaf7838561e", + "sha256:376bec83a63b8021bb5c8ea75e21c4ccb86e7e45ca4eb81146091b56599b80c3", + "sha256:44c2a8734b333e0578090c4cd6b16f275e07aa6614ca8715e6c038e865e70576", + "sha256:47cc91b2f4dd2833fddaedd2893006b0106129d4b94fdb6af1f4ce5a9965577c", + "sha256:4902828217069c3c5c71094537a8e623f5d097858ac6ca8252f7b4d10b7560f1", + "sha256:4bd5d4137d500351a30687c2d3971758aac9a19208fc110ccb9d7188fbe709e8", + "sha256:4fe7859a4e3e8457458e2ff592f15ccb02f3da787fcd31e0183879c3ad4692a1", + "sha256:542d2cee80be6f80247095cc36c418f7bddd14f4a6de45af91dfad36d817bba2", + "sha256:554af85e960429cf30784dd47447d5125aaa3b99a6f0683589dbd27e2f45da44", + "sha256:5833d2c39d8896e4e19b689ffc198f08ea58116bee26dea51e362ecc7cd3ed26", + "sha256:5947809c8a2417be3267efc979c47d76a079758166f7d43ef5ae8e9f92751f88", + "sha256:5ae497466c7901d54b639cf42d5b8c1b6a4fead55215500d2f486d34db48d016", + "sha256:5bd2293095d766545ec1a8f612559f6b40abc0eb18bb2f5d1171872d34036ede", + "sha256:5bfbb1b9acf3334612667b61bd3002196fe2a1eb4dd74d247e0f2a4d50ec9bbf", + "sha256:5cb4d72eea50c8868f5288b7f7f33ed276118325c1dfd3957089f6b519e1382a", + "sha256:5dbe56a36425d26d6cfb40ce79c314a2e4dd6211d51d6d2191c00bed34f354cc", + "sha256:5f819d5fe9234f9f82d75bdfa9aef3a3d72c4d24a6e57aeaebba32a704553aa0", + "sha256:64b55f9dce520635f018f907ff1b0df1fdc31f2795a922fb49dd14fbcdf48c84", + "sha256:6515f3182dbe4ea06ced2d9e8666d97b46ef4c75e326b79bb624110f122551db", + "sha256:65e2befcd84bc6f37095f5961e68a6f077bf44946771354a28ad434c2cce0ae1", + "sha256:6aee717dcfead04c6eb1ce3bd29ac1e22663cdea57f943c87d1eab9a025438d7", + "sha256:6b39f987ae8ccdf0d2642338faf2abb1862340facc796048b604ef14919e55ed", + "sha256:6e1fcf0720908f200cd21aa4e6750a48ff6ce4afe7ff5a79a90d5ed8a08296f8", + "sha256:74018750915ee7ad843a774364e13a3db91682f26142baddf775342c3f5b1133", + "sha256:74664978bb272435107de04e36db5a9735e78232b85b77d45cfb38f758efd33e", + "sha256:74bb723680f9f7a6234dcf67aea57e708ec1fbdf5699fb91dfd6f511b0a320ef", + "sha256:752944c7ffbfdd10c074dc58ec2d5a8a4cd9493b314d367c14d24c17684ddd14", + "sha256:778d2e08eda00f4256d7f672ca9fef386071c9202f5e4607920b86d7803387f2", + "sha256:780236ac706e66881f3b7f2f32dfe90507a09e67d1d454c762cf642e6e1586e0", + "sha256:798d75d81754988d2565bff1b97ba5a44411867c0cf32b77a7e8f8d84796b10d", + "sha256:799a7a5e4fb2d5898c60b640fd4981d6a25f1c11790935a44ce38c54e985f828", + "sha256:7a32c560861a02ff789ad905a2fe94e3f840803362c84fecf1851cb4cf3dc37f", + "sha256:7c308f7e26e4363d79df40ca5b2be1c6ba9f02bdbccfed5abddb7859a6ce72cf", + "sha256:7fa17817dc5625de8a027cb8b26d9fefa3ea28c8253929b8d6649e705d2835b6", + "sha256:81d5eb2a312700f4ecaa977a8235b634ce853200e828fbadf3a9c50bab278328", + "sha256:82004af6c302b5d3ab2cfc4cc5f29db16123b1a8417f2e25f9066f91d4411090", + "sha256:837c2ce8c5a65a2035be9b3569c684358dfbf109fd3b6969630a87535495ceaa", + "sha256:840c25fb618a231545cbab0564a799f101b63b9901f2569faecd6b222ac72381", + "sha256:8a6562c3700cce886c5be75ade4a5db4214fda19fede41d9792d100288d8f94c", + "sha256:8af65f14dc14a79b924524b1e7fffe304517b2bff5a58bf64f30b98bbc5079eb", + "sha256:8ef3c867360f88ac904fd3f5e1f902f13307af9052646963ee08ff4f131adafc", + "sha256:94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a", + "sha256:99ae2cffebb06e6c22bdc25801d7b30f503cc87dbd283479e7b606f70aff57ec", + "sha256:9a26f18905b8dd5d685d6d07b0cdf98a79f3c7a918906af7cc143ea2e164c8bc", + "sha256:9b35f4c90079ff2e2edc5b26c0c77925e5d2d255c42c74fdb70fb49b172726ac", + "sha256:9cd98cdc06614a2f768d2b7286d66805f94c48cde050acdbbb7db2600ab3197e", + "sha256:9d1bb833febdff5c8927f922386db610b49db6e0d4f4ee29601d71e7c2694313", + "sha256:9f7fcd74d410a36883701fafa2482a6af2ff5ba96b9a620e9e0721e28ead5569", + "sha256:a59cb51917aa591b1c4e6a43c132f0cdc3c76dbad6155df4e28ee626cc77a0a3", + "sha256:a61900df84c667873b292c3de315a786dd8dac506704dea57bc957bd31e22c7d", + "sha256:a79cfe37875f822425b89a82333404539ae63dbdddf97f84dcbc3d339aae9525", + "sha256:a8a8b89589086a25749f471e6a900d3f662d1d3b6e2e59dcecf787b1cc3a1894", + "sha256:a8bf8d0f749c5757af2142fe7903a9df1d2e8aa3841559b2bad34b08d0e2bcf3", + "sha256:a9768c477b9d7bd54bc0c86dbaebdec6f03306675526c9927c0e8a04e8f94af9", + "sha256:ac1c4a689edcc530fc9d9aa11f5774b9e2f33f9a0c6a57864e90908f5208d30a", + "sha256:af2d8c67d8e573d6de5bc30cdb27e9b95e49115cd9baad5ddbd1a6207aaa82a9", + "sha256:b435cba5f4f750aa6c0a0d92c541fb79f69a387c91e61f1795227e4ed9cece14", + "sha256:b5b290ccc2a263e8d185130284f8501e3e36c5e02750fc6b6bdeb2e9e96f1e25", + "sha256:b5d84d37db046c5ca74ee7bb47dd6cbc13f80665fdde3e8040bdd3fb015ecb50", + "sha256:b7cf1017d601aa35e6bb650b6ad28652c9cd78ee6caff19f3c28d03e1c80acbf", + "sha256:bc7637e2f80d8530ee4a78e878bce464f70087ce73cf7c1caf142416923b98f1", + "sha256:c0463276121fdee9c49b98908b3a89c39be45d86d1dbaa22957e38f6321d4ce3", + "sha256:c4ef880e27901b6cc782f1b95f82da9313c0eb95c3af699103088fa0ac3ce9ac", + "sha256:c8ae8a0f02f57a6e61203a31428fa1d677cbe50c93622b4149d5c0f319c1d19e", + "sha256:ca5862d5b3928c4940729dacc329aa9102900382fea192fc5e52eb69d6093815", + "sha256:cb01158d8b88ee68f15949894ccc6712278243d95f344770fa7593fa2d94410c", + "sha256:cb6254dc36b47a990e59e1068afacdcd02958bdcce30bb50cc1700a8b9d624a6", + "sha256:cc00f04ed596e9dc0da42ed17ac5e596c6ccba999ba6bd92b0e0aef2f170f2d6", + "sha256:cd09d08005f958f370f539f186d10aec3377d55b9eeb0d796025d4886119d76e", + "sha256:cd4b7ca9984e5e7985c12bc60a6f173f3c958eae74f3ef6624bb6b26e2abbae4", + "sha256:ce8a0633f41a967713a59c4139d29110c07e826d131a316b50ce11b1d79b4f84", + "sha256:cead0978fc57397645f12578bfd2d5ea9138ea0fac82b2f63f7f7c6877986a69", + "sha256:d055ec1e26e441f6187acf818b73564e6e6282709e9bcb5b63f5b23068356a15", + "sha256:d1f13550535ad8cff21b8d757a3257963e951d96e20ec82ab44bc64aeb62a191", + "sha256:d9c7f57c3d666a53421049053eaacdd14bbd0a528e2186fcb2e672effd053bb0", + "sha256:d9e45d7faa48ee908174d8fe84854479ef838fc6a705c9315372eacbc2f02897", + "sha256:da3326d9e65ef63a817ecbcc0df6e94463713b754fe293eaa03da99befb9a5bd", + "sha256:de00632ca48df9daf77a2c65a484531649261ec9f25489917f09e455cb09ddb2", + "sha256:e1f185f86a6f3403aa2420e815904c67b2f9ebc443f045edd0de921108345794", + "sha256:e824f1492727fa856dd6eda4f7cee25f8518a12f3c4a56a74e8095695089cf6d", + "sha256:e912091979546adf63357d7e2ccff9b44f026c075aeaf25a52d0e95ad2281074", + "sha256:eaabd426fe94daf8fd157c32e571c85cb12e66692f15516a83a03264b08d06c3", + "sha256:ebf3e58c7ec8a8bed6d66a75d7fb37b55e5015b03ceae72a8e7c74495551e224", + "sha256:ecaae4149d99b1c9e7b88bb03e3221956f68fd6d50be2ef061b2381b61d20838", + "sha256:eecbc200c7fd5ddb9a7f16c7decb07b566c29fa2161a16cf67b8d068bd21690a", + "sha256:f155a433c2ec037d4e8df17d18922c3a0d9b3232a396690f17175d2946f0218d", + "sha256:f1e34719c6ed0b92f418c7c780480b26b5d9c50349e9a9af7d76bf757530350d", + "sha256:f34be2938726fc13801220747472850852fe6b1ea75869a048d6f896838c896f", + "sha256:f820802628d2694cb7e56db99213f930856014862f3fd943d290ea8438d07ca8", + "sha256:f8bf04158c6b607d747e93949aa60618b61312fe647a6369f88ce2ff16043490", + "sha256:f8e160feb2aed042cd657a72acc0b481212ed28b1b9a95c0cee1621b524e1966", + "sha256:f9d332f8c2a2fcbffe1378594431458ddbef721c1769d78e2cbc06280d8155f9", + "sha256:fa09f53c465e532f4d3db095e0c55b615f010ad81803d383195b6b5ca6cbf5f3", + "sha256:faa3a41b2b66b6e50f84ae4a68c64fcd0c44355741c6374813a800cd6695db9e", + "sha256:fd44c878ea55ba351104cb93cc85e74916eb8fa440ca7903e57575e97394f608" + ], + "markers": "python_version >= '3.7'", + "version": "==3.4.4" + }, + "docutils": { + "hashes": [ + "sha256:9fdb771707c8784c8f2728b67cb2c691305933d68137ef95a75db5f4dfbc213d", + "sha256:b0e98d679283fc3bb0ead8a5da7f501baa632654e7056e9c5846842213d674d8" + ], + "markers": "python_version >= '3.9'", + "version": "==0.22.2" + }, + "id": { + "hashes": [ + "sha256:292cb8a49eacbbdbce97244f47a97b4c62540169c976552e497fd57df0734c1d", + "sha256:f1434e1cef91f2cbb8a4ec64663d5a23b9ed43ef44c4c957d02583d61714c658" + ], + "markers": "python_version >= '3.8'", + "version": "==1.5.0" + }, + "idna": { + "hashes": [ + "sha256:771a87f49d9defaf64091e6e6fe9c18d4833f140bd19464795bc32d966ca37ea", + "sha256:795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + ], + "markers": "python_version >= '3.8'", + "version": "==3.11" + }, + "iniconfig": { + "hashes": [ + "sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730", + "sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12" + ], + "markers": "python_version >= '3.10'", + "version": "==2.3.0" + }, + "jaraco.classes": { + "hashes": [ + "sha256:47a024b51d0239c0dd8c8540c6c7f484be3b8fcf0b2d85c13825780d3b3f3acd", + "sha256:f662826b6bed8cace05e7ff873ce0f9283b5c924470fe664fff1c2f00f581790" + ], + "markers": "python_version >= '3.8'", + "version": "==3.4.0" + }, + "jaraco.context": { + "hashes": [ + "sha256:9bae4ea555cf0b14938dc0aee7c9f32ed303aa20a3b73e7dc80111628792d1b3", + "sha256:f797fc481b490edb305122c9181830a3a5b76d84ef6d1aef2fb9b47ab956f9e4" + ], + "markers": "python_version >= '3.8'", + "version": "==6.0.1" + }, + "jaraco.functools": { + "hashes": [ + "sha256:227ff8ed6f7b8f62c56deff101545fa7543cf2c8e7b82a7c2116e672f29c26e8", + "sha256:cfd13ad0dd2c47a3600b439ef72d8615d482cedcff1632930d6f28924d92f294" + ], + "markers": "python_version >= '3.9'", + "version": "==4.3.0" + }, + "keyring": { + "hashes": [ + "sha256:0b39998aa941431eb3d9b0d4b2460bc773b9df6fed7621c2dfb291a7e0187a66", + "sha256:552a3f7af126ece7ed5c89753650eec89c7eaae8617d0aa4d9ad2b75111266bd" + ], + "markers": "python_version >= '3.9'", + "version": "==25.6.0" + }, + "markdown-it-py": { + "hashes": [ + "sha256:87327c59b172c5011896038353a81343b6754500a08cd7a4973bb48c6d578147", + "sha256:cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + ], + "markers": "python_version >= '3.10'", + "version": "==4.0.0" + }, + "mdurl": { + "hashes": [ + "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8", + "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + ], + "markers": "python_version >= '3.7'", + "version": "==0.1.2" + }, + "more-itertools": { + "hashes": [ + "sha256:52d4362373dcf7c52546bc4af9a86ee7c4579df9a8dc268be0a2f949d376cc9b", + "sha256:f638ddf8a1a0d134181275fb5d58b086ead7c6a72429ad725c67503f13ba30bd" + ], + "markers": "python_version >= '3.9'", + "version": "==10.8.0" + }, + "nh3": { + "hashes": [ + "sha256:019ecbd007536b67fdf76fab411b648fb64e2257ca3262ec80c3425c24028c80", + "sha256:03d617e5c8aa7331bd2659c654e021caf9bba704b109e7b2b28b039a00949fe5", + "sha256:0dca4365db62b2d71ff1620ee4f800c4729849906c5dd504ee1a7b2389558e31", + "sha256:0fe7ee035dd7b2290715baf29cb27167dddd2ff70ea7d052c958dbd80d323c99", + "sha256:13398e676a14d6233f372c75f52d5ae74f98210172991f7a3142a736bd92b131", + "sha256:169db03df90da63286e0560ea0efa9b6f3b59844a9735514a1d47e6bb2c8c61b", + "sha256:1710f3901cd6440ca92494ba2eb6dc260f829fa8d9196b659fa10de825610ce0", + "sha256:1f9ba555a797dbdcd844b89523f29cdc90973d8bd2e836ea6b962cf567cadd93", + "sha256:2ab70e8c6c7d2ce953d2a58102eefa90c2d0a5ed7aa40c7e29a487bc5e613131", + "sha256:2c9850041b77a9147d6bbd6dbbf13eeec7009eb60b44e83f07fcb2910075bf9b", + "sha256:403c11563e50b915d0efdb622866d1d9e4506bce590ef7da57789bf71dd148b5", + "sha256:45c953e57028c31d473d6b648552d9cab1efe20a42ad139d78e11d8f42a36130", + "sha256:562da3dca7a17f9077593214a9781a94b8d76de4f158f8c895e62f09573945fe", + "sha256:6d66f41672eb4060cf87c037f760bdbc6847852ca9ef8e9c5a5da18f090abf87", + "sha256:7064ccf5ace75825bd7bf57859daaaf16ed28660c1c6b306b649a9eda4b54b1e", + "sha256:72d67c25a84579f4a432c065e8b4274e53b7cf1df8f792cf846abfe2c3090866", + "sha256:7bb18403f02b655a1bbe4e3a4696c2ae1d6ae8f5991f7cacb684b1ae27e6c9f7", + "sha256:91e9b001101fb4500a2aafe3e7c92928d85242d38bf5ac0aba0b7480da0a4cd6", + "sha256:a40202fd58e49129764f025bbaae77028e420f1d5b3c8e6f6fd3a6490d513868", + "sha256:c8745454cdd28bbbc90861b80a0111a195b0e3961b9fa2e672be89eb199fa5d8", + "sha256:cf5964d54edd405e68583114a7cba929468bcd7db5e676ae38ee954de1cfc104", + "sha256:d18957a90806d943d141cc5e4a0fefa1d77cf0d7a156878bf9a66eed52c9cc7d", + "sha256:dce4248edc427c9b79261f3e6e2b3ecbdd9b88c267012168b4a7b3fc6fd41d13", + "sha256:f2f55c4d2d5a207e74eefe4d828067bbb01300e06e2a7436142f915c5928de07", + "sha256:f394759a06df8b685a4ebfb1874fb67a9cbfd58c64fc5ed587a663c0e63ec376", + "sha256:f97f8b25cb2681d25e2338148159447e4d689aafdccfcf19e61ff7db3905768a" + ], + "markers": "python_version >= '3.8'", + "version": "==0.3.2" + }, + "packaging": { + "hashes": [ + "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484", + "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + ], + "markers": "python_version >= '3.8'", + "version": "==25.0" + }, + "pluggy": { + "hashes": [ + "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", + "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746" + ], + "markers": "python_version >= '3.9'", + "version": "==1.6.0" + }, + "pygments": { + "hashes": [ + "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887", + "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b" + ], + "markers": "python_version >= '3.8'", + "version": "==2.19.2" + }, + "pyproject-hooks": { + "hashes": [ + "sha256:1e859bd5c40fae9448642dd871adf459e5e2084186e8d2c2a79a824c970da1f8", + "sha256:9e5c6bfa8dcc30091c74b0cf803c81fdd29d94f01992a7707bc97babb1141913" + ], + "markers": "python_version >= '3.7'", + "version": "==1.2.0" + }, + "pytest": { + "hashes": [ + "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01", + "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79" + ], + "index": "pypi", + "markers": "python_version >= '3.9'", + "version": "==8.4.2" + }, + "readme-renderer": { + "hashes": [ + "sha256:2fbca89b81a08526aadf1357a8c2ae889ec05fb03f5da67f9769c9a592166151", + "sha256:8712034eabbfa6805cacf1402b4eeb2a73028f72d1166d6f5cb7f9c047c5d1e1" + ], + "markers": "python_version >= '3.9'", + "version": "==44.0" + }, + "requests": { + "hashes": [ + "sha256:2462f94637a34fd532264295e186976db0f5d453d1cdd31473c85a6a161affb6", + "sha256:dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + ], + "markers": "python_version >= '3.9'", + "version": "==2.32.5" + }, + "requests-toolbelt": { + "hashes": [ + "sha256:7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6", + "sha256:cccfdd665f0a24fcf4726e690f65639d272bb0637b9b92dfd91a5568ccf6bd06" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==1.0.0" + }, + "rfc3986": { + "hashes": [ + "sha256:50b1502b60e289cb37883f3dfd34532b8873c7de9f49bb546641ce9cbd256ebd", + "sha256:97aacf9dbd4bfd829baad6e6309fa6573aaf1be3f6fa735c8ab05e46cecb261c" + ], + "markers": "python_version >= '3.7'", + "version": "==2.0.0" + }, + "rich": { + "hashes": [ + "sha256:73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4", + "sha256:76bc51fe2e57d2b1be1f96c524b890b816e334ab4c1e45888799bfaab0021edd" + ], + "markers": "python_full_version >= '3.8.0'", + "version": "==14.2.0" + }, + "twine": { + "hashes": [ + "sha256:418ebf08ccda9a8caaebe414433b0ba5e25eb5e4a927667122fbe8f829f985d8", + "sha256:e5ed0d2fd70c9959770dce51c8f39c8945c574e18173a7b81802dab51b4b75cf" + ], + "index": "pypi", + "markers": "python_version >= '3.9'", + "version": "==6.2.0" + }, + "urllib3": { + "hashes": [ + "sha256:3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760", + "sha256:e6b01673c0fa6a13e374b50871808eb3bf7046c4b125b216f6bf1cc604cff0dc" + ], + "markers": "python_version >= '3.9'", + "version": "==2.5.0" + } + } +} diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..d70a0bf --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,33 @@ +[build-system] +requires = ["setuptools>=68", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "snacktime" +version = "0.2.0" +description = "CLI that gives a random snack, a simple salad recipe, a random vegetable, or a sweet treat." +readme = "README.md" +requires-python = ">=3.9" +authors = [{ name = "Your Name", email = "you@example.com" }] +license = { text = "MIT" } +keywords = ["snack", "recipe", "vegetable", "treat", "fun", "cli"] +classifiers = [ + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "License :: OSI Approved :: MIT License", + "Environment :: Console", + "Topic :: Games/Entertainment", + "Topic :: Utilities" +] + +[project.urls] +Homepage = "https://github.com/swe-students-fall2025/3-python-package-team_solace" +Repository = "https://github.com/swe-students-fall2025/3-python-package-team_solace" +Issues = "https://github.com/swe-students-fall2025/3-python-package-team_solace/issues" + +[project.scripts] +snacktime = "snacktime.__main__:main" + +[tool.setuptools.packages.find] +where = ["."] +include = ["snacktime*"] diff --git a/snacktime/__init__.py b/snacktime/__init__.py new file mode 100644 index 0000000..753c916 --- /dev/null +++ b/snacktime/__init__.py @@ -0,0 +1,10 @@ +__version__ = "0.2.0" + +from .core import ( + random_snack, + random_vegetable, + random_treat, + recipe_salad, +) + +__all__ = ["random_snack", "random_vegetable", "random_treat", "recipe_salad"] \ No newline at end of file diff --git a/snacktime/__main__.py b/snacktime/__main__.py new file mode 100644 index 0000000..da625ad --- /dev/null +++ b/snacktime/__main__.py @@ -0,0 +1,63 @@ +import sys +from . import random_snack, random_vegetable, random_treat, recipe_salad, __version__ + +USAGE = """\ +snacktime v{v} + +Usage: + snacktime snack # random snack + snacktime recipt # simple salad recipe (accepts 'recipe' too) + snacktime recipe # same as 'recipt' (spelling friendly) + snacktime vegitable # random vegetable (accepts 'vegetable' too) + snacktime vegetable # same as 'vegitable' + snacktime treat # random sweet treat + +Options: + --seed N # deterministic output for snack/veg/treat + --serves N # servings for the salad recipe (default 1) + --dressing NAME # lemon | balsamic | olive (default lemon) +""" + +def main(argv=None): + argv = list(sys.argv[1:] if argv is None else argv) + if not argv: + print(USAGE.format(v=__version__)) + return 0 + + cmd = argv[0].lower().strip() + args = argv[1:] + + # spelling-friendly aliases + if cmd == "recipt": + cmd = "recipe" + if cmd == "vegitable": + cmd = "vegetable" + + # parse simple flags + def read_flag(name, cast=int, default=None): + if name in args: + i = args.index(name) + try: + return cast(args[i+1]) + except Exception: + raise SystemExit(f"Invalid value for {name}") + return default + + seed = read_flag("--seed", int, None) + serves = read_flag("--serves", int, 2) # default now 2 + dressing = read_flag("--dressing", str, "balsamic") + + if cmd == "snack": + print(random_snack(seed=seed)); return 0 + if cmd == "vegetable": + print(random_vegetable(seed=seed)); return 0 + if cmd == "treat": + print(random_treat(seed=seed)); return 0 + if cmd == "recipe": + print(recipe_salad(serves=serves, dressing=dressing)); return 0 + + print(USAGE.format(v=__version__)) + return 1 + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/snacktime/core.py b/snacktime/core.py new file mode 100644 index 0000000..6516e03 --- /dev/null +++ b/snacktime/core.py @@ -0,0 +1,75 @@ +from typing import Optional, Sequence +import random +import textwrap + +_SNACKS: Sequence[str] = ( + "pretzels", "popcorn", "granola bar", "apple slices", "yogurt cup", + "cheese & crackers", "trail mix", "rice cakes", "hummus & pita" +) + +_VEGETABLES: Sequence[str] = ( + "carrot", "cucumber", "spinach", "kale", "broccoli", + "bell pepper", "tomato", "celery", "edamame" +) + +_TREATS: Sequence[str] = ( + "chocolate chip cookie", "brownie bite", "gummy bears", + "ice cream scoop", "cupcake", "churro", "donut hole" +) + +def random_snack(seed: Optional[int] = None) -> str: + """Return a random snack (deterministic if seed is provided).""" + rng = random.Random(seed) + return rng.choice(_SNACKS) + +def random_vegetable(seed: Optional[int] = None) -> str: + """Return a random vegetable (deterministic if seed is provided).""" + rng = random.Random(seed) + return rng.choice(_VEGETABLES) + +def random_treat(seed: Optional[int] = None) -> str: + """Return a random sweet treat (deterministic if seed is provided).""" + rng = random.Random(seed) + return rng.choice(_TREATS) + +def recipe_salad(serves: int = 1, dressing: str = "lemon") -> str: + """ + Return a simple salad recipe as a formatted string. + Args: + serves: number of servings (must be >= 1) + dressing: 'lemon' | 'balsamic' | 'olive' + """ + if serves < 1: + raise ValueError("serves must be >= 1") + dressing = dressing.lower().strip() + if dressing not in {"lemon", "balsamic", "olive"}: + raise ValueError("dressing must be 'lemon', 'balsamic', or 'olive'") + + base = textwrap.dedent(f""" + Simple Green Salad + Serves: {serves} + + Ingredients + ---------- + - {2*serves} cups mixed greens + - {serves} cup chopped vegetables (e.g., cucumber, tomato, carrot) + - {serves*2} tbsp nuts or seeds (optional) + - Salt & pepper to taste + """).strip() + + if dressing == "lemon": + d = f"- Dressing: {serves*2} tbsp olive oil, {serves} tbsp lemon juice, pinch of salt" + elif dressing == "balsamic": + d = f"- Dressing: {serves*2} tbsp olive oil, {serves} tbsp balsamic vinegar, pinch of salt" + else: # olive + d = f"- Dressing: {serves*2} tbsp olive oil, {serves} tsp red wine vinegar (optional), pinch of salt" + + steps = textwrap.dedent(""" + Steps + ----- + 1) Toss greens and chopped veggies in a bowl. + 2) Whisk dressing separately, then drizzle over salad. + 3) Sprinkle nuts/seeds. Season with salt & pepper. Toss and serve. + """).strip() + + return f"{base}\n{d}\n\n{steps}\n" \ No newline at end of file diff --git a/tests/test_random_snack.py b/tests/test_random_snack.py new file mode 100644 index 0000000..c9ef95a --- /dev/null +++ b/tests/test_random_snack.py @@ -0,0 +1,11 @@ +from snacktime import random_snack + +def test_random_snack_deterministic(): + assert random_snack(seed=1) == random_snack(seed=1) + +def test_random_snack_membership(): + s = random_snack(seed=2) + assert isinstance(s, str) and len(s) > 0 + +def test_random_snack_varies_with_seed(): + assert random_snack(seed=3) != random_snack(seed=4) diff --git a/tests/test_random_treat.py b/tests/test_random_treat.py new file mode 100644 index 0000000..5d20cb5 --- /dev/null +++ b/tests/test_random_treat.py @@ -0,0 +1,12 @@ +from snacktime import random_treat + +def test_random_treat_deterministic(): + assert random_treat(seed=20) == random_treat(seed=20) + +def test_random_treat_is_string(): + t = random_treat(seed=21) + assert isinstance(t, str) and len(t) > 0 + +def test_random_treat_varies_with_seed(): + assert random_treat(seed=22) != random_treat(seed=23) + diff --git a/tests/test_random_vegetable.py b/tests/test_random_vegetable.py new file mode 100644 index 0000000..5639381 --- /dev/null +++ b/tests/test_random_vegetable.py @@ -0,0 +1,11 @@ +from snacktime import random_vegetable + +def test_random_vegetable_deterministic(): + assert random_vegetable(seed=10) == random_vegetable(seed=10) + +def test_random_vegetable_is_string(): + v = random_vegetable(seed=11) + assert isinstance(v, str) and len(v) > 0 + +def test_random_vegetable_varies_with_seed(): + assert random_vegetable(seed=12) != random_vegetable(seed=13) diff --git a/tests/test_recipe_salad.py b/tests/test_recipe_salad.py new file mode 100644 index 0000000..e9cb478 --- /dev/null +++ b/tests/test_recipe_salad.py @@ -0,0 +1,17 @@ +import pytest +from snacktime import recipe_salad + +def test_recipe_includes_serves_and_ingredients(): + r = recipe_salad(serves=2, dressing="lemon") + assert "Serves: 2" in r + assert "Ingredients" in r + assert "Dressing" in r + +def test_recipe_bad_serves_raises(): + with pytest.raises(ValueError): + recipe_salad(serves=0) + +def test_recipe_dressing_variants(): + for d in ("lemon", "balsamic", "olive"): + out = recipe_salad(serves=1, dressing=d) + assert d in out.lower() From 1d9ca7bda7e5096dbdef222cb1f6bdd93fa77e56 Mon Sep 17 00:00:00 2001 From: ems9856-lgtm Date: Thu, 30 Oct 2025 22:53:06 -0400 Subject: [PATCH 02/61] snacktime-2 --- pyproject.toml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d70a0bf..e8c2528 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,22 +8,6 @@ version = "0.2.0" description = "CLI that gives a random snack, a simple salad recipe, a random vegetable, or a sweet treat." readme = "README.md" requires-python = ">=3.9" -authors = [{ name = "Your Name", email = "you@example.com" }] -license = { text = "MIT" } -keywords = ["snack", "recipe", "vegetable", "treat", "fun", "cli"] -classifiers = [ - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "License :: OSI Approved :: MIT License", - "Environment :: Console", - "Topic :: Games/Entertainment", - "Topic :: Utilities" -] - -[project.urls] -Homepage = "https://github.com/swe-students-fall2025/3-python-package-team_solace" -Repository = "https://github.com/swe-students-fall2025/3-python-package-team_solace" -Issues = "https://github.com/swe-students-fall2025/3-python-package-team_solace/issues" [project.scripts] snacktime = "snacktime.__main__:main" From 59bbd8cc6001f1d30162548b02d64aa3b8e8d79c Mon Sep 17 00:00:00 2001 From: ems9856-lgtm Date: Sun, 2 Nov 2025 20:18:39 -0500 Subject: [PATCH 03/61] spelling-correction --- snacktime/__main__.py | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/snacktime/__main__.py b/snacktime/__main__.py index da625ad..3f62ccf 100644 --- a/snacktime/__main__.py +++ b/snacktime/__main__.py @@ -5,17 +5,15 @@ snacktime v{v} Usage: - snacktime snack # random snack - snacktime recipt # simple salad recipe (accepts 'recipe' too) - snacktime recipe # same as 'recipt' (spelling friendly) - snacktime vegitable # random vegetable (accepts 'vegetable' too) - snacktime vegetable # same as 'vegitable' - snacktime treat # random sweet treat + snacktime snack # random snack + snacktime recipe [--serves N] [--dressing NAME] + snacktime vegetable [--seed N] # random vegetable + snacktime treat [--seed N] # random sweet treat Options: - --seed N # deterministic output for snack/veg/treat - --serves N # servings for the salad recipe (default 1) - --dressing NAME # lemon | balsamic | olive (default lemon) + --seed N Deterministic selection for snack/vegetable/treat (default: none) + --serves N Servings for the salad recipe (default: 2) + --dressing NAME lemon | balsamic | olive (default: balsamic) """ def main(argv=None): @@ -27,12 +25,6 @@ def main(argv=None): cmd = argv[0].lower().strip() args = argv[1:] - # spelling-friendly aliases - if cmd == "recipt": - cmd = "recipe" - if cmd == "vegitable": - cmd = "vegetable" - # parse simple flags def read_flag(name, cast=int, default=None): if name in args: @@ -44,8 +36,8 @@ def read_flag(name, cast=int, default=None): return default seed = read_flag("--seed", int, None) - serves = read_flag("--serves", int, 2) # default now 2 - dressing = read_flag("--dressing", str, "balsamic") + serves = read_flag("--serves", int, 2) + dressing = read_flag("--dressing", str, "balsamic") if cmd == "snack": print(random_snack(seed=seed)); return 0 From 30d198a0e013d162f1d0e44dfa6a2784e8aae0ee Mon Sep 17 00:00:00 2001 From: ems9856-lgtm Date: Mon, 3 Nov 2025 11:17:23 -0500 Subject: [PATCH 04/61] test-edit --- tests/test_random_snack.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_random_snack.py b/tests/test_random_snack.py index c9ef95a..1eb17d6 100644 --- a/tests/test_random_snack.py +++ b/tests/test_random_snack.py @@ -8,4 +8,6 @@ def test_random_snack_membership(): assert isinstance(s, str) and len(s) > 0 def test_random_snack_varies_with_seed(): - assert random_snack(seed=3) != random_snack(seed=4) + # Over multiple seeds we should see at least 2 distinct results + results = {random_snack(seed=i) for i in range(10)} + assert len(results) >= 2 \ No newline at end of file From 1627fb3a84ba2d83cd5daf1fe3c8f2e978fa446e Mon Sep 17 00:00:00 2001 From: jawarbx Date: Mon, 3 Nov 2025 14:55:19 -0500 Subject: [PATCH 05/61] Formatted tests to run with pypi. Updated minimum python version --- Pipfile | 2 +- pyproject.toml | 3 +++ tests/test_random_snack.py | 20 +++++++++++--------- tests/test_random_treat.py | 17 +++++++++-------- tests/test_random_vegetable.py | 16 +++++++++------- tests/test_recipe_salad.py | 25 +++++++++++++------------ 6 files changed, 46 insertions(+), 37 deletions(-) diff --git a/Pipfile b/Pipfile index 6b93f48..be94dcd 100644 --- a/Pipfile +++ b/Pipfile @@ -11,7 +11,7 @@ build = "*" twine = "*" [requires] -python_version = "3.14" +python_version = "3" [scripts] snacktime = "python -m snacktime" diff --git a/pyproject.toml b/pyproject.toml index e8c2528..3dbe178 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,6 +12,9 @@ requires-python = ">=3.9" [project.scripts] snacktime = "snacktime.__main__:main" +[project.optional-dependencies] +dev = ['pytest'] + [tool.setuptools.packages.find] where = ["."] include = ["snacktime*"] diff --git a/tests/test_random_snack.py b/tests/test_random_snack.py index 1eb17d6..5207bb2 100644 --- a/tests/test_random_snack.py +++ b/tests/test_random_snack.py @@ -1,13 +1,15 @@ +import pytest from snacktime import random_snack -def test_random_snack_deterministic(): - assert random_snack(seed=1) == random_snack(seed=1) +class Tests: + def test_random_snack_deterministic(self): + assert random_snack(seed=1) == random_snack(seed=1) -def test_random_snack_membership(): - s = random_snack(seed=2) - assert isinstance(s, str) and len(s) > 0 + def test_random_snack_membership(self): + s = random_snack(seed=2) + assert isinstance(s, str) and len(s) > 0 -def test_random_snack_varies_with_seed(): - # Over multiple seeds we should see at least 2 distinct results - results = {random_snack(seed=i) for i in range(10)} - assert len(results) >= 2 \ No newline at end of file + def test_random_snack_varies_with_seed(self): + # Over multiple seeds we should see at least 2 distinct results + results = {random_snack(seed=i) for i in range(10)} + assert len(results) >= 2 diff --git a/tests/test_random_treat.py b/tests/test_random_treat.py index 5d20cb5..d9c824e 100644 --- a/tests/test_random_treat.py +++ b/tests/test_random_treat.py @@ -1,12 +1,13 @@ +import pytest from snacktime import random_treat -def test_random_treat_deterministic(): - assert random_treat(seed=20) == random_treat(seed=20) +class Tests: + def test_random_treat_deterministic(self): + assert random_treat(seed=20) == random_treat(seed=20), "Expected same result for same seed" -def test_random_treat_is_string(): - t = random_treat(seed=21) - assert isinstance(t, str) and len(t) > 0 - -def test_random_treat_varies_with_seed(): - assert random_treat(seed=22) != random_treat(seed=23) + def test_random_treat_is_string(self): + t = random_treat(seed=21) + assert isinstance(t, str) and len(t) > 0, "Expected nonempty string" + def test_random_treat_varies_with_seed(self): + assert random_treat(seed=22) != random_treat(seed=23), "Expected different result for different seed" diff --git a/tests/test_random_vegetable.py b/tests/test_random_vegetable.py index 5639381..ff4ff14 100644 --- a/tests/test_random_vegetable.py +++ b/tests/test_random_vegetable.py @@ -1,11 +1,13 @@ +import pytest from snacktime import random_vegetable -def test_random_vegetable_deterministic(): - assert random_vegetable(seed=10) == random_vegetable(seed=10) +class Tests: + def test_random_vegetable_deterministic(self): + assert random_vegetable(seed=10) == random_vegetable(seed=10) -def test_random_vegetable_is_string(): - v = random_vegetable(seed=11) - assert isinstance(v, str) and len(v) > 0 + def test_random_vegetable_is_string(self): + v = random_vegetable(seed=11) + assert isinstance(v, str) and len(v) > 0 -def test_random_vegetable_varies_with_seed(): - assert random_vegetable(seed=12) != random_vegetable(seed=13) + def test_random_vegetable_varies_with_seed(self): + assert random_vegetable(seed=12) != random_vegetable(seed=13) diff --git a/tests/test_recipe_salad.py b/tests/test_recipe_salad.py index e9cb478..6ab7d9a 100644 --- a/tests/test_recipe_salad.py +++ b/tests/test_recipe_salad.py @@ -1,17 +1,18 @@ import pytest from snacktime import recipe_salad -def test_recipe_includes_serves_and_ingredients(): - r = recipe_salad(serves=2, dressing="lemon") - assert "Serves: 2" in r - assert "Ingredients" in r - assert "Dressing" in r +class Tests: + def test_recipe_includes_serves_and_ingredients(self): + r = recipe_salad(serves=2, dressing="lemon") + assert "Serves: 2" in r + assert "Ingredients" in r + assert "Dressing" in r -def test_recipe_bad_serves_raises(): - with pytest.raises(ValueError): - recipe_salad(serves=0) + def test_recipe_bad_serves_raises(self): + with pytest.raises(ValueError): + recipe_salad(serves=0) -def test_recipe_dressing_variants(): - for d in ("lemon", "balsamic", "olive"): - out = recipe_salad(serves=1, dressing=d) - assert d in out.lower() + def test_recipe_dressing_variants(self): + for d in ("lemon", "balsamic", "olive"): + out = recipe_salad(serves=1, dressing=d) + assert d in out.lower() From 23b2cc68928d6e7317e5a72ede540cdcb99b2231 Mon Sep 17 00:00:00 2001 From: jawarbx Date: Mon, 3 Nov 2025 15:18:33 -0500 Subject: [PATCH 06/61] Added pr_test.yaml to automate checking PRs --- .github/workflows/Pipfile | 15 --- .github/workflows/Pipfile.lock | 184 ----------------------------- .github/workflows/event-logger.yml | 54 --------- .github/workflows/pr_test.yaml | 23 ++++ .github/workflows/requirements.txt | 10 -- 5 files changed, 23 insertions(+), 263 deletions(-) delete mode 100644 .github/workflows/Pipfile delete mode 100644 .github/workflows/Pipfile.lock delete mode 100644 .github/workflows/event-logger.yml create mode 100644 .github/workflows/pr_test.yaml delete mode 100644 .github/workflows/requirements.txt diff --git a/.github/workflows/Pipfile b/.github/workflows/Pipfile deleted file mode 100644 index f5d05e5..0000000 --- a/.github/workflows/Pipfile +++ /dev/null @@ -1,15 +0,0 @@ -[[source]] -url = "https://pypi.org/simple" -verify_ssl = true -name = "pypi" - -[packages] -gitcommitlogger = "*" -requests = "*" -pytz = "*" -python-dateutil = "*" - -[dev-packages] - -[requires] -python_version = "3" diff --git a/.github/workflows/Pipfile.lock b/.github/workflows/Pipfile.lock deleted file mode 100644 index d1e37b9..0000000 --- a/.github/workflows/Pipfile.lock +++ /dev/null @@ -1,184 +0,0 @@ -{ - "_meta": { - "hash": { - "sha256": "688050f13174cb5c5295b49799f3603a60d03b27fadcc1c63d8ce8b0ae632293" - }, - "pipfile-spec": 6, - "requires": { - "python_version": "3" - }, - "sources": [ - { - "name": "pypi", - "url": "https://pypi.org/simple", - "verify_ssl": true - } - ] - }, - "default": { - "certifi": { - "hashes": [ - "sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f", - "sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1" - ], - "markers": "python_version >= '3.6'", - "version": "==2024.2.2" - }, - "charset-normalizer": { - "hashes": [ - "sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027", - "sha256:06a81e93cd441c56a9b65d8e1d043daeb97a3d0856d177d5c90ba85acb3db087", - "sha256:0a55554a2fa0d408816b3b5cedf0045f4b8e1a6065aec45849de2d6f3f8e9786", - "sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8", - "sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09", - "sha256:122c7fa62b130ed55f8f285bfd56d5f4b4a5b503609d181f9ad85e55c89f4185", - "sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574", - "sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e", - "sha256:1f79682fbe303db92bc2b1136016a38a42e835d932bab5b3b1bfcfbf0640e519", - "sha256:2127566c664442652f024c837091890cb1942c30937add288223dc895793f898", - "sha256:22afcb9f253dac0696b5a4be4a1c0f8762f8239e21b99680099abd9b2b1b2269", - "sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3", - "sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f", - "sha256:3287761bc4ee9e33561a7e058c72ac0938c4f57fe49a09eae428fd88aafe7bb6", - "sha256:34d1c8da1e78d2e001f363791c98a272bb734000fcef47a491c1e3b0505657a8", - "sha256:37e55c8e51c236f95b033f6fb391d7d7970ba5fe7ff453dad675e88cf303377a", - "sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73", - "sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc", - "sha256:42cb296636fcc8b0644486d15c12376cb9fa75443e00fb25de0b8602e64c1714", - "sha256:45485e01ff4d3630ec0d9617310448a8702f70e9c01906b0d0118bdf9d124cf2", - "sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc", - "sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce", - "sha256:4d0d1650369165a14e14e1e47b372cfcb31d6ab44e6e33cb2d4e57265290044d", - "sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e", - "sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6", - "sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269", - "sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96", - "sha256:5b4c145409bef602a690e7cfad0a15a55c13320ff7a3ad7ca59c13bb8ba4d45d", - "sha256:6463effa3186ea09411d50efc7d85360b38d5f09b870c48e4600f63af490e56a", - "sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4", - "sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77", - "sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d", - "sha256:68d1f8a9e9e37c1223b656399be5d6b448dea850bed7d0f87a8311f1ff3dabb0", - "sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed", - "sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068", - "sha256:6c4caeef8fa63d06bd437cd4bdcf3ffefe6738fb1b25951440d80dc7df8c03ac", - "sha256:6ef1d82a3af9d3eecdba2321dc1b3c238245d890843e040e41e470ffa64c3e25", - "sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8", - "sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab", - "sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26", - "sha256:7f04c839ed0b6b98b1a7501a002144b76c18fb1c1850c8b98d458ac269e26ed2", - "sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db", - "sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f", - "sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5", - "sha256:86216b5cee4b06df986d214f664305142d9c76df9b6512be2738aa72a2048f99", - "sha256:87d1351268731db79e0f8e745d92493ee2841c974128ef629dc518b937d9194c", - "sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d", - "sha256:8c622a5fe39a48f78944a87d4fb8a53ee07344641b0562c540d840748571b811", - "sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa", - "sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a", - "sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03", - "sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b", - "sha256:923c0c831b7cfcb071580d3f46c4baf50f174be571576556269530f4bbd79d04", - "sha256:95f2a5796329323b8f0512e09dbb7a1860c46a39da62ecb2324f116fa8fdc85c", - "sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001", - "sha256:9f96df6923e21816da7e0ad3fd47dd8f94b2a5ce594e00677c0013018b813458", - "sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389", - "sha256:a50aebfa173e157099939b17f18600f72f84eed3049e743b68ad15bd69b6bf99", - "sha256:a981a536974bbc7a512cf44ed14938cf01030a99e9b3a06dd59578882f06f985", - "sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537", - "sha256:ae5f4161f18c61806f411a13b0310bea87f987c7d2ecdbdaad0e94eb2e404238", - "sha256:aed38f6e4fb3f5d6bf81bfa990a07806be9d83cf7bacef998ab1a9bd660a581f", - "sha256:b01b88d45a6fcb69667cd6d2f7a9aeb4bf53760d7fc536bf679ec94fe9f3ff3d", - "sha256:b261ccdec7821281dade748d088bb6e9b69e6d15b30652b74cbbac25e280b796", - "sha256:b2b0a0c0517616b6869869f8c581d4eb2dd83a4d79e0ebcb7d373ef9956aeb0a", - "sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143", - "sha256:bd8f7df7d12c2db9fab40bdd87a7c09b1530128315d047a086fa3ae3435cb3a8", - "sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c", - "sha256:c002b4ffc0be611f0d9da932eb0f704fe2602a9a949d1f738e4c34c75b0863d5", - "sha256:c083af607d2515612056a31f0a8d9e0fcb5876b7bfc0abad3ecd275bc4ebc2d5", - "sha256:c180f51afb394e165eafe4ac2936a14bee3eb10debc9d9e4db8958fe36afe711", - "sha256:c235ebd9baae02f1b77bcea61bce332cb4331dc3617d254df3323aa01ab47bd4", - "sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6", - "sha256:d0eccceffcb53201b5bfebb52600a5fb483a20b61da9dbc885f8b103cbe7598c", - "sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7", - "sha256:db364eca23f876da6f9e16c9da0df51aa4f104a972735574842618b8c6d999d4", - "sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b", - "sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae", - "sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12", - "sha256:e27ad930a842b4c5eb8ac0016b0a54f5aebbe679340c26101df33424142c143c", - "sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae", - "sha256:eb00ed941194665c332bf8e078baf037d6c35d7c4f3102ea2d4f16ca94a26dc8", - "sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887", - "sha256:eb8821e09e916165e160797a6c17edda0679379a4be5c716c260e836e122f54b", - "sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4", - "sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f", - "sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5", - "sha256:fb69256e180cb6c8a894fee62b3afebae785babc1ee98b81cdf68bbca1987f33", - "sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519", - "sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561" - ], - "markers": "python_full_version >= '3.7.0'", - "version": "==3.3.2" - }, - "gitcommitlogger": { - "hashes": [ - "sha256:3badf5db541d81cc3473882d9d255dabc66cd413e780ccb4fe6b320afddedcd0", - "sha256:7bafd58d46441b8c01b0f5706e7242df0ff841b3f87a7f621979577758546869" - ], - "index": "pypi", - "markers": "python_version >= '3.7'", - "version": "==1.2.5" - }, - "idna": { - "hashes": [ - "sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca", - "sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f" - ], - "markers": "python_version >= '3.5'", - "version": "==3.6" - }, - "python-dateutil": { - "hashes": [ - "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3", - "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427" - ], - "index": "pypi", - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==2.9.0.post0" - }, - "pytz": { - "hashes": [ - "sha256:2a29735ea9c18baf14b448846bde5a48030ed267578472d8955cd0e7443a9812", - "sha256:328171f4e3623139da4983451950b28e95ac706e13f3f2630a879749e7a8b319" - ], - "index": "pypi", - "version": "==2024.1" - }, - "requests": { - "hashes": [ - "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f", - "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1" - ], - "index": "pypi", - "markers": "python_version >= '3.7'", - "version": "==2.31.0" - }, - "six": { - "hashes": [ - "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926", - "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254" - ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==1.16.0" - }, - "urllib3": { - "hashes": [ - "sha256:450b20ec296a467077128bff42b73080516e71b56ff59a60a02bef2232c4fa9d", - "sha256:d0570876c61ab9e520d776c38acbbb5b05a776d3f9ff98a5c8fd5162a444cf19" - ], - "markers": "python_version >= '3.8'", - "version": "==2.2.1" - } - }, - "develop": {} -} diff --git a/.github/workflows/event-logger.yml b/.github/workflows/event-logger.yml deleted file mode 100644 index 31f231e..0000000 --- a/.github/workflows/event-logger.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: log github events -on: - push: - branches: [main, master, pipfile-experiment] - pull_request: - types: [opened, closed] - branches: [main, master, pipfile-experiment] -jobs: - log: - runs-on: ubuntu-latest - env: - PIPENV_PIPFILE: .github/workflows/Pipfile # so this script doesn't use the Pipfile in the root directory - COMMIT_LOG_API: ${{ secrets.COMMIT_LOG_API }} - GITHUB_LOGIN: ${{ github.actor }} # github login also available in github.triggering_actor, github.event.sender.login - COMMITS: ${{ toJSON(github.event.commits) }} - REPOSITORY_URL: ${{ github.repositoryUrl }} - EVENT_TYPE: ${{ github.event_name }} - EVENT_ACTION: ${{ github.event.action }} - PR_MERGED: ${{ github.event.pull_request.merged }} - PR_CREATED_AT: ${{ github.event.pull_request.created_at}} - PR_CLOSED_AT: ${{ github.event.pull_request.closed_at}} - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 # this is important so git fetches all history.. the actions/checkout by default fetches all history as one commit which throws off stats - - uses: actions/setup-python@v3 - with: - python-version: "^3.9" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install --user pipenv - pipenv --python $(which python) - pipenv install - - name: Log pull request opened - if: github.event_name == 'pull_request' && github.event.action == 'opened' - run: | - pipenv run gitcommitlogger -r $(echo $REPOSITORY_URL) -t pull_request_opened -d $(echo $PR_CREATED_AT) -un $(echo $GITHUB_LOGIN) -o commit_stats.csv -u $(echo $COMMIT_LOG_API) -v - - name: Log pull request closed and merged - if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true - run: | - echo $COMMITS > commits.json - cat commits.json # debugging - pipenv run gitcommitlogger -r $(echo $REPOSITORY_URL) -t pull_request_merged -d $(echo $PR_CLOSED_AT) -un $(echo $GITHUB_LOGIN) -i commits.json -o commit_stats.csv -u $(echo $COMMIT_LOG_API) -v - - name: Log pull request closed without merge - if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == false - run: | - pipenv run gitcommitlogger -r $(echo $REPOSITORY_URL) -t pull_request_closed -d $(echo $PR_CLOSED_AT) -un $(echo $GITHUB_LOGIN) -o commit_stats.csv -u $(echo $COMMIT_LOG_API) -v - - name: Log push - if: github.event_name == 'push' - run: | - echo $COMMITS > commits.json - cat commits.json # debugging - pipenv run gitcommitlogger -r $(echo $REPOSITORY_URL) -t $(echo $EVENT_TYPE) -i commits.json -o commit_stats.csv -u $(echo $COMMIT_LOG_API) -v diff --git a/.github/workflows/pr_test.yaml b/.github/workflows/pr_test.yaml new file mode 100644 index 0000000..e14eaba --- /dev/null +++ b/.github/workflows/pr_test.yaml @@ -0,0 +1,23 @@ +name: CI / CD +on: [pull_request] +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 5 + strategy: + matrix: + python-version: ["3.9"] + steps: + - uses: actions/checkout@v4 + - name: Install Python, pipenv and Pipfile packages + uses: kojoru/prepare-pipenv@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Turn on 'editable' mode + run: | + pipenv install -e . + - name: Test with pytest + run: | + pipenv install pytest + pipenv --venv + pipenv run python -m pytest diff --git a/.github/workflows/requirements.txt b/.github/workflows/requirements.txt deleted file mode 100644 index d055863..0000000 --- a/.github/workflows/requirements.txt +++ /dev/null @@ -1,10 +0,0 @@ --i https://pypi.org/simple -certifi==2024.2.2; python_version >= '3.6' -charset-normalizer==3.3.2; python_full_version >= '3.7.0' -gitcommitlogger==1.2.5; python_version >= '3.7' -idna==3.6; python_version >= '3.5' -python-dateutil==2.9.0.post0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' -pytz==2024.1 -requests==2.31.0; python_version >= '3.7' -six==1.16.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' -urllib3==2.2.1; python_version >= '3.8' From a6d6000969122e3357f7aa553a701d942062ce77 Mon Sep 17 00:00:00 2001 From: jawarbx Date: Mon, 3 Nov 2025 15:22:51 -0500 Subject: [PATCH 07/61] Added build file for testing PRs --- .github/workflows/pr_test.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_test.yaml b/.github/workflows/pr_test.yaml index e14eaba..77a12dd 100644 --- a/.github/workflows/pr_test.yaml +++ b/.github/workflows/pr_test.yaml @@ -1,5 +1,8 @@ -name: CI / CD -on: [pull_request] +name: PR Tests +on: + pull_request: + types: [opened, synchronize, closed] + jobs: build: runs-on: ubuntu-latest From f69a57af466062060cba5a5e6824138719067bbc Mon Sep 17 00:00:00 2001 From: hanqigui Date: Mon, 3 Nov 2025 18:48:33 -0500 Subject: [PATCH 08/61] Update test_random_snack.py Stabilize random_snack seed test --- tests/test_random_snack.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_random_snack.py b/tests/test_random_snack.py index 5207bb2..afa4c23 100644 --- a/tests/test_random_snack.py +++ b/tests/test_random_snack.py @@ -10,6 +10,6 @@ def test_random_snack_membership(self): assert isinstance(s, str) and len(s) > 0 def test_random_snack_varies_with_seed(self): - # Over multiple seeds we should see at least 2 distinct results - results = {random_snack(seed=i) for i in range(10)} - assert len(results) >= 2 + seeds = range(10, 30) + values = [random_snack(seed=s) for s in seeds] + assert len(set(values)) > 1 From cd157031f97f347613eccced6991cbb41269bc7a Mon Sep 17 00:00:00 2001 From: hanqigui Date: Mon, 3 Nov 2025 19:15:54 -0500 Subject: [PATCH 09/61] Create demo.py --- examples/demo.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 examples/demo.py diff --git a/examples/demo.py b/examples/demo.py new file mode 100644 index 0000000..c087a67 --- /dev/null +++ b/examples/demo.py @@ -0,0 +1,15 @@ +# examples/demo.py + +from snacktime import random_snack, random_treat, random_vegetable, recipe_salad + +def main(): + print("=== snacktime demo ===") + print("snack:", random_snack(seed=1)) + print("treat:", random_treat(seed=2)) + print("vegetable:", random_vegetable(seed=3)) + + print("\n--- salad recipe ---") + print(recipe_salad(serves=3, dressing="lemon")) + +if __name__ == "__main__": + main() From d9cb58f2290d4c6ac504d651f30973b89a6a1fdc Mon Sep 17 00:00:00 2001 From: hanqigui Date: Mon, 3 Nov 2025 19:24:12 -0500 Subject: [PATCH 10/61] Update Pipfile --- Pipfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pipfile b/Pipfile index be94dcd..6d47a21 100644 --- a/Pipfile +++ b/Pipfile @@ -11,7 +11,7 @@ build = "*" twine = "*" [requires] -python_version = "3" +python_version = "3.12" [scripts] snacktime = "python -m snacktime" From d9ea6dcb863f6a846cb8972086ae702f2b7e9ebc Mon Sep 17 00:00:00 2001 From: hanqigui Date: Mon, 3 Nov 2025 19:26:21 -0500 Subject: [PATCH 11/61] Create ci.yml --- ci.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 ci.yml diff --git a/ci.yml b/ci.yml new file mode 100644 index 0000000..8340bfd --- /dev/null +++ b/ci.yml @@ -0,0 +1,31 @@ +name: CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [ "3.10", "3.12" ] + + steps: + - name: Check out repo + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install package and test deps + run: | + python -m pip install --upgrade pip + pip install -e . pytest + + - name: Run tests + run: pytest -q From cbb502aefa7d4235ffe682d4cf4d603aa03e4d30 Mon Sep 17 00:00:00 2001 From: Kaiyuan Wu Date: Tue, 4 Nov 2025 03:41:09 -0500 Subject: [PATCH 12/61] Update README.md Update README --- README.md | 120 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 118 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6022e0e..e92a8d2 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,119 @@ -# Python Package Exercise +# πŸ₯— snacktime -An exercise to create a Python package, build it, test it, distribute it, and use it. See [instructions](./instructions.md) for details. +A lightweight and fun Python package that helps you pick a **random snack**, **vegetable**, **sweet treat**, or even generate a **simple salad recipe**. +Originally created as part of the Software Engineering Fall 2025 team project β€” this package demonstrates Python packaging, publishing, and CI automation. + +--- + +## πŸ“¦ PyPI Project + +πŸ”— **Link:** [https://pypi.org/project/snacktime/0.3.0/](https://pypi.org/project/snacktime/0.3.0/) +πŸ“¦ **Latest version:** 0.3.0 + +--- + +## πŸš€ Installation + +You can install directly from PyPI using pip: + +```bash +pip install snacktime==0.3.0 +``` + +--- + +## 🧩 Usage + +Once installed, simply import and call any of the available functions: + +```python +import snacktime + +print(snacktime.random_snack()) +print(snacktime.random_vegetable()) +print(snacktime.random_treat()) +print(snacktime.recipe_salad(serves=2, dressing="balsamic")) +``` + +--- + +## 🧾 Example Output + +``` +granola bar +spinach +cupcake + +Simple Green Salad +Serves: 2 + +Ingredients +----------- +- 4 cups mixed greens +- 2 cups chopped vegetables (e.g., cucumber, tomato, carrot) +- 4 tbsp nuts or seeds (optional) +- Salt & pepper to taste +- Dressing: 4 tbsp olive oil, 2 tbsp balsamic vinegar, pinch of salt + +Steps +----- +1) Toss greens and chopped veggies in a bowl. +2) Whisk dressing separately, then drizzle over salad. +3) Sprinkle nuts/seeds. Season with salt & pepper. Toss and serve. +``` + +--- + +## ✨ Features + +- 🍎 **`random_snack()`** β€” pick a random healthy or quick snack +- πŸ₯¦ **`random_vegetable()`** β€” choose a random vegetable +- 🍩 **`random_treat()`** β€” get a random dessert idea +- πŸ₯— **`recipe_salad()`** β€” generate a simple, customizable salad recipe + +--- + +## πŸ‘₯ Team Solace + +| Member | + +| **funfigwat** | +| **qiexian-mf** | +| **ems9856-lgtm** | +| **hanqigui** | +| **jawarbx** | +--- + +## 🧠 Notes + +- Tested with **Python 3.9+** on macOS. +- All random functions can be made deterministic with a `seed` argument. + ```python + snacktime.random_snack(seed=42) + ``` +- Supports CLI and programmatic use. + +--- + +## πŸ§‘β€πŸ’» Project Details + +| Field | Description | +|-------|-------------| +| **Package Name** | `snacktime` | +| **Version** | 0.3.0 | +| **Author** | Team Solace | +| **License** | MIT | +| **Language** | Python 3.9+ | +| **PyPI Page** | [https://pypi.org/project/snacktime/0.3.0/](https://pypi.org/project/snacktime/0.3.0/) | + +--- + +## πŸ₯³ Credits + +Developed by **Team Solace** for *Software Engineering (Fall 2025)* +as part of the Python Package exercise. +This project demonstrates collaboration, testing, automation, and packaging best practices. + +--- + +**Enjoy your snacks and code responsibly! πŸͺπŸ₯—πŸ«** From 70bd2cc710c4305589d65f4652dbd266083b0961 Mon Sep 17 00:00:00 2001 From: hanqigui Date: Tue, 4 Nov 2025 19:34:18 -0500 Subject: [PATCH 13/61] Update README.md --- README.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/README.md b/README.md index e92a8d2..0655d61 100644 --- a/README.md +++ b/README.md @@ -75,13 +75,8 @@ Steps ## πŸ‘₯ Team Solace -| Member | +- **Member**: funfigwat, qiexian-mf, ems9856-lgtm, hanqigui, jawarbx -| **funfigwat** | -| **qiexian-mf** | -| **ems9856-lgtm** | -| **hanqigui** | -| **jawarbx** | --- ## 🧠 Notes From b8faa8a11aae9bf903ca2bf0467c6d4704840ec1 Mon Sep 17 00:00:00 2001 From: hanqigui Date: Tue, 4 Nov 2025 20:01:08 -0500 Subject: [PATCH 14/61] Update core.py --- snacktime/core.py | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/snacktime/core.py b/snacktime/core.py index 6516e03..9cccce5 100644 --- a/snacktime/core.py +++ b/snacktime/core.py @@ -2,6 +2,15 @@ import random import textwrap +def _normalize_seed(seed): + """Accept only int or None; raise on other types.""" + if seed is None: + return None + if isinstance(seed, bool) or not isinstance(seed, int): + raise TypeError("seed must be an int or None") + return seed + + _SNACKS: Sequence[str] = ( "pretzels", "popcorn", "granola bar", "apple slices", "yogurt cup", "cheese & crackers", "trail mix", "rice cakes", "hummus & pita" @@ -17,20 +26,20 @@ "ice cream scoop", "cupcake", "churro", "donut hole" ) -def random_snack(seed: Optional[int] = None) -> str: - """Return a random snack (deterministic if seed is provided).""" - rng = random.Random(seed) - return rng.choice(_SNACKS) +def random_snack(seed: int | None = None) -> str: + seed = _normalize_seed(seed) + rng = random.Random(seed) if seed is not None else random.Random() + return rng.choice(SNACKS) -def random_vegetable(seed: Optional[int] = None) -> str: - """Return a random vegetable (deterministic if seed is provided).""" - rng = random.Random(seed) - return rng.choice(_VEGETABLES) +def random_vegetable(seed: int | None = None) -> str: + seed = _normalize_seed(seed) + rng = random.Random(seed) if seed is not None else random.Random() + return rng.choice(VEGETABLES) -def random_treat(seed: Optional[int] = None) -> str: - """Return a random sweet treat (deterministic if seed is provided).""" - rng = random.Random(seed) - return rng.choice(_TREATS) +def random_treat(seed: int | None = None) -> str: + seed = _normalize_seed(seed) + rng = random.Random(seed) if seed is not None else random.Random() + return rng.choice(TREATS) def recipe_salad(serves: int = 1, dressing: str = "lemon") -> str: """ @@ -72,4 +81,4 @@ def recipe_salad(serves: int = 1, dressing: str = "lemon") -> str: 3) Sprinkle nuts/seeds. Season with salt & pepper. Toss and serve. """).strip() - return f"{base}\n{d}\n\n{steps}\n" \ No newline at end of file + return f"{base}\n{d}\n\n{steps}\n" From 86ef8210856c1744c44c042f27cb844c4d1544ec Mon Sep 17 00:00:00 2001 From: hanqigui Date: Tue, 4 Nov 2025 20:11:45 -0500 Subject: [PATCH 15/61] Update core.py --- snacktime/core.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/snacktime/core.py b/snacktime/core.py index 9cccce5..db4b002 100644 --- a/snacktime/core.py +++ b/snacktime/core.py @@ -2,7 +2,7 @@ import random import textwrap -def _normalize_seed(seed): +def _normalize_seed(seed: Optional[int]) -> Optional[int]: """Accept only int or None; raise on other types.""" if seed is None: return None @@ -10,7 +10,6 @@ def _normalize_seed(seed): raise TypeError("seed must be an int or None") return seed - _SNACKS: Sequence[str] = ( "pretzels", "popcorn", "granola bar", "apple slices", "yogurt cup", "cheese & crackers", "trail mix", "rice cakes", "hummus & pita" @@ -26,20 +25,20 @@ def _normalize_seed(seed): "ice cream scoop", "cupcake", "churro", "donut hole" ) -def random_snack(seed: int | None = None) -> str: +def random_snack(seed: Optional[int] = None) -> str: seed = _normalize_seed(seed) rng = random.Random(seed) if seed is not None else random.Random() - return rng.choice(SNACKS) + return rng.choice(_SNACKS) -def random_vegetable(seed: int | None = None) -> str: +def random_vegetable(seed: Optional[int] = None) -> str: seed = _normalize_seed(seed) rng = random.Random(seed) if seed is not None else random.Random() - return rng.choice(VEGETABLES) + return rng.choice(_VEGETABLES) -def random_treat(seed: int | None = None) -> str: +def random_treat(seed: Optional[int] = None) -> str: seed = _normalize_seed(seed) rng = random.Random(seed) if seed is not None else random.Random() - return rng.choice(TREATS) + return rng.choice(_TREATS) def recipe_salad(serves: int = 1, dressing: str = "lemon") -> str: """ From 0ffe3321004c81129d7ca16c381369b4ad37c864 Mon Sep 17 00:00:00 2001 From: hanqigui Date: Tue, 4 Nov 2025 20:16:35 -0500 Subject: [PATCH 16/61] Update core.py From 500a802ac1dbc54ee6f3f64b6a5063f980d80a5d Mon Sep 17 00:00:00 2001 From: Mico_Mi Date: Tue, 4 Nov 2025 22:01:42 -0500 Subject: [PATCH 17/61] added CI badge and updated license --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0655d61..02a6ad7 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,8 @@ Originally created as part of the Software Engineering Fall 2025 team project πŸ”— **Link:** [https://pypi.org/project/snacktime/0.3.0/](https://pypi.org/project/snacktime/0.3.0/) πŸ“¦ **Latest version:** 0.3.0 +πŸ““ **Build & Test:** ![Build & Tests](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=main) + --- @@ -97,7 +99,7 @@ Steps | **Package Name** | `snacktime` | | **Version** | 0.3.0 | | **Author** | Team Solace | -| **License** | MIT | +| **License** | GLP 3.0 | | **Language** | Python 3.9+ | | **PyPI Page** | [https://pypi.org/project/snacktime/0.3.0/](https://pypi.org/project/snacktime/0.3.0/) | From 607b8f54c71f384010ef40ba61bdebd26071bf29 Mon Sep 17 00:00:00 2001 From: funfig_16 <53211033+funfig16@users.noreply.github.com> Date: Tue, 4 Nov 2025 22:16:01 -0500 Subject: [PATCH 18/61] Fix formatting in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 02a6ad7..912b7cf 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Originally created as part of the Software Engineering Fall 2025 team project ## πŸ“¦ PyPI Project πŸ”— **Link:** [https://pypi.org/project/snacktime/0.3.0/](https://pypi.org/project/snacktime/0.3.0/) -πŸ“¦ **Latest version:** 0.3.0 +πŸ“¦ **Latest version:** 0.3.0 πŸ““ **Build & Test:** ![Build & Tests](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=main) From 5456662b2d24f05682080d27191c8732ada81fd3 Mon Sep 17 00:00:00 2001 From: funfig_16 <53211033+funfig16@users.noreply.github.com> Date: Tue, 4 Nov 2025 22:17:12 -0500 Subject: [PATCH 19/61] Fix link to Build & Test badge in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 912b7cf..a04c11a 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Originally created as part of the Software Engineering Fall 2025 team project πŸ”— **Link:** [https://pypi.org/project/snacktime/0.3.0/](https://pypi.org/project/snacktime/0.3.0/) πŸ“¦ **Latest version:** 0.3.0 -πŸ““ **Build & Test:** ![Build & Tests](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=main) +πŸ““ **Build & Test:** ![Build & Tests](https://github.com/swe-students-fall2025/3-python-package-team_solace/.github/workflows/pr_test.yaml/badge.svg?branch=main) --- From 03258668801f1fb9abc711b8581c83734f19afe2 Mon Sep 17 00:00:00 2001 From: funfig_16 <53211033+funfig16@users.noreply.github.com> Date: Tue, 4 Nov 2025 22:17:51 -0500 Subject: [PATCH 20/61] Update Build & Test badge link in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a04c11a..7c2d47c 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Originally created as part of the Software Engineering Fall 2025 team project πŸ”— **Link:** [https://pypi.org/project/snacktime/0.3.0/](https://pypi.org/project/snacktime/0.3.0/) πŸ“¦ **Latest version:** 0.3.0 -πŸ““ **Build & Test:** ![Build & Tests](https://github.com/swe-students-fall2025/3-python-package-team_solace/.github/workflows/pr_test.yaml/badge.svg?branch=main) +πŸ““ **Build & Test:** ![Build & Tests](https://github.com/swe-students-fall2025/3-python-package-team_solace/blob/pipfile-experiment/.github/workflows/pr_test.yaml/badge.svg?branch=main) --- From 1e0ddbf9f9f8e936867e9231fd54993fd6bb99e2 Mon Sep 17 00:00:00 2001 From: funfig_16 <53211033+funfig16@users.noreply.github.com> Date: Tue, 4 Nov 2025 22:20:03 -0500 Subject: [PATCH 21/61] Update Build & Test badge link in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7c2d47c..d3e210a 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Originally created as part of the Software Engineering Fall 2025 team project πŸ”— **Link:** [https://pypi.org/project/snacktime/0.3.0/](https://pypi.org/project/snacktime/0.3.0/) πŸ“¦ **Latest version:** 0.3.0 -πŸ““ **Build & Test:** ![Build & Tests](https://github.com/swe-students-fall2025/3-python-package-team_solace/blob/pipfile-experiment/.github/workflows/pr_test.yaml/badge.svg?branch=main) +πŸ““ **Build & Test:** ![Build & Tests](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2) --- From d7553aa3074bc82e5e3d62b4b83390f0406a818f Mon Sep 17 00:00:00 2001 From: funfig_16 <53211033+funfig16@users.noreply.github.com> Date: Tue, 4 Nov 2025 22:22:43 -0500 Subject: [PATCH 22/61] Add push event trigger for pipfile-experiment branch --- .github/workflows/pr_test.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pr_test.yaml b/.github/workflows/pr_test.yaml index 77a12dd..45fd7c7 100644 --- a/.github/workflows/pr_test.yaml +++ b/.github/workflows/pr_test.yaml @@ -2,6 +2,9 @@ name: PR Tests on: pull_request: types: [opened, synchronize, closed] + push: + branches: + [pipfile-experiment] jobs: build: From 4d612d31d5a608d9d49193bef583d5cda5c5af8f Mon Sep 17 00:00:00 2001 From: funfig_16 <53211033+funfig16@users.noreply.github.com> Date: Tue, 4 Nov 2025 22:26:14 -0500 Subject: [PATCH 23/61] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d3e210a..e62942a 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Originally created as part of the Software Engineering Fall 2025 team project πŸ”— **Link:** [https://pypi.org/project/snacktime/0.3.0/](https://pypi.org/project/snacktime/0.3.0/) πŸ“¦ **Latest version:** 0.3.0 -πŸ““ **Build & Test:** ![Build & Tests](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2) +πŸ““ **Build & Test:** ![Build & Tests](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=pipfile-experiment) --- From d8f12f91f5c49bb8a2fc3b64a0e871a02d5b9e56 Mon Sep 17 00:00:00 2001 From: funfig_16 <53211033+funfig16@users.noreply.github.com> Date: Tue, 4 Nov 2025 22:37:44 -0500 Subject: [PATCH 24/61] Update push branches in PR workflow --- .github/workflows/pr_test.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr_test.yaml b/.github/workflows/pr_test.yaml index 45fd7c7..3d488ee 100644 --- a/.github/workflows/pr_test.yaml +++ b/.github/workflows/pr_test.yaml @@ -4,7 +4,9 @@ on: types: [opened, synchronize, closed] push: branches: - [pipfile-experiment] + [pipfile-experiment,readme-update2] + workflow_dispatch: {} + jobs: build: From 236775adebf29df7024cd7093350016b9bf44188 Mon Sep 17 00:00:00 2001 From: funfig_16 <53211033+funfig16@users.noreply.github.com> Date: Tue, 4 Nov 2025 22:56:21 -0500 Subject: [PATCH 25/61] Fix license abbreviation from GLP to GPL --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e62942a..78f9cbc 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ Steps | **Package Name** | `snacktime` | | **Version** | 0.3.0 | | **Author** | Team Solace | -| **License** | GLP 3.0 | +| **License** | GPL 3.0 | | **Language** | Python 3.9+ | | **PyPI Page** | [https://pypi.org/project/snacktime/0.3.0/](https://pypi.org/project/snacktime/0.3.0/) | From ca4f4b9aa570cf0ddf4a6e177274c5c20ee019f2 Mon Sep 17 00:00:00 2001 From: Mico_Mi Date: Tue, 4 Nov 2025 23:11:54 -0500 Subject: [PATCH 26/61] push request --- .github/workflows/pr_test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_test.yaml b/.github/workflows/pr_test.yaml index 3d488ee..b7e5ea5 100644 --- a/.github/workflows/pr_test.yaml +++ b/.github/workflows/pr_test.yaml @@ -1,7 +1,7 @@ name: PR Tests on: pull_request: - types: [opened, synchronize, closed] + types: [opened, synchronize, reopened] push: branches: [pipfile-experiment,readme-update2] From 36b316ab0985f166922e543f268896508439cb5e Mon Sep 17 00:00:00 2001 From: funfig_16 <53211033+funfig16@users.noreply.github.com> Date: Tue, 4 Nov 2025 23:19:44 -0500 Subject: [PATCH 27/61] Update build & test badge link in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 78f9cbc..98de1d6 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Originally created as part of the Software Engineering Fall 2025 team project πŸ”— **Link:** [https://pypi.org/project/snacktime/0.3.0/](https://pypi.org/project/snacktime/0.3.0/) πŸ“¦ **Latest version:** 0.3.0 -πŸ““ **Build & Test:** ![Build & Tests](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=pipfile-experiment) +πŸ““ **Build & Test:** ![Build & Tests](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&event=pull_request) --- From 380abe22516c711e61fdda96c1aea47f3d143ada Mon Sep 17 00:00:00 2001 From: funfig_16 <53211033+funfig16@users.noreply.github.com> Date: Tue, 4 Nov 2025 23:20:16 -0500 Subject: [PATCH 28/61] Fix workflow trigger configuration in PR tests --- .github/workflows/pr_test.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr_test.yaml b/.github/workflows/pr_test.yaml index b7e5ea5..6d9f926 100644 --- a/.github/workflows/pr_test.yaml +++ b/.github/workflows/pr_test.yaml @@ -1,11 +1,10 @@ name: PR Tests -on: +on: + push: + branches: [ pipfile-experiment,readme-update2 ] pull_request: types: [opened, synchronize, reopened] - push: - branches: - [pipfile-experiment,readme-update2] - workflow_dispatch: {} + jobs: From 3bc80300eeef3d6e04f5b9616a5f51bb8d00baa1 Mon Sep 17 00:00:00 2001 From: funfig_16 <53211033+funfig16@users.noreply.github.com> Date: Tue, 4 Nov 2025 23:27:09 -0500 Subject: [PATCH 29/61] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 98de1d6..8d4fc71 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Originally created as part of the Software Engineering Fall 2025 team project πŸ”— **Link:** [https://pypi.org/project/snacktime/0.3.0/](https://pypi.org/project/snacktime/0.3.0/) πŸ“¦ **Latest version:** 0.3.0 -πŸ““ **Build & Test:** ![Build & Tests](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&event=pull_request) +πŸ““ **Build & Test:** ![Build & Tests](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2) --- From 06a58fadeacbbd6db6beefd4ed6b47b2d010703f Mon Sep 17 00:00:00 2001 From: Mico_Mi Date: Tue, 4 Nov 2025 23:27:51 -0500 Subject: [PATCH 30/61] trigger CI for badge From 1069c76d5f7add95536b40600775095eb33bc08d Mon Sep 17 00:00:00 2001 From: funfig_16 <53211033+funfig16@users.noreply.github.com> Date: Tue, 4 Nov 2025 23:28:27 -0500 Subject: [PATCH 31/61] Update Build & Test badge link in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8d4fc71..78f9cbc 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Originally created as part of the Software Engineering Fall 2025 team project πŸ”— **Link:** [https://pypi.org/project/snacktime/0.3.0/](https://pypi.org/project/snacktime/0.3.0/) πŸ“¦ **Latest version:** 0.3.0 -πŸ““ **Build & Test:** ![Build & Tests](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2) +πŸ““ **Build & Test:** ![Build & Tests](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=pipfile-experiment) --- From 3574b203f6fd0ad66a1b3d44ab99fa7a7b053673 Mon Sep 17 00:00:00 2001 From: funfig_16 <53211033+funfig16@users.noreply.github.com> Date: Tue, 4 Nov 2025 23:29:14 -0500 Subject: [PATCH 32/61] Fix CI badge link in README Updated README to include correct CI badge for the 'update-readme2' branch. --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 78f9cbc..2bb821f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# πŸ₯— snacktime +# πŸ₯— snacktime (https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=update-readme2) A lightweight and fun Python package that helps you pick a **random snack**, **vegetable**, **sweet treat**, or even generate a **simple salad recipe**. Originally created as part of the Software Engineering Fall 2025 team project β€” this package demonstrates Python packaging, publishing, and CI automation. @@ -9,8 +9,6 @@ Originally created as part of the Software Engineering Fall 2025 team project πŸ”— **Link:** [https://pypi.org/project/snacktime/0.3.0/](https://pypi.org/project/snacktime/0.3.0/) πŸ“¦ **Latest version:** 0.3.0 -πŸ““ **Build & Test:** ![Build & Tests](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=pipfile-experiment) - --- From 091b5204fb2994e400143ea847eb298e6fd37c68 Mon Sep 17 00:00:00 2001 From: funfig_16 <53211033+funfig16@users.noreply.github.com> Date: Tue, 4 Nov 2025 23:29:39 -0500 Subject: [PATCH 33/61] Revise README formatting and link placement Updated README to improve formatting and link visibility. --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2bb821f..95c34d6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -# πŸ₯— snacktime (https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=update-readme2) +# πŸ₯— snacktime + +(https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=update-readme2) A lightweight and fun Python package that helps you pick a **random snack**, **vegetable**, **sweet treat**, or even generate a **simple salad recipe**. Originally created as part of the Software Engineering Fall 2025 team project β€” this package demonstrates Python packaging, publishing, and CI automation. From 9a756adb8486511f0802c6abd35d511643885edc Mon Sep 17 00:00:00 2001 From: funfig_16 <53211033+funfig16@users.noreply.github.com> Date: Tue, 4 Nov 2025 23:29:53 -0500 Subject: [PATCH 34/61] Update README to include build badge image --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 95c34d6..a5ff6a8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # πŸ₯— snacktime -(https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=update-readme2) +![Build & Tests](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=update-readme2) A lightweight and fun Python package that helps you pick a **random snack**, **vegetable**, **sweet treat**, or even generate a **simple salad recipe**. Originally created as part of the Software Engineering Fall 2025 team project β€” this package demonstrates Python packaging, publishing, and CI automation. From 74939fdb06627ffadaa0a81ec13736ca98e0832f Mon Sep 17 00:00:00 2001 From: Mico_Mi Date: Tue, 4 Nov 2025 23:30:40 -0500 Subject: [PATCH 35/61] CI badge From 9f67b6204252844888ad875f9f3c8f3db5625b70 Mon Sep 17 00:00:00 2001 From: funfig_16 <53211033+funfig16@users.noreply.github.com> Date: Tue, 4 Nov 2025 23:34:47 -0500 Subject: [PATCH 36/61] Update README badge link for CI workflow --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a5ff6a8..5e56703 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # πŸ₯— snacktime -![Build & Tests](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=update-readme2) +![Build & Tests](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2) + A lightweight and fun Python package that helps you pick a **random snack**, **vegetable**, **sweet treat**, or even generate a **simple salad recipe**. Originally created as part of the Software Engineering Fall 2025 team project β€” this package demonstrates Python packaging, publishing, and CI automation. From 32fe3af3e1200bd3cb3440462010b7e15bcc6478 Mon Sep 17 00:00:00 2001 From: funfig_16 <53211033+funfig16@users.noreply.github.com> Date: Wed, 5 Nov 2025 00:10:29 -0500 Subject: [PATCH 37/61] Modify PR test workflow for additional Python versions Updated the GitHub Actions workflow to include Python 3.10 and 3.11 versions for testing. --- .github/workflows/pr_test.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_test.yaml b/.github/workflows/pr_test.yaml index 6d9f926..0227f04 100644 --- a/.github/workflows/pr_test.yaml +++ b/.github/workflows/pr_test.yaml @@ -1,7 +1,7 @@ name: PR Tests on: push: - branches: [ pipfile-experiment,readme-update2 ] + branches: [ pipfile-experiment ] pull_request: types: [opened, synchronize, reopened] @@ -13,7 +13,7 @@ jobs: timeout-minutes: 5 strategy: matrix: - python-version: ["3.9"] + python-version: ["3.9","3.10", "3.11"] steps: - uses: actions/checkout@v4 - name: Install Python, pipenv and Pipfile packages @@ -23,6 +23,7 @@ jobs: - name: Turn on 'editable' mode run: | pipenv install -e . + pipenv install pytest build twine - name: Test with pytest run: | pipenv install pytest From d51becd2203ca34ba118b29cf47ddac7a0e3dcc4 Mon Sep 17 00:00:00 2001 From: funfig_16 <53211033+funfig16@users.noreply.github.com> Date: Wed, 5 Nov 2025 00:13:05 -0500 Subject: [PATCH 38/61] Add Python version badges to README Updated the README to include separate badges for Python versions 3.09, 3.10, and 3.11. --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5e56703..c377a11 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@ # πŸ₯— snacktime -![Build & Tests](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2) +**Build & Tests** +![Python 3.09](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.09) +![Python 3.10](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.10) +![Python 3.11](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.11) + A lightweight and fun Python package that helps you pick a **random snack**, **vegetable**, **sweet treat**, or even generate a **simple salad recipe**. From d064205cd81ead0140358c33238d87d3a5c36d72 Mon Sep 17 00:00:00 2001 From: funfig_16 <53211033+funfig16@users.noreply.github.com> Date: Wed, 5 Nov 2025 00:13:40 -0500 Subject: [PATCH 39/61] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c377a11..3a54c5c 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # πŸ₯— snacktime **Build & Tests** -![Python 3.09](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.09) -![Python 3.10](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.10) -![Python 3.11](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.11) +Python 3.09![Python 3.09](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.09) +Python 3.10 ![Python 3.10](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.10) +Python 3.11 ![Python 3.11](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.11) From 9d0dc7a2a8e861ccfb733885ec652c84403de255 Mon Sep 17 00:00:00 2001 From: funfig_16 <53211033+funfig16@users.noreply.github.com> Date: Wed, 5 Nov 2025 00:13:46 -0500 Subject: [PATCH 40/61] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3a54c5c..a5fe72d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # πŸ₯— snacktime -**Build & Tests** +**Build & Tests** Python 3.09![Python 3.09](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.09) Python 3.10 ![Python 3.10](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.10) Python 3.11 ![Python 3.11](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.11) From b4dbcca028301e2262ce5aa86186a6565f4b271a Mon Sep 17 00:00:00 2001 From: funfig_16 <53211033+funfig16@users.noreply.github.com> Date: Wed, 5 Nov 2025 00:14:06 -0500 Subject: [PATCH 41/61] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a5fe72d..8f818d0 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # πŸ₯— snacktime **Build & Tests** -Python 3.09![Python 3.09](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.09) -Python 3.10 ![Python 3.10](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.10) -Python 3.11 ![Python 3.11](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.11) +Python 3.09 ![Python 3.09](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.09) +Python 3.10 ![Python 3.10](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.10) +Python 3.11 ![Python 3.11](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.11) From 121cf05ff2f983b299969f4ce39b019c7eb61ff2 Mon Sep 17 00:00:00 2001 From: funfig_16 <53211033+funfig16@users.noreply.github.com> Date: Wed, 5 Nov 2025 00:14:20 -0500 Subject: [PATCH 42/61] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8f818d0..ba7d16c 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ **Build & Tests** Python 3.09 ![Python 3.09](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.09) -Python 3.10 ![Python 3.10](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.10) -Python 3.11 ![Python 3.11](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.11) +Python 3.10 ![Python 3.10](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.10) +Python 3.11 ![Python 3.11](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.11) From ad801bbe0c0600e9354e1fc435409f43508bc238 Mon Sep 17 00:00:00 2001 From: funfig_16 <53211033+funfig16@users.noreply.github.com> Date: Wed, 5 Nov 2025 00:15:48 -0500 Subject: [PATCH 43/61] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ba7d16c..8c11d11 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # πŸ₯— snacktime **Build & Tests** -Python 3.09 ![Python 3.09](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.09) + Python 3.09 ![Python 3.09](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.09) Python 3.10 ![Python 3.10](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.10) Python 3.11 ![Python 3.11](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.11) From b0559263397fa7a12b485e6229f3d0c047e69715 Mon Sep 17 00:00:00 2001 From: funfig_16 <53211033+funfig16@users.noreply.github.com> Date: Wed, 5 Nov 2025 00:16:07 -0500 Subject: [PATCH 44/61] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8c11d11..23812eb 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # πŸ₯— snacktime **Build & Tests** - Python 3.09 ![Python 3.09](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.09) +Python 3.09![Python 3.09](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.09) Python 3.10 ![Python 3.10](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.10) Python 3.11 ![Python 3.11](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.11) From 7643a8cfa2ce878b2fc2d53d712cfa66c0e6fcb5 Mon Sep 17 00:00:00 2001 From: funfig_16 <53211033+funfig16@users.noreply.github.com> Date: Wed, 5 Nov 2025 00:16:15 -0500 Subject: [PATCH 45/61] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 23812eb..e125b44 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # πŸ₯— snacktime **Build & Tests** -Python 3.09![Python 3.09](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.09) +Python 3.09![Python 3.09](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.09) Python 3.10 ![Python 3.10](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.10) Python 3.11 ![Python 3.11](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.11) From 08857ae2bc2be248f31584cc1e9f97c8c2c99dc0 Mon Sep 17 00:00:00 2001 From: funfig_16 <53211033+funfig16@users.noreply.github.com> Date: Wed, 5 Nov 2025 00:16:27 -0500 Subject: [PATCH 46/61] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e125b44..ba7d16c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # πŸ₯— snacktime **Build & Tests** -Python 3.09![Python 3.09](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.09) +Python 3.09 ![Python 3.09](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.09) Python 3.10 ![Python 3.10](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.10) Python 3.11 ![Python 3.11](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.11) From 6875886de290654920229e4a44861f3bead0d7fd Mon Sep 17 00:00:00 2001 From: funfig_16 <53211033+funfig16@users.noreply.github.com> Date: Wed, 5 Nov 2025 00:17:34 -0500 Subject: [PATCH 47/61] Update pr_test.yaml --- .github/workflows/pr_test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_test.yaml b/.github/workflows/pr_test.yaml index 6d9f926..866d0fb 100644 --- a/.github/workflows/pr_test.yaml +++ b/.github/workflows/pr_test.yaml @@ -13,7 +13,7 @@ jobs: timeout-minutes: 5 strategy: matrix: - python-version: ["3.9"] + python-version: ["3.9","3.10","3.11"] steps: - uses: actions/checkout@v4 - name: Install Python, pipenv and Pipfile packages From b0058e45fc49163e5512cf03caad675663949f8f Mon Sep 17 00:00:00 2001 From: funfig_16 <53211033+funfig16@users.noreply.github.com> Date: Wed, 5 Nov 2025 00:30:50 -0500 Subject: [PATCH 48/61] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ba7d16c..194f78e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # πŸ₯— snacktime **Build & Tests** -Python 3.09 ![Python 3.09](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.09) +Python 3.09 ![Python 3.09](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=pipfile-experiment2&label=Python%203.09) Python 3.10 ![Python 3.10](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.10) Python 3.11 ![Python 3.11](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.11) From bb6a8c8ba1782c800657a408b125be9f51b1280c Mon Sep 17 00:00:00 2001 From: funfig_16 <53211033+funfig16@users.noreply.github.com> Date: Wed, 5 Nov 2025 00:31:02 -0500 Subject: [PATCH 49/61] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 194f78e..397865b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # πŸ₯— snacktime **Build & Tests** -Python 3.09 ![Python 3.09](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=pipfile-experiment2&label=Python%203.09) +Python 3.09 ![Python 3.09](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=pipfile-experiment&label=Python%203.09) Python 3.10 ![Python 3.10](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.10) Python 3.11 ![Python 3.11](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.11) From dc82acbd7acfceffa100901f96b7e0a1179dce70 Mon Sep 17 00:00:00 2001 From: Mico_Mi Date: Wed, 5 Nov 2025 00:43:33 -0500 Subject: [PATCH 50/61] github repo link update --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 397865b..83dda39 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ Steps ## πŸ‘₯ Team Solace -- **Member**: funfigwat, qiexian-mf, ems9856-lgtm, hanqigui, jawarbx +- **Member**: [funfigwat](https://github.com/funfig16), [qiexian-mf](https://github.com/qiexian-mf), [ems9856-lgtm](https://github.com/ems9856-lgtm), [hanqigui](https://github.com/hanqigui), [jawarbx](https://github.com/jawarbx) --- From 829ce4d6886d6c3d5b7084b124b7e1e5ffee79c4 Mon Sep 17 00:00:00 2001 From: jawarbx Date: Wed, 5 Nov 2025 01:35:44 -0500 Subject: [PATCH 51/61] Added delivery job to workflow and updated minimum python version to be 3.9 --- .github/workflows/pr_test.yaml | 26 ++++++++++++++++++++++---- Pipfile | 2 +- ci.yml | 31 ------------------------------- 3 files changed, 23 insertions(+), 36 deletions(-) delete mode 100644 ci.yml diff --git a/.github/workflows/pr_test.yaml b/.github/workflows/pr_test.yaml index 866d0fb..f913ca1 100644 --- a/.github/workflows/pr_test.yaml +++ b/.github/workflows/pr_test.yaml @@ -1,12 +1,12 @@ -name: PR Tests +name: Tests on: push: - branches: [ pipfile-experiment,readme-update2 ] + branches: [pipfile-experiment] + tag: ['*'] pull_request: + branches: [pipfile-experiment] types: [opened, synchronize, reopened] - - jobs: build: runs-on: ubuntu-latest @@ -28,3 +28,21 @@ jobs: pipenv install pytest pipenv --venv pipenv run python -m pytest + deliver: + if: github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/') + needs: [build] + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - uses: actions/checkout@v4 + - name: Install Python, pipenv and Pipfile packages + uses: kojoru/prepare-pipenv@v1 + - name: Build package + run: | + pipenv install build + pipenv run python -m build . + - name: Publish to PyPI test server + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }} + repository-url: https://test.pypi.org/legacy/ diff --git a/Pipfile b/Pipfile index 6d47a21..2fe7f57 100644 --- a/Pipfile +++ b/Pipfile @@ -11,7 +11,7 @@ build = "*" twine = "*" [requires] -python_version = "3.12" +python_version = "3.9" [scripts] snacktime = "python -m snacktime" diff --git a/ci.yml b/ci.yml deleted file mode 100644 index 8340bfd..0000000 --- a/ci.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: CI - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - test: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: [ "3.10", "3.12" ] - - steps: - - name: Check out repo - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Install package and test deps - run: | - python -m pip install --upgrade pip - pip install -e . pytest - - - name: Run tests - run: pytest -q From 815a859e4f72cf18761cff16e5464d89567ad58d Mon Sep 17 00:00:00 2001 From: jawarbx Date: Wed, 5 Nov 2025 02:11:10 -0500 Subject: [PATCH 52/61] Typo fix to delivery workflow --- .github/workflows/pr_test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_test.yaml b/.github/workflows/pr_test.yaml index f913ca1..8b6fad2 100644 --- a/.github/workflows/pr_test.yaml +++ b/.github/workflows/pr_test.yaml @@ -2,10 +2,10 @@ name: Tests on: push: branches: [pipfile-experiment] - tag: ['*'] + tags: ['*'] pull_request: branches: [pipfile-experiment] - types: [opened, synchronize, reopened] + types: [opened, synchronize, reopened, closed] jobs: build: From 385795af64648e23bc6746f8e5cbfbcc13c47aa4 Mon Sep 17 00:00:00 2001 From: Mico_Mi Date: Wed, 5 Nov 2025 10:00:59 -0500 Subject: [PATCH 53/61] tests added --- tests/test_membership_list.py | 9 +++++++++ tests/test_module_metadata.py | 12 ++++++++++++ tests/test_public_seed_errors.py | 12 ++++++++++++ tests/test_recipe_invalid_inputs.py | 12 ++++++++++++ tests/test_recipe_output_format.py | 12 ++++++++++++ tests/test_recipe_whitespace_capital.py | 14 ++++++++++++++ tests/test_seed_validation.py | 22 ++++++++++++++++++++++ 7 files changed, 93 insertions(+) create mode 100644 tests/test_membership_list.py create mode 100644 tests/test_module_metadata.py create mode 100644 tests/test_public_seed_errors.py create mode 100644 tests/test_recipe_invalid_inputs.py create mode 100644 tests/test_recipe_output_format.py create mode 100644 tests/test_recipe_whitespace_capital.py create mode 100644 tests/test_seed_validation.py diff --git a/tests/test_membership_list.py b/tests/test_membership_list.py new file mode 100644 index 0000000..6901c9d --- /dev/null +++ b/tests/test_membership_list.py @@ -0,0 +1,9 @@ +from snacktime.core import _SNACKS, _VEGETABLES, _TREATS +from snacktime import random_snack, random_vegetable, random_treat + +def test_random_outputs_are_from_defined_sets(): + assert random_snack(seed=3) in _SNACKS + assert random_vegetable(seed=4) in _VEGETABLES + assert random_treat(seed=5) in _TREATS + +#ensure pulled froom list created \ No newline at end of file diff --git a/tests/test_module_metadata.py b/tests/test_module_metadata.py new file mode 100644 index 0000000..a243676 --- /dev/null +++ b/tests/test_module_metadata.py @@ -0,0 +1,12 @@ +import re +import snacktime + +def test_version_semver_like(): + assert isinstance(snacktime.__version__, str) + assert re.match(r"^\d+\.\d+\.\d+$", snacktime.__version__) + +def test_all_exports(): + for name in ["random_snack", "random_vegetable", "random_treat", "recipe_salad"]: + assert name in snacktime.__all__ + +#semantic version expected \ No newline at end of file diff --git a/tests/test_public_seed_errors.py b/tests/test_public_seed_errors.py new file mode 100644 index 0000000..0181229 --- /dev/null +++ b/tests/test_public_seed_errors.py @@ -0,0 +1,12 @@ +import pytest +from snacktime import random_snack, random_vegetable, random_treat + +BAD_SEEDS = [True, False, 3.14, "1", object()] + +@pytest.mark.parametrize("func", [random_snack, random_vegetable, random_treat]) +@pytest.mark.parametrize("bad", BAD_SEEDS) +def test_public_random_functions_reject_bad_seed(func, bad): + with pytest.raises(TypeError): + func(seed=bad) + +#raise TypeError if non-int/non-None seed \ No newline at end of file diff --git a/tests/test_recipe_invalid_inputs.py b/tests/test_recipe_invalid_inputs.py new file mode 100644 index 0000000..98a0c30 --- /dev/null +++ b/tests/test_recipe_invalid_inputs.py @@ -0,0 +1,12 @@ +import pytest +from snacktime import recipe_salad + +def test_recipe_invalid_serves_raises_valueerror(): + with pytest.raises(ValueError): + recipe_salad(serves=0, dressing="lemon") + +def test_recipe_invalid_dressing_raises_valueerror(): + with pytest.raises(ValueError): + recipe_salad(serves=1, dressing="ranch") + +#reject invalid input values \ No newline at end of file diff --git a/tests/test_recipe_output_format.py b/tests/test_recipe_output_format.py new file mode 100644 index 0000000..c880b97 --- /dev/null +++ b/tests/test_recipe_output_format.py @@ -0,0 +1,12 @@ +from snacktime import recipe_salad + +def test_recipe_has_sections_and_trailing_newline(): + out = recipe_salad(serves=1, dressing="lemon") + assert "Simple Green Salad" in out + assert "Ingredients" in out and "Steps" in out + assert out.endswith("\n"), "Expect trailing newline for nice CLI printing" + for n in ("1)", "2)", "3)"): + assert n in out + + +#ensure formatted & readable recipe \ No newline at end of file diff --git a/tests/test_recipe_whitespace_capital.py b/tests/test_recipe_whitespace_capital.py new file mode 100644 index 0000000..e7f87a0 --- /dev/null +++ b/tests/test_recipe_whitespace_capital.py @@ -0,0 +1,14 @@ +import pytest +from snacktime import recipe_salad + +@pytest.mark.parametrize("txt,expected", [ + ("LEMON", "lemon"), + (" Lemon ", "lemon"), + ("bAlSaMiC", "balsamic"), + (" olive", "olive"), +]) +def test_dressing_accepts_case_and_whitespace(txt, expected): + out = recipe_salad(serves=2, dressing=txt) + assert expected in out.lower() + +#case insensitive \ No newline at end of file diff --git a/tests/test_seed_validation.py b/tests/test_seed_validation.py new file mode 100644 index 0000000..a4e1ea2 --- /dev/null +++ b/tests/test_seed_validation.py @@ -0,0 +1,22 @@ +import pytest +from snacktime.core import _normalize_seed +from snacktime import recipe_salad + +def test_seed_accepts_int_and_none(): + assert _normalize_seed(42) == 42 + assert _normalize_seed(None) is None + +@pytest.mark.parametrize("bad", [True, False, 3.14, "7", object()]) +def test_seed_rejects_others(bad): + with pytest.raises(TypeError): + _normalize_seed(bad) + +@pytest.mark.parametrize("n", [1, 2, 4]) +def test_recipe_quantities_scale(n): + out = recipe_salad(serves=n, dressing="lemon") + assert f"Serves: {n}" in out + assert f"- {2*n} cups mixed greens" in out + assert f"- {n} cup chopped vegetables" in out + assert f"- {2*n} tbsp nuts or seeds" in out + +#ormalize_seed should accept int/None & other types raise typeError; recpite quantiity follows serve argument \ No newline at end of file From b2307855c33ec964c36bb2132d365f08d7d9e204 Mon Sep 17 00:00:00 2001 From: funfig_16 <53211033+funfig16@users.noreply.github.com> Date: Wed, 5 Nov 2025 10:03:56 -0500 Subject: [PATCH 54/61] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 83dda39..2294d0b 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ **Build & Tests** Python 3.09 ![Python 3.09](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=pipfile-experiment&label=Python%203.09) -Python 3.10 ![Python 3.10](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.10) -Python 3.11 ![Python 3.11](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=readme-update2&label=Python%203.11) +Python 3.10 ![Python 3.10](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=pipfile-experiment&label=Python%203.10) +Python 3.11 ![Python 3.11](https://github.com/swe-students-fall2025/3-python-package-team_solace/actions/workflows/pr_test.yaml/badge.svg?branch=pipfile-experiment&label=Python%203.11) From c8ccb618a03f7a0a9e7701ca94bbfd6e4102d3a2 Mon Sep 17 00:00:00 2001 From: qiexian-mf Date: Wed, 5 Nov 2025 11:47:03 -0500 Subject: [PATCH 55/61] Update README.md Added project link, and PyPI installation instructions. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2294d0b..d42b0fe 100644 --- a/README.md +++ b/README.md @@ -118,4 +118,4 @@ This project demonstrates collaboration, testing, automation, and packaging best --- -**Enjoy your snacks and code responsibly! πŸͺπŸ₯—πŸ«** +**Enjoy your snacks and code responsibly,thank you! πŸͺπŸ₯—πŸ«** From 4f98b994754c311280816ab0d04e74514a69db32 Mon Sep 17 00:00:00 2001 From: jawarbx Date: Wed, 5 Nov 2025 12:11:11 -0500 Subject: [PATCH 56/61] Fixed build upload and updated metadata --- .github/workflows/pr_test.yaml | 2 +- pyproject.toml | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_test.yaml b/.github/workflows/pr_test.yaml index 8b6fad2..86e8ff9 100644 --- a/.github/workflows/pr_test.yaml +++ b/.github/workflows/pr_test.yaml @@ -45,4 +45,4 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.PYPI_API_TOKEN }} - repository-url: https://test.pypi.org/legacy/ + repository-url: https://pypi.org/ diff --git a/pyproject.toml b/pyproject.toml index 3dbe178..4824196 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,8 +4,16 @@ build-backend = "setuptools.build_meta" [project] name = "snacktime" -version = "0.2.0" +version = "0.4.0" description = "CLI that gives a random snack, a simple salad recipe, a random vegetable, or a sweet treat." +authors = [ + {name="Ezra Shapiro", email="ems9856@nyu.edu"}, + {name="Athena Luo", email="xl3785@nyu.edu"}, + {name="Jasir Nawar", email="jn2691@nyu.edu"}, + {name="Hanqi Gui", email="hg2542@nyu.edu"}, + {name="Kaiyuan Wu", email="wkyklmf@gmail.com"} +] +license = { file = "LICENSE" } readme = "README.md" requires-python = ">=3.9" @@ -15,6 +23,11 @@ snacktime = "snacktime.__main__:main" [project.optional-dependencies] dev = ['pytest'] +[project.urls] +"Homepage" = "https://github.com/swe-students-fall2025/3-python-package-team_solace" +"Repository" = "https://github.com/swe-students-fall2025/3-python-package-team_solace.git" +"Bug Tracker" = "https://github.com/swe-students-fall2025/3-python-package-team_solace/issues" + [tool.setuptools.packages.find] where = ["."] include = ["snacktime*"] From d310a800c0bd06ba311944d335328afa2f34e224 Mon Sep 17 00:00:00 2001 From: jawarbx Date: Wed, 5 Nov 2025 12:20:46 -0500 Subject: [PATCH 57/61] Updated url for workflow again --- .github/workflows/pr_test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_test.yaml b/.github/workflows/pr_test.yaml index 86e8ff9..c182a80 100644 --- a/.github/workflows/pr_test.yaml +++ b/.github/workflows/pr_test.yaml @@ -45,4 +45,4 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.PYPI_API_TOKEN }} - repository-url: https://pypi.org/ + repository-url: https://upload.pypi.org/legacy/ From 130abab90db6403608f80fac3bed6a1ad49bac27 Mon Sep 17 00:00:00 2001 From: jawarbx Date: Wed, 5 Nov 2025 12:50:07 -0500 Subject: [PATCH 58/61] Updated metadata and README links --- README.md | 10 ++++------ pyproject.toml | 13 +++++++++++-- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index d42b0fe..956d8bd 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,7 @@ Originally created as part of the Software Engineering Fall 2025 team project ## πŸ“¦ PyPI Project -πŸ”— **Link:** [https://pypi.org/project/snacktime/0.3.0/](https://pypi.org/project/snacktime/0.3.0/) -πŸ“¦ **Latest version:** 0.3.0 +πŸ”— **Link:** [https://pypi.org/project/snacktime/](https://pypi.org/project/snacktime/) --- @@ -24,7 +23,7 @@ Originally created as part of the Software Engineering Fall 2025 team project You can install directly from PyPI using pip: ```bash -pip install snacktime==0.3.0 +pip install snacktime ``` --- @@ -88,7 +87,7 @@ Steps ## 🧠 Notes -- Tested with **Python 3.9+** on macOS. +- Tested with **Python 3.9+** on macOS and Linux. - All random functions can be made deterministic with a `seed` argument. ```python snacktime.random_snack(seed=42) @@ -102,11 +101,10 @@ Steps | Field | Description | |-------|-------------| | **Package Name** | `snacktime` | -| **Version** | 0.3.0 | | **Author** | Team Solace | | **License** | GPL 3.0 | | **Language** | Python 3.9+ | -| **PyPI Page** | [https://pypi.org/project/snacktime/0.3.0/](https://pypi.org/project/snacktime/0.3.0/) | +| **PyPI Page** | [https://pypi.org/project/snacktime/](https://pypi.org/project/snacktime/) --- diff --git a/pyproject.toml b/pyproject.toml index 4824196..539e507 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,15 +4,24 @@ build-backend = "setuptools.build_meta" [project] name = "snacktime" -version = "0.4.0" +version = "0.5.0" description = "CLI that gives a random snack, a simple salad recipe, a random vegetable, or a sweet treat." authors = [ {name="Ezra Shapiro", email="ems9856@nyu.edu"}, - {name="Athena Luo", email="xl3785@nyu.edu"}, + {name="Athena Luo", email="athenaluoxy@gmail.com"}, {name="Jasir Nawar", email="jn2691@nyu.edu"}, {name="Hanqi Gui", email="hg2542@nyu.edu"}, {name="Kaiyuan Wu", email="wkyklmf@gmail.com"} ] + +maintainers = [ + {name="Ezra Shapiro", email="ems9856@nyu.edu"}, + {name="Athena Luo", email="athenaluoxy@gmail.com"}, + {name="Jasir Nawar", email="jn2691@nyu.edu"}, + {name="Hanqi Gui", email="hg2542@nyu.edu"}, + {name="Kaiyuan Wu", email="wkyklmf@gmail.com"} +] + license = { file = "LICENSE" } readme = "README.md" requires-python = ">=3.9" From d680ceefbb8bb70d2ca849bd8343bc5894dc4047 Mon Sep 17 00:00:00 2001 From: jawarbx Date: Wed, 5 Nov 2025 21:07:36 -0500 Subject: [PATCH 59/61] Readded files from original forked repo --- .github/workflows/Pipfile | 15 +++ .github/workflows/Pipfile.lock | 184 +++++++++++++++++++++++++++++ .github/workflows/event-logger.yml | 54 +++++++++ .github/workflows/requirements.txt | 10 ++ 4 files changed, 263 insertions(+) create mode 100644 .github/workflows/Pipfile create mode 100644 .github/workflows/Pipfile.lock create mode 100644 .github/workflows/event-logger.yml create mode 100644 .github/workflows/requirements.txt diff --git a/.github/workflows/Pipfile b/.github/workflows/Pipfile new file mode 100644 index 0000000..f5d05e5 --- /dev/null +++ b/.github/workflows/Pipfile @@ -0,0 +1,15 @@ +[[source]] +url = "https://pypi.org/simple" +verify_ssl = true +name = "pypi" + +[packages] +gitcommitlogger = "*" +requests = "*" +pytz = "*" +python-dateutil = "*" + +[dev-packages] + +[requires] +python_version = "3" diff --git a/.github/workflows/Pipfile.lock b/.github/workflows/Pipfile.lock new file mode 100644 index 0000000..d1e37b9 --- /dev/null +++ b/.github/workflows/Pipfile.lock @@ -0,0 +1,184 @@ +{ + "_meta": { + "hash": { + "sha256": "688050f13174cb5c5295b49799f3603a60d03b27fadcc1c63d8ce8b0ae632293" + }, + "pipfile-spec": 6, + "requires": { + "python_version": "3" + }, + "sources": [ + { + "name": "pypi", + "url": "https://pypi.org/simple", + "verify_ssl": true + } + ] + }, + "default": { + "certifi": { + "hashes": [ + "sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f", + "sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1" + ], + "markers": "python_version >= '3.6'", + "version": "==2024.2.2" + }, + "charset-normalizer": { + "hashes": [ + "sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027", + "sha256:06a81e93cd441c56a9b65d8e1d043daeb97a3d0856d177d5c90ba85acb3db087", + "sha256:0a55554a2fa0d408816b3b5cedf0045f4b8e1a6065aec45849de2d6f3f8e9786", + "sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8", + "sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09", + "sha256:122c7fa62b130ed55f8f285bfd56d5f4b4a5b503609d181f9ad85e55c89f4185", + "sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574", + "sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e", + "sha256:1f79682fbe303db92bc2b1136016a38a42e835d932bab5b3b1bfcfbf0640e519", + "sha256:2127566c664442652f024c837091890cb1942c30937add288223dc895793f898", + "sha256:22afcb9f253dac0696b5a4be4a1c0f8762f8239e21b99680099abd9b2b1b2269", + "sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3", + "sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f", + "sha256:3287761bc4ee9e33561a7e058c72ac0938c4f57fe49a09eae428fd88aafe7bb6", + "sha256:34d1c8da1e78d2e001f363791c98a272bb734000fcef47a491c1e3b0505657a8", + "sha256:37e55c8e51c236f95b033f6fb391d7d7970ba5fe7ff453dad675e88cf303377a", + "sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73", + "sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc", + "sha256:42cb296636fcc8b0644486d15c12376cb9fa75443e00fb25de0b8602e64c1714", + "sha256:45485e01ff4d3630ec0d9617310448a8702f70e9c01906b0d0118bdf9d124cf2", + "sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc", + "sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce", + "sha256:4d0d1650369165a14e14e1e47b372cfcb31d6ab44e6e33cb2d4e57265290044d", + "sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e", + "sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6", + "sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269", + "sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96", + "sha256:5b4c145409bef602a690e7cfad0a15a55c13320ff7a3ad7ca59c13bb8ba4d45d", + "sha256:6463effa3186ea09411d50efc7d85360b38d5f09b870c48e4600f63af490e56a", + "sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4", + "sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77", + "sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d", + "sha256:68d1f8a9e9e37c1223b656399be5d6b448dea850bed7d0f87a8311f1ff3dabb0", + "sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed", + "sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068", + "sha256:6c4caeef8fa63d06bd437cd4bdcf3ffefe6738fb1b25951440d80dc7df8c03ac", + "sha256:6ef1d82a3af9d3eecdba2321dc1b3c238245d890843e040e41e470ffa64c3e25", + "sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8", + "sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab", + "sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26", + "sha256:7f04c839ed0b6b98b1a7501a002144b76c18fb1c1850c8b98d458ac269e26ed2", + "sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db", + "sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f", + "sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5", + "sha256:86216b5cee4b06df986d214f664305142d9c76df9b6512be2738aa72a2048f99", + "sha256:87d1351268731db79e0f8e745d92493ee2841c974128ef629dc518b937d9194c", + "sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d", + "sha256:8c622a5fe39a48f78944a87d4fb8a53ee07344641b0562c540d840748571b811", + "sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa", + "sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a", + "sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03", + "sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b", + "sha256:923c0c831b7cfcb071580d3f46c4baf50f174be571576556269530f4bbd79d04", + "sha256:95f2a5796329323b8f0512e09dbb7a1860c46a39da62ecb2324f116fa8fdc85c", + "sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001", + "sha256:9f96df6923e21816da7e0ad3fd47dd8f94b2a5ce594e00677c0013018b813458", + "sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389", + "sha256:a50aebfa173e157099939b17f18600f72f84eed3049e743b68ad15bd69b6bf99", + "sha256:a981a536974bbc7a512cf44ed14938cf01030a99e9b3a06dd59578882f06f985", + "sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537", + "sha256:ae5f4161f18c61806f411a13b0310bea87f987c7d2ecdbdaad0e94eb2e404238", + "sha256:aed38f6e4fb3f5d6bf81bfa990a07806be9d83cf7bacef998ab1a9bd660a581f", + "sha256:b01b88d45a6fcb69667cd6d2f7a9aeb4bf53760d7fc536bf679ec94fe9f3ff3d", + "sha256:b261ccdec7821281dade748d088bb6e9b69e6d15b30652b74cbbac25e280b796", + "sha256:b2b0a0c0517616b6869869f8c581d4eb2dd83a4d79e0ebcb7d373ef9956aeb0a", + "sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143", + "sha256:bd8f7df7d12c2db9fab40bdd87a7c09b1530128315d047a086fa3ae3435cb3a8", + "sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c", + "sha256:c002b4ffc0be611f0d9da932eb0f704fe2602a9a949d1f738e4c34c75b0863d5", + "sha256:c083af607d2515612056a31f0a8d9e0fcb5876b7bfc0abad3ecd275bc4ebc2d5", + "sha256:c180f51afb394e165eafe4ac2936a14bee3eb10debc9d9e4db8958fe36afe711", + "sha256:c235ebd9baae02f1b77bcea61bce332cb4331dc3617d254df3323aa01ab47bd4", + "sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6", + "sha256:d0eccceffcb53201b5bfebb52600a5fb483a20b61da9dbc885f8b103cbe7598c", + "sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7", + "sha256:db364eca23f876da6f9e16c9da0df51aa4f104a972735574842618b8c6d999d4", + "sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b", + "sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae", + "sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12", + "sha256:e27ad930a842b4c5eb8ac0016b0a54f5aebbe679340c26101df33424142c143c", + "sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae", + "sha256:eb00ed941194665c332bf8e078baf037d6c35d7c4f3102ea2d4f16ca94a26dc8", + "sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887", + "sha256:eb8821e09e916165e160797a6c17edda0679379a4be5c716c260e836e122f54b", + "sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4", + "sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f", + "sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5", + "sha256:fb69256e180cb6c8a894fee62b3afebae785babc1ee98b81cdf68bbca1987f33", + "sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519", + "sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561" + ], + "markers": "python_full_version >= '3.7.0'", + "version": "==3.3.2" + }, + "gitcommitlogger": { + "hashes": [ + "sha256:3badf5db541d81cc3473882d9d255dabc66cd413e780ccb4fe6b320afddedcd0", + "sha256:7bafd58d46441b8c01b0f5706e7242df0ff841b3f87a7f621979577758546869" + ], + "index": "pypi", + "markers": "python_version >= '3.7'", + "version": "==1.2.5" + }, + "idna": { + "hashes": [ + "sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca", + "sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f" + ], + "markers": "python_version >= '3.5'", + "version": "==3.6" + }, + "python-dateutil": { + "hashes": [ + "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3", + "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427" + ], + "index": "pypi", + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==2.9.0.post0" + }, + "pytz": { + "hashes": [ + "sha256:2a29735ea9c18baf14b448846bde5a48030ed267578472d8955cd0e7443a9812", + "sha256:328171f4e3623139da4983451950b28e95ac706e13f3f2630a879749e7a8b319" + ], + "index": "pypi", + "version": "==2024.1" + }, + "requests": { + "hashes": [ + "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f", + "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1" + ], + "index": "pypi", + "markers": "python_version >= '3.7'", + "version": "==2.31.0" + }, + "six": { + "hashes": [ + "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926", + "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==1.16.0" + }, + "urllib3": { + "hashes": [ + "sha256:450b20ec296a467077128bff42b73080516e71b56ff59a60a02bef2232c4fa9d", + "sha256:d0570876c61ab9e520d776c38acbbb5b05a776d3f9ff98a5c8fd5162a444cf19" + ], + "markers": "python_version >= '3.8'", + "version": "==2.2.1" + } + }, + "develop": {} +} diff --git a/.github/workflows/event-logger.yml b/.github/workflows/event-logger.yml new file mode 100644 index 0000000..31f231e --- /dev/null +++ b/.github/workflows/event-logger.yml @@ -0,0 +1,54 @@ +name: log github events +on: + push: + branches: [main, master, pipfile-experiment] + pull_request: + types: [opened, closed] + branches: [main, master, pipfile-experiment] +jobs: + log: + runs-on: ubuntu-latest + env: + PIPENV_PIPFILE: .github/workflows/Pipfile # so this script doesn't use the Pipfile in the root directory + COMMIT_LOG_API: ${{ secrets.COMMIT_LOG_API }} + GITHUB_LOGIN: ${{ github.actor }} # github login also available in github.triggering_actor, github.event.sender.login + COMMITS: ${{ toJSON(github.event.commits) }} + REPOSITORY_URL: ${{ github.repositoryUrl }} + EVENT_TYPE: ${{ github.event_name }} + EVENT_ACTION: ${{ github.event.action }} + PR_MERGED: ${{ github.event.pull_request.merged }} + PR_CREATED_AT: ${{ github.event.pull_request.created_at}} + PR_CLOSED_AT: ${{ github.event.pull_request.closed_at}} + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 # this is important so git fetches all history.. the actions/checkout by default fetches all history as one commit which throws off stats + - uses: actions/setup-python@v3 + with: + python-version: "^3.9" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install --user pipenv + pipenv --python $(which python) + pipenv install + - name: Log pull request opened + if: github.event_name == 'pull_request' && github.event.action == 'opened' + run: | + pipenv run gitcommitlogger -r $(echo $REPOSITORY_URL) -t pull_request_opened -d $(echo $PR_CREATED_AT) -un $(echo $GITHUB_LOGIN) -o commit_stats.csv -u $(echo $COMMIT_LOG_API) -v + - name: Log pull request closed and merged + if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true + run: | + echo $COMMITS > commits.json + cat commits.json # debugging + pipenv run gitcommitlogger -r $(echo $REPOSITORY_URL) -t pull_request_merged -d $(echo $PR_CLOSED_AT) -un $(echo $GITHUB_LOGIN) -i commits.json -o commit_stats.csv -u $(echo $COMMIT_LOG_API) -v + - name: Log pull request closed without merge + if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == false + run: | + pipenv run gitcommitlogger -r $(echo $REPOSITORY_URL) -t pull_request_closed -d $(echo $PR_CLOSED_AT) -un $(echo $GITHUB_LOGIN) -o commit_stats.csv -u $(echo $COMMIT_LOG_API) -v + - name: Log push + if: github.event_name == 'push' + run: | + echo $COMMITS > commits.json + cat commits.json # debugging + pipenv run gitcommitlogger -r $(echo $REPOSITORY_URL) -t $(echo $EVENT_TYPE) -i commits.json -o commit_stats.csv -u $(echo $COMMIT_LOG_API) -v diff --git a/.github/workflows/requirements.txt b/.github/workflows/requirements.txt new file mode 100644 index 0000000..d055863 --- /dev/null +++ b/.github/workflows/requirements.txt @@ -0,0 +1,10 @@ +-i https://pypi.org/simple +certifi==2024.2.2; python_version >= '3.6' +charset-normalizer==3.3.2; python_full_version >= '3.7.0' +gitcommitlogger==1.2.5; python_version >= '3.7' +idna==3.6; python_version >= '3.5' +python-dateutil==2.9.0.post0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' +pytz==2024.1 +requests==2.31.0; python_version >= '3.7' +six==1.16.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' +urllib3==2.2.1; python_version >= '3.8' From 7fed67db7b6b8d2375f07d8d23875dad60fd630b Mon Sep 17 00:00:00 2001 From: jawarbx Date: Wed, 5 Nov 2025 21:26:05 -0500 Subject: [PATCH 60/61] Added command line instructions --- README.md | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 956d8bd..5f2f11a 100644 --- a/README.md +++ b/README.md @@ -41,11 +41,9 @@ print(snacktime.random_treat()) print(snacktime.recipe_salad(serves=2, dressing="balsamic")) ``` ---- - -## 🧾 Example Output +### 🧾 Example Output -``` +```bash granola bar spinach cupcake @@ -68,6 +66,37 @@ Steps 3) Sprinkle nuts/seeds. Season with salt & pepper. Toss and serve. ``` + +Or, if preferred, snacktime can be called from the command line once installed: +```bash +$ pipenv run snacktime snack +pretzels +$ pipenv run snacktime treat +churro +$ pipenv run snacktime vegetable +spinach +$ pipenv run snacktime recipe +Simple Green Salad +Serves: 2 + +Ingredients +---------- +- 4 cups mixed greens +- 2 cup chopped vegetables (e.g., cucumber, tomato, carrot) +- 4 tbsp nuts or seeds (optional) +- Salt & pepper to taste +- Dressing: 4 tbsp olive oil, 2 tbsp balsamic vinegar, pinch of salt + +Steps +----- +1) Toss greens and chopped veggies in a bowl. +2) Whisk dressing separately, then drizzle over salad. +3) Sprinkle nuts/seeds. Season with salt & pepper. Toss and serve. +``` + +Make sure not to snack too much! + + --- ## ✨ Features From e121ec1a1fd9c4b807901033d41b2c1e894a0d6d Mon Sep 17 00:00:00 2001 From: jawarbx Date: Wed, 5 Nov 2025 21:41:59 -0500 Subject: [PATCH 61/61] Updated metadata --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 539e507..3555958 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "snacktime" -version = "0.5.0" +version = "0.5.1" description = "CLI that gives a random snack, a simple salad recipe, a random vegetable, or a sweet treat." authors = [ {name="Ezra Shapiro", email="ems9856@nyu.edu"},