Add an enforce license headers

This commit is contained in:
Seth Michael Larson 2020-04-25 16:26:58 -05:00 committed by GitHub
parent 33b4976f9a
commit 7946eb4daa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
88 changed files with 365 additions and 1118 deletions

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# Configuration file for the Sphinx documentation builder. # Configuration file for the Sphinx documentation builder.
# #

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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 eland._version import ( # noqa: F401 from eland._version import ( # noqa: F401
__title__, __title__,

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
__title__ = "eland" __title__ = "eland"
__description__ = "Python elasticsearch client to analyse, explore and manipulate data that resides in elasticsearch." __description__ = "Python elasticsearch client to analyse, explore and manipulate data that resides in elasticsearch."

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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 abc import ABC, abstractmethod from abc import ABC, abstractmethod
from typing import TYPE_CHECKING from typing import TYPE_CHECKING

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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 abc import ABC, abstractmethod from abc import ABC, abstractmethod
from io import StringIO from io import StringIO

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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 re import re
import warnings import warnings

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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 numpy as np import numpy as np
import pandas as pd import pandas as pd

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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 sys import sys
import warnings import warnings

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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 warnings import warnings

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# Originally based on code in MIT-licensed pandasticsearch filters # Originally based on code in MIT-licensed pandasticsearch filters

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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 Optional, TextIO, TYPE_CHECKING from typing import Optional, TextIO, TYPE_CHECKING

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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 eland.ml.ml_model import MLModel from eland.ml.ml_model import MLModel
from eland.ml.imported_ml_model import ImportedMLModel from eland.ml.imported_ml_model import ImportedMLModel

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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 base64 import base64
import gzip import gzip

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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, Union from typing import List, Union

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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 distutils.version import distutils.version
import importlib import importlib

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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 Union, List from typing import Union, List

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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 elasticsearch import elasticsearch
from eland.common import ensure_es_client from eland.common import ensure_es_client

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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 sys import sys
from abc import ABC, abstractmethod from abc import ABC, abstractmethod

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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 copy import copy
import warnings import warnings

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
""" """
Public plotting API Public plotting API

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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 eland.plotting._matplotlib.hist import hist_series, hist_frame from eland.plotting._matplotlib.hist import hist_series, hist_frame

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
""" """
Public plotting API Public plotting API

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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 numpy as np import numpy as np
import pandas.core.common as com import pandas.core.common as com

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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 warnings import warnings
from copy import deepcopy from copy import deepcopy

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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 copy import copy
from datetime import datetime from datetime import datetime

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
""" """
Series Series

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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 abc import ABC, abstractmethod from abc import ABC, abstractmethod
from typing import TYPE_CHECKING, List, Dict, Any, Tuple from typing import TYPE_CHECKING, List, Dict, Any, Tuple

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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 import os

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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 import os

View File

@ -1,13 +1,3 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability
from datetime import datetime from datetime import datetime

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability
from io import StringIO from io import StringIO

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatibility # File called _pytest for PyCharm compatibility

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability
import numpy as np import numpy as np

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability

View File

@ -1,13 +1,3 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability
import pytest import pytest

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability
from datetime import datetime from datetime import datetime

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability
import pytest import pytest

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability
from pandas.testing import assert_series_equal from pandas.testing import assert_series_equal

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability
import pytest import pytest

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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 numpy as np import numpy as np
import pandas as pd import pandas as pd

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability
import pytest import pytest

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability
from io import StringIO from io import StringIO

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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 numpy as np import numpy as np
from sklearn import datasets from sklearn import datasets

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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 sys import sys
import types import types

View File

@ -1,13 +1,3 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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 eland.filter import ( from eland.filter import (
Greater, Greater,

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability
from matplotlib.testing.decorators import check_figures_equal from matplotlib.testing.decorators import check_figures_equal

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability
import pandas as pd import pandas as pd

View File

@ -1,13 +1,3 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability
import numpy as np import numpy as np

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability
import eland as ed import eland as ed

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability
import eland as ed import eland as ed

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability
import eland as ed import eland as ed

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability
import eland as ed import eland as ed

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability
import pytest import pytest

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# File called _pytest for PyCharm compatability # File called _pytest for PyCharm compatability
import pytest import pytest

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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 pandas as pd import pandas as pd
from elasticsearch import helpers from elasticsearch import helpers

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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 csv import csv
from typing import Union, List, Tuple, Optional, Mapping from typing import Union, List, Tuple, Optional, Mapping

View File

@ -1,3 +1,7 @@
# Licensed to Elasticsearch B.V under one or more agreements.
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# See the LICENSE file in the project root for more information
import os import os
import subprocess import subprocess
from pathlib import Path from pathlib import Path
@ -11,6 +15,7 @@ SOURCE_FILES = (
"noxfile.py", "noxfile.py",
"eland/", "eland/",
"docs/", "docs/",
"utils/",
) )
# Whenever type-hints are completed on a file it should # Whenever type-hints are completed on a file it should
@ -30,6 +35,7 @@ TYPED_FILES = {
@nox.session(reuse_venv=True) @nox.session(reuse_venv=True)
def blacken(session): def blacken(session):
session.install("black") session.install("black")
session.run("python", "utils/license-headers.py", "fix", *SOURCE_FILES)
session.run("black", "--target-version=py36", *SOURCE_FILES) session.run("black", "--target-version=py36", *SOURCE_FILES)
lint(session) lint(session)
@ -37,6 +43,7 @@ def blacken(session):
@nox.session(reuse_venv=True) @nox.session(reuse_venv=True)
def lint(session): def lint(session):
session.install("black", "flake8", "mypy") session.install("black", "flake8", "mypy")
session.run("python", "utils/license-headers.py", "check", *SOURCE_FILES)
session.run("black", "--check", "--target-version=py36", *SOURCE_FILES) session.run("black", "--check", "--target-version=py36", *SOURCE_FILES)
session.run("flake8", "--ignore=E501,W503,E402,E712", *SOURCE_FILES) session.run("flake8", "--ignore=E501,W503,E402,E712", *SOURCE_FILES)

View File

@ -1,16 +1,6 @@
# Copyright 2020 Elasticsearch BV # Licensed to Elasticsearch B.V under one or more agreements.
# # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# Licensed under the Apache License, Version 2.0 (the "License"); # See the LICENSE file in the project root for more information
# 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.
# flake8: noqa # flake8: noqa

100
utils/license-headers.py Normal file
View File

@ -0,0 +1,100 @@
# Licensed to Elasticsearch B.V under one or more agreements.
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# See the LICENSE file in the project root for more information
"""Script which verifies that all source files have a license header.
Has two modes: 'fix' and 'check'. 'fix' fixes problems, 'check' will
error out if 'fix' would have changed the file.
"""
import os
import sys
from typing import List, Iterator
from itertools import chain
lines_to_keep = ["# -*- coding: utf-8 -*-\n", "#!/usr/bin/env python\n"]
license_header_lines = [
"# Licensed to Elasticsearch B.V under one or more agreements.\n",
"# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.\n",
"# See the LICENSE file in the project root for more information\n",
]
def find_files_to_fix(sources: List[str]) -> Iterator[str]:
"""Iterates over all files and dirs in 'sources' and returns
only the filepaths that need fixing.
"""
for source in sources:
if os.path.isfile(source) and does_file_need_fix(source):
yield source
elif os.path.isdir(source):
for root, _, filenames in os.walk(source):
for filename in filenames:
filepath = os.path.join(root, filename)
if does_file_need_fix(filepath):
yield filepath
def does_file_need_fix(filepath: str) -> bool:
if not filepath.endswith(".py"):
return False
with open(filepath, mode="r") as f:
first_license_line = None
for line in f:
if line == license_header_lines[0]:
first_license_line = line
break
elif line not in lines_to_keep:
return True
for header_line, line in zip(
license_header_lines, chain((first_license_line,), f)
):
if line != header_line:
return True
return False
def add_header_to_file(filepath: str) -> None:
with open(filepath, mode="r") as f:
lines = list(f)
i = 0
for i, line in enumerate(lines):
if line not in lines_to_keep:
break
new_lines = lines[:i] + license_header_lines
if lines and lines[i] != "\n":
lines = ["\n"] + lines
new_lines.extend(lines)
with open(filepath, mode="w") as f:
f.truncate()
f.write("".join(new_lines))
print(f"Fixed {os.path.relpath(filepath, os.getcwd())}")
def main():
mode = sys.argv[1]
assert mode in ("fix", "check")
sources = [os.path.abspath(x) for x in sys.argv[2:]]
files_to_fix = find_files_to_fix(sources)
if mode == "fix":
for filepath in files_to_fix:
add_header_to_file(filepath)
else:
no_license_headers = list(files_to_fix)
if no_license_headers:
print("No license header found in:")
cwd = os.getcwd()
[
print(f" - {os.path.relpath(filepath, cwd)}")
for filepath in no_license_headers
]
sys.exit(1)
else:
print("All files had license header")
if __name__ == "__main__":
main()