chore: unify packaging around uv
This commit is contained in:
+8
-10
@@ -6,9 +6,9 @@ Because the parser may break on changes to the canteen website, it should be eas
|
||||
Quickstart
|
||||
~~~~~~~~~~
|
||||
|
||||
Use `Pipenv <https://pipenv.readthedocs.io/en/latest/>`_ to setup the environment and start coding: ::
|
||||
Use `uv <https://docs.astral.sh/uv/>`_ to setup the environment and start coding: ::
|
||||
|
||||
$ pipenv install --dev # Create venv
|
||||
$ uv sync --extra dev # Create venv and install dependencies
|
||||
$ make test # Check setup by running tests
|
||||
$ make debug # Start app instance with debugger and pretty printing of JSON
|
||||
$ make run # Start app without debugger
|
||||
@@ -17,7 +17,7 @@ Use `Pipenv <https://pipenv.readthedocs.io/en/latest/>`_ to setup the environmen
|
||||
|
||||
The list of available canteens is available at the ``/canteens`` endpoint. The ``/canteens/<name>`` endpoint provides the XML feed for individual canteens, e.g., ``/canteens/griebnitzsee``.
|
||||
|
||||
Given the default configuration, http://127.0.0.1:5000/canteens/griebnitzsee will display the `OpenMensa` meta-feed for the Griebnitzsee canteen, and http://127.0.0.1:5000/canteens/griebnitzsee/menu will render the menu feed.
|
||||
Given the default configuration, http://127.0.0.1:5000/canteens/griebnitzsee will display the `OpenMensa` feed for the Griebnitzsee canteen.
|
||||
|
||||
Main Module Entry Points
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -29,16 +29,15 @@ Generating a new `OpenMensa` feed starts by reading the configured canteens. Som
|
||||
|
||||
.. autoclass:: stw_potsdam.config.Canteen
|
||||
|
||||
Use the canteen data to assemble the menu parameters in order to download the menu JSON. The menu parameters are also used as cache key: it should uniquely identify the retrieved menu.
|
||||
Use the canteen data to select matching upstream outlets, download the required menu JSON, and render the OpenMensa XML.
|
||||
|
||||
.. autoclass:: stw_potsdam.canteen_api.MenuParams
|
||||
.. autoclass:: stw_potsdam.swp_webspeiseplan_api.SWPWebspeiseplanAPI
|
||||
|
||||
.. autofunction:: stw_potsdam.canteen_api.download_menu
|
||||
.. autoclass:: stw_potsdam.swp_webspeiseplan_parser.SWPWebspeiseplanParser
|
||||
|
||||
The render module contains methods for converting the JSON response into valid `OpenMensa` menu and meta feeds, respectively:
|
||||
The XML type modules contain the OpenMensa rendering objects:
|
||||
|
||||
.. autofunction:: stw_potsdam.feed.render_menu
|
||||
.. autofunction:: stw_potsdam.feed.render_meta
|
||||
.. autoclass:: stw_potsdam.xml_types.builder.Builder
|
||||
|
||||
Tests
|
||||
~~~~~
|
||||
@@ -58,4 +57,3 @@ The first invocation runs tests whose outcome can solely be determined by the te
|
||||
Setting the environment variable ``ENABLE_API_QUERY`` enables tests which require querying the canteen API. Because third-party services are queried, those are more suited to manual execution. Developers can quickly check if their change is applicable to today's menu.
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user