-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* DOC: update docstrings * FIX: pd.Series is not generic * DOC: update README.rst * DOC: remove RST reference to pandas from README.rst * DOC: remove type hints from README.rst * DOC: add tutorial for object-oriented API * DOC: remove obsolete EXCLUDE_MODULES option * DOC: update hyperlinks in README.rst * DOC: fix docstrings * DOC: hide source link in conf_base.py * CODE: ignore erroneous mypy error for non-generic pd.Series * FIX: link to home.html * DOC: update the FAQ * DOC: update the README.rst intro section * DOC: add copyright notice * DOC: update BCG URL * DOC: update API landing page * DOC: update version to 1.0.0
- Loading branch information
Showing
46 changed files
with
805 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/usr/bin/env python3 | ||
import os | ||
|
||
# Define the copyright notice | ||
COPYRIGHT_NOTICE = """\ | ||
# ----------------------------------------------------------------------------- | ||
# © 2024 Boston Consulting Group. All rights reserved. | ||
# | ||
# 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. | ||
# ----------------------------------------------------------------------------- | ||
""" | ||
|
||
|
||
def add_copyright_notice(file_path): | ||
with open(file_path) as file: | ||
content = file.read() | ||
|
||
if ( | ||
COPYRIGHT_NOTICE.strip() not in content | ||
): # Avoid adding the notice if it's already present | ||
with open(file_path, "w") as file: | ||
file.write(COPYRIGHT_NOTICE + "\n" + content) | ||
|
||
|
||
def recursively_add_notice_to_py_files(directory): | ||
for root, _, files in os.walk(directory): | ||
for file in files: | ||
if file.endswith(".py"): | ||
file_path = os.path.join(root, file) | ||
add_copyright_notice(file_path) | ||
|
||
|
||
# Specify the directory you want to start the search from | ||
start_directory = "../src" # Replace with your directory path | ||
|
||
recursively_add_notice_to_py_files(start_directory) | ||
|
||
print("Copyright notice added to all .py files.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.