{"id":18264520,"url":"https://github.com/pylons/deformdemo","last_synced_at":"2025-04-04T21:30:33.657Z","repository":{"id":947852,"uuid":"1986862","full_name":"Pylons/deformdemo","owner":"Pylons","description":"Deform form generation framework demo application","archived":false,"fork":false,"pushed_at":"2024-02-12T15:10:23.000Z","size":2776,"stargazers_count":42,"open_issues_count":12,"forks_count":41,"subscribers_count":14,"default_branch":"main","last_synced_at":"2024-04-08T17:10:54.233Z","etag":null,"topics":["bootstrap","bootstrap4","chameleon","colander","deform","peppercorn","pyramid","pyramid-framework","python","python3","web-form","web-forms"],"latest_commit_sha":null,"homepage":"https://deformdemo.pylonsproject.org","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pylons.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.txt","contributing":"CONTRIBUTING.txt","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-07-02T07:04:05.000Z","updated_at":"2024-04-08T17:10:54.234Z","dependencies_parsed_at":"2024-11-05T11:16:16.405Z","dependency_job_id":null,"html_url":"https://github.com/Pylons/deformdemo","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pylons%2Fdeformdemo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pylons%2Fdeformdemo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pylons%2Fdeformdemo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pylons%2Fdeformdemo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pylons","download_url":"https://codeload.github.com/Pylons/deformdemo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247251966,"owners_count":20908600,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap","bootstrap4","chameleon","colander","deform","peppercorn","pyramid","pyramid-framework","python","python3","web-form","web-forms"],"created_at":"2024-11-05T11:14:56.127Z","updated_at":"2025-04-04T21:30:33.653Z","avatar_url":"https://github.com/Pylons.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Deform Demo\n===========\n\n.. image:: https://github.com/Pylons/deformdemo/workflows/Build%20and%20test/badge.svg?branch=main\n    :target: https://github.com/Pylons/deformdemo/actions?query=workflow%3A%22Build+and+test%22+branch%3Amain\n\nDemonstration application for the `Deform \u003chttps://docs.pylonsproject.org/projects/deform/en/latest\u003e`_ Python HTML form library.\n\nThis application is tested on Python versions 3.8, 3.9, 3.10, 3.11, and 3.12, and PyPy3.\n\n\nOnline version\n--------------\n\nVisit https://deformdemo3.pylonsproject.org\n\n\nDocker version\n--------------\n\nBuild the Docker image for deformdemo and tag it.\n\n.. code-block:: bash\n\n    # docker build --tag pylons/deformdemo3:\u003cversion\u003e .\n    docker build --tag pylons/deformdemo3:main .\n\nRun the built image with Docker.\n\n.. code-block:: bash\n\n    docker run -d -p 8000:8523 pylons/deformdemo3:main\n\nThen in your browser, visit http://localhost:8000\n\nTo stop the docker container, find its ``NAME`` and issue the ``stop`` command.\n\n.. code-block:: bash\n\n    docker ps -a\n    docker stop \u003cvalue_from_NAMES_column\u003e\n\n\nFrom source\n-----------\n\n-   Create a virtual environment.\n\n    .. code-block:: bash\n\n        python3 -m venv /path/to/my/env\n\n    Hereafter ``/path/to/my/env`` will be referred to as ``$VENV`` in the following steps.\n\n-   Clone deformdemo.\n\n    .. code-block:: bash\n\n        git clone git://github.com/Pylons/deformdemo.git\n\n-   ``cd`` to the newly checked out deformdemo package.\n\n    .. code-block:: bash\n\n        cd deformdemo\n\n-   Run ``pip install -e .`` using the virtual environment's ``python`` command.\n\n    .. code-block:: bash\n\n        $VENV/bin/pip install -e .\n\n-   While your working directory is still ``deformdemo``, start the demo application.\n\n    .. code-block:: bash\n\n        $VENV/bin/pserve demo.ini\n\n-   Visit http://localhost:8523 in a browser to see the demo.\n\n\nInstall functional test requirements\n------------------------------------\n\nThe ``deformdemo`` application serves as a target for functional testing during Deform's development.\nA suite of Selenium tests may be run against a local instance of the demonstration application.\nIt is wise to run these tests using the following steps before submitting a pull request.\n\nFirst prepare the functional test environment by installing requirements.\nWe will assume that you put your projects in your user directory, although you can put them anywhere.\n\n    .. code-block:: bash\n\n        cd ~/projects/deformdemo/\n\n\nInstall Python development and testing requirements\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nThe following command will install requirements for development and testing of deformdemo.\nIt performs editable installs of Colander and Deform into your virtual environment's ``src`` directory, and deformdemo's testing requirements into ``lib/\u003cpython.version\u003e/site-packages`` directory.\n\n.. code-block:: bash\n\n    $VENV/bin/pip install -Ur requirements-dev.txt\n\n\nInstall Firefox latest\n^^^^^^^^^^^^^^^^^^^^^^\n\nmacOS Firefox\n\"\"\"\"\"\"\"\"\"\"\"\"\"\n\n`Download the latest version of Firefox for your platform \u003chttps://www.mozilla.org/en-US/firefox/all/\u003e`_.\n\nOpen the ``.dmg`` (macOS), and drag the Firefox icon to:\n\n    .. code-block:: console\n\n        ~/projects/deformdemo/\n\nLinux (Debian) Firefox\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\nUse cURL or wget.\nSee the `Firefox download README.txt \u003chttps://ftp.mozilla.org/pub/firefox/releases/latest/README.txt\u003e`_ for instructions.\nFor example on Linux:\n\n    .. code-block:: bash\n\n        cd ~/projects/deformdemo/\n        wget -O firefox-latest.tar.bz2 \\\n        \"https://download.mozilla.org/?product=firefox-latest\u0026os=linux64\u0026lang=en-US\"\n\nDecompress the downloaded file.\n\n    .. code-block:: bash\n\n        tar -xjf firefox-latest.tar.bz2\n\n\ngeckodriver\n^^^^^^^^^^^\n\nInstall the `latest release of geckodriver \u003chttps://github.com/mozilla/geckodriver/releases\u003e`_.\n\n.. code-block:: bash\n\n    # macOS\n    wget https://github.com/mozilla/geckodriver/releases/download/v0.29.0/geckodriver-v0.29.0-macos.tar.gz\n    tar -xzf geckodriver-v0.29.0-macos.tar.gz\n\n    # Linux (Debian)\n    wget https://github.com/mozilla/geckodriver/releases/download/v0.29.0/geckodriver-v0.29.0-linux64.tar.gz\n    tar -xzf geckodriver-v0.29.0-linux64.tar.gz\n\n\ngettext\n^^^^^^^\n\nThe functional tests require the installation of the GNU ``gettext`` utilities, specifically ``msgmerge`` and ``msgfmt``.\nUse your package manager to install these requirements.\n\nmacOS gettext\n\"\"\"\"\"\"\"\"\"\"\"\"\"\n\nUse `Homebrew \u003chttps://brew.sh/\u003e`_.\n\n.. code-block:: bash\n\n        brew install gettext\n        brew link gettext --force\n\nIf you ever have problems building packages, you can always unlink it.\n\n.. code-block:: bash\n\n        brew unlink gettext\n\nLinux (Debian) gettext\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\n.. code-block:: bash\n\n        apt-get install gettext\n        apt-get install gettext-base\n\n\nSelenium\n\"\"\"\"\"\"\"\"\n\nSelenium was already installed via ``$VENV/bin/pip install -Ur requirements-dev.txt``.\n\n\nRunning the Demo's Functional Tests\n-----------------------------------\n\n-   Start the ``deformdemo`` application as described above in \"Running the Demo\".\n    Leave the terminal window running this application open, and open a second terminal window to perform the below steps.\n\n-   In the second terminal window, go to the \"deformdemo\" checkout directory you created above in \"Running the Demo\".\n\n    .. code-block:: bash\n\n        cd ~/projects/deformdemo\n\n-   Set an environment variable to add your local checkout of Deform to your ``PATH``.\n    It must to be set before running tox or pytest, otherwise Firefox or Chrome will not start and will return an error message such as ``'geckodriver' executable needs to be in PATH.``\n\n    .. code-block:: bash\n\n        export PATH=~/projects/deform:$PATH\n\n-   Run the tests.\n\n    .. code-block:: bash\n\n        $VENV/bin/pytest\n\n    ``$VENV`` is defined as it was in \"Running the Demo\" above.\n\n-   You will (hopefully) see Firefox pop up and it will begin to display in quick succession the loading of pages.\n    The tests will run for five or ten minutes.\n\n-   Test success means that the console window on which you ran ``pytest`` shows a bunch of dots, a test summary, then ``OK``.\n    If it shows a traceback, ``FAILED``, or anything other than a straight line of dots, it means there was an error.\n\n-   Fix any errors by modifying your code or by modifying the tests to expect the changes you've made.\n\n\nTesting an Alternate Renderer Implementation\n--------------------------------------------\n\n-   Copy the ``demo.ini`` file from this demo package to your renderer's package.\n\n-   Change the ``deform.renderer`` key in the ``demo.ini`` copy to point at your renderer (it's a Python dotted name).\n\n-   Run ``pserve /path/to/your/copy/of/demo.ini``.\n\n-   Run the Selenium tests as above.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpylons%2Fdeformdemo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpylons%2Fdeformdemo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpylons%2Fdeformdemo/lists"}