diff --git a/caimira/docs/mkdocs/docs/open_source_acknowledgments.md b/caimira/docs/mkdocs/docs/open_source_acknowledgments.md new file mode 100644 index 00000000..ca84fd2a --- /dev/null +++ b/caimira/docs/mkdocs/docs/open_source_acknowledgments.md @@ -0,0 +1,113 @@ +# Open Source Acknowledgments + +# Disclaimer + +The following list includes the open-source dependencies used in this project, along with their respective licenses. It covers both the core dependencies explicitly specified in the project's requirements, as well as their transitive dependencies (dependencies of dependencies). + +Including transitive dependencies is essential to acknowledge the full spectrum of open-source contributions that contribute to the functionality of this project. It also ensures compliance with open-source licenses and recognizes the efforts of all contributors, even those indirectly involved. + +## CAiMIRA tool is Open Source + +??? "Back-end (Python) Dependencies" +??? "Front-end (JavaScript) Dependencies" + + #### jQuery 3.5.1 + + - License: MIT License(https://github.com/jquery/jquery/blob/main/LICENSE.txt) + + #### jQuery Colorbox + + - License: [MIT License](https://github.com/jackmoore/colorbox/blob/1.6.4/LICENSE.md) + + #### ScrollMagic + + - License: [MIT License](https://github.com/janpaepke/ScrollMagic/blob/v2.0.5/LICENSE.md) + + #### Twitter Bootstrap 4.5.3 + + - License: [MIT License](https://github.com/twbs/bootstrap/blob/v4.5.3/LICENSE) + + #### d3.js + + - License: [ISC License](https://github.com/d3/d3/blob/v7.8.5/LICENSE) + + +??? "Other references" + + #### Arve + + - Endpoint: `https://www.arveair.com/terms-and-conditions/` + + #### Rest Countries + + - License: [MP License 2.0](https://gitlab.com/restcountries/restcountries/-/blob/master/LICENSE?ref_type=heads) + + #### WHO COVID-19 Global Data + + - Endpoint: `https://covid19.who.int/WHO-COVID-19-global-data.csv` + + #### ArcGIS Geocode + + - Endpoint: `https://geocode.arcgis.com` + + #### View Hub Resources + + - Endpoint: `https://view-hub.org/resources` + + #### CERN Web Analytics + + - Endpoint: `https://webanalytics.web.cern.ch/` + + #### Zenodo Badge + + - Endpoint: `https://zenodo.org/badge/DOI/10.5281/zenodo.6520431.svg` + - Description: Zenodo itself does not impose any specific license on the content that is deposited. Instead, it allows the depositor to choose the license for their content. This means that the permissiveness of the Zenodo badge (with the DOI) depends entirely on the license chosen by the person depositing the content. + + #### Swiss COVID-19 Data + + - Endpoint: `https://www.covid19.admin.ch/en/epidemiologic/case/d/development?epiRelDev=abs` + +### License Distribution + +![License Distribution](license_distribution.png) + +### License information + +The list of open-source dependencies provided here includes licenses for both direct dependencies and dependencies of dependencies. This comprehensive list covers a wide range of licenses, each with its own terms and conditions. Below is a summary of the most frequently encountered licenses along with their descriptions and usage: + +1. **MIT License** + - The MIT License is a permissive free software license originating at the Massachusetts Institute of Technology (MIT). It is a short and simple license that allows developers to use, modify, and distribute the software for both commercial and non-commercial purposes. + +2. **Apache License, Version 2.0** + - The Apache License, Version 2.0 is a widely used open-source software license that allows users to use the software for any purpose, to distribute it, to modify it, and to distribute modified versions of the software under the terms of the license. + +3. **Berkeley Software Distribution License (BSDL)** + - The BSD License is a family of permissive free software licenses that allow users to do anything they want with the source code, as long as they include the original copyright and license notice in any copy of the code or substantial portion of it. + +4. **Mozilla Public License 2.0 (MPL)** + - The Mozilla Public License is a free and open-source software license developed and maintained by the Mozilla Foundation. It is a copyleft license, which means that derived works can only be distributed under the same license terms. + +5. **Python Software Foundation Licene (PSFL)** + - The Python Software Foundation License (PSFL) is a BSD-style, permissive software license which is compatible with the GNU General Public License (GPL).[1] Its primary use is for distribution of the Python project software and its documentation. Since the license is permissive, it allows proprietization of the derivations. + +6. **Internet Systems Consourtium License (ISCL)** + - The ISC license is a permissive free software license published by the Internet Software Consortium, now called Internet Systems Consortium (ISC). It is functionally equivalent to the simplified BSD and MIT licenses. + +7. **Historical Permission Notice and Disclaimer License (HPND)** + - The Historical Permission Notice and Disclaimer (HPND) is an open source license, approved by the Open Source Initiative (OSI) and verified as GPL-compatible by the Free Software Foundation. The license can be almost functionally identical to the new, 3-clause BSD License (if the option for the no-promotion clause is exercised), or the MIT License (if the option for the no-promotion clause is not exercised). + +8. **GNU General Public License 2.0 or later (GPL-2.0-or-later)** + + - The GNU General Public License (GPL) is a copyleft license that allows users to modify and distribute software. Any modified versions must also be distributed under the GPL. The "or later" part means that the software can be distributed under any later version of the GPL as well. GPL ensures that software remains free and open-source. + +9. **GNU Lesser General Public License 2.1 or later (LGPL-2.1-or-later)** + + - The GNU Lesser General Public License (LGPL) is a more permissive version of the GPL, specifically intended for software libraries. It allows proprietary software to link to LGPL-licensed libraries without requiring the proprietary software itself to be open-source. Like the GPL, the LGPL requires modifications to the LGPL-licensed software to be released under the LGPL. + +10. **Expat License (also known as MIT License)** + + - The Expat License is an open-source license that is functionally identical to the MIT License. It is a permissive license that allows users to modify and distribute the software. The Expat license is commonly used in projects like XML parsing libraries and other lightweight open-source software. + +11. **Dual License** + + - A dual license means that the software is distributed under two different licenses, and the user can choose which one to comply with. This is commonly used to provide a more permissive license for open-source usage and a more restrictive commercial license for proprietary use. For example, a project may be available under both the MIT License and the GPL. diff --git a/caimira/docs/style_docs.py b/caimira/docs/style_docs.py index e48970ab..3b694007 100644 --- a/caimira/docs/style_docs.py +++ b/caimira/docs/style_docs.py @@ -3,10 +3,51 @@ import re import os +import subprocess +import matplotlib.pyplot as plt +from collections import Counter + +def get_package_info(): + """ + Retrieves package details (name, version, license, and homepage) for each installed package. + Uses pip show to get detailed information. + """ + # Get the list of installed packages using pip freeze + packages = subprocess.check_output(["pip", "freeze"]).decode().splitlines() + + package_details = [] + for package in packages: + package_name = package.split("==")[0] + try: + # Get detailed info about each package + info = subprocess.check_output(["pip", "show", package_name]).decode().splitlines() + + details = { + "name": package_name, + "version": "", + "license": "", + "homepage": "" + } + + for line in info: + if line.startswith("Version:"): + details["version"] = line.split(":", 1)[1].strip() + elif line.startswith("License:"): + details["license"] = line.split(":", 1)[1].strip() + elif line.startswith("Home-page:"): + details["homepage"] = line.split(":", 1)[1].strip() + + # Append the details for the current package + package_details.append(details) + except subprocess.CalledProcessError: + print(f"Error retrieving details for package: {package_name}") + + return package_details + def update_markdown_references(md_file_path): """ - Updates a Markdown file by adding headers for class definitions and modifying internal links. + Updates the code markdown file by adding headers for class definitions and modifying internal links. """ # Read the original Markdown file with open(md_file_path, 'r') as file: @@ -20,18 +61,21 @@ def update_markdown_references(md_file_path): # For each found class definition for match in class_matches: - class_name = match[0] # Class name (e.g., 'Interval' or 'ConcentrationModel') - + # Class name (e.g., 'Interval' or 'ConcentrationModel') + class_name = match[0] + # Create the header for this class header = f"## {class_name} Class\n" # Check if the header already exists in the file if header not in md_content: # If the header does not exist, insert it before the class definition - md_content = md_content.replace(f"### *class* {class_name}", header + f"### *class* {class_name}") + md_content = md_content.replace( + f"### *class* {class_name}", header + f"### *class* {class_name}") # Replace references like #models.models.ClassName with #className-class - md_content = md_content.replace(f"#models.models.{class_name}", f"#{class_name.lower()}-class") + md_content = md_content.replace( + f"#models.models.{class_name}", f"#{class_name.lower()}-class") # Write the updated content back to the file with open(md_file_path, 'w') as file: @@ -39,16 +83,137 @@ def update_markdown_references(md_file_path): print(f"Markdown file '{md_file_path}' updated successfully.") +def unify_license(license_str): + """ + Returns an unified license version. + """ + license_map = { + 'MIT': 'MIT', + 'MIT License': 'MIT', + 'MIT license': 'MIT', + 'MIT-CMU': 'MIT', + 'http://www.opensource.org/licenses/mit-license.php': 'MIT', + 'BSD': 'BSD-3-Clause', + 'BSD-3-Clause': 'BSD-3-Clause', + 'BSD 3-Clause License': 'BSD-3-Clause', + 'BSD 3-Clause': 'BSD-3-Clause', + 'BSD-2-Clause': 'BSD-2-Clause', + 'BSD License': 'BSD-3-Clause', + 'new BSD License': 'BSD-3-Clause', + 'Modified BSD License': 'BSD-3-Clause', + 'BSD 2-Clause License': 'BSD-2-Clause', + 'Apache 2.0': 'Apache-2.0', + 'Apache Software License': 'Apache-2.0', + 'Apache 2.0 License': 'Apache-2.0', + 'Apache License, Version 2.0': 'Apache-2.0', + 'Apache 2.0 license': 'Apache-2.0', + 'Apache-2.0': 'Apache-2.0', + 'Apache Software License 2.0': 'Apache-2.0', + 'MPL-2.0': 'MPL-2.0', + 'MPL 2.0': 'MPL-2.0', + 'GPL-2.0-or-later': 'GPL-2.0-or-later', + 'LGPL-2.1-or-later': 'LGPL-2.1-or-later', + 'ISC license': 'ISC', + 'Expat license': 'Expat', + 'MIT OR Apache-2.0': 'Dual License', + 'Dual License': 'Dual License', + 'UNKNOWN': 'Unknown' + } + + return license_map.get(license_str, 'Custom') + + +def add_python_dependencies_section(md_file_path, package_details): + """ + Adds the Python package dependencies section to the Open Source Acknowledgments Markdown file. + """ + # Section header for Python dependencies + dependencies_section = '\n\n' + for package in package_details: + package_url = f"https://pypi.org/project/{package['name']}/{package['version']}/" + package_title = f" #### [{package['name']} {package['version']}]({package_url})" + if package["license"]: + license_text = f" - License: {unify_license(package['license'])}" + else: + license_text = " - License: Unknown" + + dependencies_section += f"{package_title}\n\n{license_text}\n\n" + + # Read the current content of the Markdown file + with open(md_file_path, 'r') as file: + md_content = file.read() + + # Regex to find the "Back-end (Python) Dependencies" section + section_pattern = re.compile( + r'(?<=\?\?\? "Back-end \(Python\) Dependencies")(.*?)(?=\n\?\?\?|\Z)', re.DOTALL) + + match = section_pattern.search(md_content) + if match: + updated_content = md_content[:match.start(1)] + dependencies_section + md_content[match.end(1):] + else: + raise ValueError("Error: '??? \"Back-end (Python) Dependencies\"' section not found in the file.") + + with open(md_file_path, 'w') as file: + file.write(updated_content) + + print(f"Markdown file '{md_file_path}' updated with Python dependencies section.") + + +def generate_license_distribution_pie_chart(package_details, output_image_path): + """ + Generates a pie chart showing the distribution of licenses from the package details. + The chart is saved to the specified output image path. + """ + try: + licenses = [unify_license(pkg["license"]) for pkg in package_details if pkg["license"]] + license_counts = Counter(licenses) + + # Create labels and sizes for the pie chart + labels = list(license_counts.keys()) + sizes = list(license_counts.values()) + + # Create the pie chart + plt.figure(figsize=(8, 8), dpi=300) + plt.pie(sizes, labels=labels, autopct='%1.1f%%', startangle=140) + plt.axis('equal') + + # Save and show the pie chart + plt.savefig(output_image_path, dpi=300) + plt.close() + + print(f"License distribution pie chart saved to {output_image_path}") + + except Exception as e: + print(f"Error generating license distribution chart: {e}") + + + + def main(): - # Path to the markdown file to be updated - md_file_path = 'sphinx/_build/markdown/index.md' + # Path to the index.md markdown file to be updated + index_file_path = 'sphinx/_build/markdown/index.md' + + if os.path.isfile(index_file_path): + update_markdown_references(index_file_path) + else: + print(f"File '{index_file_path}' does not exist, skipping update.") + + # Path to the open source acknowledgements markdown file to be updated + acknowledgements_file_path = 'mkdocs/docs/open_source_acknowledgments.md' - # Check if the markdown file exists before attempting updates - if os.path.isfile(md_file_path): - update_markdown_references(md_file_path) + if os.path.isfile(acknowledgements_file_path): + # Retrieve package details + package_details = get_package_info() + + # Write the dependencies in the file + add_python_dependencies_section(acknowledgements_file_path, package_details) + + # Generate the pie chart + output_image_path = 'mkdocs/docs/license_distribution.png' + generate_license_distribution_pie_chart(package_details, output_image_path) else: - print(f"File '{md_file_path}' does not exist, skipping update.") + print(f"File '{acknowledgements_file_path}' does not exist, skipping update.") + if __name__ == "__main__": main() - \ No newline at end of file diff --git a/open-source-licences/README.md b/open-source-licences/README.md deleted file mode 100644 index 451a9f00..00000000 --- a/open-source-licences/README.md +++ /dev/null @@ -1,643 +0,0 @@ -# Open Source Acknowledgments - -# Disclaimer - -The following list includes the open-source dependencies used in this project, along with their respective licenses. It covers both the core dependencies explicitly specified in the project's requirements, as well as their transitive dependencies (dependencies of dependencies). - -Including transitive dependencies is essential to acknowledge the full spectrum of open-source contributions that contribute to the functionality of this project. It also ensures compliance with open-source licenses and recognizes the efforts of all contributors, even those indirectly involved. - -## CAiMIRA tool is Open Source - -### Back-end (Python) Dependencies - -#### anyio 4.0.0 - -- License: [MIT License](https://pypi.org/project/anyio/) - -#### appnope 0.1.3 - -- License: [BSD License (BSD-2-Clause)](https://pypi.org/project/appnope/) - -#### argon2-cffi 23.1.0 - -- License: [MIT License](https://pypi.org/project/argon2-cffi) - -#### argon2-cffi-bindings 21.2.0 - -- License: [MIT License](https://pypi.org/project/argon2-cffi-bindings/) - -#### arrow 1.3.0 - -- License: [Apache License 2.0](https://pypi.org/project/arrow/) - -#### asttokens 2.4.0 - -- License: [Apache License 2.0](https://pypi.org/project/asttokens/) - -#### async-lru 2.0.4 - -- License: [MIT License](https://pypi.org/project/async-lru/) - -#### attrs 23.1.0 - -- License: [MIT License](https://pypi.org/project/attrs/) - -#### Babel 2.12.1 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/Babel/) - -#### backcall 0.2.0 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/backcall/) - -#### beautifulsoup4 4.12.2 - -- License: [MIT License](https://pypi.org/project/beautifulsoup4/) - -#### bleach 6.0.0 - -- License: [Apache License 2.0](https://pypi.org/project/bleach/) - -#### certifi 2023.7.22 - -- License: [MP License 2.0](https://pypi.org/project/certifi/) - -#### cffi 1.16.0 - -- License: [MIT License](https://pypi.org/project/cffi/) - -#### charset-normalizer 3.3.0 - -- License: [MIT License](https://pypi.org/project/charset-normalizer/) - -#### cloudpickle 2.2.1 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/cloudpickle/) - -#### comm 0.1.4 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/comm/) - -#### contourpy 1.1.1 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/contourpy/) - -#### cycler 0.12.0 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/cycler/) - -#### debugpy 1.8.0 - -- License: [MIT License](https://pypi.org/project/debugpy/) - -#### decorator 5.1.1 - -- License: [BSD License (BSD-2-Clause)](https://pypi.org/project/decorator/) - -#### defusedxml 0.7.1 - -- License: [PSF License](https://pypi.org/project/defusedxml/) - -#### exceptiongroup 1.1.3 - -- License: [MIT License](https://pypi.org/project/exceptiongroup/) - -#### executing 2.0.0 - -- License: [MIT License](https://pypi.org/project/executing/) - -#### fastjsonschema 2.18.1 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/fastjsonschema/) - -#### filelock 3.12.4 - -- License: [Unlicense](https://pypi.org/project/filelock/) - -#### fonttools 4.43.0 - -- License: [MIT License](https://pypi.org/project/fonttools/) - -#### fqdn 1.5.1 - -- License: [MP License 2.0](https://pypi.org/project/fqdn/) - -#### h3 3.7.6 - -- License: [Apache License 2.0](https://pypi.org/project/h3/) - -#### idna 3.4 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/idna/) - -#### importlib-metadata 6.8.0 - -- License: [Apache License 2.0](https://pypi.org/project/importlib-metadata/) - -#### importlib-resources 6.1.0 - -- License: [Apache License 2.0](https://pypi.org/project/importlib-resources/) - -#### iniconfig 2.0.0 - -- License: [MIT License](https://pypi.org/project/iniconfig/) - -#### ipykernel 6.25.2 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/ipykernel/) - -#### ipympl 0.9.3 - -- License: [BSD License](https://pypi.org/project/ipympl/) - -#### ipython 8.16.0 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/ipython/) - -#### ipython-genutils 0.2.0 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/ipython-genutils/) - -#### ipywidgets 7.8.1 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/ipywidgets/) - -#### isoduration 20.11.0 - -- License: [ISC License](https://pypi.org/project/isoduration/) - -#### jedi 0.19.0 - -- License: [MIT License](https://pypi.org/project/jedi/) - -#### Jinja2 3.1.2 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/Jinja2/) - -#### joblib 1.3.2 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/joblib/) - -#### json5 0.9.14 - -- License: [Apache License 2.0](https://pypi.org/project/json5/) - -#### jsonpointer 2.4 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/jsonpointer/) - -#### jsonschema 4.19.1 - -- License: [MIT License](https://pypi.org/project/jsonschema/) - -#### jsonschema-specifications 2023.7.1 - -- License: [MIT License](https://pypi.org/project/jsonschema-specifications/) - -#### jupyter-client 8.3.1 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/jupyter-client/) - -#### jupyter-core 5.3.2 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/jupyter-core/) - -#### jupyter-events 0.7.0 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/jupyter-events/) - -#### jupyter-lsp 2.2.0 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/jupyter-lsp/) - -#### jupyter-server 2.7.3 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/jupyter-server/) - -#### jupyter-server-terminals 0.4.4 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/jupyter-server-terminals/) - -#### jupyterlab 4.0.6 - -- License: [BSD License](https://pypi.org/project/jupyterlab/) - -#### jupyterlab-pygments 0.2.2 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/jupyterlab-pygments/) - -#### jupyterlab-server 2.25.0 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/jupyterlab-server/) - -#### jupyterlab-widgets 1.1.7 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/jupyterlab-widgets/) - -#### kiwisolver 1.4.5 - -- License: [BSD License](https://pypi.org/project/kiwisolver/) - -#### loky 3.4.1 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/loky/) - -#### MarkupSafe 2.1.3 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/MarkupSafe/) - -#### matplotlib 3.8.0 - -- License: [PSF License](https://pypi.org/project/matplotlib/) - -#### matplotlib-inline 0.1.6 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/matplotlib-inline/) - -#### memoization 0.4.0 - -- License: [MIT License](https://pypi.org/project/memoization/) - -#### mistune 3.0.2 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/mistune/) - -#### mypy 1.5.1 - -- License: [MIT License](https://pypi.org/project/mypy/) - -#### mypy-extensions 1.0.0 - -- License: [MIT License](https://pypi.org/project/mypy-extensions/) - -#### nbclient 0.7.4 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/nbclient/) - -#### nbconvert 7.8.0 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/nbconvert/) - -#### nbformat 5.9.2 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/nbformat/) - -#### nest-asyncio 1.5.8 - -- License: [BSD License (BSD-2-Clause)](https://pypi.org/project/nest-asyncio/) - -#### notebook 7.0.4 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/notebook/) - -#### notebook-shim 0.2.3 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/notebook-shim/) - -#### numpy 1.26.0 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/numpy/) - -#### numpy-stubs 0.0.1 - -- License: [BSD License (BSD-3-Clause)](https://github.com/numpy/numpy-stubs/tree/master) - -#### overrides 7.4.0 - -- License: [Apache License 2.0](https://pypi.org/project/overrides/) - -#### packaging 23.2 - -- License: [Apache License 2.0](https://pypi.org/project/packaging/) - -#### pandas 2.1.1 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/pandas/) - -#### pandocfilters 1.5.0 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/pandocfilters/) - -#### parso 0.8.3 - -- License: [MIT License](https://pypi.org/project/parso/) - -#### pexpect 4.8.0 - -- License: [ISC License](https://pypi.org/project/pexpect/) - -#### pickleshare 0.7.5 - -- License: [MIT License](https://pypi.org/project/pickleshare/) - -#### Pillow 10.0.1 - -- License: [HPND License](https://pypi.org/project/Pillow/) - -#### platformdirs 3.10.0 - -- License: [MIT License](https://pypi.org/project/platformdirs/) - -#### pluggy 1.3.0 - -- License: [MIT License](https://pypi.org/project/pluggy/) - -#### prometheus-client 0.17.1 - -- License: [Apache License 2.0](https://pypi.org/project/prometheus-client/) - -#### prompt-toolkit 3.0.39 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/prompt-toolkit/) - -#### psutil 5.9.5 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/psutil/) - -#### ptyprocess 0.7.0 - -- License: [ISC License](https://pypi.org/project/ptyprocess/) - -#### pure-eval 0.2.2 - -- License: [MIT License](https://pypi.org/project/pure-eval/) - -#### py 1.11.0 - -- License: [MIT License](https://pypi.org/project/py/) - -#### pycparser 2.21 - -- License: [BSD License](https://pypi.org/project/pycparser/) - -#### Pygments 2.16.1 - -- License: [BSD License (BSD-2-Clause)](https://pypi.org/project/Pygments/) - -#### pyinstrument 4.6.1 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/pyinstrument/) - -#### pyparsing 3.1.1 - -- License: [MIT License](https://pypi.org/project/pyparsing/) - -#### pytest 7.4.2 - -- License: [MIT License](https://pypi.org/project/pytest/) - -#### pytest-mypy 0.10.3 - -- License: [MIT License](https://pypi.org/project/pytest-mypy/) - -#### pytest-tornasync 0.6.0.post2 - -- License: [MIT License](https://pypi.org/project/pytest-tornasync/) - -#### python-dateutil 2.8.2 - -- License: [Apache License 2.0](https://pypi.org/project/python-dateutil/) - -#### python-json-logger 2.0.7 - -- License: [BSD License (BSD-2-Clause)](https://pypi.org/project/python-json-logger/) - -#### pytz 2023.3.post1 - -- License: [MIT License](https://pypi.org/project/pytz/) - -#### PyYAML 6.0.1 - -- License: [MIT License](https://pypi.org/project/PyYAML/) - -#### pyzmq 25.1.1 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/pyzmq/) - -#### referencing 0.30.2 - -- License: [MIT License](https://pypi.org/project/referencing/) - -#### requests 2.31.0 - -- License: [Apache License 2.0](https://pypi.org/project/requests/) - -#### retry 0.9.2 - -- License: [Apache License 2.0](https://pypi.org/project/retry/) - -#### rfc3339-validator 0.1.4 - -- License: [MIT License](https://pypi.org/project/rfc3339-validator/) - -#### rfc3986-validator 0.1.1 - -- License: [MIT License](https://pypi.org/project/rfc3986-validator/) - -#### rpds-py 0.10.3 - -- License: [MIT License](https://pypi.org/project/rpds-py/) - -#### scikit-learn 1.3.1 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/scikit-learn/) - -#### scipy 1.11.3 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/scipy/) - -#### Send2Trash 1.8.2 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/Send2Trash/) - -#### six 1.16.0 - -- License: [MIT License](https://pypi.org/project/six/) - -#### sniffio 1.3.0 - -- License: [Apache License 2.0](https://pypi.org/project/sniffio/) - -#### soupsieve 2.5 - -- License: [MIT License](https://pypi.org/project/soupsieve/) - -#### stack-data 0.6.3 - -- License: [MIT License](https://pypi.org/project/stack-data/) - -#### terminado 0.17.1 - -- License: [BSD License (BSD-2-Clause)](https://pypi.org/project/terminado/) - -#### threadpoolctl 3.2.0 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/threadpoolctl/) - -#### timezonefinder 6.2.0 - -- License: [MIT License](https://pypi.org/project/timezonefinder/) - -#### tinycss2 1.2.1 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/tinycss2/) - -#### tomli 2.0.1 - -- License: [MIT License](https://pypi.org/project/tomli/) - -#### tornado 6.3.3 - -- License: [Apache License 2.0](https://pypi.org/project/tornado/) - -#### traitlets 5.10.1 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/traitlets/) - -#### types-dataclasses 0.6.6 - -- License: [Apache License 2.0](https://pypi.org/project/types-dataclasses/) - -#### types-python-dateutil 2.8.19.14 - -- License: [Apache License 2.0](https://pypi.org/project/types-python-dateutil/) - -#### types-retry 0.9.9.4 - -- License: [Apache License 2.0](https://pypi.org/project/types-retry/) - -#### typing-extensions 4.8.0 - -- License: [PSF License](https://pypi.org/project/typing-extensions/) - -#### tzdata 2023.3 - -- License: [Apache License 2.0](https://pypi.org/project/tzdata/) - -#### uri-template 1.3.0 - -- License: [MIT License](https://pypi.org/project/uri-template/) - -#### urllib3 2.0.5 - -- License: [MIT License](https://pypi.org/project/urllib3/) - -#### voila 0.5.4 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/voila/) - -#### wcwidth 0.2.8 - -- License: [MIT License](https://pypi.org/project/wcwidth/) - -#### webcolors 1.13 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/webcolors/) - -#### webencodings 0.5.1 - -- License: [BSD License](https://pypi.org/project/webencodings/) - -#### websocket-client 1.6.3 - -- License: [Apache License 2.0](https://pypi.org/project/websocket-client/) - -#### websockets 11.0.3 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/websockets/) - -#### widgetsnbextension 3.6.6 - -- License: [BSD License (BSD-3-Clause)](https://pypi.org/project/widgetsnbextension/) - -#### zipp 3.17.0 - -- License: [MIT License](https://pypi.org/project/zipp/) - - -### Front-end (JavaScript) Dependencies - -#### jQuery 3.5.1 - -- License: [MIT License](https://github.com/jquery/jquery/blob/main/LICENSE.txt) - -#### jQuery Colorbox - -- License: [MIT License](https://github.com/jackmoore/colorbox/blob/1.6.4/LICENSE.md) - -#### ScrollMagic - -- License: [MIT License](https://github.com/janpaepke/ScrollMagic/blob/v2.0.5/LICENSE.md) - -#### Twitter Bootstrap 4.5.3 - -- License: [MIT License](https://github.com/twbs/bootstrap/blob/v4.5.3/LICENSE) - -#### d3.js - -- License: [ISC License](https://github.com/d3/d3/blob/v7.8.5/LICENSE) - - -### Other references - -#### Arve - -- Endpoint: `https://www.arveair.com/terms-and-conditions/` - -#### Rest Countries - -- License: [MP License 2.0](https://gitlab.com/restcountries/restcountries/-/blob/master/LICENSE?ref_type=heads) - -#### WHO COVID-19 Global Data - -- Endpoint: `https://covid19.who.int/WHO-COVID-19-global-data.csv` - -#### ArcGIS Geocode - -- Endpoint: `https://geocode.arcgis.com` - -#### View Hub Resources - -- Endpoint: `https://view-hub.org/resources` - -#### CERN Web Analytics - -- Endpoint: `https://webanalytics.web.cern.ch/` - -#### Zenodo Badge - -- Endpoint: `https://zenodo.org/badge/DOI/10.5281/zenodo.6520431.svg` -- Description: Zenodo itself does not impose any specific license on the content that is deposited. Instead, it allows the depositor to choose the license for their content. This means that the permissiveness of the Zenodo badge (with the DOI) depends entirely on the license chosen by the person depositing the content. - -#### Swiss COVID-19 Data - -- Endpoint: `https://www.covid19.admin.ch/en/epidemiologic/case/d/development?epiRelDev=abs` - -### License Distribution - -![License Distribution](open_source_acknowledgments/license_distribution.png) - -### License information - -The list of open-source dependencies provided here includes licenses for both direct dependencies and dependencies of dependencies. This comprehensive list covers a wide range of licenses, each with its own terms and conditions. Below is a summary of the most frequently encountered licenses along with their descriptions and usage: - -1. **MIT License** - - Description: The MIT License is a permissive free software license originating at the Massachusetts Institute of Technology (MIT). It is a short and simple license that allows developers to use, modify, and distribute the software for both commercial and non-commercial purposes. - -2. **Apache License, Version 2.0** - - Description: The Apache License, Version 2.0 is a widely used open-source software license that allows users to use the software for any purpose, to distribute it, to modify it, and to distribute modified versions of the software under the terms of the license. - -3. **Berkeley Software Distribution License (BSDL)** - - Description: The BSD License is a family of permissive free software licenses that allow users to do anything they want with the source code, as long as they include the original copyright and license notice in any copy of the code or substantial portion of it. - -4. **Mozilla Public License 2.0 (MPL)** - - Description: The Mozilla Public License is a free and open-source software license developed and maintained by the Mozilla Foundation. It is a copyleft license, which means that derived works can only be distributed under the same license terms. - -5. **Python Software Foundation Licene (PSFL)** - - Description: The Python Software Foundation License (PSFL) is a BSD-style, permissive software license which is compatible with the GNU General Public License (GPL).[1] Its primary use is for distribution of the Python project software and its documentation. Since the license is permissive, it allows proprietization of the derivations. - -6. **Internet Systems Consourtium License (ISCL)** - - Description: The ISC license is a permissive free software license published by the Internet Software Consortium, now called Internet Systems Consortium (ISC). It is functionally equivalent to the simplified BSD and MIT licenses. - -7. **Historical Permission Notice and Disclaimer License (HPND)** - - Description: The Historical Permission Notice and Disclaimer (HPND) is an open source license, approved by the Open Source Initiative (OSI) and verified as GPL-compatible by the Free Software Foundation. The license can be almost functionally identical to the new, 3-clause BSD License (if the option for the no-promotion clause is exercised), or the MIT License (if the option for the no-promotion clause is not exercised). diff --git a/open-source-licences/license_distribution.png b/open-source-licences/license_distribution.png deleted file mode 100644 index d6f1edff..00000000 Binary files a/open-source-licences/license_distribution.png and /dev/null differ diff --git a/open-source-licences/license_pie_chart.py b/open-source-licences/license_pie_chart.py deleted file mode 100644 index 595bcb31..00000000 --- a/open-source-licences/license_pie_chart.py +++ /dev/null @@ -1,51 +0,0 @@ -import re -from collections import Counter -import matplotlib.pyplot as plt - -# Open the acknowledgments file for reading -with open('acknowledgments.md', 'r') as file: - lines = file.readlines() - -# Regular expression to match package names and licenses -package_pattern = r'^#### (.+)$' -license_pattern = r'- License: \[([^\]]+)\]' - -# Lists to store licenses -bsd_licenses = [] -other_licenses = [] - -# Iterate through the lines and extract licenses -for line in lines: - license_match = re.search(license_pattern, line) - if license_match: - license = license_match.group(1) - if license.startswith('BSD'): - bsd_licenses.append(license) - else: - other_licenses.append(license) - -# Count the occurrences of each license -bsd_license_counts = Counter(bsd_licenses) -other_license_counts = Counter(other_licenses) - -# Print the BSD license counts -for license, count in bsd_license_counts.items(): - print(f'BSD License: {license}, Count: {count}') - -# Print the counts of other licenses -for license, count in other_license_counts.items(): - print(f'Other License: {license}, Count: {count}') - -# Combine BSD licenses into one category -bsd_combined_count = sum(bsd_license_counts.values()) - -# Create labels and sizes for the pie chart -labels = ['BSD Licenses', *other_license_counts.keys()] -sizes = [bsd_combined_count, *other_license_counts.values()] - -# Create the pie chart -plt.figure(figsize=(8, 8), dpi=300) -plt.pie(sizes, labels=labels, autopct='%1.1f%%', startangle=140) -plt.axis('equal') -plt.savefig('licence_distribution.png', dpi=300) -plt.show()