diff --git a/.github/workflows/_docker.yml b/.github/workflows/_docker.yml index bff9777d7a..ddd85d80d1 100644 --- a/.github/workflows/_docker.yml +++ b/.github/workflows/_docker.yml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + name: Build and push service docker image on: workflow_call: diff --git a/.github/workflows/_e2e_tests.yml b/.github/workflows/_e2e_tests.yml index 66bafcf3a6..2af41819b9 100644 --- a/.github/workflows/_e2e_tests.yml +++ b/.github/workflows/_e2e_tests.yml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + name: Launch end-to-end tests on: workflow_call: diff --git a/.github/workflows/_quality-python.yml b/.github/workflows/_quality-python.yml index f9a90c1002..512cd69d7c 100644 --- a/.github/workflows/_quality-python.yml +++ b/.github/workflows/_quality-python.yml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + name: Check Python code quality on: workflow_call: diff --git a/.github/workflows/_unit-tests-python.yml b/.github/workflows/_unit-tests-python.yml index 0d8f40870b..0291bb3874 100644 --- a/.github/workflows/_unit-tests-python.yml +++ b/.github/workflows/_unit-tests-python.yml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + name: Launch Python unit tests on: workflow_call: diff --git a/.github/workflows/chart.yml b/.github/workflows/chart.yml index fbc2b664f1..ef433df480 100644 --- a/.github/workflows/chart.yml +++ b/.github/workflows/chart.yml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + name: chart on: workflow_dispatch: diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml index 9b2b8f7fa2..d19baefc7a 100644 --- a/.github/workflows/doc-build.yml +++ b/.github/workflows/doc-build.yml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + name: Build documentation on: diff --git a/.github/workflows/doc-pr-build.yml b/.github/workflows/doc-pr-build.yml index ec7d1fd5e5..f962ada541 100644 --- a/.github/workflows/doc-pr-build.yml +++ b/.github/workflows/doc-pr-build.yml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + name: Build PR Documentation on: diff --git a/.github/workflows/doc-pr-delete.yml b/.github/workflows/doc-pr-delete.yml index 76afa9c92c..a4a39a4a6a 100644 --- a/.github/workflows/doc-pr-delete.yml +++ b/.github/workflows/doc-pr-delete.yml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + name: Delete PR documentation on: diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 07470410ad..0bc34f437c 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + name: e2e on: workflow_dispatch: diff --git a/.github/workflows/l-libcache.yml b/.github/workflows/l-libcache.yml index 10c76d27e8..5981ca8c15 100644 --- a/.github/workflows/l-libcache.yml +++ b/.github/workflows/l-libcache.yml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + name: libs/libcache on: workflow_dispatch: diff --git a/.github/workflows/l-libqueue.yml b/.github/workflows/l-libqueue.yml index b8ea7f9248..cfb6719461 100644 --- a/.github/workflows/l-libqueue.yml +++ b/.github/workflows/l-libqueue.yml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + name: libs/libqueue on: workflow_dispatch: diff --git a/.github/workflows/l-libutils.yml b/.github/workflows/l-libutils.yml index 46e6d866f7..80b0296c8e 100644 --- a/.github/workflows/l-libutils.yml +++ b/.github/workflows/l-libutils.yml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + name: libs/libutils on: workflow_dispatch: diff --git a/.github/workflows/openapi-spec.yml b/.github/workflows/openapi-spec.yml index 0ad6f243a8..91dd0a9b91 100644 --- a/.github/workflows/openapi-spec.yml +++ b/.github/workflows/openapi-spec.yml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + name: Check openapi specification on: workflow_dispatch: diff --git a/.github/workflows/s-admin-build.yml b/.github/workflows/s-admin-build.yml index 7b0a0602f1..c8337e9f08 100644 --- a/.github/workflows/s-admin-build.yml +++ b/.github/workflows/s-admin-build.yml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + name: services/admin on: workflow_dispatch: diff --git a/.github/workflows/s-admin.yml b/.github/workflows/s-admin.yml index 3203f8d58e..ddc57a5d92 100644 --- a/.github/workflows/s-admin.yml +++ b/.github/workflows/s-admin.yml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + name: services/admin on: workflow_dispatch: diff --git a/.github/workflows/s-api-build.yml b/.github/workflows/s-api-build.yml index bac06f22f8..75a86ac1f1 100644 --- a/.github/workflows/s-api-build.yml +++ b/.github/workflows/s-api-build.yml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + name: services/api on: workflow_dispatch: diff --git a/.github/workflows/s-api.yml b/.github/workflows/s-api.yml index 89b5857718..36f6719bc8 100644 --- a/.github/workflows/s-api.yml +++ b/.github/workflows/s-api.yml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + name: services/api on: workflow_dispatch: diff --git a/.github/workflows/s-worker-build.yml b/.github/workflows/s-worker-build.yml index 1f1e4ef397..1dc852e4d0 100644 --- a/.github/workflows/s-worker-build.yml +++ b/.github/workflows/s-worker-build.yml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + name: services/worker on: workflow_dispatch: diff --git a/.github/workflows/s-worker.yml b/.github/workflows/s-worker.yml index f464bfb888..9aaf1336e5 100644 --- a/.github/workflows/s-worker.yml +++ b/.github/workflows/s-worker.yml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + name: services/worker on: workflow_dispatch: diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 87b3e337c2..9db2736dda 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + name: Stale Bot on: diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000000..b10072f7bb --- /dev/null +++ b/AUTHORS @@ -0,0 +1,7 @@ +# This is the list of HuggingFace Datasets Server authors for copyright purposes. +# +# This does not necessarily list everyone who has contributed code, since in +# some cases, their employer may be the copyright holder. To see the full list +# of contributors, see the revision history in source control. + +HuggingFace Inc. diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000000..450a63cc30 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,132 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, caste, color, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +feedback@huggingface.co. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0]. + +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. + +For answers to common questions about this code of conduct, see the FAQ at +[https://www.contributor-covenant.org/faq][FAQ]. Translations are available +at [https://www.contributor-covenant.org/translations][translations]. + +[homepage]: https://www.contributor-covenant.org +[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html +[Mozilla CoC]: https://github.com/mozilla/diversity +[FAQ]: https://www.contributor-covenant.org/faq +[translations]: https://www.contributor-covenant.org/translations diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/README.md b/README.md index 46abca5df7..541cad6946 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,6 @@ The application also has: - a reverse proxy in front of the API to serve static files and proxy the rest to the API server - an admin server to serve technical endpoints -## Environments - The following environments contain all the modules: reverse proxy, API server, admin API server, workers, and the Mongo database. | Environment | URL | Type | How to deploy | @@ -47,13 +45,3 @@ The following environments contain all the modules: reverse proxy, API server, a | Development | https://datasets-server.us.dev.moon.huggingface.tech | Helm / Kubernetes | `make upgrade-dev` in [chart](./chart) | | Local from remote images | http://localhost:8100 | Docker compose | `make start-from-remote-images` (fetches docker images from AWS ECR) | | Local build | http://localhost:8000 | Docker compose | `make start-from-local-code` (builds docker images) | - -The Hugging Face Hub instance can be configured thanks to `HF_ENDPOINT`, so that the datasets server can access the Hub, a private Hub, or the instance dedicated to CI (https://hub-ci.huggingface.co/). The `HF_TOKEN` environment variable used by the workers to access the gated datasets must be set accordingly. - -| Where | `HF_ENDPOINT` (api, worker) | `HF_TOKEN` (worker) | -| ----------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------ | -| production | https://huggingface.co/ | Kubernetes secret | -| development | https://huggingface.co/ | Kubernetes secret | -| local docker | https://huggingface.co/. Override with `HF_ENDPOINT=... make start-...` | Enable the gated datasets with `HF_TOKEN=... make start-...` | -| e2e | https://hub-ci.huggingface.co/ | Hard-coded: `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` | -| worker unit tests | https://hub-ci.huggingface.co/ | Hard-coded: `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` | diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000000..c8a500a276 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,33 @@ +# Security Policy + +## Supported Versions + + + +Each major version is currently being supported with security updates. + +| Version | Supported | +| ------- | ------------------ | +| 1.x.x | :white_check_mark: | + +## Reporting a Vulnerability + + + +To report a security vulnerability, please contact: security@huggingface.co diff --git a/chart/Chart.yaml b/chart/Chart.yaml index d048c58110..ff3ee87ec4 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + apiVersion: v2 name: datasets-server description: A Helm chart for the datasets-server application diff --git a/chart/env/dev.yaml b/chart/env/dev.yaml index b3de888521..0c52ca0bee 100644 --- a/chart/env/dev.yaml +++ b/chart/env/dev.yaml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + mongodb: enabled: true diff --git a/chart/env/prod.yaml b/chart/env/prod.yaml index 6dda8ad077..3002e880fa 100644 --- a/chart/env/prod.yaml +++ b/chart/env/prod.yaml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + ## Production # # datasets-server is installed on a [kubernetes cluster](https://us-east-1.console.aws.amazon.com/eks/home?region=us-east-1#/clusters) diff --git a/chart/templates/_helpers.tpl b/chart/templates/_helpers.tpl index 833fcc2cd2..f053376155 100644 --- a/chart/templates/_helpers.tpl +++ b/chart/templates/_helpers.tpl @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + {{/* Expand the name of the chart. */}} diff --git a/chart/templates/_initContainerAssets.tpl b/chart/templates/_initContainerAssets.tpl index 71c046c605..642468285e 100644 --- a/chart/templates/_initContainerAssets.tpl +++ b/chart/templates/_initContainerAssets.tpl @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + {{- define "initContainerAssets" -}} - name: prepare-assets image: ubuntu:focal diff --git a/chart/templates/_initContainerCache.tpl b/chart/templates/_initContainerCache.tpl index 92c26e23da..4504665dee 100644 --- a/chart/templates/_initContainerCache.tpl +++ b/chart/templates/_initContainerCache.tpl @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + {{- define "initContainerCache" -}} - name: prepare-cache image: ubuntu:focal diff --git a/chart/templates/_initContainerNumbaCache.tpl b/chart/templates/_initContainerNumbaCache.tpl index 09bdd17240..1f9bd87c2c 100644 --- a/chart/templates/_initContainerNumbaCache.tpl +++ b/chart/templates/_initContainerNumbaCache.tpl @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + {{- define "initContainerNumbaCache" -}} - name: prepare-numba-cache image: ubuntu:focal diff --git a/chart/templates/admin/_container.tpl b/chart/templates/admin/_container.tpl index 7429d3d430..aa13526f7b 100644 --- a/chart/templates/admin/_container.tpl +++ b/chart/templates/admin/_container.tpl @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + {{- define "containerAdmin" -}} - name: "{{ include "name" . }}-admin" env: diff --git a/chart/templates/admin/deployment.yaml b/chart/templates/admin/deployment.yaml index b002e92eee..a5061067ad 100644 --- a/chart/templates/admin/deployment.yaml +++ b/chart/templates/admin/deployment.yaml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + apiVersion: apps/v1 kind: Deployment metadata: diff --git a/chart/templates/admin/service.yaml b/chart/templates/admin/service.yaml index 16d785d112..857e6d5bf2 100644 --- a/chart/templates/admin/service.yaml +++ b/chart/templates/admin/service.yaml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + apiVersion: v1 kind: Service metadata: diff --git a/chart/templates/admin/servicemonitor.yaml b/chart/templates/admin/servicemonitor.yaml index 234943acae..8500e0fb39 100644 --- a/chart/templates/admin/servicemonitor.yaml +++ b/chart/templates/admin/servicemonitor.yaml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + {{- if .Values.monitoring.enabled }} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor diff --git a/chart/templates/api/_container.tpl b/chart/templates/api/_container.tpl index afe53d8ca5..87228447b9 100644 --- a/chart/templates/api/_container.tpl +++ b/chart/templates/api/_container.tpl @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + {{- define "containerApi" -}} - name: "{{ include "name" . }}-api" env: diff --git a/chart/templates/api/deployment.yaml b/chart/templates/api/deployment.yaml index 07fa757b61..0046d64de0 100644 --- a/chart/templates/api/deployment.yaml +++ b/chart/templates/api/deployment.yaml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + apiVersion: apps/v1 kind: Deployment metadata: diff --git a/chart/templates/api/service.yaml b/chart/templates/api/service.yaml index 4ff25b8f82..779d2db068 100644 --- a/chart/templates/api/service.yaml +++ b/chart/templates/api/service.yaml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + apiVersion: v1 kind: Service metadata: diff --git a/chart/templates/api/servicemonitor.yaml b/chart/templates/api/servicemonitor.yaml index a3d9e23041..2ceffe2a70 100644 --- a/chart/templates/api/servicemonitor.yaml +++ b/chart/templates/api/servicemonitor.yaml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + {{- if .Values.monitoring.enabled }} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor diff --git a/chart/templates/reverse-proxy/_container.tpl b/chart/templates/reverse-proxy/_container.tpl index 412f94ae31..7b9575075d 100644 --- a/chart/templates/reverse-proxy/_container.tpl +++ b/chart/templates/reverse-proxy/_container.tpl @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + {{- define "containerReverseProxy" -}} - name: "{{ include "name" . }}-reverse-proxy" image: {{ .Values.dockerImage.reverseProxy }} diff --git a/chart/templates/reverse-proxy/configMap.yaml b/chart/templates/reverse-proxy/configMap.yaml index 14f8eade4b..72021abff1 100644 --- a/chart/templates/reverse-proxy/configMap.yaml +++ b/chart/templates/reverse-proxy/configMap.yaml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + apiVersion: v1 kind: ConfigMap metadata: diff --git a/chart/templates/reverse-proxy/deployment.yaml b/chart/templates/reverse-proxy/deployment.yaml index ab2bb9c7a5..81648de2e9 100644 --- a/chart/templates/reverse-proxy/deployment.yaml +++ b/chart/templates/reverse-proxy/deployment.yaml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + apiVersion: apps/v1 kind: Deployment metadata: diff --git a/chart/templates/reverse-proxy/service.yaml b/chart/templates/reverse-proxy/service.yaml index 93eef209cc..5b99652a2c 100644 --- a/chart/templates/reverse-proxy/service.yaml +++ b/chart/templates/reverse-proxy/service.yaml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + apiVersion: v1 kind: Service metadata: diff --git a/chart/templates/worker/first-rows/_container.tpl b/chart/templates/worker/first-rows/_container.tpl index ee99e06b4c..5861736957 100644 --- a/chart/templates/worker/first-rows/_container.tpl +++ b/chart/templates/worker/first-rows/_container.tpl @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + {{- define "containerWorkerFirstRows" -}} - name: "{{ include "name" . }}-worker-first-rows" env: diff --git a/chart/templates/worker/first-rows/deployment.yaml b/chart/templates/worker/first-rows/deployment.yaml index 0670d291c3..7c5af3a584 100644 --- a/chart/templates/worker/first-rows/deployment.yaml +++ b/chart/templates/worker/first-rows/deployment.yaml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + apiVersion: apps/v1 kind: Deployment metadata: diff --git a/chart/templates/worker/splits/_container.tpl b/chart/templates/worker/splits/_container.tpl index 308b3ebf31..abf78b893f 100644 --- a/chart/templates/worker/splits/_container.tpl +++ b/chart/templates/worker/splits/_container.tpl @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + {{- define "containerWorkerSplits" -}} - name: "{{ include "name" . }}-worker-splits" env: diff --git a/chart/templates/worker/splits/deployment.yaml b/chart/templates/worker/splits/deployment.yaml index ebc724b1be..fe3a8c6a07 100644 --- a/chart/templates/worker/splits/deployment.yaml +++ b/chart/templates/worker/splits/deployment.yaml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + apiVersion: apps/v1 kind: Deployment metadata: diff --git a/e2e/pyproject.toml b/e2e/pyproject.toml index 5e7bb7aa7d..368b73524c 100644 --- a/e2e/pyproject.toml +++ b/e2e/pyproject.toml @@ -3,6 +3,7 @@ authors = ["Sylvain Lesage "] description = "End to end tests" name = "e2e" version = "0.1.0" +license = "Apache-2.0" [tool.poetry.dependencies] openapi-spec-validator = "^0.4.0" diff --git a/e2e/src/__init__.py b/e2e/src/__init__.py index e69de29bb2..1e9d0c5a99 100644 --- a/e2e/src/__init__.py +++ b/e2e/src/__init__.py @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. diff --git a/e2e/tests/__init__.py b/e2e/tests/__init__.py index e69de29bb2..1e9d0c5a99 100644 --- a/e2e/tests/__init__.py +++ b/e2e/tests/__init__.py @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. diff --git a/e2e/tests/conftest.py b/e2e/tests/conftest.py index 7fafc27a40..a8cded4a05 100644 --- a/e2e/tests/conftest.py +++ b/e2e/tests/conftest.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import pytest from .utils import poll diff --git a/e2e/tests/fixtures/__init__.py b/e2e/tests/fixtures/__init__.py index e69de29bb2..1e9d0c5a99 100644 --- a/e2e/tests/fixtures/__init__.py +++ b/e2e/tests/fixtures/__init__.py @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. diff --git a/e2e/tests/fixtures/files.py b/e2e/tests/fixtures/files.py index f5151447ef..1a4f812ae1 100644 --- a/e2e/tests/fixtures/files.py +++ b/e2e/tests/fixtures/files.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import csv import pytest diff --git a/e2e/tests/fixtures/hub.py b/e2e/tests/fixtures/hub.py index d500dcad28..23e23fc48e 100644 --- a/e2e/tests/fixtures/hub.py +++ b/e2e/tests/fixtures/hub.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + # Adapted from https://github.com/huggingface/datasets/blob/main/tests/fixtures/hub.py import time diff --git a/e2e/tests/test_10_healthcheck.py b/e2e/tests/test_10_healthcheck.py index ffbe1e8f0c..a7425e0e88 100644 --- a/e2e/tests/test_10_healthcheck.py +++ b/e2e/tests/test_10_healthcheck.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + from .utils import poll diff --git a/e2e/tests/test_30_auth.py b/e2e/tests/test_30_auth.py index 1eea6f4767..a7755c689b 100644 --- a/e2e/tests/test_30_auth.py +++ b/e2e/tests/test_30_auth.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import pytest from .fixtures.hub import AuthHeaders, AuthType, DatasetRepos, DatasetReposType diff --git a/e2e/tests/test_40_splits.py b/e2e/tests/test_40_splits.py index 06bc68d3d2..fe8cea9915 100644 --- a/e2e/tests/test_40_splits.py +++ b/e2e/tests/test_40_splits.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import pytest from .utils import ( diff --git a/e2e/tests/test_50_first_rows.py b/e2e/tests/test_50_first_rows.py index acac97cd44..8780d2db90 100644 --- a/e2e/tests/test_50_first_rows.py +++ b/e2e/tests/test_50_first_rows.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import json from typing import Any diff --git a/e2e/tests/test_80_valid.py b/e2e/tests/test_80_valid.py index b5e69662ed..2d8a1f9b76 100644 --- a/e2e/tests/test_80_valid.py +++ b/e2e/tests/test_80_valid.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + from .fixtures.hub import DatasetRepos from .utils import get diff --git a/e2e/tests/test_90_is_valid.py b/e2e/tests/test_90_is_valid.py index e5df780185..a1c42a67ca 100644 --- a/e2e/tests/test_90_is_valid.py +++ b/e2e/tests/test_90_is_valid.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + from .fixtures.hub import DatasetRepos from .utils import get diff --git a/e2e/tests/utils.py b/e2e/tests/utils.py index 846c258764..119528bf3d 100644 --- a/e2e/tests/utils.py +++ b/e2e/tests/utils.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import json import os import time diff --git a/libs/libcache/pyproject.toml b/libs/libcache/pyproject.toml index 5da3f05ac0..b1dfe670cf 100644 --- a/libs/libcache/pyproject.toml +++ b/libs/libcache/pyproject.toml @@ -3,6 +3,7 @@ authors = ["Sylvain Lesage "] description = "Library for the cache in mongodb" name = "libcache" version = "0.2.1" +license = "Apache-2.0" [tool.poetry.dependencies] appdirs = "^1.4.4" diff --git a/libs/libcache/src/libcache/__init__.py b/libs/libcache/src/libcache/__init__.py index e69de29bb2..1e9d0c5a99 100644 --- a/libs/libcache/src/libcache/__init__.py +++ b/libs/libcache/src/libcache/__init__.py @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. diff --git a/libs/libcache/src/libcache/asset.py b/libs/libcache/src/libcache/asset.py index 99480537a0..73b0f1bc58 100644 --- a/libs/libcache/src/libcache/asset.py +++ b/libs/libcache/src/libcache/asset.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import logging import os from typing import Optional diff --git a/libs/libcache/src/libcache/simple_cache.py b/libs/libcache/src/libcache/simple_cache.py index 4d6b8ec652..3a24a80a6f 100644 --- a/libs/libcache/src/libcache/simple_cache.py +++ b/libs/libcache/src/libcache/simple_cache.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import logging import types from datetime import datetime, timezone diff --git a/libs/libcache/tests/__init__.py b/libs/libcache/tests/__init__.py index e69de29bb2..1e9d0c5a99 100644 --- a/libs/libcache/tests/__init__.py +++ b/libs/libcache/tests/__init__.py @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. diff --git a/libs/libcache/tests/_utils.py b/libs/libcache/tests/_utils.py index 8e973b351f..1dafee6d7c 100644 --- a/libs/libcache/tests/_utils.py +++ b/libs/libcache/tests/_utils.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import os DEFAULT_MONGO_CACHE_DATABASE: str = "datasets_server_cache_test" diff --git a/libs/libcache/tests/test_simple_cache.py b/libs/libcache/tests/test_simple_cache.py index b757197ab9..78a6e5f865 100644 --- a/libs/libcache/tests/test_simple_cache.py +++ b/libs/libcache/tests/test_simple_cache.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + from http import HTTPStatus from time import process_time diff --git a/libs/libqueue/pyproject.toml b/libs/libqueue/pyproject.toml index f3b975f822..997e967ea3 100644 --- a/libs/libqueue/pyproject.toml +++ b/libs/libqueue/pyproject.toml @@ -3,6 +3,7 @@ authors = ["Sylvain Lesage "] description = "Library for the jobs queue in mongodb" name = "libqueue" version = "0.2.0" +license = "Apache-2.0" [tool.poetry.dependencies] mongo-types = "0.15.1" diff --git a/libs/libqueue/src/libqueue/__init__.py b/libs/libqueue/src/libqueue/__init__.py index e69de29bb2..1e9d0c5a99 100644 --- a/libs/libqueue/src/libqueue/__init__.py +++ b/libs/libqueue/src/libqueue/__init__.py @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. diff --git a/libs/libqueue/src/libqueue/queue.py b/libs/libqueue/src/libqueue/queue.py index 415b8b1341..58752370c7 100644 --- a/libs/libqueue/src/libqueue/queue.py +++ b/libs/libqueue/src/libqueue/queue.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import enum import logging import types diff --git a/libs/libqueue/tests/__init__.py b/libs/libqueue/tests/__init__.py index e69de29bb2..1e9d0c5a99 100644 --- a/libs/libqueue/tests/__init__.py +++ b/libs/libqueue/tests/__init__.py @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. diff --git a/libs/libqueue/tests/_utils.py b/libs/libqueue/tests/_utils.py index 38dbfec793..7b725f1bb4 100644 --- a/libs/libqueue/tests/_utils.py +++ b/libs/libqueue/tests/_utils.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import os DEFAULT_MONGO_QUEUE_DATABASE: str = "datasets_server_queue_test" diff --git a/libs/libqueue/tests/test_queue.py b/libs/libqueue/tests/test_queue.py index 70fc066075..5d58f89e21 100644 --- a/libs/libqueue/tests/test_queue.py +++ b/libs/libqueue/tests/test_queue.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import pytest from libqueue.queue import ( diff --git a/libs/libutils/pyproject.toml b/libs/libutils/pyproject.toml index f26e0f9680..6d4ac70bb3 100644 --- a/libs/libutils/pyproject.toml +++ b/libs/libutils/pyproject.toml @@ -3,6 +3,7 @@ authors = ["Sylvain Lesage "] description = "Library for utils" name = "libutils" version = "0.2.0" +license = "Apache-2.0" [tool.poetry.dependencies] orjson = "^3.6.4" diff --git a/libs/libutils/src/libutils/__init__.py b/libs/libutils/src/libutils/__init__.py index e69de29bb2..1e9d0c5a99 100644 --- a/libs/libutils/src/libutils/__init__.py +++ b/libs/libutils/src/libutils/__init__.py @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. diff --git a/libs/libutils/src/libutils/exceptions.py b/libs/libutils/src/libutils/exceptions.py index b83b48da53..c2db778de0 100644 --- a/libs/libutils/src/libutils/exceptions.py +++ b/libs/libutils/src/libutils/exceptions.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import sys import traceback from http import HTTPStatus diff --git a/libs/libutils/src/libutils/logger.py b/libs/libutils/src/libutils/logger.py index 73e63a8fbf..3e406028f9 100644 --- a/libs/libutils/src/libutils/logger.py +++ b/libs/libutils/src/libutils/logger.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import logging diff --git a/libs/libutils/src/libutils/utils.py b/libs/libutils/src/libutils/utils.py index 1d6ab59867..d78993de28 100644 --- a/libs/libutils/src/libutils/utils.py +++ b/libs/libutils/src/libutils/utils.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import base64 from distutils.util import strtobool from os import _Environ diff --git a/libs/libutils/tests/__init__.py b/libs/libutils/tests/__init__.py index e69de29bb2..1e9d0c5a99 100644 --- a/libs/libutils/tests/__init__.py +++ b/libs/libutils/tests/__init__.py @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. diff --git a/libs/libutils/tests/test_utils.py b/libs/libutils/tests/test_utils.py index 3bd02aa6bb..8f1b5e76d5 100644 --- a/libs/libutils/tests/test_utils.py +++ b/libs/libutils/tests/test_utils.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + from libutils.utils import ( get_bool_value, get_int_value, diff --git a/services/admin/pyproject.toml b/services/admin/pyproject.toml index 8c4945a286..0c2b27bf13 100644 --- a/services/admin/pyproject.toml +++ b/services/admin/pyproject.toml @@ -3,6 +3,7 @@ authors = ["Sylvain Lesage "] description = "Admin scripts and API" name = "admin" version = "0.1.2" +license = "Apache-2.0" [tool.poetry.dependencies] huggingface-hub = "^0.8.1" diff --git a/services/admin/src/admin/__init__.py b/services/admin/src/admin/__init__.py index e69de29bb2..1e9d0c5a99 100644 --- a/services/admin/src/admin/__init__.py +++ b/services/admin/src/admin/__init__.py @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. diff --git a/services/admin/src/admin/app.py b/services/admin/src/admin/app.py index 0ad340b30a..333e20639f 100644 --- a/services/admin/src/admin/app.py +++ b/services/admin/src/admin/app.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import uvicorn # type: ignore from libcache.simple_cache import connect_to_cache from libqueue.queue import connect_to_queue diff --git a/services/admin/src/admin/authentication.py b/services/admin/src/admin/authentication.py index 01b9914fb3..48b685aaf1 100644 --- a/services/admin/src/admin/authentication.py +++ b/services/admin/src/admin/authentication.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + from typing import Literal, Optional import requests diff --git a/services/admin/src/admin/config.py b/services/admin/src/admin/config.py index ede14c1148..8c2d503719 100644 --- a/services/admin/src/admin/config.py +++ b/services/admin/src/admin/config.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import os from libutils.utils import get_int_value, get_str_or_none_value, get_str_value diff --git a/services/admin/src/admin/constants.py b/services/admin/src/admin/constants.py index efe7377e25..a04f0945ae 100644 --- a/services/admin/src/admin/constants.py +++ b/services/admin/src/admin/constants.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + DEFAULT_APP_HOSTNAME: str = "localhost" DEFAULT_APP_NUM_WORKERS: int = 2 DEFAULT_APP_PORT: int = 8000 diff --git a/services/admin/src/admin/main.py b/services/admin/src/admin/main.py index 6244cb2801..e484292584 100644 --- a/services/admin/src/admin/main.py +++ b/services/admin/src/admin/main.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + from admin.app import start if __name__ == "__main__": diff --git a/services/admin/src/admin/prometheus.py b/services/admin/src/admin/prometheus.py index ead8b03022..d2f60a0430 100644 --- a/services/admin/src/admin/prometheus.py +++ b/services/admin/src/admin/prometheus.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import os from typing import Dict diff --git a/services/admin/src/admin/routes/__init__.py b/services/admin/src/admin/routes/__init__.py index e69de29bb2..1e9d0c5a99 100644 --- a/services/admin/src/admin/routes/__init__.py +++ b/services/admin/src/admin/routes/__init__.py @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. diff --git a/services/admin/src/admin/routes/cache_reports.py b/services/admin/src/admin/routes/cache_reports.py index 6de4406a64..3a5e2eadb8 100644 --- a/services/admin/src/admin/routes/cache_reports.py +++ b/services/admin/src/admin/routes/cache_reports.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import logging from typing import Optional diff --git a/services/admin/src/admin/routes/healthcheck.py b/services/admin/src/admin/routes/healthcheck.py index 636207c749..5ea61a2c62 100644 --- a/services/admin/src/admin/routes/healthcheck.py +++ b/services/admin/src/admin/routes/healthcheck.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import logging from starlette.requests import Request diff --git a/services/admin/src/admin/routes/pending_jobs.py b/services/admin/src/admin/routes/pending_jobs.py index c2837e3c19..070705add0 100644 --- a/services/admin/src/admin/routes/pending_jobs.py +++ b/services/admin/src/admin/routes/pending_jobs.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import logging import time from typing import Optional diff --git a/services/admin/src/admin/scripts/__init__.py b/services/admin/src/admin/scripts/__init__.py index e69de29bb2..1e9d0c5a99 100644 --- a/services/admin/src/admin/scripts/__init__.py +++ b/services/admin/src/admin/scripts/__init__.py @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. diff --git a/services/admin/src/admin/scripts/cancel_jobs_first_rows.py b/services/admin/src/admin/scripts/cancel_jobs_first_rows.py index 0036927a31..e28b372a5c 100644 --- a/services/admin/src/admin/scripts/cancel_jobs_first_rows.py +++ b/services/admin/src/admin/scripts/cancel_jobs_first_rows.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import logging from libqueue.queue import cancel_started_first_rows_jobs, connect_to_queue diff --git a/services/admin/src/admin/scripts/cancel_jobs_splits.py b/services/admin/src/admin/scripts/cancel_jobs_splits.py index 7cf687778a..85781bbc0d 100644 --- a/services/admin/src/admin/scripts/cancel_jobs_splits.py +++ b/services/admin/src/admin/scripts/cancel_jobs_splits.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import logging from libqueue.queue import cancel_started_splits_jobs, connect_to_queue diff --git a/services/admin/src/admin/scripts/refresh_cache.py b/services/admin/src/admin/scripts/refresh_cache.py index 891f41983a..c54991f4cf 100644 --- a/services/admin/src/admin/scripts/refresh_cache.py +++ b/services/admin/src/admin/scripts/refresh_cache.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import logging from typing import List diff --git a/services/admin/src/admin/scripts/refresh_cache_canonical.py b/services/admin/src/admin/scripts/refresh_cache_canonical.py index 1d0ffcb188..3548236b0b 100644 --- a/services/admin/src/admin/scripts/refresh_cache_canonical.py +++ b/services/admin/src/admin/scripts/refresh_cache_canonical.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import logging from huggingface_hub.hf_api import HfApi # type: ignore diff --git a/services/admin/src/admin/scripts/refresh_cache_errors.py b/services/admin/src/admin/scripts/refresh_cache_errors.py index e4be08b34b..5ababb5957 100644 --- a/services/admin/src/admin/scripts/refresh_cache_errors.py +++ b/services/admin/src/admin/scripts/refresh_cache_errors.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import logging from libcache.simple_cache import connect_to_cache, get_datasets_with_some_error diff --git a/services/admin/src/admin/utils.py b/services/admin/src/admin/utils.py index cc5fee8994..945c038cde 100644 --- a/services/admin/src/admin/utils.py +++ b/services/admin/src/admin/utils.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + from http import HTTPStatus from typing import Any, Callable, Coroutine, Literal, Optional diff --git a/services/admin/tests/__init__.py b/services/admin/tests/__init__.py index e69de29bb2..1e9d0c5a99 100644 --- a/services/admin/tests/__init__.py +++ b/services/admin/tests/__init__.py @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. diff --git a/services/admin/tests/conftest.py b/services/admin/tests/conftest.py index 88142e18ff..7cb3ac81b4 100644 --- a/services/admin/tests/conftest.py +++ b/services/admin/tests/conftest.py @@ -1,2 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + # Import fixture modules as plugins pytest_plugins = ["tests.fixtures.hub"] diff --git a/services/admin/tests/fixtures/__init__.py b/services/admin/tests/fixtures/__init__.py index e69de29bb2..1e9d0c5a99 100644 --- a/services/admin/tests/fixtures/__init__.py +++ b/services/admin/tests/fixtures/__init__.py @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. diff --git a/services/admin/tests/fixtures/hub.py b/services/admin/tests/fixtures/hub.py index f6563e8582..ad2771e9b4 100644 --- a/services/admin/tests/fixtures/hub.py +++ b/services/admin/tests/fixtures/hub.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + # Adapted from https://github.com/huggingface/datasets/blob/main/tests/fixtures/hub.py import time diff --git a/services/admin/tests/scripts/__init__.py b/services/admin/tests/scripts/__init__.py index e69de29bb2..1e9d0c5a99 100644 --- a/services/admin/tests/scripts/__init__.py +++ b/services/admin/tests/scripts/__init__.py @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. diff --git a/services/admin/tests/scripts/test_refresh_cache_canonical.py b/services/admin/tests/scripts/test_refresh_cache_canonical.py index 75737edaab..088e06b594 100644 --- a/services/admin/tests/scripts/test_refresh_cache_canonical.py +++ b/services/admin/tests/scripts/test_refresh_cache_canonical.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + from admin.scripts.refresh_cache_canonical import get_hf_canonical_dataset_names from ..fixtures.hub import DatasetRepos diff --git a/services/admin/tests/test_app.py b/services/admin/tests/test_app.py index 0b3489b475..70e47de1c1 100644 --- a/services/admin/tests/test_app.py +++ b/services/admin/tests/test_app.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + from typing import Optional import pytest diff --git a/services/admin/tests/test_authentication.py b/services/admin/tests/test_authentication.py index 1335107450..d4cb710d94 100644 --- a/services/admin/tests/test_authentication.py +++ b/services/admin/tests/test_authentication.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + from typing import Dict import pytest diff --git a/services/admin/tests/utils.py b/services/admin/tests/utils.py index 332729f9bc..0b875c1a95 100644 --- a/services/admin/tests/utils.py +++ b/services/admin/tests/utils.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + from typing import Mapping, Tuple, Union from requests import PreparedRequest diff --git a/services/api/pyproject.toml b/services/api/pyproject.toml index f82e49d189..aa31046ba0 100644 --- a/services/api/pyproject.toml +++ b/services/api/pyproject.toml @@ -3,6 +3,7 @@ authors = ["Sylvain Lesage "] description = "REST API app" name = "api" version = "0.1.3" +license = "Apache-2.0" [tool.poetry.dependencies] libcache = { path = "../../libs/libcache/dist/libcache-0.2.1-py3-none-any.whl", develop = false } diff --git a/services/api/src/api/__init__.py b/services/api/src/api/__init__.py index e69de29bb2..1e9d0c5a99 100644 --- a/services/api/src/api/__init__.py +++ b/services/api/src/api/__init__.py @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. diff --git a/services/api/src/api/app.py b/services/api/src/api/app.py index 466fcc2f03..4815c7e9d7 100644 --- a/services/api/src/api/app.py +++ b/services/api/src/api/app.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + from typing import List import uvicorn # type: ignore diff --git a/services/api/src/api/authentication.py b/services/api/src/api/authentication.py index 346dadae13..7e0f4ed2cd 100644 --- a/services/api/src/api/authentication.py +++ b/services/api/src/api/authentication.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + from typing import Literal, Optional import requests diff --git a/services/api/src/api/config.py b/services/api/src/api/config.py index 68895b6d56..8e5efbc77a 100644 --- a/services/api/src/api/config.py +++ b/services/api/src/api/config.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import os from libutils.utils import get_int_value, get_str_or_none_value, get_str_value diff --git a/services/api/src/api/constants.py b/services/api/src/api/constants.py index 3ca9ddfb90..3f749c2714 100644 --- a/services/api/src/api/constants.py +++ b/services/api/src/api/constants.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + DEFAULT_APP_HOSTNAME: str = "localhost" DEFAULT_APP_NUM_WORKERS: int = 2 DEFAULT_APP_PORT: int = 8000 diff --git a/services/api/src/api/main.py b/services/api/src/api/main.py index 3c9212e28a..af5dbd5d40 100644 --- a/services/api/src/api/main.py +++ b/services/api/src/api/main.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + from api.app import start if __name__ == "__main__": diff --git a/services/api/src/api/prometheus.py b/services/api/src/api/prometheus.py index 8de107e883..2c2b4ee484 100644 --- a/services/api/src/api/prometheus.py +++ b/services/api/src/api/prometheus.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import os from prometheus_client import ( # type: ignore # https://github.com/prometheus/client_python/issues/491 diff --git a/services/api/src/api/routes/__init__.py b/services/api/src/api/routes/__init__.py index e69de29bb2..1e9d0c5a99 100644 --- a/services/api/src/api/routes/__init__.py +++ b/services/api/src/api/routes/__init__.py @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. diff --git a/services/api/src/api/routes/first_rows.py b/services/api/src/api/routes/first_rows.py index b13497d358..b750f04249 100644 --- a/services/api/src/api/routes/first_rows.py +++ b/services/api/src/api/routes/first_rows.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import logging from http import HTTPStatus from typing import Optional diff --git a/services/api/src/api/routes/healthcheck.py b/services/api/src/api/routes/healthcheck.py index 636207c749..5ea61a2c62 100644 --- a/services/api/src/api/routes/healthcheck.py +++ b/services/api/src/api/routes/healthcheck.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import logging from starlette.requests import Request diff --git a/services/api/src/api/routes/splits.py b/services/api/src/api/routes/splits.py index 5043dfce4e..aac9e91856 100644 --- a/services/api/src/api/routes/splits.py +++ b/services/api/src/api/routes/splits.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import logging from http import HTTPStatus from typing import Optional diff --git a/services/api/src/api/routes/valid.py b/services/api/src/api/routes/valid.py index 061faea3b9..d64e0a4130 100644 --- a/services/api/src/api/routes/valid.py +++ b/services/api/src/api/routes/valid.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import logging from typing import Optional diff --git a/services/api/src/api/routes/webhook.py b/services/api/src/api/routes/webhook.py index 3ffe90c2f9..fbd2c448ec 100644 --- a/services/api/src/api/routes/webhook.py +++ b/services/api/src/api/routes/webhook.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import logging from typing import Any, Optional, TypedDict diff --git a/services/api/src/api/utils.py b/services/api/src/api/utils.py index 5756b50cc5..858d60b7a7 100644 --- a/services/api/src/api/utils.py +++ b/services/api/src/api/utils.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + from http import HTTPStatus from typing import Any, Callable, Coroutine, List, Literal, Optional diff --git a/services/api/tests/__init__.py b/services/api/tests/__init__.py index e69de29bb2..1e9d0c5a99 100644 --- a/services/api/tests/__init__.py +++ b/services/api/tests/__init__.py @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. diff --git a/services/api/tests/conftest.py b/services/api/tests/conftest.py index 21398c4e02..a8392cd668 100644 --- a/services/api/tests/conftest.py +++ b/services/api/tests/conftest.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import os os.environ["HF_AUTH_PATH"] = "/%s" diff --git a/services/api/tests/test_app.py b/services/api/tests/test_app.py index 7e0f78fd80..565fa36c65 100644 --- a/services/api/tests/test_app.py +++ b/services/api/tests/test_app.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + from http import HTTPStatus from typing import Dict, Optional diff --git a/services/api/tests/test_authentication.py b/services/api/tests/test_authentication.py index 89feab1750..48bc15e2ec 100644 --- a/services/api/tests/test_authentication.py +++ b/services/api/tests/test_authentication.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + from typing import Dict import pytest diff --git a/services/api/tests/utils.py b/services/api/tests/utils.py index 2d42c8cac2..c23582fa32 100644 --- a/services/api/tests/utils.py +++ b/services/api/tests/utils.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + from typing import Mapping, Tuple, Union from requests import PreparedRequest diff --git a/services/worker/pyproject.toml b/services/worker/pyproject.toml index d293739246..0da84d44eb 100644 --- a/services/worker/pyproject.toml +++ b/services/worker/pyproject.toml @@ -3,6 +3,7 @@ authors = ["Sylvain Lesage "] description = "Worker that refreshes datasets and splits" name = "worker" version = "0.1.1" +license = "Apache-2.0" [tool.poetry.dependencies] Pillow = "^9.0.0" diff --git a/services/worker/src/worker/__init__.py b/services/worker/src/worker/__init__.py index e69de29bb2..1e9d0c5a99 100644 --- a/services/worker/src/worker/__init__.py +++ b/services/worker/src/worker/__init__.py @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. diff --git a/services/worker/src/worker/asset.py b/services/worker/src/worker/asset.py index 46691263fd..008d506669 100644 --- a/services/worker/src/worker/asset.py +++ b/services/worker/src/worker/asset.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import logging from os import makedirs from pathlib import Path diff --git a/services/worker/src/worker/config.py b/services/worker/src/worker/config.py index 6902de0494..b0b74a62c8 100644 --- a/services/worker/src/worker/config.py +++ b/services/worker/src/worker/config.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import os import datasets.config diff --git a/services/worker/src/worker/constants.py b/services/worker/src/worker/constants.py index 3bd7d2dee3..3fd2224ae5 100644 --- a/services/worker/src/worker/constants.py +++ b/services/worker/src/worker/constants.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + from typing import Optional DEFAULT_ASSETS_BASE_URL: str = "assets" diff --git a/services/worker/src/worker/features.py b/services/worker/src/worker/features.py index 9101ae4f17..4c8fdaf67c 100644 --- a/services/worker/src/worker/features.py +++ b/services/worker/src/worker/features.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + from typing import Any from datasets import ( diff --git a/services/worker/src/worker/main.py b/services/worker/src/worker/main.py index db3b7adcec..6c94902555 100644 --- a/services/worker/src/worker/main.py +++ b/services/worker/src/worker/main.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import logging import random import time diff --git a/services/worker/src/worker/refresh.py b/services/worker/src/worker/refresh.py index 722a07a2ab..d713415ffd 100644 --- a/services/worker/src/worker/refresh.py +++ b/services/worker/src/worker/refresh.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import logging from http import HTTPStatus from typing import Optional, Tuple diff --git a/services/worker/src/worker/responses/__init__.py b/services/worker/src/worker/responses/__init__.py index e69de29bb2..1e9d0c5a99 100644 --- a/services/worker/src/worker/responses/__init__.py +++ b/services/worker/src/worker/responses/__init__.py @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. diff --git a/services/worker/src/worker/responses/first_rows.py b/services/worker/src/worker/responses/first_rows.py index 566d2e3cee..7c2bb200e5 100644 --- a/services/worker/src/worker/responses/first_rows.py +++ b/services/worker/src/worker/responses/first_rows.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import itertools import logging import sys diff --git a/services/worker/src/worker/responses/splits.py b/services/worker/src/worker/responses/splits.py index 1fb2e49f70..aa351ae742 100644 --- a/services/worker/src/worker/responses/splits.py +++ b/services/worker/src/worker/responses/splits.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import logging from typing import Dict, List, Optional, TypedDict diff --git a/services/worker/src/worker/utils.py b/services/worker/src/worker/utils.py index 64bbaa44fb..8e7f3012d1 100644 --- a/services/worker/src/worker/utils.py +++ b/services/worker/src/worker/utils.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import functools import time from http import HTTPStatus diff --git a/services/worker/tests/__init__.py b/services/worker/tests/__init__.py index e69de29bb2..1e9d0c5a99 100644 --- a/services/worker/tests/__init__.py +++ b/services/worker/tests/__init__.py @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. diff --git a/services/worker/tests/conftest.py b/services/worker/tests/conftest.py index 8ec65149ab..5010cf61c2 100644 --- a/services/worker/tests/conftest.py +++ b/services/worker/tests/conftest.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import os from .utils import HF_ENDPOINT diff --git a/services/worker/tests/fixtures/__init__.py b/services/worker/tests/fixtures/__init__.py index e69de29bb2..1e9d0c5a99 100644 --- a/services/worker/tests/fixtures/__init__.py +++ b/services/worker/tests/fixtures/__init__.py @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. diff --git a/services/worker/tests/fixtures/datasets.py b/services/worker/tests/fixtures/datasets.py index d2c4217385..a88805a7b7 100644 --- a/services/worker/tests/fixtures/datasets.py +++ b/services/worker/tests/fixtures/datasets.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import datetime from pathlib import Path from typing import Any, Dict diff --git a/services/worker/tests/fixtures/files.py b/services/worker/tests/fixtures/files.py index 97a6b2e3c2..4a2dd290ff 100644 --- a/services/worker/tests/fixtures/files.py +++ b/services/worker/tests/fixtures/files.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import csv import pytest diff --git a/services/worker/tests/fixtures/hub.py b/services/worker/tests/fixtures/hub.py index 0ea7ef08d1..6c8daedd1a 100644 --- a/services/worker/tests/fixtures/hub.py +++ b/services/worker/tests/fixtures/hub.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + # Adapted from https://github.com/huggingface/datasets/blob/main/tests/fixtures/hub.py import time diff --git a/services/worker/tests/responses/__init__.py b/services/worker/tests/responses/__init__.py index e69de29bb2..1e9d0c5a99 100644 --- a/services/worker/tests/responses/__init__.py +++ b/services/worker/tests/responses/__init__.py @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. diff --git a/services/worker/tests/responses/test_first_rows.py b/services/worker/tests/responses/test_first_rows.py index 5d4095fcd9..cddd40144d 100644 --- a/services/worker/tests/responses/test_first_rows.py +++ b/services/worker/tests/responses/test_first_rows.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import pytest from libutils.exceptions import CustomError diff --git a/services/worker/tests/responses/test_splits.py b/services/worker/tests/responses/test_splits.py index d5381a5867..58dc6ddacc 100644 --- a/services/worker/tests/responses/test_splits.py +++ b/services/worker/tests/responses/test_splits.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import pytest from libutils.exceptions import CustomError diff --git a/services/worker/tests/test_features.py b/services/worker/tests/test_features.py index c5974281fc..3e4f04beaf 100644 --- a/services/worker/tests/test_features.py +++ b/services/worker/tests/test_features.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import datetime from typing import Any, Dict from zoneinfo import ZoneInfo diff --git a/services/worker/tests/test_main.py b/services/worker/tests/test_main.py index 47435ab135..f36d90f543 100644 --- a/services/worker/tests/test_main.py +++ b/services/worker/tests/test_main.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import pytest from libcache.simple_cache import _clean_database as clean_cache_database from libcache.simple_cache import connect_to_cache diff --git a/services/worker/tests/test_refresh.py b/services/worker/tests/test_refresh.py index 651216e525..61fa8350b0 100644 --- a/services/worker/tests/test_refresh.py +++ b/services/worker/tests/test_refresh.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + from http import HTTPStatus import pytest diff --git a/services/worker/tests/utils.py b/services/worker/tests/utils.py index 1b0db32cc7..2b61cc2782 100644 --- a/services/worker/tests/utils.py +++ b/services/worker/tests/utils.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors. + import os from typing import Tuple diff --git a/tools/stale.py b/tools/stale.py index 2d078829c1..8c791c9afc 100644 --- a/tools/stale.py +++ b/tools/stale.py @@ -1,16 +1,7 @@ -# Copyright 2021 The HuggingFace Team, the AllenNLP library authors. 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. +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 The HuggingFace Authors, the AllenNLP library authors. +# All rights reserved. + """ Script to close stale issue. Taken in part from the AllenNLP repository. https://github.com/allenai/allennlp.