diff --git a/.flake8 b/.flake8 index f2b41384..71bc7c21 100644 --- a/.flake8 +++ b/.flake8 @@ -1,5 +1,6 @@ +[flake8] max-line-length=100 application_import_names=projectt ignore=P102,B311,W503,E226,S311,W504,F821 -exclude=__pycache__, venv, .venv, tests +exclude=__pycache__, venv, .venv, tests, crocpad/ui, crocpad/troubleshooter import-order-style=pycharm diff --git a/.gitignore b/.gitignore index 894a44cc..465ea844 100644 --- a/.gitignore +++ b/.gitignore @@ -102,3 +102,6 @@ venv.bak/ # mypy .mypy_cache/ +.vscode/settings.json +notepad.ini +.vscode/launch.json diff --git a/Pipfile b/Pipfile index 72b70b6f..7f4624bd 100644 --- a/Pipfile +++ b/Pipfile @@ -7,9 +7,12 @@ verify_ssl = true flake8 = "*" [packages] +pyqt5 = "*" [requires] python_version = "3.7" [scripts] -lint = "python -m flake8" \ No newline at end of file +lint = "python -m flake8" +start = "python -m crocpad" +test = "python -m unittest discover -s crocpad" diff --git a/Pipfile.lock b/Pipfile.lock index 79354a3c..3b893207 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "a376db0bd471e38a7080cd854c46349b46922db98afeaf83d17b84923fbe9710" + "sha256": "48d6bfe3c7fcbfd37d98cc67de5e827c5b77e51c0cba71b4717dab5471ee0f60" }, "pipfile-spec": 6, "requires": { @@ -15,7 +15,35 @@ } ] }, - "default": {}, + "default": { + "pyqt5": { + "hashes": [ + "sha256:1402f1613698ca64e3cec0ee27a60b5454e782c16fbd1bdee4a270a058947939", + "sha256:8872c78f204bf8b660164d6dfae87e1be5a9dbc3e20fd2823bd4e851b3647eba", + "sha256:912ead29f8ed86be178faeb2be83793fb633c11059ae54c3bd8e81c1e224e339", + "sha256:acbefac6c780f04709441aa7d8a147c0801f01f8db93f8f000e4a4391db27345" + ], + "index": "pypi", + "version": "==5.12" + }, + "pyqt5-sip": { + "hashes": [ + "sha256:04bd0bb8b6f8fa03c2dfbdfff0c8c9bfb3f46a21dd4cac73983dae93bf949523", + "sha256:058d450c26be92193605f4628ff690d77080f599ffe381a1029cea8eeb71ab8e", + "sha256:0b838ef8a55461785e78b4e347cf52ce228a5d4392c57e07cc46de51433dc8ac", + "sha256:40504f96ecb834e54491ead558589bfd773056dba7f2df76599a06fdd8ed1ead", + "sha256:49b2151bd0a0e439efc9d4c22c33a048d8e8ede5c7296851c221fa0988887edb", + "sha256:6540b510f9436fe2d65801af55ecbf8c43bdda47294e994ed3851403a93e4a8b", + "sha256:6b3063b12e700944172d57cdbeafb363229669af933f873d01c7a6d8a91c4c87", + "sha256:6b65d2b14084eb583bf4cf68b97ade295fabae5f5bf2aae0ab00ab30533f1c60", + "sha256:6ca796071b21761917ee486e57bfa2fc694580e65c462e4173cf849ed8fe201c", + "sha256:6d3013a6820ea614f46fdc73cc16dd57c36a0c74bcbd38bd0b9f2d46b6e6dd16", + "sha256:84f7401afdd5f31e961de75e9c6b1610849e8883fbe0ed675bbb7d7d97286347", + "sha256:bb81cfc4d35ca59f1c419b6abeb6ca6a726a63b712cf979f2b5ab24b81c36f49" + ], + "version": "==4.19.14" + } + }, "develop": { "entrypoints": { "hashes": [ @@ -26,11 +54,11 @@ }, "flake8": { "hashes": [ - "sha256:6d8c66a65635d46d54de59b027a1dda40abbe2275b3164b634835ac9c13fd048", - "sha256:6eab21c6e34df2c05416faa40d0c59963008fff29b6f0ccfe8fa28152ab3e383" + "sha256:859996073f341f2670741b51ec1e67a01da142831aa1fdc6242dbf88dffbe661", + "sha256:a796a115208f5c03b18f332f7c11729812c8c3ded6c46319c59b53efd3819da8" ], "index": "pypi", - "version": "==3.7.6" + "version": "==3.7.7" }, "mccabe": { "hashes": [ @@ -48,10 +76,10 @@ }, "pyflakes": { "hashes": [ - "sha256:5e8c00e30c464c99e0b501dc160b13a14af7f27d4dffb529c556e30a159e231d", - "sha256:f277f9ca3e55de669fba45b7393a1449009cff5a37d1af10ebb76c52765269cd" + "sha256:17dbeb2e3f4d772725c777fabc446d5634d1038f234e77343108ce445ea69ce0", + "sha256:d976835886f8c5b31d47970ed689944a0262b5f3afa00a5a7b4dc81e5449f8a2" ], - "version": "==2.1.0" + "version": "==2.1.1" } } } diff --git a/README.md b/README.md index 697c2bf7..65fadb2a 100644 --- a/README.md +++ b/README.md @@ -30,16 +30,36 @@ You should be using [Pipenv](https://pipenv.readthedocs.io/en/latest/). Take a l # Project Information -`# TODO` +This is the Code Jam 4 entry for team Cool Crocodiles. ## Description -`# TODO` +Crocpad++ is a free replacement for Notepad. ## Setup & Installation -`# TODO` +Use `pipenv install` from the root directory. ## How do I use this thing? -`# TODO` +Use `pipenv run start` to run Crocpad++. + +## Project Structure +`project/` +Contains the Crocpad++ application. + +`project/ui` +Contains `.ui` files created for Qt and the Python modules generated from those UI files. + +`project/sounds` +Contains sound resources for a multimedia, user-friendly experience. + +## Known bugs +- When running under Linux, occasionally the following message might appear: + >```qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 5441, resource id: 27411671, major code: 40 (TranslateCoords), minor code: 0``` + +## Attributions +`wrong.wav` is from https://freesound.org/people/sharesynth/sounds/341256/ + +## Spoilers +There are many subtle annoyances in Crocpad++. Please check `spoilers.txt` for a complete list. diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 88c177c5..afb5dc54 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -35,4 +35,7 @@ jobs: displayName: 'Install project dependencies' - script: pipenv run lint - displayName: 'Lint the project' \ No newline at end of file + displayName: 'Lint the project' + + - script: pipenv run test + displayName: 'Run unit tests' diff --git a/cool-crocodiles.png b/cool-crocodiles.png new file mode 100644 index 00000000..e15b0087 Binary files /dev/null and b/cool-crocodiles.png differ diff --git a/crocpad/.idea/crocpad.iml b/crocpad/.idea/crocpad.iml new file mode 100644 index 00000000..67116063 --- /dev/null +++ b/crocpad/.idea/crocpad.iml @@ -0,0 +1,11 @@ + + + + + + + + + + \ No newline at end of file diff --git a/crocpad/.idea/encodings.xml b/crocpad/.idea/encodings.xml new file mode 100644 index 00000000..15a15b21 --- /dev/null +++ b/crocpad/.idea/encodings.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/crocpad/.idea/misc.xml b/crocpad/.idea/misc.xml new file mode 100644 index 00000000..39990872 --- /dev/null +++ b/crocpad/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/crocpad/.idea/modules.xml b/crocpad/.idea/modules.xml new file mode 100644 index 00000000..dea2133c --- /dev/null +++ b/crocpad/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/crocpad/.idea/vcs.xml b/crocpad/.idea/vcs.xml new file mode 100644 index 00000000..6c0b8635 --- /dev/null +++ b/crocpad/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/crocpad/.idea/workspace.xml b/crocpad/.idea/workspace.xml new file mode 100644 index 00000000..85402eb3 --- /dev/null +++ b/crocpad/.idea/workspace.xml @@ -0,0 +1,233 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +