Commit 7bbffce8 authored by Guillaume Mella's avatar Guillaume Mella

general import cleanup

parent 1cf9d336
from pyramid.session import SignedCookieSessionFactory
from pyramid.config import Configurator
from pyramid.session import SignedCookieSessionFactory
def main(global_config, **settings):
......
......@@ -5,9 +5,8 @@ Revises:
Create Date: 2019-07-24 12:04:47.744393
"""
from alembic import op
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = '59e01862a009'
......
......@@ -5,9 +5,8 @@ Revises: e969bef706d9
Create Date: 2019-07-26 15:48:45.120586
"""
from alembic import op
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = '0197b06cd69d'
......
......@@ -5,9 +5,8 @@ Revises: 59e01862a009
Create Date: 2019-07-26 14:34:34.781225
"""
from alembic import op
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = 'aaee0e29c9ad'
......
......@@ -5,9 +5,8 @@ Revises: aaee0e29c9ad
Create Date: 2019-07-26 15:44:30.034370
"""
from alembic import op
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = 'e969bef706d9'
......
......@@ -5,9 +5,8 @@ Revises: 0197b06cd69d
Create Date: 2020-01-17 12:25:22.100925
"""
from alembic import op
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = 'e891b3cc374d'
......
from wtforms.form import Form
from wtforms import TextAreaField, StringField, FileField
from wtforms import validators
from wtforms.form import Form
class FormSubmitResults(Form):
email = StringField('Email', [validators.required()])
......
import zope.sqlalchemy
from sqlalchemy import engine_from_config
from sqlalchemy.orm import sessionmaker
from sqlalchemy.orm import configure_mappers
import zope.sqlalchemy
from sqlalchemy.orm import sessionmaker
# import or define all models here to ensure they are attached to the
# Base.metadata prior to any initialization routines
from .star_data import Catalog, Star, StarName
from .submission import StarInfoEntry, Submission
from .star_info import StarInfo
from .submission import StarInfoEntry, Submission
# run configure_mappers after defining all of the models to ensure
# all relationships can be setup
......
......@@ -5,14 +5,13 @@ import urllib.parse
import requests
from psycopg2.errors import UniqueViolation
from sqlalchemy import (Boolean, Column, Float, ForeignKey, Index, Integer,
from sqlalchemy import (Boolean, Column, ForeignKey, Integer,
String)
from sqlalchemy.ext.associationproxy import association_proxy
from sqlalchemy.orm import relationship
from sqlalchemy.orm.collections import attribute_mapped_collection
from .meta import Base
#
# utility functions
#
......
import re
from sqlalchemy import Column, Float, Index, Integer, String, Boolean
from sqlalchemy import Column, Float, Integer, String, Boolean
from sqlalchemy.ext.associationproxy import association_proxy
from sqlalchemy.inspection import inspect
from sqlalchemy.orm import relationship
......@@ -8,6 +6,7 @@ from sqlalchemy.orm import relationship
from .meta import Base
from .star_data import Star, StarName, Band
#---------------------------------------------------------------------------
#-- II/345 JMDC : JMMC Measured Stellar Diameters Catalogue (Duvert, 2016)
#--------------------------------------------------------------------------
......
from sqlalchemy import Boolean, Column, ForeignKey, Index, Integer, TIMESTAMP, Text
from sqlalchemy import Boolean, Column, ForeignKey, Integer, TIMESTAMP, Text
from sqlalchemy.orm import relationship
from .meta import Base
from .star_info import StarInfo
class StarInfoEntry(Base):
__tablename__ = 'star_info_entry'
......
import unittest
from pyramid import testing
import transaction
from pyramid import testing
def dummy_request(dbsession):
......
from pyramid.view import view_config
from pyramid.response import Response
from sqlalchemy.exc import DBAPIError
from .. import models
......
from pyramid.response import Response
from pyramid.view import view_config
from sqlalchemy.exc import DBAPIError
@view_config(route_name='jmdc_about', renderer='../templates/jmdc_about.jinja2')
def jmdc_about(request):
......
......@@ -3,6 +3,7 @@ from pyramid.view import view_config
from jmdc_app.models.star_info import StarInfo
from jmdc_app.models.submission import StarInfoEntry
@view_config(route_name='jmdc_catalog', renderer='../templates/jmdc_catalog.jinja2')
def jmdc_home(request):
......
from pyramid.response import Response
from pyramid.view import view_config
from sqlalchemy.exc import DBAPIError
@view_config(route_name='jmdc_doc', renderer='../templates/jmdc_doc.jinja2')
def jmdc_doc(request):
......
import re
from pyramid.response import Response
from pyramid.view import view_config
from sqlalchemy.exc import DBAPIError
from jmdc_app.models.submission import StarInfoEntry, Submission
......
from pyramid.view import notfound_view_config
# @notfound_view_config(renderer='../templates/404.jinja2')
# def notfound_view(request):
# request.response.status = 404
......
......@@ -2,21 +2,16 @@ import codecs
import csv
import datetime
import json
import secrets
from pyramid.config import Configurator
import secrets
from pyramid.httpexceptions import HTTPFound
from pyramid.response import Response
from pyramid.view import view_config
from pyramid_mailer.message import Message
from sqlalchemy.exc import DBAPIError
from jmdc_app.forms.submit import FormImportCsv, FormSubmitResults
from jmdc_app.models.star_info import StarInfo
from jmdc_app.models.submission import StarInfoEntry, Submission
from .. import models
class import_new_data():
......
import json
import threading
import time
import traceback
from multiprocessing import Process
import pyramid.httpexceptions as exc
from pyramid.request import Request
from pyramid.response import Response
from pyramid.renderers import render_to_response
from pyramid.view import view_config
from pyramid.threadlocal import get_current_registry
from pyramid_mailer.mailer import Mailer
from pyramid_mailer.message import Message
from sqlalchemy import create_engine
from sqlalchemy.exc import DBAPIError
from sqlalchemy.orm import sessionmaker
from jmdc_app.models.star_info import StarInfo
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment