From 571a42f798376b9c58b9f97411255a01b4b669c0 Mon Sep 17 00:00:00 2001 From: Martin Mahner Date: Wed, 10 Jul 2024 21:38:25 +0200 Subject: [PATCH] Switch to Poetry --- .gitignore | 1 + CHANGELOG.rst => CHANGELOG.md | 8 +- Pipfile | 22 -- Pipfile.lock | 383 ---------------------------------- README.md | 103 +++++++++ README.rst | 118 ----------- pyproject.toml | 45 +++- setup.cfg | 30 --- setup.py | 3 - 9 files changed, 147 insertions(+), 566 deletions(-) rename CHANGELOG.rst => CHANGELOG.md (92%) delete mode 100644 Pipfile delete mode 100644 Pipfile.lock create mode 100644 README.md delete mode 100644 README.rst delete mode 100644 setup.cfg delete mode 100644 setup.py diff --git a/.gitignore b/.gitignore index 4364f15..480be18 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ test_project.sqlite3 /dist *.egg-info /wakawaka/tests/test_project/.static +poetry.lock \ No newline at end of file diff --git a/CHANGELOG.rst b/CHANGELOG.md similarity index 92% rename from CHANGELOG.rst rename to CHANGELOG.md index 88ea12e..2f525b0 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ -========== -Changelog: -========== +# Changelog: + +v1.5 (WIP): + +- Switch from pipenv to a Poetry build system v1.4 (2023-12-15): diff --git a/Pipfile b/Pipfile deleted file mode 100644 index 6c93634..0000000 --- a/Pipfile +++ /dev/null @@ -1,22 +0,0 @@ -[[source]] -url = "https://pypi.org/simple" -verify_ssl = true -name = "pypi" - -[packages] -django-wakawaka = {editable = true,extras = ["tests"],path = "."} - -[dev-packages] -ipdb = "*" -black = "*" -tox = "*" -wheel = "*" -setuptools = "*" -pytest = "*" -pytest-django = "*" - -[scripts] -tests = "pytest" -cleanup = "sh -c \"ruff --fix wakawaka && ruff format wakawaka\"" -runserver = "sh -c \"django-admin migrate --noinput && django-admin runserver\"" - diff --git a/Pipfile.lock b/Pipfile.lock deleted file mode 100644 index 3e6d179..0000000 --- a/Pipfile.lock +++ /dev/null @@ -1,383 +0,0 @@ -{ - "_meta": { - "hash": { - "sha256": "706d951f872895e3dbbd6aba67b56ab3c09f16e99bad47875dd9f72fbcf68847" - }, - "pipfile-spec": 6, - "requires": {}, - "sources": [ - { - "name": "pypi", - "url": "https://pypi.org/simple", - "verify_ssl": true - } - ] - }, - "default": { - "asgiref": { - "hashes": [ - "sha256:71e68008da809b957b7ee4b43dbccff33d1b23519fb8344e33f049897077afac", - "sha256:9567dfe7bd8d3c8c892227827c41cce860b368104c3431da67a0c5a65a949506" - ], - "markers": "python_version >= '3.7'", - "version": "==3.6.0" - }, - "django": { - "hashes": [ - "sha256:ad33ed68db9398f5dfb33282704925bce044bef4261cd4fb59e4e7f9ae505a78", - "sha256:c36e2ab12824e2ac36afa8b2515a70c53c7742f0d6eaefa7311ec379558db997" - ], - "markers": "python_version >= '3.8'", - "version": "==4.2" - }, - "django-wakawaka": { - "editable": true, - "extras": [ - "tests" - ], - "path": "." - }, - "sqlparse": { - "hashes": [ - "sha256:5430a4fe2ac7d0f93e66f1efc6e1338a41884b7ddf2a350cedd20ccc4d9d28f3", - "sha256:d446183e84b8349fa3061f0fe7f06ca94ba65b426946ffebe6e3e8295332420c" - ], - "markers": "python_version >= '3.5'", - "version": "==0.4.4" - } - }, - "develop": { - "appnope": { - "hashes": [ - "sha256:02bd91c4de869fbb1e1c50aafc4098827a7a54ab2f39d9dcba6c9547ed920e24", - "sha256:265a455292d0bd8a72453494fa24df5a11eb18373a60c7c0430889f22548605e" - ], - "markers": "sys_platform == 'darwin'", - "version": "==0.1.3" - }, - "asttokens": { - "hashes": [ - "sha256:4622110b2a6f30b77e1473affaa97e711bc2f07d3f10848420ff1898edbe94f3", - "sha256:6b0ac9e93fb0335014d382b8fa9b3afa7df546984258005da0b9e7095b3deb1c" - ], - "version": "==2.2.1" - }, - "backcall": { - "hashes": [ - "sha256:5cbdbf27be5e7cfadb448baf0aa95508f91f2bbc6c6437cd9cd06e2a4c215e1e", - "sha256:fbbce6a29f263178a1f7915c1940bde0ec2b2a967566fe1c65c1dfb7422bd255" - ], - "version": "==0.2.0" - }, - "black": { - "hashes": [ - "sha256:2818cf72dfd5d289e48f37ccfa08b460bf469e67fb7c4abb07edc2e9f16fb63f", - "sha256:41622020d7120e01d377f74249e677039d20e6344ff5851de8a10f11f513bf93", - "sha256:4acf672def7eb1725f41f38bf6bf425c8237248bb0804faa3965c036f7672d11", - "sha256:4be5bb28e090456adfc1255e03967fb67ca846a03be7aadf6249096100ee32d0", - "sha256:4f1373a7808a8f135b774039f61d59e4be7eb56b2513d3d2f02a8b9365b8a8a9", - "sha256:56f52cfbd3dabe2798d76dbdd299faa046a901041faf2cf33288bc4e6dae57b5", - "sha256:65b76c275e4c1c5ce6e9870911384bff5ca31ab63d19c76811cb1fb162678213", - "sha256:65c02e4ea2ae09d16314d30912a58ada9a5c4fdfedf9512d23326128ac08ac3d", - "sha256:6905238a754ceb7788a73f02b45637d820b2f5478b20fec82ea865e4f5d4d9f7", - "sha256:79dcf34b33e38ed1b17434693763301d7ccbd1c5860674a8f871bd15139e7837", - "sha256:7bb041dca0d784697af4646d3b62ba4a6b028276ae878e53f6b4f74ddd6db99f", - "sha256:7d5e026f8da0322b5662fa7a8e752b3fa2dac1c1cbc213c3d7ff9bdd0ab12395", - "sha256:9f50ea1132e2189d8dff0115ab75b65590a3e97de1e143795adb4ce317934995", - "sha256:a0c9c4a0771afc6919578cec71ce82a3e31e054904e7197deacbc9382671c41f", - "sha256:aadf7a02d947936ee418777e0247ea114f78aff0d0959461057cae8a04f20597", - "sha256:b5991d523eee14756f3c8d5df5231550ae8993e2286b8014e2fdea7156ed0959", - "sha256:bf21b7b230718a5f08bd32d5e4f1db7fc8788345c8aea1d155fc17852b3410f5", - "sha256:c45f8dff244b3c431b36e3224b6be4a127c6aca780853574c00faf99258041eb", - "sha256:c7ed6668cbbfcd231fa0dc1b137d3e40c04c7f786e626b405c62bcd5db5857e4", - "sha256:d7de8d330763c66663661a1ffd432274a2f92f07feeddd89ffd085b5744f85e7", - "sha256:e19cb1c6365fd6dc38a6eae2dcb691d7d83935c10215aef8e6c38edee3f77abd", - "sha256:e2af80566f43c85f5797365077fb64a393861a3730bd110971ab7a0c94e873e7" - ], - "index": "pypi", - "markers": "python_version >= '3.8'", - "version": "==24.3.0" - }, - "cachetools": { - "hashes": [ - "sha256:13dfddc7b8df938c21a940dfa6557ce6e94a2f1cdfa58eb90c805721d58f2c14", - "sha256:429e1a1e845c008ea6c85aa35d4b98b65d6a9763eeef3e37e92728a12d1de9d4" - ], - "markers": "python_version ~= '3.7'", - "version": "==5.3.0" - }, - "chardet": { - "hashes": [ - "sha256:0d62712b956bc154f85fb0a266e2a3c5913c2967e00348701b32411d6def31e5", - "sha256:362777fb014af596ad31334fde1e8c327dfdb076e1960d1694662d46a6917ab9" - ], - "markers": "python_version >= '3.7'", - "version": "==5.1.0" - }, - "click": { - "hashes": [ - "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28", - "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" - ], - "markers": "python_version >= '3.7'", - "version": "==8.1.7" - }, - "colorama": { - "hashes": [ - "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", - "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6" - ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6'", - "version": "==0.4.6" - }, - "decorator": { - "hashes": [ - "sha256:637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330", - "sha256:b8c3f85900b9dc423225913c5aace94729fe1fa9763b38939a95226f02d37186" - ], - "markers": "python_version >= '3.11'", - "version": "==5.1.1" - }, - "distlib": { - "hashes": [ - "sha256:14bad2d9b04d3a36127ac97f30b12a19268f211063d8f8ee4f47108896e11b46", - "sha256:f35c4b692542ca110de7ef0bea44d73981caeb34ca0b9b6b2e6d7790dda8f80e" - ], - "version": "==0.3.6" - }, - "executing": { - "hashes": [ - "sha256:0314a69e37426e3608aada02473b4161d4caf5a4b244d1d0c48072b8fee7bacc", - "sha256:19da64c18d2d851112f09c287f8d3dbbdf725ab0e569077efb6cdcbd3497c107" - ], - "version": "==1.2.0" - }, - "filelock": { - "hashes": [ - "sha256:ad98852315c2ab702aeb628412cbf7e95b7ce8c3bf9565670b4eaecf1db370a9", - "sha256:fc03ae43288c013d2ea83c8597001b1129db351aad9c57fe2409327916b8e718" - ], - "markers": "python_version >= '3.7'", - "version": "==3.12.0" - }, - "iniconfig": { - "hashes": [ - "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3", - "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374" - ], - "markers": "python_version >= '3.7'", - "version": "==2.0.0" - }, - "ipdb": { - "hashes": [ - "sha256:45529994741c4ab6d2388bfa5d7b725c2cf7fe9deffabdb8a6113aa5ed449ed4", - "sha256:e3ac6018ef05126d442af680aad863006ec19d02290561ac88b8b1c0b0cfc726" - ], - "index": "pypi", - "version": "==0.13.13" - }, - "ipython": { - "hashes": [ - "sha256:1c80d08f04144a1994cda25569eab07fbdc4989bd8d8793e3a4ff643065ccb51", - "sha256:9c8487ac18f330c8a683fc50ab6d7bc0fcf9ef1d7a9f6ce7926938261067b81f" - ], - "markers": "python_version >= '3.11'", - "version": "==8.13.1" - }, - "jedi": { - "hashes": [ - "sha256:203c1fd9d969ab8f2119ec0a3342e0b49910045abe6af0a3ae83a5764d54639e", - "sha256:bae794c30d07f6d910d32a7048af09b5a39ed740918da923c6b780790ebac612" - ], - "markers": "python_version >= '3.6'", - "version": "==0.18.2" - }, - "matplotlib-inline": { - "hashes": [ - "sha256:f1f41aab5328aa5aaea9b16d083b128102f8712542f819fe7e6a420ff581b311", - "sha256:f887e5f10ba98e8d2b150ddcf4702c1e5f8b3a20005eb0f74bfdbd360ee6f304" - ], - "markers": "python_version >= '3.5'", - "version": "==0.1.6" - }, - "mypy-extensions": { - "hashes": [ - "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d", - "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782" - ], - "markers": "python_version >= '3.5'", - "version": "==1.0.0" - }, - "packaging": { - "hashes": [ - "sha256:2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5", - "sha256:eb82c5e3e56209074766e6885bb04b8c38a0c015d0a30036ebe7ece34c9989e9" - ], - "markers": "python_version >= '3.7'", - "version": "==24.0" - }, - "parso": { - "hashes": [ - "sha256:8c07be290bb59f03588915921e29e8a50002acaf2cdc5fa0e0114f91709fafa0", - "sha256:c001d4636cd3aecdaf33cbb40aebb59b094be2a74c556778ef5576c175e19e75" - ], - "markers": "python_version >= '3.6'", - "version": "==0.8.3" - }, - "pathspec": { - "hashes": [ - "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08", - "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712" - ], - "markers": "python_version >= '3.8'", - "version": "==0.12.1" - }, - "pexpect": { - "hashes": [ - "sha256:0b48a55dcb3c05f3329815901ea4fc1537514d6ba867a152b581d69ae3710937", - "sha256:fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c" - ], - "markers": "sys_platform != 'win32'", - "version": "==4.8.0" - }, - "pickleshare": { - "hashes": [ - "sha256:87683d47965c1da65cdacaf31c8441d12b8044cdec9aca500cd78fc2c683afca", - "sha256:9649af414d74d4df115d5d718f82acb59c9d418196b7b4290ed47a12ce62df56" - ], - "version": "==0.7.5" - }, - "platformdirs": { - "hashes": [ - "sha256:0614df2a2f37e1a662acbd8e2b25b92ccf8632929bc6d43467e17fe89c75e068", - "sha256:ef0cc731df711022c174543cb70a9b5bd22e5a9337c8624ef2c2ceb8ddad8768" - ], - "markers": "python_version >= '3.8'", - "version": "==4.2.0" - }, - "pluggy": { - "hashes": [ - "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159", - "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3" - ], - "markers": "python_version >= '3.6'", - "version": "==1.0.0" - }, - "prompt-toolkit": { - "hashes": [ - "sha256:23ac5d50538a9a38c8bde05fecb47d0b403ecd0662857a86f886f798563d5b9b", - "sha256:45ea77a2f7c60418850331366c81cf6b5b9cf4c7fd34616f733c5427e6abbb1f" - ], - "markers": "python_full_version >= '3.7.0'", - "version": "==3.0.38" - }, - "ptyprocess": { - "hashes": [ - "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35", - "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220" - ], - "version": "==0.7.0" - }, - "pure-eval": { - "hashes": [ - "sha256:01eaab343580944bc56080ebe0a674b39ec44a945e6d09ba7db3cb8cec289350", - "sha256:2b45320af6dfaa1750f543d714b6d1c520a1688dec6fd24d339063ce0aaa9ac3" - ], - "version": "==0.2.2" - }, - "pygments": { - "hashes": [ - "sha256:8ace4d3c1dd481894b2005f560ead0f9f19ee64fe983366be1a21e171d12775c", - "sha256:db2db3deb4b4179f399a09054b023b6a586b76499d36965813c71aa8ed7b5fd1" - ], - "markers": "python_version >= '3.7'", - "version": "==2.15.1" - }, - "pyproject-api": { - "hashes": [ - "sha256:435f46547a9ff22cf4208ee274fca3e2869aeb062a4834adfc99a4dd64af3cf9", - "sha256:4698a3777c2e0f6b624f8a4599131e2a25376d90fe8d146d7ac74c67c6f97c43" - ], - "markers": "python_version >= '3.7'", - "version": "==1.5.1" - }, - "pytest": { - "hashes": [ - "sha256:3799fa815351fea3a5e96ac7e503a96fa51cc9942c3753cda7651b93c1cfa362", - "sha256:434afafd78b1d78ed0addf160ad2b77a30d35d4bdf8af234fe621919d9ed15e3" - ], - "index": "pypi", - "version": "==7.3.1" - }, - "pytest-django": { - "hashes": [ - "sha256:c60834861933773109334fe5a53e83d1ef4828f2203a1d6a0fa9972f4f75ab3e", - "sha256:d9076f759bb7c36939dbdd5ae6633c18edfc2902d1a69fdbefd2426b970ce6c2" - ], - "index": "pypi", - "version": "==4.5.2" - }, - "setuptools": { - "hashes": [ - "sha256:23aaf86b85ca52ceb801d32703f12d77517b2556af839621c641fca11287952b", - "sha256:f104fa03692a2602fa0fec6c6a9e63b6c8a968de13e17c026957dd1f53d80990" - ], - "index": "pypi", - "version": "==67.7.2" - }, - "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" - }, - "stack-data": { - "hashes": [ - "sha256:32d2dd0376772d01b6cb9fc996f3c8b57a357089dec328ed4b6553d037eaf815", - "sha256:cbb2a53eb64e5785878201a97ed7c7b94883f48b87bfb0bbe8b623c74679e4a8" - ], - "version": "==0.6.2" - }, - "tox": { - "hashes": [ - "sha256:5a2eac5fb816779dfdf5cb00fecbc27eb0524e4626626bb1de84747b24cacc56", - "sha256:d25a2e6cb261adc489604fafd76cd689efeadfa79709965e965668d6d3f63046" - ], - "index": "pypi", - "version": "==4.5.1" - }, - "traitlets": { - "hashes": [ - "sha256:9e6ec080259b9a5940c797d58b613b5e31441c2257b87c2e795c5228ae80d2d8", - "sha256:f6cde21a9c68cf756af02035f72d5a723bf607e862e7be33ece505abf4a3bad9" - ], - "markers": "python_version >= '3.7'", - "version": "==5.9.0" - }, - "virtualenv": { - "hashes": [ - "sha256:6abec7670e5802a528357fdc75b26b9f57d5d92f29c5462ba0fbe45feacc685e", - "sha256:a85caa554ced0c0afbd0d638e7e2d7b5f92d23478d05d17a76daeac8f279f924" - ], - "markers": "python_version >= '3.7'", - "version": "==20.23.0" - }, - "wcwidth": { - "hashes": [ - "sha256:795b138f6875577cd91bba52baf9e445cd5118fd32723b460e30a0af30ea230e", - "sha256:a5220780a404dbe3353789870978e472cfe477761f06ee55077256e509b156d0" - ], - "version": "==0.2.6" - }, - "wheel": { - "hashes": [ - "sha256:cd1196f3faee2b31968d626e1731c94f99cbdb67cf5a46e4f5656cbee7738873", - "sha256:d236b20e7cb522daf2390fa84c55eea81c5c30190f90f29ae2ca1ad8355bf247" - ], - "index": "pypi", - "version": "==0.40.0" - } - } -} diff --git a/README.md b/README.md new file mode 100644 index 0000000..5ca4a2c --- /dev/null +++ b/README.md @@ -0,0 +1,103 @@ +[![](https://badge.fury.io/py/django-wakawaka.svg)](https://badge.fury.io/py/django-wakawaka) + +*Compatibility Matrix:* + +| Py/Dj | 3.8 | 3.9 | 3.10 | 3.11 | 3.12 | +|-----------|-----|-----|------|------|------| +| 3.2 (LTS) | ✓ | ✓ | ✓ | ✓ | ✓ | +| 4.0 | ✓ | ✓ | ✓ | ✓ | ✓ | +| 4.1 | ✓ | ✓ | ✓ | ✓ | ✓ | +| 4.2 (LTS) | ✓ | ✓ | ✓ | ✓ | ✓ | +| 5.0 | | | ✓ | ✓ | ✓ | + +# django-wakawaka + +django-wakawaka is a super simple wiki system written in Python using the +Django framework. + +* Links between Wiki pages are automatically resolved by their CamelCase naming + scheme. + +* It automatically keeps track of revision changes of a Page, while + providing the ability to revert to earlier states. + +* It also has a quite comprehensive permission integration, taking care of + Django's default create/edit/delete permissions. + +* Wakawaka is an application and indented to be placed in an existing project. + +Some screenshots from the *Example Project*: + +* [WikiIndex Page][WikiIndex Page] +* [Revision List][Revision List] +* [Page History][Page History] +* [Page List][Page List] + +[WikiIndex Page]: https://github.com/bartTC/django-wakawaka/raw/master/docs/_static/overview.png +[Revision List]: https://github.com/bartTC/django-wakawaka/raw/master/docs/_static/revisions.png +[Page History]: https://github.com/bartTC/django-wakawaka/raw/master/docs/_static/history.png +[Page List]: https://github.com/bartTC/django-wakawaka/raw/master/docs/_static/pagelist.png + +## Installation: + +1. Put `wakawaka` to your INSTALLED_APPS in your settings.py within your + django project. +2. Add `(r'^wiki/', include('wakawaka.urls')),` to your urls.py. + +That's all. Wakawaka has no other dependencies than Django 1.11 or later. + +## Configuration: + +Wakawaka takes care of Django's permission system. Grant your users always a +pair of `wikipage` and `revision` permissions either what they should do. +(Adding, changing or deleting WikiPages) + +### Optional Settings: + +The name of your first wiki page is defined as `WikiIndex`. You can change +this by adding a setting `WAKAWAKA_DEFAULT_INDEX` to your settings.py. +Example: + + WAKAWAKA_DEFAULT_INDEX = 'Home' + +Words that are written in CamelCase (a pair of one upper letter followed by +*n* lower letters) are automatically treated as internal wiki links. You can +change this behaviour by adding a setting `WAKAWAKA_SLUG_REGEX` to your +settings.py. This holds a regular expression of the wiki name format. Default: + + WAKAWAKA_SLUG_REGEX = r'((([A-Z]+[a-z]+){2,})(/([A-Z]+[a-z]+){2,})*)' + +### Attachments: + +Wakawaka does not provide the ability to store file attachments to wiki pages. +To do so, have a look on the side project [django-attachments][django-attachments] +which provides a unobstrusive way to add attachments to models. + +## Testing and Development: + +The project comes with a test library which can be simply invoked by Tox, +which tests the project under all current Python and Django versions: + + $ pip install tox + $ tox + +To run the testsuite manually in your development environment, install the +project using [Poetry][poetry]: + + $ poetry install + $ pipenv run pytest + + +## Example Project: + +The application comes with a sample project. This gives you a brief overview +about the Wiki features, and can help you with the integration of the +application into an existing project. It's alo used for the test suite: + + $ poetry install + $ poetry run ./manage.py migrate + $ poetry run ./manage.py createsuperuser + $ poetry run ./manage.py runserver + +[django-attachments]: https://github.com/bartTC/django-attachments +[poetry]: https://python-poetry.org diff --git a/README.rst b/README.rst deleted file mode 100644 index 29af720..0000000 --- a/README.rst +++ /dev/null @@ -1,118 +0,0 @@ -.. image:: https://badge.fury.io/py/django-wakawaka.svg - :target: https://badge.fury.io/py/django-wakawaka - -*Compatibility Matrix:* - -========= === === ==== ==== ==== -Py/Dj 3.8 3.9 3.10 3.11 3.12 -========= === === ==== ==== ==== -3.2 (LTS) ✓ ✓ ✓ ✓ ✓ -4.0 ✓ ✓ ✓ ✓ ✓ -4.1 ✓ ✓ ✓ ✓ ✓ -4.2 (LTS) ✓ ✓ ✓ ✓ ✓ -5.0 ✓ ✓ ✓ -========= === === ==== ==== ==== - -=============== -django-wakawaka -=============== - -django-wakawaka is a super simple wiki system written in Python using the -Django framework. - -* Links between Wiki pages are automatically resolved by their CamelCase naming - scheme. - -* It automatically keeps track of revision changes of a Page, while - providing the ability to revert to earlier states. - -* It also has a quite comprehensive permission integration, taking care of - Django's default create/edit/delete permissions. - -* Wakawaka is an application and indented to be placed in an existing project. - -Some screenshots from the *Example Project*: - -* `WikiIndex Page`_ -* `Revision List`_ -* `Page History`_ -* `Page List`_ - -.. _WikiIndex Page: https://github.com/bartTC/django-wakawaka/raw/master/docs/_static/overview.png -.. _Revision List: https://github.com/bartTC/django-wakawaka/raw/master/docs/_static/revisions.png -.. _Page History: https://github.com/bartTC/django-wakawaka/raw/master/docs/_static/history.png -.. _Page List: https://github.com/bartTC/django-wakawaka/raw/master/docs/_static/pagelist.png - - -Installation: -============= - -1. Put ``wakawaka`` to your INSTALLED_APPS in your settings.py within your - django project. -2. Add ``(r'^wiki/', include('wakawaka.urls')),`` to your urls.py. - -That's all. Wakawaka has no other dependencies than Django 1.11 or later. - - -Configuration: -============== - -Wakawaka takes care of Django's permission system. Grant your users always a -pair of ``wikipage`` and ``revision`` permissions either what they should do. -(Adding, changing or deleting WikiPages) - -Optional Settings: ------------------- - -The name of your first wiki page is defined as ``WikiIndex``. You can change -this by adding a setting ``WAKAWAKA_DEFAULT_INDEX`` to your settings.py. -Example:: - - WAKAWAKA_DEFAULT_INDEX = 'Home' - -Words that are written in CamelCase (a pair of one upper letter followed by -*n* lower letters) are automatically treated as internal wiki links. You can -change this behaviour by adding a setting ``WAKAWAKA_SLUG_REGEX`` to your -settings.py. This holds a regular expression of the wiki name format. Default:: - - WAKAWAKA_SLUG_REGEX = r'((([A-Z]+[a-z]+){2,})(/([A-Z]+[a-z]+){2,})*)' - - -Attachments: -============ - -Wakawaka does not provide the ability to store file attachments to wiki pages. -To do so, have a look on the side project `django-attachments`_ which provides -a unobstrusive way to add attachments to models. - - -Testing and Development: -======================== - -The project comes with a test library which can be simply invoked by Tox, -which tests the project under all current Python and Django versions:: - - $ pip install tox - $ tox - -To run the testsuite manually in your development environment, install the -project using pipenv_:: - - $ pipenv install - $ pipenv run tests - - -Example Project: -================ - -The application comes with a sample project. This gives you a brief overview -about the Wiki features, and can help you with the integration of the -application into an existing project. It's alo used for the test suite:: - - $ pipenv install - $ pipenv run ./manage.py migrate - $ pipenv run ./manage.py createsuperuser - $ pipenv run ./manage.py runserver - -.. _django-attachments: https://github.com/bartTC/django-attachments -.. _pipenv: https://pipenv.readthedocs.io/ diff --git a/pyproject.toml b/pyproject.toml index c40b7ed..80f94cf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,42 @@ [build-system] -requires = ["setuptools", "wheel"] -build-backend = "setuptools.build_meta:__legacy__" +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" +# Quality Tools ------------------------------------------------------------------------ +[tool.poetry] +name = "django-wakawaka" +version = "1.4" +packages = [{include = "wakawaka"}] +description = "A simple Django based wiki system." +authors = ["Martin Mahner "] +license = "MIT" +readme = ["README.md", "CHANGELOG.md"] +homepage = "https://github.com/bartTC/django-wakawaka/" +keywords = ["django", "wiki"] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Web Environment", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Framework :: Django", +] + +[tool.poetry.dependencies] +python = "^3.8" +django = ">=3.2" + +[tool.poetry.group.dev.dependencies] +pytest = "*" +pytest-django = "*" + +# Quality Tools ------------------------------------------------------------------------ [tool.ruff] target-version = "py38" exclude = ["migrations"] @@ -27,11 +62,7 @@ ignore = [ ] [tool.pytest.ini_options] -python_files = [ - "tests.py", - "test_*.py", - "*_tests.py", -] +python_files = ["test_*.py",] addopts = """ --ds=wakawaka.tests.test_project.settings --nomigrations diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 5c80e35..0000000 --- a/setup.cfg +++ /dev/null @@ -1,30 +0,0 @@ -[metadata] -name = django-wakawaka -version = 1.4 -description = A simple Django based wiki system. -long_description = file: README.rst, CHANGELOG.rst -author = Martin Mahner -author_email = martin@mahner.org -url = https://github.com/bartTC/django-wakawaka -keywords = django, wiki, wikipedia, documentation -license = MIT -classifiers = - Development Status :: 5 - Production/Stable - Environment :: Web Environment - Intended Audience :: Developers - License :: OSI Approved :: MIT License - Operating System :: OS Independent - Programming Language :: Python - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3.11 - Programming Language :: Python :: 3.12 - Framework :: Django - -[options] -python_requires = >=3.8 -packages = find: -include_package_data = True -zip_safe = False -install_requires = django>=3.2 diff --git a/setup.py b/setup.py deleted file mode 100644 index bb42283..0000000 --- a/setup.py +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env python -from setuptools import setup -setup()