Skip to content

Commit

Permalink
🔥 removed unused celery, templates and utils
Browse files Browse the repository at this point in the history
  • Loading branch information
bart-maykin committed May 7, 2024
1 parent f452792 commit b07cce5
Show file tree
Hide file tree
Showing 18 changed files with 227 additions and 482 deletions.
74 changes: 7 additions & 67 deletions INSTALL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Prerequisites

You need the following libraries and/or programs:

* `Python`_ - check the ``Dockerfile`` for the required version.
* `Python`_ - 3.11
* Python `Virtualenv`_ and `Pip`_
* `PostgreSQL`_
* `Node.js`_
Expand All @@ -44,13 +44,10 @@ development machine.

.. code-block:: bash
$ git clone [email protected]:maykinmedia/referentielijsten.git
$ git clone https://github.com/maykinmedia/referentielijsten.git
$ cd referentielijsten
3. Install all required (backend) libraries.
**Tip:** You can use the ``bootstrap.py`` script to install the requirements
and set the proper settings in ``manage.py``. Or, perform the steps
manually:
3. Install all required (backend) libraries:

.. code-block:: bash
Expand All @@ -69,6 +66,7 @@ development machine.

.. code-block:: bash
$ source env/bin/activate
$ python src/manage.py collectstatic --link
$ python src/manage.py migrate
Expand Down Expand Up @@ -148,10 +146,6 @@ file or as part of the ``(post)activate`` of your virtualenv.
* ``DB_HOST``: database host. Defaults to ``localhost``
* ``DB_PORT``: database port. Defaults to ``5432``.

* ``SENTRY_DSN``: the DSN of the project in Sentry. If set, enabled Sentry SDK as
logger and will send errors/logging to Sentry. If unset, Sentry SDK will be
disabled.

Docker
======

Expand All @@ -162,7 +156,7 @@ The easiest way to get the project started is by using `Docker Compose`_.

.. code-block:: bash
$ git clone [email protected]:maykinmedia/referentielijsten.git
$ git clone https://github.com/maykinmedia/referentielijsten.git
Cloning into 'referentielijsten'...
...
Expand Down Expand Up @@ -194,8 +188,8 @@ The easiest way to get the project started is by using `Docker Compose`_.
...
Superuser created successfully.
$ docker exec -it referentielijsten_web_1 /app/src/manage.py loaddata admin_index groups
Installed 5 object(s) from 2 fixture(s)
$ docker exec -it referentielijsten_web_1 /app/src/manage.py loaddata default_admin_index.json
Installed 4 object(s) from 1 fixture(s)
4. Point your browser to ``http://localhost:8000/`` to access the project's
management interface with the credentials used in step 3.
Expand Down Expand Up @@ -240,60 +234,6 @@ all settings.
$ docker exec -it referentielijsten /app/src/manage.py createsuperuser
Building and publishing the image
---------------------------------

Using ``bin/release-docker-image``, you can easily build and tag the image.

The script is based on git branches and tags - if you're on the ``master``
branch and the current ``HEAD`` is tagged, the tag will be used as
``RELEASE_TAG`` and the image will be pushed. If you want to push the image
without a git tag, you can use the ``RELEASE_TAG`` envvar.

The image will only be pushed if the ``JOB_NAME`` envvar is set. The image
will always be built, even if no envvar is set. The default release tag is
``latest``.

Example usage:

.. code-block:: bash
JOB_NAME=publish RELEASE_TAG=dev ./bin/release-docker-image.sh
Staging and production
======================

Ansible is used to deploy test, staging and production servers. It is assumed
the target machine has a clean `Debian`_ installation.

1. Make sure you have `Ansible`_ installed (globally or in the virtual
environment):

.. code-block:: bash
$ pip install ansible
2. Navigate to the project directory, and install the Maykin deployment
submodule if you haven't already:

.. code-block:: bash
$ git submodule update --init
3. Run the Ansible playbook to provision a clean Debian machine:

.. code-block:: bash
$ cd deployment
$ ansible-playbook <test/staging/production>.yml
For more information, see the ``README`` file in the deployment directory.

.. _Debian: https://www.debian.org/
.. _Ansible: https://pypi.org/project/ansible/


Settings
========

Expand Down
86 changes: 73 additions & 13 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,66 @@ referentielijsten
==================

:Version: 0.1.0
:Source: https://bitbucket.org/maykinmedia/referentielijsten
:Keywords: ``<keywords>``
:Source: https://github.com/maykinmedia/referentielijsten
:Keywords: referentielijsten, stambomen
:PythonVersion: 3.11

|build-status| |requirements|
|docker|

``<oneliner describing the project>``

Developed by `Maykin Media B.V.`_ for ``<client>``
Developed by `Maykin Media B.V.`_


Introduction
============

``<describe the project in a few paragraphs and briefly mention the features>``

API specificatie
================

Documentation
=============
Hieronder staat de versie van Open Klant en welke versie van de
API-specificatie wordt aangeboden.

