Skip to content

Commit

Permalink
[DOP-3161] Automatically add license header
Browse files Browse the repository at this point in the history
  • Loading branch information
dolfinus committed Feb 2, 2024
1 parent 1ed561f commit 5ac644f
Show file tree
Hide file tree
Showing 19 changed files with 61 additions and 173 deletions.
20 changes: 18 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,23 @@ repos:
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.4
hooks:
- id: forbid-tabs
- id: remove-tabs
exclude: ^docs/(make.bat|Makefile)$
args: [--whitespaces-count, '2']
- id: chmod
args: ['644']
exclude_types: [shell]
- id: chmod
args: ['755']
types: [shell]
- id: insert-license
files: .*\.py$
exclude: ^(setup\.py|samples/.*\.py|docs/.*\.py|tests/.*\.py)$
args:
- --license-filepath
- .spdx-license-header.txt
- --use-current-year
- --no-extra-eol

- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
Expand Down Expand Up @@ -113,4 +128,5 @@ repos:

ci:
skip:
- docker-compose-check
- docker-compose-check # cannot run on pre-commit.ci
- chmod # failing in pre-commit.ci
2 changes: 2 additions & 0 deletions .spdx-license-header.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SPDX-FileCopyrightText: 2021-2024 MTS (Mobile Telesystems)
SPDX-License-Identifier: Apache-2.0
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2022 MTS (Mobile Telesystems). All rights reserved.
Copyright 2021-2024 MTS (Mobile Telesystems). All rights reserved.

Apache License
Version 2.0, January 2004
Expand Down
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.

import sys
import subprocess
import sys
from pathlib import Path

from packaging.version import Version
Expand All @@ -32,8 +32,8 @@
# -- Project information -----------------------------------------------------

project = "mlflow-rest-client"
copyright = "2022, MTS (Mobile Telesystems)"
author = "MTS DSX Team"
copyright = "2021-2024, MTS (Mobile Telesystems)"
author = "DSX Team"

# The short X.Y version
version = ver.base_version
Expand Down
20 changes: 10 additions & 10 deletions docs/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pushd %~dp0
REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build
Expand All @@ -14,15 +14,15 @@ if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
Expand Down
16 changes: 2 additions & 14 deletions mlflow_rest_client/__init__.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
# Copyright 2022 MTS (Mobile Telesystems)
#
# 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.

# SPDX-FileCopyrightText: 2021-2024 MTS (Mobile Telesystems)
# SPDX-License-Identifier: Apache-2.0
# pylint: disable= wrong-import-position

from .mlflow_rest_client import MLflowRESTClient
Expand Down
16 changes: 2 additions & 14 deletions mlflow_rest_client/artifact.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
# Copyright 2022 MTS (Mobile Telesystems)
#
# 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.

# SPDX-FileCopyrightText: 2021-2024 MTS (Mobile Telesystems)
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations

import os
Expand Down
16 changes: 2 additions & 14 deletions mlflow_rest_client/experiment.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
# Copyright 2022 MTS (Mobile Telesystems)
#
# 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.

# SPDX-FileCopyrightText: 2021-2024 MTS (Mobile Telesystems)
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations

from enum import Enum
Expand Down
16 changes: 2 additions & 14 deletions mlflow_rest_client/internal.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
# Copyright 2022 MTS (Mobile Telesystems)
#
# 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.

# SPDX-FileCopyrightText: 2021-2024 MTS (Mobile Telesystems)
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations

from typing import List
Expand Down
16 changes: 2 additions & 14 deletions mlflow_rest_client/mlflow_rest_client.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
# Copyright 2022 MTS (Mobile Telesystems)
#
# 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.

# SPDX-FileCopyrightText: 2021-2024 MTS (Mobile Telesystems)
# SPDX-License-Identifier: Apache-2.0
# pylint: disable=too-many-lines

from __future__ import annotations
Expand Down
16 changes: 2 additions & 14 deletions mlflow_rest_client/model.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
# Copyright 2022 MTS (Mobile Telesystems)
#
# 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.

# SPDX-FileCopyrightText: 2021-2024 MTS (Mobile Telesystems)
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations

from datetime import datetime
Expand Down
16 changes: 2 additions & 14 deletions mlflow_rest_client/page.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
# Copyright 2022 MTS (Mobile Telesystems)
#
# 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.

# SPDX-FileCopyrightText: 2021-2024 MTS (Mobile Telesystems)
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations


Expand Down
16 changes: 2 additions & 14 deletions mlflow_rest_client/run.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
# Copyright 2022 MTS (Mobile Telesystems)
#
# 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.

# SPDX-FileCopyrightText: 2021-2024 MTS (Mobile Telesystems)
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations

from datetime import datetime
Expand Down
16 changes: 2 additions & 14 deletions mlflow_rest_client/tag.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
# Copyright 2022 MTS (Mobile Telesystems)
#
# 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.

# SPDX-FileCopyrightText: 2021-2024 MTS (Mobile Telesystems)
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations

from typing import Dict, List, Union
Expand Down
16 changes: 2 additions & 14 deletions mlflow_rest_client/timestamp.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
# Copyright 2022 MTS (Mobile Telesystems)
#
# 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.

# SPDX-FileCopyrightText: 2021-2024 MTS (Mobile Telesystems)
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations

import datetime
Expand Down
16 changes: 2 additions & 14 deletions mlflow_rest_client/version.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
# Copyright 2022 MTS (Mobile Telesystems)
#
# 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.

# SPDX-FileCopyrightText: 2021-2024 MTS (Mobile Telesystems)
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations

import os
Expand Down
3 changes: 2 additions & 1 deletion samples/sample.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import sys, time
import sys
import time

from mlflow_rest_client import MLflowRESTClient
from mlflow_rest_client.log import get_logger
Expand Down
1 change: 1 addition & 0 deletions samples/sklearn_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""

import sys

from mlflow_rest_client import MLflowRESTClient


Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
description="Python client for MLflow REST API",
long_description=long_description,
long_description_content_type="text/x-rst",
license="Apache License 2.0",
license="Apache-2.0",
license_files=("LICENSE.txt",),
url="https://github.com/MobileTeleSystems/mlflow-rest-client",
author="MTS DSX Team",
author="DSX Team",
author_email="dsx-team@mts.ru",
classifiers=[
"Development Status :: 4 - Beta",
Expand Down

0 comments on commit 5ac644f

Please sign in to comment.