Pylons / deform

A Python HTML form library.
Other
416 stars 160 forks source link

Reorganize Deform repo to best practices #475

Open stevepiercy opened 3 years ago

stevepiercy commented 3 years ago

Reorganize the code, emulating Pyramid. This allows only Deform's source to be easily released (currently it includes its tests, which is a sloppy practice).

Include only Deform's source code in the release to PyPI, using the spiffy code reorganization.

Originally posted by @stevepiercy in https://github.com/Pylons/deform/issues/472#issuecomment-685741043

sydoluciani commented 3 years ago

@stevepiercy

A test file with minimum test requirements can be added to the structure you provided here, then custom_widgets can be excluded from full functional tests, since it is going to serve the unofficial widgets or templates demonstrated in Deformdemo, and developers can upload new widgets or templates with no test as long as it works in Deformdemo, the reviewer or maintainer has to visually inspect it, but if at some point original contributor or other contributor wants to move the widget to official template or widget directory, then the test shall be successful.

Another section can be added to Deformdemo to demonstrate unofficial widgets and templates, below the rest and current officual widgets.

sydoluciani commented 3 years ago

@stevepiercy I just noticed you already considered a test file there but it is not in the root of custom_widgets.

stevepiercy commented 3 years ago

That structure I recommended is of deformdemo. I'm not sure why you mention that in this issue.

To run any optional tests in custom widgets supplied in deformdemo, the developer can pass them as arguments to the test runner, e.g., $TOX -e functional3 -- deformdemo.custom_widgets.my_widget.test:MyWidgetClassTest.my_test_method.

sydoluciani commented 3 years ago

@stevepiercy sorry about that, thought it is Deformdemo restructure. We are talking about couple of different issues at the same time.