See ``INSTALL.rst`` for installation instructions, available settings and
commands.
========================== ============== ============= ================
Referentielijsten versie API versie Release datum API specificatie
========================== ============== ============= ================
master/latest n/a n/a `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/referentielijsten/master/src/api/openapi.yaml>`_,
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/maykinmedia/referentielijsten/master/src/api/openapi.yaml>`_


Ready-to-go implementatie
=========================

|build-status| |coverage| |code-style| |codeql| |black| |python-versions|

Deze implementatie is bedoeld als referentie implementatie van de API
specificaties maar tevens een productiewaardig component dat ingezet kan worden
in het ICT landschap van de overheid.

Quickstart
----------

1. Download en start Open Klant:

.. code:: bash
$ wget https://raw.githubusercontent.com/maykinmedia/referentielijsten/master/docker-compose.yml
$ docker-compose up -d --no-build
$ docker-compose exec web src/manage.py createsuperuser
2. In de browser, navigeer naar ``http://localhost:8000/`` om de beheerinterface
en de API te benaderen.


Links
=====

* `Docker image <https://hub.docker.com/r/maykinmedia/referentielijsten>`_
* `Issues <https://github.com/maykinmedia/referentielijsten/issues>`_
* `Code <https://github.com/maykinmedia/referentielijsten>`_
* `Community <https://commonground.nl/groups/view/6bca7599-0f58-44e4-a405-7aa3a4c682f3/referentielijsten>`_


References
Expand All @@ -34,13 +72,35 @@ References
* `Code <https://bitbucket.org/maykinmedia/referentielijsten>`_


.. |build-status| image:: https://github.com/maykinmedia/referentielijsten/workflows/ci/badge.svg?branch=master
.. _`Maykin B.V.`: https://www.maykinmedia.nl

.. |build-status| image:: https://github.com/maykinmedia/referentielijsten/workflows/ci.yml/badge.svg?branch=master
:alt: Build status
:target: https://github.com/maykinmedia/referentielijsten/actions?query=workflow%3Aci

.. |requirements| image:: https://requires.io/bitbucket/maykinmedia/referentielijsten/requirements.svg?branch=master
:target: https://requires.io/bitbucket/maykinmedia/referentielijsten/requirements/?branch=master
:alt: Requirements status
.. |coverage| image:: https://codecov.io/github/maykinmedia/referentielijsten/branch/master/graphs/badge.svg?branch=master
:alt: Coverage
:target: https://codecov.io/gh/maykinmedia/referentielijsten

.. |code-style| image:: https://github.com/maykinmedia/referentielijsten/actions/workflows/code-style.yml/badge.svg?branch=master
:alt: Code style
:target: https://github.com/maykinmedia/referentielijsten/actions/workflows/code-style.yml

.. |codeql| image:: https://github.com/maykinmedia/referentielijsten/actions/workflows/codeql.yml/badge.svg?branch=master
:alt: CodeQL scan
:target: https://github.com/maykinmedia/referentielijsten/actions/workflows/codeql.yml

.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
:alt: Code style
:target: https://github.com/psf/black

.. |docker| image:: https://img.shields.io/docker/v/maykinmedia/referentielijsten?sort=semver
:alt: Docker image
:target: https://hub.docker.com/r/maykinmedia/referentielijsten

.. |python-versions| image:: https://img.shields.io/badge/python-3.11%2B-blue.svg
:alt: Supported Python version

.. _Maykin Media B.V.: https://www.maykinmedia.nl
.. |lint-oas| image:: https://github.com/maykinmedia/referentielijsten/workflows/actions/lint-oas/badge.svg
:alt: Lint OAS
:target: https://github.com/maykinmedia/referentielijsten/actions?query=workflow%3Alint-oas
14 changes: 0 additions & 14 deletions bin/celery_beat.sh

This file was deleted.

2 changes: 0 additions & 2 deletions bin/celery_flower.sh

This file was deleted.

20 changes: 0 additions & 20 deletions bin/celery_worker.sh

This file was deleted.

51 changes: 27 additions & 24 deletions src/referentielijsten/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ paths:
type: string
description: 'De waarde van de `tabel__code` die gelinkt is aan de items:
VERPLICHT'
required: true
tags:
- items
security:
Expand All @@ -47,13 +48,13 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationError'
$ref: '#/components/schemas/FieldValidationError'
examples:
Tabel_codeQueryParamNotProvided:
value:
name: tabel__code
code: invalid
reason: Verplichte query parameter `tabel__code` niet mee gegeven.
code: required
reason: Dit veld is vereist.
summary: tabel__code query param not provided
description: ''
/api/v1/tabellen:
Expand Down Expand Up @@ -123,6 +124,23 @@ components:
type: string
description: De organisatie naam van de beheerder van dit tabel.
maxLength: 200
FieldValidationError:
type: object
description: Formaat van validatiefouten.
properties:
name:
type: string
description: Naam van het veld met ongeldige gegevens
code:
type: string
description: Systeemcode die het type fout aangeeft
reason:
type: string
description: Uitleg wat er precies fout is met de gegevens
required:
- code
- name
- reason
Item:
type: object
properties:
Expand Down Expand Up @@ -152,6 +170,9 @@ components:
- naam
PaginatedItemList:
type: object
required:
- count
- results
properties:
count:
type: integer
Expand All @@ -172,6 +193,9 @@ components:
$ref: '#/components/schemas/Item'
PaginatedTabelList:
type: object
required:
- count
- results
properties:
count:
type: integer
Expand Down Expand Up @@ -214,24 +238,3 @@ components:
required:
- code
- naam
ValidationError:
type: object
description: |-
Validation error format, following the NL API Strategy.
See https://docs.geostandaarden.nl/api/API-Strategie/ and
https://docs.geostandaarden.nl/api/API-Strategie-ext/#error-handling-0
properties:
name:
type: string
description: Name of the field with invalid data
code:
type: string
description: System code of the type of error
reason:
type: string
description: Explanation of what went wrong with the data
required:
- code
- name
- reason
Loading

0 comments on commit b07cce5

Please sign in to comment.