Ignore:
Timestamp:
Apr 19, 2020, 4:27:01 PM (7 years ago)
Author:
Joachim Langenbach <joachim.langenbach@…>
Branches:
debian/bullseye, master
Children:
2a31181
Parents:
77cd9cf
Message:

Refactored code to have one gnuboat python structure

Location:
buildhelpers/codegen
Files:
14 moved

Legend:

Unmodified
Added
Removed
  • buildhelpers/codegen/templates/__init__test.mustache

    r77cd9cf r43fd35c  
    1414
    1515from {{packageName}}.encoder import JSONEncoder
    16 from {{packageName}}.server_impl.database.Model import db, db_setup, load_spatialite
    17 from . import db_test_setup
     16from {{packageName}}_impl.database.Model import (
     17    db, db_setup, load_spatialite
     18)
     19from {{packageName}}_impl.tests import db_test_setup
    1820
    1921class BaseTestCase(TestCase):
    … …  
    2729                app.add_api('openapi.yaml')
    2830
    29                 application.config.from_object('{{packageName}}.server_impl.Config.TestingConfig')
    30                 application.template_folder = os.path.join(os.path.dirname(__file__), '../templates')
     31                application.config.from_object('{{packageName}}_impl.Config.TestingConfig')
     32                application.template_folder = os.path.join(os.path.dirname(__file__), '../../mapservice_impl/templates')
    3133                celery = Celery(__name__, broker=application.config['CELERY_BROKER_URL'])
    3234                celery.config_from_object(application.config)
  • buildhelpers/codegen/templates/__main__.mustache

    r77cd9cf r43fd35c  
    88import os
    99
    10 from {{packageName}}.server_impl import app, application, mail, celery, setup_app, config_object
     10from {{packageName}}_impl import (
     11    app, application, mail, celery, setup_app, config_object
     12)
    1113
    1214def main():
  • buildhelpers/codegen/templates/controller.mustache

    r77cd9cf r43fd35c  
    88{{#operation}}
    99
    10 from {{packageName}}.server_impl.controllers import {{classname}}
     10from {{packageName}}_impl.controllers import {{classname}}
    1111
    1212def {{operationId}}({{#allParams}}{{paramName}}{{^required}}=None{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}):  # noqa: E501
  • buildhelpers/codegen/templates/controller_test.mustache

    r77cd9cf r43fd35c  
    2121    def test_{{operationId}}(self):
    2222        """Test case for {{{operationId}}}
    23 
    2423        {{{summary}}}
    2524        """
  • buildhelpers/codegen/templates/model.mustache

    r77cd9cf r43fd35c  
    2323{{#model}}
    2424class {{classname}}(Model):
    25     """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
     25    """NOTE: This class is auto generated by OpenAPI Generator
     26       (https://openapi-generator.tech).
    2627
    2728    Do not edit the class manually.
Note: See TracChangeset for help on using the changeset viewer.