diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..299fa730 --- /dev/null +++ b/LICENSE @@ -0,0 +1,15 @@ +Copyright 2020 Network to Code +Network to Code, LLC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. + +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/dsync/__init__.py b/dsync/__init__.py index b8f6ca41..0bcaba9c 100644 --- a/dsync/__init__.py +++ b/dsync/__init__.py @@ -1,10 +1,13 @@ -""" -(c) 2020 Network To Code +"""DSync core classes and logic. + +Copyright (c) 2020 Network To Code, LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/dsync/diff.py b/dsync/diff.py index 6dc80f88..44aab641 100644 --- a/dsync/diff.py +++ b/dsync/diff.py @@ -1,11 +1,13 @@ """Diff and DiffElement classes for DSync. -(c) 2020 Network To Code +Copyright (c) 2020 Network To Code, LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/dsync/exceptions.py b/dsync/exceptions.py index 807e86cf..6bb87689 100644 --- a/dsync/exceptions.py +++ b/dsync/exceptions.py @@ -1,4 +1,19 @@ -"""Exception classes used in DSync.""" +"""Exception classes used in DSync. + +Copyright (c) 2020 Network To Code, LLC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" class ObjectCrudException(Exception): diff --git a/dsync/logging.py b/dsync/logging.py index c2bed410..782ca555 100644 --- a/dsync/logging.py +++ b/dsync/logging.py @@ -1,4 +1,19 @@ -"""Helpful APIs for setting up DSync logging.""" +"""Helpful APIs for setting up DSync logging. + +Copyright (c) 2020 Network To Code, LLC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" import logging diff --git a/dsync/utils.py b/dsync/utils.py index 0973d035..32bc0146 100644 --- a/dsync/utils.py +++ b/dsync/utils.py @@ -1,11 +1,13 @@ """Utility functions for DSync library. -(c) 2020 Network To Code +Copyright (c) 2020 Network To Code, LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/examples/example1/backend_a.py b/examples/example1/backend_a.py index ac0a9f8d..121f452f 100644 --- a/examples/example1/backend_a.py +++ b/examples/example1/backend_a.py @@ -1,4 +1,19 @@ -"""Example of a DSync adapter implementation.""" +"""Example of a DSync adapter implementation. + +Copyright (c) 2020 Network To Code, LLC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" # pylint: disable=wrong-import-order from dsync import DSync diff --git a/examples/example1/backend_b.py b/examples/example1/backend_b.py index 68aa548c..9a960949 100644 --- a/examples/example1/backend_b.py +++ b/examples/example1/backend_b.py @@ -1,4 +1,19 @@ -"""Example of a DSync adapter implementation.""" +"""Example of a DSync adapter implementation. + +Copyright (c) 2020 Network To Code, LLC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" # pylint: disable=wrong-import-order from dsync import DSync diff --git a/examples/example1/backend_c.py b/examples/example1/backend_c.py index 3d02dc87..7ff84947 100644 --- a/examples/example1/backend_c.py +++ b/examples/example1/backend_c.py @@ -1,4 +1,19 @@ -"""Example of a DSync adapter implementation.""" +"""Example of a DSync adapter implementation. + +Copyright (c) 2020 Network To Code, LLC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" # pylint: disable=wrong-import-order from dsync import DSync diff --git a/examples/example1/main.py b/examples/example1/main.py index adc3b012..41e95d12 100644 --- a/examples/example1/main.py +++ b/examples/example1/main.py @@ -1,4 +1,19 @@ -"""Main executable for DSync "example1".""" +"""Main executable for DSync "example1". + +Copyright (c) 2020 Network To Code, LLC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" # pylint: disable=wrong-import-order import argparse diff --git a/examples/example1/models.py b/examples/example1/models.py index 80020b3f..8c4440aa 100644 --- a/examples/example1/models.py +++ b/examples/example1/models.py @@ -1,4 +1,19 @@ -"""Example models.""" +"""Example models. + +Copyright (c) 2020 Network To Code, LLC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" from typing import List, Optional from dsync import DSyncModel diff --git a/pyproject.toml b/pyproject.toml index 1b96e84c..c209a2d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,8 +1,15 @@ [tool.poetry] name = "dsync" version = "0.1.0" -description = "Library to easily sync/diff/update 2 different data source" +description = "Library to easily sync/diff/update 2 different data sources" authors = ["Network to Code, LLC "] +license = "Apache-2.0" +readme = "README.md" +include = [ + "CHANGELOG.md", + "LICENSE", + "README.md", +] [tool.poetry.dependencies] python = "^3.7" diff --git a/tasks.py b/tasks.py index c3c312b1..d31cc131 100644 --- a/tasks.py +++ b/tasks.py @@ -1,4 +1,19 @@ -"""Replacement for Makefile.""" +"""Replacement for Makefile. + +Copyright (c) 2020 Network To Code, LLC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" import os from invoke import task # type: ignore diff --git a/tests/integration/__init__.py b/tests/integration/__init__.py index e69de29b..6d07dec9 100644 --- a/tests/integration/__init__.py +++ b/tests/integration/__init__.py @@ -0,0 +1,16 @@ +"""Integration tests for DSync. + +Copyright (c) 2020 Network To Code, LLC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py index e69de29b..2bf831a7 100644 --- a/tests/unit/__init__.py +++ b/tests/unit/__init__.py @@ -0,0 +1,16 @@ +"""Unit tests for DSync. + +Copyright (c) 2020 Network To Code, LLC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" diff --git a/tests/unit/conftest.py b/tests/unit/conftest.py index e149fcea..d8ed456e 100644 --- a/tests/unit/conftest.py +++ b/tests/unit/conftest.py @@ -1,4 +1,19 @@ -"""Used to setup fixtures to be used through tests""" +"""Used to setup fixtures to be used through tests. + +Copyright (c) 2020 Network To Code, LLC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" from typing import ClassVar, List, Optional, Tuple import pytest diff --git a/tests/unit/test_diff.py b/tests/unit/test_diff.py index 31649574..cc5b1703 100644 --- a/tests/unit/test_diff.py +++ b/tests/unit/test_diff.py @@ -1,4 +1,19 @@ -"""Unit tests for the Diff class.""" +"""Unit tests for the Diff class. + +Copyright (c) 2020 Network To Code, LLC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" import pytest diff --git a/tests/unit/test_diff_element.py b/tests/unit/test_diff_element.py index 7ccf6550..0ab85ec0 100644 --- a/tests/unit/test_diff_element.py +++ b/tests/unit/test_diff_element.py @@ -1,4 +1,19 @@ -"""Unit tests for the DiffElement class.""" +"""Unit tests for the DiffElement class. + +Copyright (c) 2020 Network To Code, LLC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" from dsync.diff import DiffElement diff --git a/tests/unit/test_dsync.py b/tests/unit/test_dsync.py index 81c87999..5540c194 100644 --- a/tests/unit/test_dsync.py +++ b/tests/unit/test_dsync.py @@ -1,4 +1,19 @@ -"""Unit tests for the DSync class.""" +"""Unit tests for the DSync class. + +Copyright (c) 2020 Network To Code, LLC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" import pytest diff --git a/tests/unit/test_dsync_model.py b/tests/unit/test_dsync_model.py index aec01110..bc7be614 100644 --- a/tests/unit/test_dsync_model.py +++ b/tests/unit/test_dsync_model.py @@ -1,4 +1,19 @@ -"""Unit tests for the DSyncModel class.""" +"""Unit tests for the DSyncModel class. + +Copyright (c) 2020 Network To Code, LLC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" from typing import List diff --git a/tests/unit/test_initial_pass.py b/tests/unit/test_initial_pass.py deleted file mode 100644 index 694c27e2..00000000 --- a/tests/unit/test_initial_pass.py +++ /dev/null @@ -1,6 +0,0 @@ -"""Example Test using Fixtures.""" - - -def test_initial_success(give_me_success): - "Assert give_me_success is true" - assert give_me_success