Skip to content

Commit

Permalink
Feature/license header (#153)
Browse files Browse the repository at this point in the history
- Added script for checking and fixing license headers
- Fixed license headers in all existing files
  • Loading branch information
feldlime authored Jun 18, 2024
1 parent 0100f52 commit 5faf9b9
Show file tree
Hide file tree
Showing 83 changed files with 537 additions and 212 deletions.
30 changes: 20 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ REPORTS=.reports
BENCHMARK=benchmark
SOURCES=rectools
TESTS=tests
SCRIPTS=scripts



Expand All @@ -21,37 +22,37 @@ install: .venv .reports
# Linters

.isort:
poetry run isort --check ${SOURCES} ${TESTS} ${BENCHMARK}
poetry run isort --check ${SOURCES} ${TESTS} ${SCRIPTS} ${BENCHMARK}

.black:
poetry run black --check --diff ${SOURCES} ${TESTS} ${BENCHMARK}
poetry run black --check --diff ${SOURCES} ${TESTS} ${SCRIPTS} ${BENCHMARK}

.pylint:
poetry run pylint --jobs 4 ${SOURCES} ${TESTS} ${BENCHMARK}
poetry run pylint --jobs 4 ${SOURCES} ${TESTS} ${SCRIPTS} ${BENCHMARK}

.mypy:
poetry run mypy ${SOURCES} ${TESTS} ${BENCHMARK}
poetry run mypy ${SOURCES} ${TESTS} ${SCRIPTS} ${BENCHMARK}

.flake8:
poetry run flake8 ${SOURCES} ${TESTS} ${BENCHMARK}
poetry run flake8 ${SOURCES} ${TESTS} ${SCRIPTS} ${BENCHMARK}

.bandit:
poetry run bandit -q -c bandit.yml -r ${SOURCES} ${TESTS} ${BENCHMARK}
poetry run bandit -q -c bandit.yml -r ${SOURCES} ${TESTS} ${SCRIPTS} ${BENCHMARK}

.codespell:
poetry run codespell ${SOURCES} ${TESTS} ${BENCHMARK}
poetry run codespell ${SOURCES} ${TESTS} ${SCRIPTS} ${BENCHMARK}


# Fixers & formatters

.isort_fix:
poetry run isort ${SOURCES} ${TESTS} ${BENCHMARK}
poetry run isort ${SOURCES} ${TESTS} ${SCRIPTS} ${BENCHMARK}

.autopep8_fix:
poetry run autopep8 --in-place -r ${SOURCES} ${TESTS} ${BENCHMARK}
poetry run autopep8 --in-place -r ${SOURCES} ${TESTS} ${SCRIPTS} ${BENCHMARK}

.black_fix:
poetry run black -q ${SOURCES} ${TESTS} ${BENCHMARK}
poetry run black -q ${SOURCES} ${TESTS} ${SCRIPTS} ${BENCHMARK}


# Tests
Expand Down Expand Up @@ -81,6 +82,15 @@ lint: .venv .lint
test: .venv .test


# Copyright

copyright:
poetry run python -m scripts.copyright --check ${SOURCES} ${TESTS} ${SCRIPTS} ${BENCHMARK}

copyright_fix:
poetry run python -m scripts.copyright ${SOURCES} ${TESTS} ${SCRIPTS} ${BENCHMARK}


# Cleaning

clean:
Expand Down
14 changes: 14 additions & 0 deletions benchmark/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2022-2024 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.

"""
Benchmarks for RecTools models
===================================================
Expand Down
Loading

0 comments on commit 5faf9b9

Please sign in to comment.