cookiecutter-web-backend

Backend for cookiecutter-web

https://github.com/m-team-kit/cookiecutter-web-backend

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.4%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Backend for cookiecutter-web

Basic Info
  • Host: GitHub
  • Owner: m-team-kit
  • License: apache-2.0
  • Language: Python
  • Default Branch: main
  • Size: 509 KB
Statistics
  • Stars: 0
  • Watchers: 3
  • Forks: 0
  • Open Issues: 1
  • Releases: 0
Created about 2 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation Codemeta

README.md

Cookiecutter Web Backend

Implemented using:

Installation and run

There standard way to run the application is via docker-compose:

bash $ docker compose -f docker-compose.yml -f compose/production.yml up -d

See Use Compose in production for more information.

This will run the application following the configuration in compose.yml and production.yml files. It automatically loads the environment variables from the .env file and creates a postgres database.

After the backend is running for first time, the database is empty. You need to call the API method POST /database:create as admin (env ADMIN_SECRET) to trigger the reading of the repository containing the templates index.

Testing

Tests are implemented using pytest. The tests are designed to run on the integration layer, therefore they require a database and an smtp server running.

There are multiple ways to run the tests. The standard way is to use docker compose:

bash $ docker compose -f docker-compose.yml -f compose/testing.yml run --rm backend

This will run the tests inside a container with all the required dependencies and services.

Testing does not read the .env file. You need to edit compose/testing.yml to set the environment variables.

Development

There are multiple ways and tools that can be used to develop the application. The standard way is to use docker compose:

bash $ docker compose -f docker-compose.yml -f compose/development.yml up -d

Then you can attach your debugger to the running container.

```bash

```

For vscode the launch.json contains a configuration Python: Attach backend to attach the debugger to the running backend.

The backend service is configured to do not start until a debugger is attached. Therefore you do not need to use the container to debug your application. You can also use locally uvicorn:

bash $ pip install -r requirements.txt -r requirements-dev.txt $ uvicorn autoapp:app --reload

Note that this does not load the environment variables from the .env file. You need to load them with your preferred method.

For vscode the launch.json contains a configuration Python: FastAPI to directly lunch the application in local.

Coverage and other tools

You can get extended testing features by running tox:

bash $ tox

You have the following environments configured:

  • py311: run tests in python 3.11
  • qc.cov: run coverage tests
  • qc.sec: run security tests
  • qc.sty: run style tests

Owner

  • Name: m-team-kit
  • Login: m-team-kit
  • Kind: organization

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: cookiecutter-web
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Christophe
    family-names: Laures
    affiliation: KIT
  - given-names: Borja
    family-names: Esteban
    affiliation: KIT
  - given-names: Valentin
    family-names: Kozlov
    affiliation: KIT
repository-code: >-
  https://codebase.helmholtz.cloud/m-team/ai/cookiecutter-web/
url: 'https://templates.services.fedcloud.eu/'
abstract: >-
  This application provides a 'marketplace' for commonly
  used [cookiecutter](https://cookiecutter.readthedocs.io/)
  templates, allowing the user to fill in the configuration
  online and download the generated project as a .zip file.
keywords:
  - templates
  - web service
  - cookiecutter
license: Apache-2.0

CodeMeta (codemeta.json)

{
  "@context": "https://doi.org/10.5063/schema/codemeta-2.0",
  "@type": "SoftwareSourceCode",
  "license": "https://spdx.org/licenses/Apache-2.0",
  "name": "cookiecutter-web-backend",
  "description": "This application is the backend for the service '[cookiecutter-web](https://templates.cloud.ai4eosc.eu/)'\ntemplates for ai4eosc.\n",
  "applicationCategory": "Software templates",
  "keywords": [
    "templates",
    "cookiecutter",
    "web service"
  ],
  "programmingLanguage": [
    "Python"
  ],
  "relatedLink": [
    "https://templates.services.fedcloud.eu/"
  ],
  "author": [
    {
      "@type": "Person",
      "givenName": "Christophe",
      "familyName": "Laures",
      "affiliation": {
        "@type": "Organization",
        "name": "KIT"
      }
    },
    {
      "@type": "Person",
      "givenName": "Borja",
      "familyName": "Esteban",
      "affiliation": {
        "@type": "Organization",
        "name": "KIT"
      }
    },
    {
      "@type": "Person",
      "givenName": "Valentin",
      "familyName": "Kozlov",
      "affiliation": {
        "@type": "Organization",
        "name": "KIT"
      }
    }
  ]
}

GitHub Events

Total
  • Issues event: 1
  • Push event: 1
Last Year
  • Issues event: 1
  • Push event: 1

Dependencies

.sqa/docker-compose.yml docker
  • backend testing
  • boky/postfix v3.6.1-alpine
  • postgres 15
docker-compose.yml docker
  • backend latest
  • boky/postfix v3.6.1-alpine
  • postgres 15
pyproject.toml pypi
requirements-dev.txt pypi
  • autoflake * development
  • black * development
  • debugpy * development
  • isort * development
  • mypy * development
  • sqlalchemy-stubs * development
requirements-docs.txt pypi
  • sphinx *
requirements-test.txt pypi
  • bandit * test
  • flake8 * test
  • pytest * test
  • pytest-cov * test
  • pytest-xdist * test
requirements.txt pypi
  • alembic *
  • cookiecutter *
  • email-validator *
  • fastapi *
  • flaat *
  • gitpython *
  • httpx *
  • psycopg2-binary *
  • pydantic *
  • pydantic-settings *
  • requests *
  • sqlalchemy *
  • tox *
  • uvicorn *