From c0d3fca6d69e7d0c843f19b541dbe78f387ab0c8 Mon Sep 17 00:00:00 2001 From: Joel Brownstein Date: Sat, 10 Aug 2019 15:29:42 -0600 Subject: [PATCH 01/28] archive --- python/sdssdb/sqlalchemy/archive/__init__.py | 24 ++++++++ python/sdssdb/sqlalchemy/archive/sas.py | 60 ++++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 python/sdssdb/sqlalchemy/archive/__init__.py create mode 100644 python/sdssdb/sqlalchemy/archive/sas.py diff --git a/python/sdssdb/sqlalchemy/archive/__init__.py b/python/sdssdb/sqlalchemy/archive/__init__.py new file mode 100644 index 00000000..969baeea --- /dev/null +++ b/python/sdssdb/sqlalchemy/archive/__init__.py @@ -0,0 +1,24 @@ +# !usr/bin/env python +# -*- coding: utf-8 -*- +# +# Licensed under a 3-clause BSD license. +# +# @Author: Brian Cherinka +# @Date: 2018-09-23 16:06:18 +# @Last modified by: José Sánchez-Gallego (gallegoj@uw.edu) +# @Last Modified time: 2018-10-10 11:25:13 + +from __future__ import print_function, division, absolute_import + +from sdssdb.connection import SQLADatabaseConnection +from sqlalchemy.ext.declarative import declarative_base, DeferredReflection +from sdssdb.sqlalchemy import BaseModel + +# we need a shared common Base when joining across multiple schema +ArchiveBase = declarative_base(cls=(DeferredReflection, BaseModel,)) + +class ArchiveDatabaseConnection(SQLADatabaseConnection): + dbname = 'archive' + base = ArchiveBase + +database = ArchiveDatabaseConnection(autoconnect=True) diff --git a/python/sdssdb/sqlalchemy/archive/sas.py b/python/sdssdb/sqlalchemy/archive/sas.py new file mode 100644 index 00000000..214f2bfc --- /dev/null +++ b/python/sdssdb/sqlalchemy/archive/sas.py @@ -0,0 +1,60 @@ +# !usr/bin/env python +# -*- coding: utf-8 -*- +# +# Licensed under a 3-clause BSD license. +# +# @Author: Joel Brownstein +# @Date: 2019-08-01 06:54:15 +# @Last modified by: Joel Brownstein (joelbrownstein@astro.utah.edu) + +from __future__ import absolute_import, division, print_function + +from sdssdb.sqlalchemy.archive import database, ArchiveBase, sas +from sqlalchemy import Column, Float, and_, case, cast, select +from sqlalchemy.engine import reflection +from sqlalchemy.ext.declarative import AbstractConcreteBase, declared_attr +from sqlalchemy.ext.hybrid import hybrid_property +from sqlalchemy.orm import relationship +from sqlalchemy.types import Integer + +SCHEMA = 'sas' + +class Base(AbstractConcreteBase, ArchiveBase): + __abstract__ = True + _schema = SCHEMA + _relations = 'define_relations' + + @declared_attr + def __table_args__(cls): + return {'schema': cls._schema} + +class Root(Base): + __tablename__ = 'root' + +class Tree(Base): + __tablename__ = 'tree' + +class Env(Base): + __tablename__ = 'env' + +class File(Base): + __tablename__ = 'file' + +class Symlink_file(Base): + __tablename__ = 'symlink_file' + +class Symlink_directory(Base): + __tablename__ = 'symlink_directory' + +class Checksumfile(Base): + __tablename__ = 'checksumfile' + +class Checksum(Base): + __tablename__ = 'checksum' + +def define_relations(): + """Setup relationships after preparation.""" + pass + +# prepare the base +database.add_base(Base) From de160863568ae80c73d92b1e5960d280e6930ee8 Mon Sep 17 00:00:00 2001 From: Joel Brownstein Date: Sat, 10 Aug 2019 15:41:18 -0600 Subject: [PATCH 02/28] archive_20190507 --- python/sdssdb/sqlalchemy/archive/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/sdssdb/sqlalchemy/archive/__init__.py b/python/sdssdb/sqlalchemy/archive/__init__.py index 969baeea..583f1a5d 100644 --- a/python/sdssdb/sqlalchemy/archive/__init__.py +++ b/python/sdssdb/sqlalchemy/archive/__init__.py @@ -18,7 +18,7 @@ ArchiveBase = declarative_base(cls=(DeferredReflection, BaseModel,)) class ArchiveDatabaseConnection(SQLADatabaseConnection): - dbname = 'archive' + dbname = 'archive_20190507' base = ArchiveBase database = ArchiveDatabaseConnection(autoconnect=True) From 783eb6a17138e05d9e5ee92fad07cd3e989ee822 Mon Sep 17 00:00:00 2001 From: Joel Brownstein Date: Sun, 11 Aug 2019 12:02:01 -0600 Subject: [PATCH 03/28] Update sas.py directory table --- python/sdssdb/sqlalchemy/archive/sas.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/sdssdb/sqlalchemy/archive/sas.py b/python/sdssdb/sqlalchemy/archive/sas.py index 214f2bfc..59238c99 100644 --- a/python/sdssdb/sqlalchemy/archive/sas.py +++ b/python/sdssdb/sqlalchemy/archive/sas.py @@ -37,6 +37,9 @@ class Tree(Base): class Env(Base): __tablename__ = 'env' +class Directory(Base): + __tablename__ = 'directory' + class File(Base): __tablename__ = 'file' From dbfb0c8b1d1a5897a4f6c6dca9a897ffcfd3d6c2 Mon Sep 17 00:00:00 2001 From: N Benjamin Murphy Date: Wed, 4 Sep 2019 16:33:35 -0600 Subject: [PATCH 04/28] Updated define_relations() method in sas module --- python/sdssdb/sqlalchemy/archive/sas.py | 68 ++++++++++++++++++++++++- 1 file changed, 66 insertions(+), 2 deletions(-) diff --git a/python/sdssdb/sqlalchemy/archive/sas.py b/python/sdssdb/sqlalchemy/archive/sas.py index 59238c99..cdccd5ad 100644 --- a/python/sdssdb/sqlalchemy/archive/sas.py +++ b/python/sdssdb/sqlalchemy/archive/sas.py @@ -5,7 +5,8 @@ # # @Author: Joel Brownstein # @Date: 2019-08-01 06:54:15 -# @Last modified by: Joel Brownstein (joelbrownstein@astro.utah.edu) +# @Last modified by: N Benjamin Murphy (n.benjamin.murphy@astro.utah.edu) +# @Date: 2019-09-04 16:31:00 from __future__ import absolute_import, division, print_function @@ -57,7 +58,70 @@ class Checksum(Base): def define_relations(): """Setup relationships after preparation.""" - pass + + # model relationships + #directories = relationship("Directory", backref='root') + #envs = relationship("Env", backref='tree') + Root.directories = relationship(Directory, backref='root') + Tree.envs = relationship(Env, backref='tree') + + #class Checksum + #tree_id = db.Column(db.Integer, db.ForeignKey('%s.tree.id' % schema)) + #checksumfile_id = db.Column(db.Integer, db.ForeignKey('%s.checksumfile.id' % schema), nullable=False) + #file_id = db.Column(db.Integer, db.ForeignKey('%s.file.id' % schema)) + #directory_id = db.Column(db.Integer, db.ForeignKey('%s.directory.id' % schema), nullable=False) + Checksum.tree = relationship(Tree, backref='checksum') + Checksum.checksumfile = relationship(Checksumfile, backref='checksum') + Checksum.file = relationship(File, backref='checksum') + Checksum.directory = relationship(Directory, backref='checksum') + + #class Checksumfile + #tree_id = db.Column(db.Integer, db.ForeignKey('%s.tree.id' % schema)) + #env_id = db.Column(db.Integer, db.ForeignKey('%s.env.id' % schema)) + #directory_id = db.Column(db.Integer, db.ForeignKey('%s.directory.id' % schema), nullable=False) + #file_id = db.Column(db.Integer, db.ForeignKey('%s.file.id' % schema), nullable=False) + Checksumfile.tree = relationship(Tree, backref='checksumfile') + Checksumfile.env = relationship(Env, backref='checksumfile') + Checksumfile.directory = relationship(Directory, backref='checksumfile') + Checksumfile.file = relationship(File, backref='checksumfile') + + #class Directory + #root_id = db.Column(db.Integer, db.ForeignKey('%s.root.id' % schema), nullable = False) + #tree_id = db.Column(db.Integer, db.ForeignKey('%s.tree.id' % schema)) + #env_id = db.Column(db.Integer, db.ForeignKey('%s.env.id' % schema)) + Directory.root = relationship(Root, backref='directory') + Directory.tree = relationship(Tree, backref='directory') + Directory.env = relationship(Env, backref='directory') + + #class Env + #tree_id = db.Column(db.Integer, db.ForeignKey('%s.tree.id' % schema)) + #real_env_id = db.Column(db.Integer, db.ForeignKey('%s.env.id' % schema)) + Env.tree = relationship(Tree, backref='env') + Env.real_env = relationship(Env) + + #class File + #root_id = db.Column(db.Integer, db.ForeignKey('%s.root.id' % schema), nullable = False) + #tree_id = db.Column(db.Integer, db.ForeignKey('%s.tree.id' % schema)) + #env_id = db.Column(db.Integer, db.ForeignKey('%s.env.id' % schema)) + File.root = relationship(Root, backref='file') + File.tree = relationship(Tree, backref='file') + File.env = relationship(Env, backref='file') + + #class Symlink_directory + #root_id = db.Column(db.Integer, db.ForeignKey('%s.root.id' % schema), nullable = False) + #tree_id = db.Column(db.Integer, db.ForeignKey('%s.tree.id' % schema)) + #env_id = db.Column(db.Integer, db.ForeignKey('%s.env.id' % schema)) + Symlink_directory.root = relationship(Root, backref='symlink_directory') + Symlink_directory.tree = relationship(Tree, backref='symlink_directory') + Symlink_directory.env = relationship(Env, backref='symlink_directory') + + #class Symlink_file + #root_id = db.Column(db.Integer, db.ForeignKey('%s.root.id' % schema), nullable = False) + #tree_id = db.Column(db.Integer, db.ForeignKey('%s.tree.id' % schema)) + #env_id = db.Column(db.Integer, db.ForeignKey('%s.env.id' % schema)) + Symlink_file.root = relationship(Root, backref='symlink_file') + Symlink_file.tree = relationship(Tree, backref='symlink_file') + Symlink_file.env = relationship(Env, backref='symlink_file') # prepare the base database.add_base(Base) From b92db3057bfac0b07d3ea64fc449fcbbf96bae9c Mon Sep 17 00:00:00 2001 From: Brian Cherinka Date: Wed, 18 Sep 2019 12:05:41 -0400 Subject: [PATCH 05/28] linting archive sas.py file --- python/sdssdb/sqlalchemy/archive/sas.py | 34 +++++++++++++++++-------- python/sdssdb/tests/test_main.py | 14 +++++----- 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/python/sdssdb/sqlalchemy/archive/sas.py b/python/sdssdb/sqlalchemy/archive/sas.py index cdccd5ad..954b749a 100644 --- a/python/sdssdb/sqlalchemy/archive/sas.py +++ b/python/sdssdb/sqlalchemy/archive/sas.py @@ -20,6 +20,7 @@ SCHEMA = 'sas' + class Base(AbstractConcreteBase, ArchiveBase): __abstract__ = True _schema = SCHEMA @@ -29,33 +30,43 @@ class Base(AbstractConcreteBase, ArchiveBase): def __table_args__(cls): return {'schema': cls._schema} + class Root(Base): __tablename__ = 'root' + class Tree(Base): __tablename__ = 'tree' + class Env(Base): __tablename__ = 'env' + class Directory(Base): __tablename__ = 'directory' + class File(Base): __tablename__ = 'file' + class Symlink_file(Base): __tablename__ = 'symlink_file' + class Symlink_directory(Base): __tablename__ = 'symlink_directory' + class Checksumfile(Base): __tablename__ = 'checksumfile' + class Checksum(Base): __tablename__ = 'checksum' + def define_relations(): """Setup relationships after preparation.""" @@ -63,27 +74,27 @@ def define_relations(): #directories = relationship("Directory", backref='root') #envs = relationship("Env", backref='tree') Root.directories = relationship(Directory, backref='root') - Tree.envs = relationship(Env, backref='tree') + Tree.envs = relationship(Env, backref='tree') #class Checksum #tree_id = db.Column(db.Integer, db.ForeignKey('%s.tree.id' % schema)) #checksumfile_id = db.Column(db.Integer, db.ForeignKey('%s.checksumfile.id' % schema), nullable=False) #file_id = db.Column(db.Integer, db.ForeignKey('%s.file.id' % schema)) #directory_id = db.Column(db.Integer, db.ForeignKey('%s.directory.id' % schema), nullable=False) - Checksum.tree = relationship(Tree, backref='checksum') + Checksum.tree = relationship(Tree, backref='checksum') Checksum.checksumfile = relationship(Checksumfile, backref='checksum') - Checksum.file = relationship(File, backref='checksum') - Checksum.directory = relationship(Directory, backref='checksum') + Checksum.file = relationship(File, backref='checksum') + Checksum.directory = relationship(Directory, backref='checksum') #class Checksumfile #tree_id = db.Column(db.Integer, db.ForeignKey('%s.tree.id' % schema)) #env_id = db.Column(db.Integer, db.ForeignKey('%s.env.id' % schema)) #directory_id = db.Column(db.Integer, db.ForeignKey('%s.directory.id' % schema), nullable=False) #file_id = db.Column(db.Integer, db.ForeignKey('%s.file.id' % schema), nullable=False) - Checksumfile.tree = relationship(Tree, backref='checksumfile') - Checksumfile.env = relationship(Env, backref='checksumfile') + Checksumfile.tree = relationship(Tree, backref='checksumfile') + Checksumfile.env = relationship(Env, backref='checksumfile') Checksumfile.directory = relationship(Directory, backref='checksumfile') - Checksumfile.file = relationship(File, backref='checksumfile') + Checksumfile.file = relationship(File, backref='checksumfile') #class Directory #root_id = db.Column(db.Integer, db.ForeignKey('%s.root.id' % schema), nullable = False) @@ -91,7 +102,7 @@ def define_relations(): #env_id = db.Column(db.Integer, db.ForeignKey('%s.env.id' % schema)) Directory.root = relationship(Root, backref='directory') Directory.tree = relationship(Tree, backref='directory') - Directory.env = relationship(Env, backref='directory') + Directory.env = relationship(Env, backref='directory') #class Env #tree_id = db.Column(db.Integer, db.ForeignKey('%s.tree.id' % schema)) @@ -105,7 +116,7 @@ def define_relations(): #env_id = db.Column(db.Integer, db.ForeignKey('%s.env.id' % schema)) File.root = relationship(Root, backref='file') File.tree = relationship(Tree, backref='file') - File.env = relationship(Env, backref='file') + File.env = relationship(Env, backref='file') #class Symlink_directory #root_id = db.Column(db.Integer, db.ForeignKey('%s.root.id' % schema), nullable = False) @@ -113,7 +124,7 @@ def define_relations(): #env_id = db.Column(db.Integer, db.ForeignKey('%s.env.id' % schema)) Symlink_directory.root = relationship(Root, backref='symlink_directory') Symlink_directory.tree = relationship(Tree, backref='symlink_directory') - Symlink_directory.env = relationship(Env, backref='symlink_directory') + Symlink_directory.env = relationship(Env, backref='symlink_directory') #class Symlink_file #root_id = db.Column(db.Integer, db.ForeignKey('%s.root.id' % schema), nullable = False) @@ -121,7 +132,8 @@ def define_relations(): #env_id = db.Column(db.Integer, db.ForeignKey('%s.env.id' % schema)) Symlink_file.root = relationship(Root, backref='symlink_file') Symlink_file.tree = relationship(Tree, backref='symlink_file') - Symlink_file.env = relationship(Env, backref='symlink_file') + Symlink_file.env = relationship(Env, backref='symlink_file') + # prepare the base database.add_base(Base) diff --git a/python/sdssdb/tests/test_main.py b/python/sdssdb/tests/test_main.py index 78c82100..c580e311 100644 --- a/python/sdssdb/tests/test_main.py +++ b/python/sdssdb/tests/test_main.py @@ -10,14 +10,14 @@ from pytest import mark -from sdssdb.main import math +# from sdssdb.main import math -class TestMath(object): - """Tests for the ``math`` function in main.py.""" +# class TestMath(object): +# """Tests for the ``math`` function in main.py.""" - @mark.parametrize(('arg1', 'arg2', 'operator', 'result'), - [(1, 2, '+', 3), (2, 2, '-', 0), (3, 5, '*', 15), (10, 2, '/', 5)]) - def test_math(self, arg1, arg2, operator, result): +# @mark.parametrize(('arg1', 'arg2', 'operator', 'result'), +# [(1, 2, '+', 3), (2, 2, '-', 0), (3, 5, '*', 15), (10, 2, '/', 5)]) +# def test_math(self, arg1, arg2, operator, result): - assert math(arg1, arg2, arith_operator=operator) == result +# assert math(arg1, arg2, arith_operator=operator) == result From d1c9c80f1b9624dfdd279995d706934e32ac212c Mon Sep 17 00:00:00 2001 From: Brian Cherinka Date: Wed, 18 Sep 2019 17:06:54 -0400 Subject: [PATCH 06/28] updating relationships --- python/sdssdb/sqlalchemy/archive/sas.py | 98 ++++++++++--------------- 1 file changed, 37 insertions(+), 61 deletions(-) diff --git a/python/sdssdb/sqlalchemy/archive/sas.py b/python/sdssdb/sqlalchemy/archive/sas.py index 954b749a..90de3f15 100644 --- a/python/sdssdb/sqlalchemy/archive/sas.py +++ b/python/sdssdb/sqlalchemy/archive/sas.py @@ -51,15 +51,15 @@ class File(Base): __tablename__ = 'file' -class Symlink_file(Base): +class SymlinkFile(Base): __tablename__ = 'symlink_file' -class Symlink_directory(Base): +class SymlinkDirectory(Base): __tablename__ = 'symlink_directory' -class Checksumfile(Base): +class ChecksumFile(Base): __tablename__ = 'checksumfile' @@ -71,68 +71,44 @@ def define_relations(): """Setup relationships after preparation.""" # model relationships - #directories = relationship("Directory", backref='root') - #envs = relationship("Env", backref='tree') Root.directories = relationship(Directory, backref='root') Tree.envs = relationship(Env, backref='tree') - #class Checksum - #tree_id = db.Column(db.Integer, db.ForeignKey('%s.tree.id' % schema)) - #checksumfile_id = db.Column(db.Integer, db.ForeignKey('%s.checksumfile.id' % schema), nullable=False) - #file_id = db.Column(db.Integer, db.ForeignKey('%s.file.id' % schema)) - #directory_id = db.Column(db.Integer, db.ForeignKey('%s.directory.id' % schema), nullable=False) - Checksum.tree = relationship(Tree, backref='checksum') - Checksum.checksumfile = relationship(Checksumfile, backref='checksum') - Checksum.file = relationship(File, backref='checksum') - Checksum.directory = relationship(Directory, backref='checksum') + # class Checksum + Checksum.tree = relationship(Tree, backref='checksums') + Checksum.checksumfile = relationship(ChecksumFile, backref='checksums') + Checksum.file = relationship(File, backref='checksums') + Checksum.directory = relationship(Directory, backref='checksums') - #class Checksumfile - #tree_id = db.Column(db.Integer, db.ForeignKey('%s.tree.id' % schema)) - #env_id = db.Column(db.Integer, db.ForeignKey('%s.env.id' % schema)) - #directory_id = db.Column(db.Integer, db.ForeignKey('%s.directory.id' % schema), nullable=False) - #file_id = db.Column(db.Integer, db.ForeignKey('%s.file.id' % schema), nullable=False) - Checksumfile.tree = relationship(Tree, backref='checksumfile') - Checksumfile.env = relationship(Env, backref='checksumfile') - Checksumfile.directory = relationship(Directory, backref='checksumfile') - Checksumfile.file = relationship(File, backref='checksumfile') - - #class Directory - #root_id = db.Column(db.Integer, db.ForeignKey('%s.root.id' % schema), nullable = False) - #tree_id = db.Column(db.Integer, db.ForeignKey('%s.tree.id' % schema)) - #env_id = db.Column(db.Integer, db.ForeignKey('%s.env.id' % schema)) - Directory.root = relationship(Root, backref='directory') - Directory.tree = relationship(Tree, backref='directory') - Directory.env = relationship(Env, backref='directory') - - #class Env - #tree_id = db.Column(db.Integer, db.ForeignKey('%s.tree.id' % schema)) - #real_env_id = db.Column(db.Integer, db.ForeignKey('%s.env.id' % schema)) - Env.tree = relationship(Tree, backref='env') - Env.real_env = relationship(Env) - - #class File - #root_id = db.Column(db.Integer, db.ForeignKey('%s.root.id' % schema), nullable = False) - #tree_id = db.Column(db.Integer, db.ForeignKey('%s.tree.id' % schema)) - #env_id = db.Column(db.Integer, db.ForeignKey('%s.env.id' % schema)) - File.root = relationship(Root, backref='file') - File.tree = relationship(Tree, backref='file') - File.env = relationship(Env, backref='file') - - #class Symlink_directory - #root_id = db.Column(db.Integer, db.ForeignKey('%s.root.id' % schema), nullable = False) - #tree_id = db.Column(db.Integer, db.ForeignKey('%s.tree.id' % schema)) - #env_id = db.Column(db.Integer, db.ForeignKey('%s.env.id' % schema)) - Symlink_directory.root = relationship(Root, backref='symlink_directory') - Symlink_directory.tree = relationship(Tree, backref='symlink_directory') - Symlink_directory.env = relationship(Env, backref='symlink_directory') - - #class Symlink_file - #root_id = db.Column(db.Integer, db.ForeignKey('%s.root.id' % schema), nullable = False) - #tree_id = db.Column(db.Integer, db.ForeignKey('%s.tree.id' % schema)) - #env_id = db.Column(db.Integer, db.ForeignKey('%s.env.id' % schema)) - Symlink_file.root = relationship(Root, backref='symlink_file') - Symlink_file.tree = relationship(Tree, backref='symlink_file') - Symlink_file.env = relationship(Env, backref='symlink_file') + # class Checksumfile + ChecksumFile.tree = relationship(Tree, backref='checksumfile') + ChecksumFile.env = relationship(Env, backref='checksumfile') + ChecksumFile.directory = relationship(Directory, backref='checksumfile') + ChecksumFile.file = relationship(File, backref='checksumfile') + + # class Directory + #Directory.root = relationship(Root, backref='directory') + Directory.tree = relationship(Tree, backref='directories') + Directory.env = relationship(Env, backref='directories') + + # class Env + #Env.tree = relationship(Tree, backref='env') + Env.real_env = relationship(Env, backref='env') + + # class File + File.root = relationship(Root, backref='files') + File.tree = relationship(Tree, backref='files') + File.env = relationship(Env, backref='files') + + # class Symlink_directory + SymlinkDirectory.root = relationship(Root, backref='symdirs', foreign_keys=['root_id']) + SymlinkDirectory.tree = relationship(Tree, backref='symdirs', foreign_keys=['tree_id']) + SymlinkDirectory.env = relationship(Env, backref='symdirs') + + # class Symlink_file + SymlinkFile.root = relationship(Root, backref='symlinks', foreign_keys=['root_id']) + SymlinkFile.tree = relationship(Tree, backref='symlinks', foreign_keys=['tree_id']) + SymlinkFile.env = relationship(Env, backref='symlinks') # prepare the base From 45ab9522099f7bd44c1b41d23c151a9d525d63cd Mon Sep 17 00:00:00 2001 From: Brian Cherinka Date: Wed, 18 Sep 2019 18:10:54 -0400 Subject: [PATCH 07/28] updating relationships --- python/sdssdb/sqlalchemy/archive/sas.py | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/python/sdssdb/sqlalchemy/archive/sas.py b/python/sdssdb/sqlalchemy/archive/sas.py index 90de3f15..200f5280 100644 --- a/python/sdssdb/sqlalchemy/archive/sas.py +++ b/python/sdssdb/sqlalchemy/archive/sas.py @@ -81,7 +81,7 @@ def define_relations(): Checksum.directory = relationship(Directory, backref='checksums') # class Checksumfile - ChecksumFile.tree = relationship(Tree, backref='checksumfile') + ChecksumFile.tree = relationship(Tree, backref='checksumfiles') ChecksumFile.env = relationship(Env, backref='checksumfile') ChecksumFile.directory = relationship(Directory, backref='checksumfile') ChecksumFile.file = relationship(File, backref='checksumfile') @@ -92,8 +92,8 @@ def define_relations(): Directory.env = relationship(Env, backref='directories') # class Env - #Env.tree = relationship(Tree, backref='env') - Env.real_env = relationship(Env, backref='env') + # specify remote_side when foreign key points to itself + Env.real_env = relationship(Env, remote_side=['Env.id'], backref='env') # class File File.root = relationship(Root, backref='files') @@ -101,14 +101,25 @@ def define_relations(): File.env = relationship(Env, backref='files') # class Symlink_directory - SymlinkDirectory.root = relationship(Root, backref='symdirs', foreign_keys=['root_id']) - SymlinkDirectory.tree = relationship(Tree, backref='symdirs', foreign_keys=['tree_id']) + SymlinkDirectory.directory = relationship(Directory, backref='symdir') + SymlinkDirectory.root = relationship(Root, backref='symdirs', foreign_keys='SymlinkDirectory.root_id') + SymlinkDirectory.tree = relationship(Tree, backref='symdirs', foreign_keys='SymlinkDirectory.tree_id', + primaryjoin='and_(SymlinkDirectory.tree_id==Tree.id)') SymlinkDirectory.env = relationship(Env, backref='symdirs') + SymlinkDirectory.real_dir = relationship(SymlinkDirectory, remote_side=['SymlinkDirectory.directory_id'], backref='symdir') + SymlinkDirectory.real_tree = relationship(SymlinkDirectory, remote_side=[ + 'SymlinkDirectory.tree_id'], backref='symdir') + # class Symlink_file - SymlinkFile.root = relationship(Root, backref='symlinks', foreign_keys=['root_id']) - SymlinkFile.tree = relationship(Tree, backref='symlinks', foreign_keys=['tree_id']) + SymlinkFile.directory = relationship(Directory, backref='symlinks') + SymlinkFile.root = relationship(Root, backref='symlinks', foreign_keys='SymlinkFile.root_id') + SymlinkFile.tree = relationship(Tree, backref='symlinks', foreign_keys='SymlinkFile.tree_id', + primaryjoin='and_(SymlinkDirectory.tree_id==Tree.id)') SymlinkFile.env = relationship(Env, backref='symlinks') + SymlinkFile.real_tree = relationship(SymlinkFile, remote_side=[ + 'SymlinkFile.tree_id'], backref='symlinks') + SymlinkFile.real_file = relationship(File, backref='symlinks') # prepare the base From 51d7dd9ed29d914668b6c81ceb7ee24d0bf0c2c4 Mon Sep 17 00:00:00 2001 From: Brian Cherinka Date: Wed, 18 Sep 2019 18:13:31 -0400 Subject: [PATCH 08/28] updating relationships --- python/sdssdb/sqlalchemy/archive/sas.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/python/sdssdb/sqlalchemy/archive/sas.py b/python/sdssdb/sqlalchemy/archive/sas.py index 200f5280..8ac4c5d8 100644 --- a/python/sdssdb/sqlalchemy/archive/sas.py +++ b/python/sdssdb/sqlalchemy/archive/sas.py @@ -101,12 +101,14 @@ def define_relations(): File.env = relationship(Env, backref='files') # class Symlink_directory - SymlinkDirectory.directory = relationship(Directory, backref='symdir') - SymlinkDirectory.root = relationship(Root, backref='symdirs', foreign_keys='SymlinkDirectory.root_id') + SymlinkDirectory.directory = relationship( + Directory, backref='symdir', foreign_keys='SymlinkDirectory.directory_id') + SymlinkDirectory.root = relationship(Root, backref='symdirs') SymlinkDirectory.tree = relationship(Tree, backref='symdirs', foreign_keys='SymlinkDirectory.tree_id', primaryjoin='and_(SymlinkDirectory.tree_id==Tree.id)') SymlinkDirectory.env = relationship(Env, backref='symdirs') - SymlinkDirectory.real_dir = relationship(SymlinkDirectory, remote_side=['SymlinkDirectory.directory_id'], backref='symdir') + SymlinkDirectory.real_dir = relationship(SymlinkDirectory, + remote_side=['SymlinkDirectory.directory_id'], backref='symdir') SymlinkDirectory.real_tree = relationship(SymlinkDirectory, remote_side=[ 'SymlinkDirectory.tree_id'], backref='symdir') From 4a5f7f53265112fc7c34edc92eaed50fe8ee362a Mon Sep 17 00:00:00 2001 From: Brian Cherinka Date: Wed, 18 Sep 2019 18:29:55 -0400 Subject: [PATCH 09/28] updating relationships to fix symlinks and symdirs --- python/sdssdb/sqlalchemy/archive/sas.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/python/sdssdb/sqlalchemy/archive/sas.py b/python/sdssdb/sqlalchemy/archive/sas.py index 8ac4c5d8..e3a2bdb8 100644 --- a/python/sdssdb/sqlalchemy/archive/sas.py +++ b/python/sdssdb/sqlalchemy/archive/sas.py @@ -104,24 +104,23 @@ def define_relations(): SymlinkDirectory.directory = relationship( Directory, backref='symdir', foreign_keys='SymlinkDirectory.directory_id') SymlinkDirectory.root = relationship(Root, backref='symdirs') - SymlinkDirectory.tree = relationship(Tree, backref='symdirs', foreign_keys='SymlinkDirectory.tree_id', + SymlinkDirectory.tree = relationship(Tree, backref='symdirs', foreign_keys='SymlinkDirectory.tree_id', primaryjoin='and_(SymlinkDirectory.tree_id==Tree.id)') SymlinkDirectory.env = relationship(Env, backref='symdirs') - SymlinkDirectory.real_dir = relationship(SymlinkDirectory, - remote_side=['SymlinkDirectory.directory_id'], backref='symdir') - SymlinkDirectory.real_tree = relationship(SymlinkDirectory, remote_side=[ - 'SymlinkDirectory.tree_id'], backref='symdir') - + SymlinkDirectory.real_dir = relationship(Directory, backref='realsymdir', + primaryjoin='and_(SymlinkDirectory.real_directory_id==Directory.id)') + SymlinkDirectory.real_tree = relationship( + Tree, backref='realsymdir', primaryjoin='and_(SymlinkDirectory.real_tree_id==Tree.id)') # class Symlink_file SymlinkFile.directory = relationship(Directory, backref='symlinks') - SymlinkFile.root = relationship(Root, backref='symlinks', foreign_keys='SymlinkFile.root_id') - SymlinkFile.tree = relationship(Tree, backref='symlinks', foreign_keys='SymlinkFile.tree_id', - primaryjoin='and_(SymlinkDirectory.tree_id==Tree.id)') SymlinkFile.env = relationship(Env, backref='symlinks') - SymlinkFile.real_tree = relationship(SymlinkFile, remote_side=[ - 'SymlinkFile.tree_id'], backref='symlinks') SymlinkFile.real_file = relationship(File, backref='symlinks') + SymlinkFile.root = relationship(Root, backref='symlinks', foreign_keys='SymlinkFile.root_id') + SymlinkFile.tree = relationship(Tree, backref='symlinks', foreign_keys='SymlinkFile.tree_id', + primaryjoin='and_(SymlinkFile.tree_id==Tree.id)') + SymlinkFile.real_tree = relationship( + Tree, backref='realsymlinks', primaryjoin='and_(SymlinkFile.real_tree_id==Tree.id)') # prepare the base From aa0f0389ae65d1ea39b907af866bf378a4293fbb Mon Sep 17 00:00:00 2001 From: Brian Cherinka Date: Wed, 18 Sep 2019 18:36:00 -0400 Subject: [PATCH 10/28] cleaning up relationships --- python/sdssdb/sqlalchemy/archive/sas.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/python/sdssdb/sqlalchemy/archive/sas.py b/python/sdssdb/sqlalchemy/archive/sas.py index e3a2bdb8..f4a15ba6 100644 --- a/python/sdssdb/sqlalchemy/archive/sas.py +++ b/python/sdssdb/sqlalchemy/archive/sas.py @@ -87,13 +87,12 @@ def define_relations(): ChecksumFile.file = relationship(File, backref='checksumfile') # class Directory - #Directory.root = relationship(Root, backref='directory') Directory.tree = relationship(Tree, backref='directories') Directory.env = relationship(Env, backref='directories') # class Env - # specify remote_side when foreign key points to itself - Env.real_env = relationship(Env, remote_side=['Env.id'], backref='env') + # need to specify remote_side when foreign key points to itself + Env.real_env = relationship(Env, remote_side='Env.id', backref='env') # class File File.root = relationship(Root, backref='files') @@ -101,14 +100,16 @@ def define_relations(): File.env = relationship(Env, backref='files') # class Symlink_directory + SymlinkDirectory.env = relationship(Env, backref='symdirs') + SymlinkDirectory.root = relationship(Root, backref='symdirs') + # need to specify foreign_keys when multiple columns points to same key + # need to specify primaryjoin when there are multiple ways to join the tables SymlinkDirectory.directory = relationship( Directory, backref='symdir', foreign_keys='SymlinkDirectory.directory_id') - SymlinkDirectory.root = relationship(Root, backref='symdirs') + SymlinkDirectory.real_dir = relationship(Directory, backref='realsymdir', + primaryjoin='and_(SymlinkDirectory.real_directory_id==Directory.id)') SymlinkDirectory.tree = relationship(Tree, backref='symdirs', foreign_keys='SymlinkDirectory.tree_id', primaryjoin='and_(SymlinkDirectory.tree_id==Tree.id)') - SymlinkDirectory.env = relationship(Env, backref='symdirs') - SymlinkDirectory.real_dir = relationship(Directory, backref='realsymdir', - primaryjoin='and_(SymlinkDirectory.real_directory_id==Directory.id)') SymlinkDirectory.real_tree = relationship( Tree, backref='realsymdir', primaryjoin='and_(SymlinkDirectory.real_tree_id==Tree.id)') From a13c28dfc0329b035991f3558115d002bb89add9 Mon Sep 17 00:00:00 2001 From: Brian Cherinka Date: Wed, 18 Sep 2019 18:45:34 -0400 Subject: [PATCH 11/28] updating print_fields --- python/sdssdb/sqlalchemy/archive/sas.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python/sdssdb/sqlalchemy/archive/sas.py b/python/sdssdb/sqlalchemy/archive/sas.py index f4a15ba6..c2f76952 100644 --- a/python/sdssdb/sqlalchemy/archive/sas.py +++ b/python/sdssdb/sqlalchemy/archive/sas.py @@ -33,10 +33,12 @@ def __table_args__(cls): class Root(Base): __tablename__ = 'root' + print_fields = ['identifier'] class Tree(Base): __tablename__ = 'tree' + print_fields = ['version'] class Env(Base): @@ -45,22 +47,27 @@ class Env(Base): class Directory(Base): __tablename__ = 'directory' + print_fields = ['location'] class File(Base): __tablename__ = 'file' + print_fields = ['location'] class SymlinkFile(Base): __tablename__ = 'symlink_file' + print_fields = ['location'] class SymlinkDirectory(Base): __tablename__ = 'symlink_directory' + print_fields = ['location'] class ChecksumFile(Base): __tablename__ = 'checksumfile' + print_fields = ['filename'] class Checksum(Base): From 632a3e08522010ba45d81972973f11a1621bf505 Mon Sep 17 00:00:00 2001 From: Joel Brownstein Date: Wed, 18 Sep 2019 17:05:16 -0600 Subject: [PATCH 12/28] add archive --- docs/sphinx/intro.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/sphinx/intro.rst b/docs/sphinx/intro.rst index 605439d5..05943403 100644 --- a/docs/sphinx/intro.rst +++ b/docs/sphinx/intro.rst @@ -38,6 +38,8 @@ Currently, we support the following databases and schemas: * **sdss5db**: the SDSS-V development database. * *catalogdb*: schema for source catalogues used for target selection. * *targetdb*: schema with the results of the target selection and positioner information. +* **archive**: the SDSS science archive database. + * *sas*: schema for SAS. Note that the level of readiness is not necessarily identical in both Peewee and SQLAlchemy. This table summarises what schemas are available for each library. Green indicates fully supported, yellow partial support, and red means that there are currently not model classes available for that schema. You can download the graph visualisation of the schema, showing the tables, columns, and relations between tables. From 44750317a3a66b534d4e1b8ea4276b395cfbe222 Mon Sep 17 00:00:00 2001 From: Brian Cherinka Date: Thu, 19 Sep 2019 13:40:12 -0400 Subject: [PATCH 13/28] updating backrefs --- python/sdssdb/sqlalchemy/archive/sas.py | 28 +++++++++++++------------ 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/python/sdssdb/sqlalchemy/archive/sas.py b/python/sdssdb/sqlalchemy/archive/sas.py index c2f76952..77ee0113 100644 --- a/python/sdssdb/sqlalchemy/archive/sas.py +++ b/python/sdssdb/sqlalchemy/archive/sas.py @@ -107,28 +107,30 @@ def define_relations(): File.env = relationship(Env, backref='files') # class Symlink_directory - SymlinkDirectory.env = relationship(Env, backref='symdirs') - SymlinkDirectory.root = relationship(Root, backref='symdirs') + SymlinkDirectory.env = relationship(Env, backref='symlink_directories') + SymlinkDirectory.root = relationship(Root, backref='symlink_directories') # need to specify foreign_keys when multiple columns points to same key # need to specify primaryjoin when there are multiple ways to join the tables SymlinkDirectory.directory = relationship( - Directory, backref='symdir', foreign_keys='SymlinkDirectory.directory_id') - SymlinkDirectory.real_dir = relationship(Directory, backref='realsymdir', - primaryjoin='and_(SymlinkDirectory.real_directory_id==Directory.id)') - SymlinkDirectory.tree = relationship(Tree, backref='symdirs', foreign_keys='SymlinkDirectory.tree_id', + Directory, backref='symlink_directories', foreign_keys='SymlinkDirectory.directory_id') + SymlinkDirectory.real_directory = relationship(Directory, backref='linked_symlink_directories', + primaryjoin='and_(SymlinkDirectory.real_directory_id==Directory.id)') + + SymlinkDirectory.tree = relationship(Tree, backref='symlink_directories', foreign_keys='SymlinkDirectory.tree_id', primaryjoin='and_(SymlinkDirectory.tree_id==Tree.id)') SymlinkDirectory.real_tree = relationship( - Tree, backref='realsymdir', primaryjoin='and_(SymlinkDirectory.real_tree_id==Tree.id)') + Tree, backref='linked_symlink_directories', primaryjoin='and_(SymlinkDirectory.real_tree_id==Tree.id)') # class Symlink_file - SymlinkFile.directory = relationship(Directory, backref='symlinks') - SymlinkFile.env = relationship(Env, backref='symlinks') - SymlinkFile.real_file = relationship(File, backref='symlinks') - SymlinkFile.root = relationship(Root, backref='symlinks', foreign_keys='SymlinkFile.root_id') - SymlinkFile.tree = relationship(Tree, backref='symlinks', foreign_keys='SymlinkFile.tree_id', + SymlinkFile.directory = relationship(Directory, backref='symlink_files') + SymlinkFile.env = relationship(Env, backref='symlink_files') + SymlinkFile.real_file = relationship(File, backref='symlink_files') + SymlinkFile.root = relationship(Root, backref='symlink_files', foreign_keys='SymlinkFile.root_id') + + SymlinkFile.tree = relationship(Tree, backref='symlink_files', foreign_keys='SymlinkFile.tree_id', primaryjoin='and_(SymlinkFile.tree_id==Tree.id)') SymlinkFile.real_tree = relationship( - Tree, backref='realsymlinks', primaryjoin='and_(SymlinkFile.real_tree_id==Tree.id)') + Tree, backref='linked_symlink_files', primaryjoin='and_(SymlinkFile.real_tree_id==Tree.id)') # prepare the base From 7120537099cc3337cd25880716eb14b3b60a27a1 Mon Sep 17 00:00:00 2001 From: Brian Cherinka Date: Thu, 19 Sep 2019 14:00:45 -0400 Subject: [PATCH 14/28] adding archive db to docs --- docs/sphinx/intro.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/sphinx/intro.rst b/docs/sphinx/intro.rst index 05943403..6d839a6d 100644 --- a/docs/sphinx/intro.rst +++ b/docs/sphinx/intro.rst @@ -113,6 +113,13 @@ Note that the level of readiness is not necessarily identical in both Peewee and + + archive + sas + + + + From 3130548dd2a4815a04684ebd9fb5ce2b1d29a8fd Mon Sep 17 00:00:00 2001 From: Brian Cherinka Date: Thu, 19 Sep 2019 14:02:02 -0400 Subject: [PATCH 15/28] updating changelog --- CHANGELOG.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2ad02d93..96a87bff 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,7 @@ Changelog This document records the main changes to the ``sdssdb`` code. +* Added ``archive`` database with ``sas`` schema. * Added ``TIC v8``. * :release:`0.2.2 <2019-07-24>` * Fixed import of database connections when Peewee or SQLAlchemy are not available. From 8e47785d0071808b89e7c613c92b7e7446dbeac3 Mon Sep 17 00:00:00 2001 From: Brian Cherinka Date: Thu, 19 Sep 2019 14:10:56 -0400 Subject: [PATCH 16/28] adding files-dir relationship and name property to file --- python/sdssdb/sqlalchemy/archive/sas.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/python/sdssdb/sqlalchemy/archive/sas.py b/python/sdssdb/sqlalchemy/archive/sas.py index 77ee0113..bbc4470b 100644 --- a/python/sdssdb/sqlalchemy/archive/sas.py +++ b/python/sdssdb/sqlalchemy/archive/sas.py @@ -52,7 +52,11 @@ class Directory(Base): class File(Base): __tablename__ = 'file' - print_fields = ['location'] + print_fields = ['name'] + + @property + def name(self): + return self.location.rsplit('/', 1)[-1] class SymlinkFile(Base): @@ -105,6 +109,7 @@ def define_relations(): File.root = relationship(Root, backref='files') File.tree = relationship(Tree, backref='files') File.env = relationship(Env, backref='files') + File.env = relationship(Directory, backref='files') # class Symlink_directory SymlinkDirectory.env = relationship(Env, backref='symlink_directories') From 807faf23f2769118ab471b3998f0027c07fa58bc Mon Sep 17 00:00:00 2001 From: Brian Cherinka Date: Thu, 19 Sep 2019 14:13:17 -0400 Subject: [PATCH 17/28] bugfix in relationship name --- python/sdssdb/sqlalchemy/archive/sas.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/sdssdb/sqlalchemy/archive/sas.py b/python/sdssdb/sqlalchemy/archive/sas.py index bbc4470b..ec922f59 100644 --- a/python/sdssdb/sqlalchemy/archive/sas.py +++ b/python/sdssdb/sqlalchemy/archive/sas.py @@ -109,7 +109,7 @@ def define_relations(): File.root = relationship(Root, backref='files') File.tree = relationship(Tree, backref='files') File.env = relationship(Env, backref='files') - File.env = relationship(Directory, backref='files') + File.directory = relationship(Directory, backref='files') # class Symlink_directory SymlinkDirectory.env = relationship(Env, backref='symlink_directories') From 64bfe1fb69061c29b5a23b4b3a755154018947e8 Mon Sep 17 00:00:00 2001 From: N Benjamin Murphy Date: Thu, 19 Sep 2019 18:59:32 -0600 Subject: [PATCH 18/28] Added archive db ER diagram and made associated changes to intro.rst --- docs/sphinx/intro.rst | 4 ++-- schema/archive/archive_sas.pdf | Bin 0 -> 20612 bytes 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 schema/archive/archive_sas.pdf diff --git a/docs/sphinx/intro.rst b/docs/sphinx/intro.rst index 6d839a6d..286c6d49 100644 --- a/docs/sphinx/intro.rst +++ b/docs/sphinx/intro.rst @@ -118,8 +118,8 @@ Note that the level of readiness is not necessarily identical in both Peewee and sas - - + + diff --git a/schema/archive/archive_sas.pdf b/schema/archive/archive_sas.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5e8461a94b139d72aeb41d006566d28315676e10 GIT binary patch literal 20612 zcmdUXWmH_v(k|{!@BkAaSc1&p?(S~E-Q6X)1qd1}Xb3I=f(3^JCuq>%!QCO)ogvA4 z^2$ByyFcz(-BC;DWd=Y048xu8y8b2@UM-bi>auovAu~Y3O_%Jvx}3dp)HEX>s?*l3Mvje z-wOSaA?UA+zKO+faGppwa7b8ybiy8ycbF@gscca#@;kZ)$H$a@50!Q2baj2#XUMz} zyF5bIr4v8KOGf6pJb%~`aC^0>5LU4e9VT$&iF8>%aEjHzOIkpPAtTv6e0xhDjPr6# z6;r^M)8}EAG4JBg^J|%_Crn|j7%NNqVICKL7yAP2CcI7L9Ud2ToiED*DsRs5Zt#R{ zLof@HbDnmqCW{On0~wbNoD>1d1YHiCbyZ`)_2EZ%o);q4->#OVUb)iq79Zy%is!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c^b=A8a?0|1+R-mZ?cWF2 z{)7T03|a*BmSYW7r7+u}={)V> z&A`y0vvF9+>b~D7fwrcA=89#eogVJ?2KQ7Hsu@BvRip-AEn|P@foTQ-G0CigmRjXC z<%9K46*lK4`7vamF3sCD^via=>Ah{A_OkxL26EzF#?qdxG@`A}6+P|qnV649oK5z! zg_!*xFpZy+W|dG5D6d-J&`?YV0a^Tg@*#?#7-u(Mpn z0`7PyQbAC>jZm0mE)?mA6acSC*7@-o4qtA*Ak6@&5Q7!WcmS2;n`%TNEJSQt*R$+y z$)+}b+;)ZBgiZw`J`4e9cZ^mL_H~SA293Z@TBkyLc&CD;;t>nrq6j1L`T&9JTDnOW zLjYL-Lm>6xB2DE7|E!N&Fn*7@#lHI;;2x+vM)Io)Zn4?)*Q1lVrq{)Fp&|gOkA7wm$%m z|CMmkk7P}-M*dRgUts6I!$$rMob-R4{(lxux|iBt;UqA01c8$7VI(k=^y~N@Uit|a z-NQ}4pd$$E^gI104E0BypJl&bse9<@SKD8|KimA?$Ne#w{wGN4e}dxu6D0M2<@f&s zB*k(c?)@tyb-%Iw4oUsK(fwEmklb+Rd*zm~yw4lH&mUL*krD#VHg*MLe!pixv;2;j zi-7-J42;GCXpJGrD*(s{WM%{bXf0e^9JralS^Z$5xs#!Tg{84GqrHoP7Y-EWKVATKHa75N z%m6=VKrS{GumB-1fZb0TGY1PBc46l(BF6uPM8NL zO8%u^ASWct>(66hVQ2l@JXpZl{eP{;%FOn+ep$g%|64tlzw?EagY$3oI6;4t2M}y9 z{jCp94i<2P Date: Mon, 23 Sep 2019 15:36:02 -0400 Subject: [PATCH 19/28] fixing link to sas archive pdf schema --- docs/sphinx/intro.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sphinx/intro.rst b/docs/sphinx/intro.rst index 286c6d49..8b54e1b4 100644 --- a/docs/sphinx/intro.rst +++ b/docs/sphinx/intro.rst @@ -118,7 +118,7 @@ Note that the level of readiness is not necessarily identical in both Peewee and sas - + From 9dbc24ba96803866e8130123f394c569100581c7 Mon Sep 17 00:00:00 2001 From: Brian Cherinka Date: Mon, 23 Sep 2019 15:54:05 -0400 Subject: [PATCH 20/28] fixing imports and linting issues --- python/sdssdb/sqlalchemy/archive/sas.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/python/sdssdb/sqlalchemy/archive/sas.py b/python/sdssdb/sqlalchemy/archive/sas.py index ec922f59..686c1efd 100644 --- a/python/sdssdb/sqlalchemy/archive/sas.py +++ b/python/sdssdb/sqlalchemy/archive/sas.py @@ -10,13 +10,9 @@ from __future__ import absolute_import, division, print_function -from sdssdb.sqlalchemy.archive import database, ArchiveBase, sas -from sqlalchemy import Column, Float, and_, case, cast, select -from sqlalchemy.engine import reflection +from sdssdb.sqlalchemy.archive import database, ArchiveBase from sqlalchemy.ext.declarative import AbstractConcreteBase, declared_attr -from sqlalchemy.ext.hybrid import hybrid_property from sqlalchemy.orm import relationship -from sqlalchemy.types import Integer SCHEMA = 'sas' @@ -119,20 +115,25 @@ def define_relations(): SymlinkDirectory.directory = relationship( Directory, backref='symlink_directories', foreign_keys='SymlinkDirectory.directory_id') SymlinkDirectory.real_directory = relationship(Directory, backref='linked_symlink_directories', - primaryjoin='and_(SymlinkDirectory.real_directory_id==Directory.id)') + primaryjoin=('and_(SymlinkDirectory.' + 'real_directory_id==Directory.id)')) - SymlinkDirectory.tree = relationship(Tree, backref='symlink_directories', foreign_keys='SymlinkDirectory.tree_id', + SymlinkDirectory.tree = relationship(Tree, backref='symlink_directories', + foreign_keys='SymlinkDirectory.tree_id', primaryjoin='and_(SymlinkDirectory.tree_id==Tree.id)') SymlinkDirectory.real_tree = relationship( - Tree, backref='linked_symlink_directories', primaryjoin='and_(SymlinkDirectory.real_tree_id==Tree.id)') + Tree, backref='linked_symlink_directories', + primaryjoin='and_(SymlinkDirectory.real_tree_id==Tree.id)') # class Symlink_file SymlinkFile.directory = relationship(Directory, backref='symlink_files') SymlinkFile.env = relationship(Env, backref='symlink_files') SymlinkFile.real_file = relationship(File, backref='symlink_files') - SymlinkFile.root = relationship(Root, backref='symlink_files', foreign_keys='SymlinkFile.root_id') + SymlinkFile.root = relationship(Root, backref='symlink_files', + foreign_keys='SymlinkFile.root_id') - SymlinkFile.tree = relationship(Tree, backref='symlink_files', foreign_keys='SymlinkFile.tree_id', + SymlinkFile.tree = relationship(Tree, backref='symlink_files', + foreign_keys='SymlinkFile.tree_id', primaryjoin='and_(SymlinkFile.tree_id==Tree.id)') SymlinkFile.real_tree = relationship( Tree, backref='linked_symlink_files', primaryjoin='and_(SymlinkFile.real_tree_id==Tree.id)') From a3dfcf0615728e114df47e86b75e649414a7b2a6 Mon Sep 17 00:00:00 2001 From: Brian Cherinka Date: Mon, 23 Sep 2019 16:01:09 -0400 Subject: [PATCH 21/28] fixing linting issues --- python/sdssdb/sqlalchemy/archive/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/sdssdb/sqlalchemy/archive/__init__.py b/python/sdssdb/sqlalchemy/archive/__init__.py index 583f1a5d..bdfc930c 100644 --- a/python/sdssdb/sqlalchemy/archive/__init__.py +++ b/python/sdssdb/sqlalchemy/archive/__init__.py @@ -17,8 +17,10 @@ # we need a shared common Base when joining across multiple schema ArchiveBase = declarative_base(cls=(DeferredReflection, BaseModel,)) + class ArchiveDatabaseConnection(SQLADatabaseConnection): dbname = 'archive_20190507' base = ArchiveBase + database = ArchiveDatabaseConnection(autoconnect=True) From ba7c8430f3852aedae126c0570cbeda046d62570 Mon Sep 17 00:00:00 2001 From: Brian Cherinka Date: Mon, 23 Sep 2019 16:46:34 -0400 Subject: [PATCH 22/28] adding travis status badge --- README.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 65f79c9a..e93d211a 100644 --- a/README.rst +++ b/README.rst @@ -1,7 +1,7 @@ sdssdb ====== -|python| |docs| +|python| |docs| |travis| `SDSS `__ product for database management. @@ -30,3 +30,6 @@ How to use :alt: Documentation Status :scale: 100% :target: https://sdssdb.readthedocs.io/en/latest/?badge=latest + +.. |travis| image:: https://travis-ci.org/sdss/sdssdb.svg?branch=master + :target: https://travis-ci.org/sdss/sdssdb \ No newline at end of file From d6ffc9a8e591e0852c4f6ff6427e9246a904ac8d Mon Sep 17 00:00:00 2001 From: Brian Cherinka Date: Mon, 23 Sep 2019 16:47:59 -0400 Subject: [PATCH 23/28] removing requirements.txt from travis file --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7bb57110..31504224 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,6 @@ branches: install: - pip install -U pip wheel --quiet - pip install --upgrade setuptools --quiet -- pip install -r requirements.txt --quiet - pip install pytest - pip install pytest-coverage - pip install coveralls From f2cd3bc73c0db5a22c61b2e5efb981c252f148a7 Mon Sep 17 00:00:00 2001 From: Brian Cherinka Date: Mon, 23 Sep 2019 16:56:07 -0400 Subject: [PATCH 24/28] adding a skipdb test for travis until db tests can be fixed --- python/sdssdb/tests/test_peewee.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python/sdssdb/tests/test_peewee.py b/python/sdssdb/tests/test_peewee.py index adaed0f8..1bfe41e8 100644 --- a/python/sdssdb/tests/test_peewee.py +++ b/python/sdssdb/tests/test_peewee.py @@ -9,6 +9,13 @@ from __future__ import unicode_literals import sdssdb.peewee.sdss5db.targetdb as targetdb +import pytest + + +@pytest.fixture(scope='session', autouse=True) +def skipdb(): + if targetdb.database.connected is False: + pytest.skip('no targetdb found') class TestPeewee(object): From 4b3d9c69acf02ca955b229f823a268b9f93ffd77 Mon Sep 17 00:00:00 2001 From: Brian Cherinka Date: Mon, 23 Sep 2019 16:57:13 -0400 Subject: [PATCH 25/28] removing tests for nonexistent code --- python/sdssdb/tests/test_main.py | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 python/sdssdb/tests/test_main.py diff --git a/python/sdssdb/tests/test_main.py b/python/sdssdb/tests/test_main.py deleted file mode 100644 index c580e311..00000000 --- a/python/sdssdb/tests/test_main.py +++ /dev/null @@ -1,23 +0,0 @@ -# encoding: utf-8 -# -# main.py - - -from __future__ import division -from __future__ import print_function -from __future__ import absolute_import -from __future__ import unicode_literals - -from pytest import mark - -# from sdssdb.main import math - - -# class TestMath(object): -# """Tests for the ``math`` function in main.py.""" - -# @mark.parametrize(('arg1', 'arg2', 'operator', 'result'), -# [(1, 2, '+', 3), (2, 2, '-', 0), (3, 5, '*', 15), (10, 2, '/', 5)]) -# def test_math(self, arg1, arg2, operator, result): - -# assert math(arg1, arg2, arith_operator=operator) == result From a6910b65145612823b855eea485c9d83791f5d15 Mon Sep 17 00:00:00 2001 From: Brian Cherinka Date: Mon, 23 Sep 2019 16:59:37 -0400 Subject: [PATCH 26/28] allowing py2.7 to fail --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 31504224..8486a6c5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,8 @@ os: matrix: fast_finish: true + allow_failures: + - python: '2.7' notifications: email: false From 6b6645097ab5e9e9a63d4e9c28015fb872a1080f Mon Sep 17 00:00:00 2001 From: Brian Cherinka Date: Mon, 23 Sep 2019 17:00:39 -0400 Subject: [PATCH 27/28] allowing py3.5 to fail since we use fstrings --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 8486a6c5..3bb44138 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,7 @@ python: - '2.7' - '3.5' - '3.6' +- '3.7' os: - linux @@ -18,6 +19,7 @@ matrix: fast_finish: true allow_failures: - python: '2.7' + - python: '3.5' notifications: email: false From 7c490a1bc05f863c556af984789c4455ea984583 Mon Sep 17 00:00:00 2001 From: Brian Cherinka Date: Mon, 23 Sep 2019 17:34:59 -0400 Subject: [PATCH 28/28] removing explicit localhost from local profile --- python/sdssdb/etc/sdssdb.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/python/sdssdb/etc/sdssdb.yml b/python/sdssdb/etc/sdssdb.yml index 986e4005..eaadb6f1 100644 --- a/python/sdssdb/etc/sdssdb.yml +++ b/python/sdssdb/etc/sdssdb.yml @@ -14,8 +14,6 @@ lco: domain: lco.cl local: - host: localhost - port: 5432 domain: null lore: