diff --git a/.github/workflows/reuse.yml b/.github/workflows/reuse.yml new file mode 100644 index 00000000..def7a570 --- /dev/null +++ b/.github/workflows/reuse.yml @@ -0,0 +1,15 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# +# SPDX-License-Identifier: CC0-1.0 + +name: REUSE Compliance Check + +on: [push, pull_request] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: REUSE Compliance Check + uses: fsfe/reuse-action@v4 \ No newline at end of file diff --git a/.gitignore b/.gitignore index 0043f215..0bb70283 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# +# SPDX-License-Identifier: CC0-1.0 + # IDEs .vscode/ .idea/ diff --git a/.travis.yml b/.travis.yml index ee5a9e0f..03c1603f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# +# SPDX-License-Identifier: CC0-1.0 + os: linux dist: bionic language: python diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c29d9d9..6b88103f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ + + # Changelog All notable changes to this project will be documented in this file.
@@ -10,7 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Added -- [(#)]() +- Add REUSE Software compliance check [(#218)](https://github.com/OpenEnergyPlatform/oemetadata/pull/218) ### Changed - Update documentation and README [(#209)](https://github.com/OpenEnergyPlatform/oemetadata/pull/209) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 29642d97..aa01e1f7 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,3 +1,9 @@ + + # Contributor Covenant Code of Conduct ## Our Pledge diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index edfbcc7e..6d7b3a15 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,11 +1,7 @@ # Contributing to Collaborative Development diff --git a/LICENSES/AFL-3.0.txt b/LICENSES/AFL-3.0.txt new file mode 100644 index 00000000..e1b7792a --- /dev/null +++ b/LICENSES/AFL-3.0.txt @@ -0,0 +1,43 @@ +Academic Free License (“AFL”) v. 3.0 + +This Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work: + + Licensed under the Academic Free License version 3.0 + +1) Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following: + + a) to reproduce the Original Work in copies, either alone or as part of a collective work; + b) to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work; + c) to distribute or communicate copies of the Original Work and Derivative Works to the public, under any license of your choice that does not contradict the terms and conditions, including Licensor’s reserved rights and remedies, in this Academic Free License; + d) to perform the Original Work publicly; and + e) to display the Original Work publicly. + +2) Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works. + +3) Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work. + + 4) Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor’s trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license. + +5) External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c). + +6) Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work. + +7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer. + +8) Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation. + +9) Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including “fair use” or “fair dealing”). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c). + +10) Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware. + +11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License. + +12) Attorneys’ Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License. + +13) Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. + +14) Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For 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. + +15) Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You. + +16) Modification of This License. This License is Copyright © 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Academic Free License" or "AFL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under " or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process. diff --git a/LICENSES/BSD-3-Clause.txt b/LICENSES/BSD-3-Clause.txt new file mode 100644 index 00000000..ea890afb --- /dev/null +++ b/LICENSES/BSD-3-Clause.txt @@ -0,0 +1,11 @@ +Copyright (c) . + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/LICENSES/CC-BY-4.0.txt b/LICENSES/CC-BY-4.0.txt new file mode 100644 index 00000000..3f92dfc5 --- /dev/null +++ b/LICENSES/CC-BY-4.0.txt @@ -0,0 +1,324 @@ +Creative Commons Attribution 4.0 International Creative Commons Corporation +("Creative Commons") is not a law firm and does not provide legal services +or legal advice. Distribution of Creative Commons public licenses does not +create a lawyer-client or other relationship. Creative Commons makes its licenses +and related information available on an "as-is" basis. Creative Commons gives +no warranties regarding its licenses, any material licensed under their terms +and conditions, or any related information. Creative Commons disclaims all +liability for damages resulting from their use to the fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and conditions +that creators and other rights holders may use to share original works of +authorship and other material subject to copyright and certain other rights +specified in the public license below. The following considerations are for +informational purposes only, are not exhaustive, and do not form part of our +licenses. + +Considerations for licensors: Our public licenses are intended for use by +those authorized to give the public permission to use material in ways otherwise +restricted by copyright and certain other rights. Our licenses are irrevocable. +Licensors should read and understand the terms and conditions of the license +they choose before applying it. Licensors should also secure all rights necessary +before applying our licenses so that the public can reuse the material as +expected. Licensors should clearly mark any material not subject to the license. +This includes other CC-licensed material, or material used under an exception +or limitation to copyright. More considerations for licensors : wiki.creativecommons.org/Considerations_for_licensors + +Considerations for the public: By using one of our public licenses, a licensor +grants the public permission to use the licensed material under specified +terms and conditions. If the licensor's permission is not necessary for any +reason–for example, because of any applicable exception or limitation to copyright–then +that use is not regulated by the license. Our licenses grant only permissions +under copyright and certain other rights that a licensor has authority to +grant. Use of the licensed material may still be restricted for other reasons, +including because others have copyright or other rights in the material. A +licensor may make special requests, such as asking that all changes be marked +or described. Although not required by our licenses, you are encouraged to +respect those requests where reasonable. More considerations for the public +: wiki.creativecommons.org/Considerations_for_licensees Creative Commons Attribution +4.0 International Public License + +By exercising the Licensed Rights (defined below), You accept and agree to +be bound by the terms and conditions of this Creative Commons Attribution +4.0 International Public License ("Public License"). To the extent this Public +License may be interpreted as a contract, You are granted the Licensed Rights +in consideration of Your acceptance of these terms and conditions, and the +Licensor grants You such rights in consideration of benefits the Licensor +receives from making the Licensed Material available under these terms and +conditions. + +Section 1 – Definitions. + +a. Adapted Material means material subject to Copyright and Similar Rights +that is derived from or based upon the Licensed Material and in which the +Licensed Material is translated, altered, arranged, transformed, or otherwise +modified in a manner requiring permission under the Copyright and Similar +Rights held by the Licensor. For purposes of this Public License, where the +Licensed Material is a musical work, performance, or sound recording, Adapted +Material is always produced where the Licensed Material is synched in timed +relation with a moving image. + +b. Adapter's License means the license You apply to Your Copyright and Similar +Rights in Your contributions to Adapted Material in accordance with the terms +and conditions of this Public License. + +c. Copyright and Similar Rights means copyright and/or similar rights closely +related to copyright including, without limitation, performance, broadcast, +sound recording, and Sui Generis Database Rights, without regard to how the +rights are labeled or categorized. For purposes of this Public License, the +rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. + +d. Effective Technological Measures means those measures that, in the absence +of proper authority, may not be circumvented under laws fulfilling obligations +under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, +and/or similar international agreements. + +e. Exceptions and Limitations means fair use, fair dealing, and/or any other +exception or limitation to Copyright and Similar Rights that applies to Your +use of the Licensed Material. + +f. Licensed Material means the artistic or literary work, database, or other +material to which the Licensor applied this Public License. + +g. Licensed Rights means the rights granted to You subject to the terms and +conditions of this Public License, which are limited to all Copyright and +Similar Rights that apply to Your use of the Licensed Material and that the +Licensor has authority to license. + +h. Licensor means the individual(s) or entity(ies) granting rights under this +Public License. + +i. Share means to provide material to the public by any means or process that +requires permission under the Licensed Rights, such as reproduction, public +display, public performance, distribution, dissemination, communication, or +importation, and to make material available to the public including in ways +that members of the public may access the material from a place and at a time +individually chosen by them. + +j. Sui Generis Database Rights means rights other than copyright resulting +from Directive 96/9/EC of the European Parliament and of the Council of 11 +March 1996 on the legal protection of databases, as amended and/or succeeded, +as well as other essentially equivalent rights anywhere in the world. + +k. You means the individual or entity exercising the Licensed Rights under +this Public License. Your has a corresponding meaning. + +Section 2 – Scope. + + a. License grant. + +1. Subject to the terms and conditions of this Public License, the Licensor +hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, +irrevocable license to exercise the Licensed Rights in the Licensed Material +to: + + A. reproduce and Share the Licensed Material, in whole or in part; and + + B. produce, reproduce, and Share Adapted Material. + +2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions +and Limitations apply to Your use, this Public License does not apply, and +You do not need to comply with its terms and conditions. + + 3. Term. The term of this Public License is specified in Section 6(a). + +4. Media and formats; technical modifications allowed. The Licensor authorizes +You to exercise the Licensed Rights in all media and formats whether now known +or hereafter created, and to make technical modifications necessary to do +so. The Licensor waives and/or agrees not to assert any right or authority +to forbid You from making technical modifications necessary to exercise the +Licensed Rights, including technical modifications necessary to circumvent +Effective Technological Measures. For purposes of this Public License, simply +making modifications authorized by this Section 2(a)(4) never produces Adapted +Material. + + 5. Downstream recipients. + +A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed +Material automatically receives an offer from the Licensor to exercise the +Licensed Rights under the terms and conditions of this Public License. + +B. No downstream restrictions. You may not offer or impose any additional +or different terms or conditions on, or apply any Effective Technological +Measures to, the Licensed Material if doing so restricts exercise of the Licensed +Rights by any recipient of the Licensed Material. + +6. No endorsement. Nothing in this Public License constitutes or may be construed +as permission to assert or imply that You are, or that Your use of the Licensed +Material is, connected with, or sponsored, endorsed, or granted official status +by, the Licensor or others designated to receive attribution as provided in +Section 3(a)(1)(A)(i). + + b. Other rights. + +1. Moral rights, such as the right of integrity, are not licensed under this +Public License, nor are publicity, privacy, and/or other similar personality +rights; however, to the extent possible, the Licensor waives and/or agrees +not to assert any such rights held by the Licensor to the limited extent necessary +to allow You to exercise the Licensed Rights, but not otherwise. + +2. Patent and trademark rights are not licensed under this Public License. + +3. To the extent possible, the Licensor waives any right to collect royalties +from You for the exercise of the Licensed Rights, whether directly or through +a collecting society under any voluntary or waivable statutory or compulsory +licensing scheme. In all other cases the Licensor expressly reserves any right +to collect such royalties. + +Section 3 – License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the following +conditions. + + a. Attribution. + +1. If You Share the Licensed Material (including in modified form), You must: + +A. retain the following if it is supplied by the Licensor with the Licensed +Material: + +i. identification of the creator(s) of the Licensed Material and any others +designated to receive attribution, in any reasonable manner requested by the +Licensor (including by pseudonym if designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of warranties; + +v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; + +B. indicate if You modified the Licensed Material and retain an indication +of any previous modifications; and + +C. indicate the Licensed Material is licensed under this Public License, and +include the text of, or the URI or hyperlink to, this Public License. + +2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner +based on the medium, means, and context in which You Share the Licensed Material. +For example, it may be reasonable to satisfy the conditions by providing a +URI or hyperlink to a resource that includes the required information. + +3. If requested by the Licensor, You must remove any of the information required +by Section 3(a)(1)(A) to the extent reasonably practicable. + +4. If You Share Adapted Material You produce, the Adapter's License You apply +must not prevent recipients of the Adapted Material from complying with this +Public License. + +Section 4 – Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that apply to +Your use of the Licensed Material: + +a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, +reuse, reproduce, and Share all or a substantial portion of the contents of +the database; + +b. if You include all or a substantial portion of the database contents in +a database in which You have Sui Generis Database Rights, then the database +in which You have Sui Generis Database Rights (but not its individual contents) +is Adapted Material; and + +c. You must comply with the conditions in Section 3(a) if You Share all or +a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not replace +Your obligations under this Public License where the Licensed Rights include +other Copyright and Similar Rights. + +Section 5 – Disclaimer of Warranties and Limitation of Liability. + +a. Unless otherwise separately undertaken by the Licensor, to the extent possible, +the Licensor offers the Licensed Material as-is and as-available, and makes +no representations or warranties of any kind concerning the Licensed Material, +whether express, implied, statutory, or other. This includes, without limitation, +warranties of title, merchantability, fitness for a particular purpose, non-infringement, +absence of latent or other defects, accuracy, or the presence or absence of +errors, whether or not known or discoverable. Where disclaimers of warranties +are not allowed in full or in part, this disclaimer may not apply to You. + +b. To the extent possible, in no event will the Licensor be liable to You +on any legal theory (including, without limitation, negligence) or otherwise +for any direct, special, indirect, incidental, consequential, punitive, exemplary, +or other losses, costs, expenses, or damages arising out of this Public License +or use of the Licensed Material, even if the Licensor has been advised of +the possibility of such losses, costs, expenses, or damages. Where a limitation +of liability is not allowed in full or in part, this limitation may not apply +to You. + +c. The disclaimer of warranties and limitation of liability provided above +shall be interpreted in a manner that, to the extent possible, most closely +approximates an absolute disclaimer and waiver of all liability. + +Section 6 – Term and Termination. + +a. This Public License applies for the term of the Copyright and Similar Rights +licensed here. However, if You fail to comply with this Public License, then +Your rights under this Public License terminate automatically. + +b. Where Your right to use the Licensed Material has terminated under Section +6(a), it reinstates: + +1. automatically as of the date the violation is cured, provided it is cured +within 30 days of Your discovery of the violation; or + + 2. upon express reinstatement by the Licensor. + +c. For the avoidance of doubt, this Section 6(b) does not affect any right +the Licensor may have to seek remedies for Your violations of this Public +License. + +d. For the avoidance of doubt, the Licensor may also offer the Licensed Material +under separate terms or conditions or stop distributing the Licensed Material +at any time; however, doing so will not terminate this Public License. + + e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. + +Section 7 – Other Terms and Conditions. + +a. The Licensor shall not be bound by any additional or different terms or +conditions communicated by You unless expressly agreed. + +b. Any arrangements, understandings, or agreements regarding the Licensed +Material not stated herein are separate from and independent of the terms +and conditions of this Public License. + +Section 8 – Interpretation. + +a. For the avoidance of doubt, this Public License does not, and shall not +be interpreted to, reduce, limit, restrict, or impose conditions on any use +of the Licensed Material that could lawfully be made without permission under +this Public License. + +b. To the extent possible, if any provision of this Public License is deemed +unenforceable, it shall be automatically reformed to the minimum extent necessary +to make it enforceable. If the provision cannot be reformed, it shall be severed +from this Public License without affecting the enforceability of the remaining +terms and conditions. + +c. No term or condition of this Public License will be waived and no failure +to comply consented to unless expressly agreed to by the Licensor. + +d. Nothing in this Public License constitutes or may be interpreted as a limitation +upon, or waiver of, any privileges and immunities that apply to the Licensor +or You, including from the legal processes of any jurisdiction or authority. + +Creative Commons is not a party to its public licenses. Notwithstanding, Creative +Commons may elect to apply one of its public licenses to material it publishes +and in those instances will be considered the "Licensor." The text of the +Creative Commons public licenses is dedicated to the public domain under the +CC0 Public Domain Dedication. Except for the limited purpose of indicating +that material is shared under a Creative Commons public license or as otherwise +permitted by the Creative Commons policies published at creativecommons.org/policies, +Creative Commons does not authorize the use of the trademark "Creative Commons" +or any other trademark or logo of Creative Commons without its prior written +consent including, without limitation, in connection with any unauthorized +modifications to any of its public licenses or any other arrangements, understandings, +or agreements concerning use of licensed material. For the avoidance of doubt, +this paragraph does not form part of the public licenses. + +Creative Commons may be contacted at creativecommons.org. diff --git a/LICENSES/CC0-1.0.txt b/LICENSES/CC0-1.0.txt new file mode 100644 index 00000000..0e259d42 --- /dev/null +++ b/LICENSES/CC0-1.0.txt @@ -0,0 +1,121 @@ +Creative Commons Legal Code + +CC0 1.0 Universal + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE + LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN + ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS + INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES + REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS + PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM + THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED + HEREUNDER. + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator +and subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for +the purpose of contributing to a commons of creative, cultural and +scientific works ("Commons") that the public can reliably and without fear +of later claims of infringement build upon, modify, incorporate in other +works, reuse and redistribute as freely as possible in any form whatsoever +and for any purposes, including without limitation commercial purposes. +These owners may contribute to the Commons to promote the ideal of a free +culture and the further production of creative, cultural and scientific +works, or to gain reputation or greater distribution for their Work in +part through the use and efforts of others. + +For these and/or other purposes and motivations, and without any +expectation of additional consideration or compensation, the person +associating CC0 with a Work (the "Affirmer"), to the extent that he or she +is an owner of Copyright and Related Rights in the Work, voluntarily +elects to apply CC0 to the Work and publicly distribute the Work under its +terms, with knowledge of his or her Copyright and Related Rights in the +Work and the meaning and intended legal effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not +limited to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, + communicate, and translate a Work; + ii. moral rights retained by the original author(s) and/or performer(s); +iii. publicity and privacy rights pertaining to a person's image or + likeness depicted in a Work; + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + v. rights protecting the extraction, dissemination, use and reuse of data + in a Work; + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation + thereof, including any amended or successor version of such + directive); and +vii. other similar, equivalent or corresponding rights throughout the + world based on applicable law or treaty, and any national + implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention +of, applicable law, Affirmer hereby overtly, fully, permanently, +irrevocably and unconditionally waives, abandons, and surrenders all of +Affirmer's Copyright and Related Rights and associated claims and causes +of action, whether now known or unknown (including existing as well as +future claims and causes of action), in the Work (i) in all territories +worldwide, (ii) for the maximum duration provided by applicable law or +treaty (including future time extensions), (iii) in any current or future +medium and for any number of copies, and (iv) for any purpose whatsoever, +including without limitation commercial, advertising or promotional +purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each +member of the public at large and to the detriment of Affirmer's heirs and +successors, fully intending that such Waiver shall not be subject to +revocation, rescission, cancellation, termination, or any other legal or +equitable action to disrupt the quiet enjoyment of the Work by the public +as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason +be judged legally invalid or ineffective under applicable law, then the +Waiver shall be preserved to the maximum extent permitted taking into +account Affirmer's express Statement of Purpose. In addition, to the +extent the Waiver is so judged Affirmer hereby grants to each affected +person a royalty-free, non transferable, non sublicensable, non exclusive, +irrevocable and unconditional license to exercise Affirmer's Copyright and +Related Rights in the Work (i) in all territories worldwide, (ii) for the +maximum duration provided by applicable law or treaty (including future +time extensions), (iii) in any current or future medium and for any number +of copies, and (iv) for any purpose whatsoever, including without +limitation commercial, advertising or promotional purposes (the +"License"). The License shall be deemed effective as of the date CC0 was +applied by Affirmer to the Work. Should any part of the License for any +reason be judged legally invalid or ineffective under applicable law, such +partial invalidity or ineffectiveness shall not invalidate the remainder +of the License, and in such case Affirmer hereby affirms that he or she +will not (i) exercise any of his or her remaining Copyright and Related +Rights in the Work or (ii) assert any associated claims and causes of +action with respect to the Work, in either case contrary to Affirmer's +express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + b. Affirmer offers the Work as-is and makes no representations or + warranties of any kind concerning the Work, express, implied, + statutory or otherwise, including without limitation warranties of + title, merchantability, fitness for a particular purpose, non + infringement, or the absence of latent or other defects, accuracy, or + the present or absence of errors, whether or not discoverable, all to + the greatest extent permissible under applicable law. + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without + limitation any person's Copyright and Related Rights in the Work. + Further, Affirmer disclaims responsibility for obtaining any necessary + consents, permissions or other rights required for any use of the + Work. + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to + this CC0 or use of the Work. diff --git a/LICENSES/MIT.txt b/LICENSES/MIT.txt new file mode 100644 index 00000000..f4d9bdb1 --- /dev/null +++ b/LICENSES/MIT.txt @@ -0,0 +1,20 @@ +MIT License + +Copyright © Reiner Lemoine Institut + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/README.rst b/README.rst index c5142b23..37e049ff 100644 --- a/README.rst +++ b/README.rst @@ -1,3 +1,7 @@ +.. + SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut + + SPDX-License-Identifier: CC0-1.0 .. figure:: https://user-images.githubusercontent.com/14353512/245271998-794e9d73-e728-4993-9ecf-4d0d08d96827.png :align: left @@ -14,7 +18,7 @@ Open Energy Metadata (OEMetadata) :widths: auto * - License - - |badge_license| + - |badge_license| |badge_reuse| * - Documentation - |badge_documentation| * - Publication @@ -69,6 +73,10 @@ License and Citation :target: https://github.com/OpenEnergyPlatform/oemetadata/blob/production/LICENSE.txt :alt: License +.. |badge_reuse| image:: https://api.reuse.software/badge/github.com/OpenEnergyPlatform/oemetadata + :target: https://api.reuse.software/info/github.com/OpenEnergyPlatform/oemetadata + :alt: REUSE + .. |badge_documentation| image:: https://img.shields.io/github/actions/workflow/status/OpenEnergyPlatform/oemetadata/gh-pages.yml?branch=release-v2.0.1 :target: https://openenergyplatform.github.io/oemetadata/ :alt: Documentation diff --git a/RELEASE_PROCEDURE.md b/RELEASE_PROCEDURE.md index 5f0abacb..f7cde043 100644 --- a/RELEASE_PROCEDURE.md +++ b/RELEASE_PROCEDURE.md @@ -1,3 +1,9 @@ + + # Release Procedure The release procedure is a process in which different parts of the repository are involved.
diff --git a/REUSE.toml b/REUSE.toml new file mode 100644 index 00000000..d73b21a9 --- /dev/null +++ b/REUSE.toml @@ -0,0 +1,89 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# +# SPDX-License-Identifier: CC0-1.0 + +version = 1 + +[[annotations]] +path = "docs/**" +precedence = "override" +SPDX-FileCopyrightText = "Ludwig Hülk <@Ludee> © Reiner Lemoine Institut; Jonas Huber © Reiner Lemoine Institut; Christian Hofmann © Reiner Lemoine Institut" +SPDX-License-Identifier = "CC-BY-4.0" + +[[annotations]] +path = ".github/pull_request_template.md" +precedence = "override" +SPDX-FileCopyrightText = "Ludwig Hülk <@Ludee> © Reiner Lemoine Institut" +SPDX-License-Identifier = "CC0-1.0" + +[[annotations]] +path = ".github/ISSUE_TEMPLATE/*.md" +precedence = "override" +SPDX-FileCopyrightText = "Ludwig Hülk <@Ludee> © Reiner Lemoine Institut" +SPDX-License-Identifier = "CC0-1.0" + +[[annotations]] +path = ".github/workflows/*.yml" +precedence = "override" +SPDX-FileCopyrightText = "Ludwig Hülk <@Ludee> © Reiner Lemoine Institut" +SPDX-License-Identifier = "CC0-1.0" + +[[annotations]] +path = "CITATION.cff" +precedence = "override" +SPDX-FileCopyrightText = "Ludwig Hülk <@Ludee> © Reiner Lemoine Institut" +SPDX-License-Identifier = "CC0-1.0" + +[[annotations]] +path = "USERS.cff" +precedence = "override" +SPDX-FileCopyrightText = "Ludwig Hülk <@Ludee> © Reiner Lemoine Institut" +SPDX-License-Identifier = "CC0-1.0" + +[[annotations]] +path = "format_code.sh" +precedence = "override" +SPDX-FileCopyrightText = "Ludwig Hülk <@Ludee> © Reiner Lemoine Institut" +SPDX-License-Identifier = "CC0-1.0" + +[[annotations]] +path = "tox.ini" +precedence = "override" +SPDX-FileCopyrightText = "Ludwig Hülk <@Ludee> © Reiner Lemoine Institut" +SPDX-License-Identifier = "CC0-1.0" + +[[annotations]] +path = "requirements.txt" +precedence = "override" +SPDX-FileCopyrightText = "Ludwig Hülk <@Ludee> © Reiner Lemoine Institut" +SPDX-License-Identifier = "CC0-1.0" + +[[annotations]] +path = "requirements-docs.txt" +precedence = "override" +SPDX-FileCopyrightText = "Ludwig Hülk <@Ludee> © Reiner Lemoine Institut" +SPDX-License-Identifier = "CC0-1.0" + +[[annotations]] +path = "setup.py" +precedence = "override" +SPDX-FileCopyrightText = "Ludwig Hülk <@Ludee> © Reiner Lemoine Institut" +SPDX-License-Identifier = "CC0-1.0" + +[[annotations]] +path = "setup.cfg" +precedence = "override" +SPDX-FileCopyrightText = "Ludwig Hülk <@Ludee> © Reiner Lemoine Institut" +SPDX-License-Identifier = "CC0-1.0" + +[[annotations]] +path = "metadata/v20/v20/build_source/schemas/*.json" +precedence = "override" +SPDX-FileCopyrightText = "Ludwig Hülk <@Ludee> © Reiner Lemoine Institut; Jonas Huber © Reiner Lemoine Institut" +SPDX-License-Identifier = "MIT" + +[[annotations]] +path = "metadata/latest/build_source/schemas/*.json" +precedence = "override" +SPDX-FileCopyrightText = "Ludwig Hülk <@Ludee> © Reiner Lemoine Institut; Jonas Huber © Reiner Lemoine Institut" +SPDX-License-Identifier = "MIT" diff --git a/metadata/json_schema/README.md b/metadata/json_schema/README.md index 62e7a646..dd67cd53 100644 --- a/metadata/json_schema/README.md +++ b/metadata/json_schema/README.md @@ -1,3 +1,9 @@ + + # JSON Schema [JSON Schema](https://json-schema.org/) enables the confident and reliable use of the JSON data format.
diff --git a/metadata/json_schema/draft07/schema.json.license b/metadata/json_schema/draft07/schema.json.license new file mode 100644 index 00000000..b27080bf --- /dev/null +++ b/metadata/json_schema/draft07/schema.json.license @@ -0,0 +1,3 @@ +# SPDX-FileCopyrightText: 2022 JSON Schema Specification Authors +# +# SPDX-License-Identifier: BSD-3-Clause OR AFL-3.0 diff --git a/metadata/json_schema/draft07/schema.py b/metadata/json_schema/draft07/schema.py index 82f9fce3..95ee36fe 100644 --- a/metadata/json_schema/draft07/schema.py +++ b/metadata/json_schema/draft07/schema.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + import json import os diff --git a/metadata/json_schema/draft2020_12/schema.json.license b/metadata/json_schema/draft2020_12/schema.json.license new file mode 100644 index 00000000..b27080bf --- /dev/null +++ b/metadata/json_schema/draft2020_12/schema.json.license @@ -0,0 +1,3 @@ +# SPDX-FileCopyrightText: 2022 JSON Schema Specification Authors +# +# SPDX-License-Identifier: BSD-3-Clause OR AFL-3.0 diff --git a/metadata/json_schema/draft2020_12/schema.py b/metadata/json_schema/draft2020_12/schema.py index dfac2303..dac505ae 100644 --- a/metadata/json_schema/draft2020_12/schema.py +++ b/metadata/json_schema/draft2020_12/schema.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + import json import os diff --git a/metadata/latest/README.md b/metadata/latest/README.md index a363679d..8faf9ab0 100644 --- a/metadata/latest/README.md +++ b/metadata/latest/README.md @@ -1,14 +1,28 @@ + + +OpenEnergyMetadata +OpenEnergyPlatform OpenEnergyMetadata OpenEnergyPlatform -# Open Energy Metadata (OEMetadata) - Latest-Release +# OEMetadata - Version 2.0 This version of the OEMetadata represents the latest released version. This release is fully integrated into the OEP. The OEMetadata contains the following files: +* [template.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/template.json) contains an empty metadata string with all fields. +* [example.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/example.json) contains a basic metadata example. +* [metadata_key_description.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/metadata_key_description.md) contains a full description of each metadata key and an example. +* [context.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/context.json) contains the references of metadata keys in ontology terms. +* [schema.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/schema.json) contains the json schema for the metadata. * [template.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/template.json) contains an empty metadata string with all fields. * [example.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/example.json) contains a basic metadata example. * [metadata_key_description.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/metadata_key_description.md) contains a full description of each metadata key and an example. @@ -16,3 +30,4 @@ The OEMetadata contains the following files: * [schema.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/schema.json) contains the json schema for the metadata. For further information see the [Changelog](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/CHANGELOG.md). +For further information see the [Changelog](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/CHANGELOG.md). diff --git a/metadata/latest/build_source/README.md b/metadata/latest/build_source/README.md index 1c8b89dc..0e22035f 100644 --- a/metadata/latest/build_source/README.md +++ b/metadata/latest/build_source/README.md @@ -1,39 +1,52 @@ -# Oemetadata build tooling + -Over the years it also became an constant issue to keep all parts of the release consistent with all changes made to the schema.json. The tooling enables developers to only edit the schema.json and then generate the relevant example and template JSON files based on the OEMetaData specification and the example values available as part of the schema.json. +# OEMetadata Build Source + +The OEMetadata uses the [JSON Schema](https://json-schema.org/) specification +to define the structure of the metadata.
+It offers the possibility to make the `schema.json` more modular.
+For better maintenance the file is split into separate files.
+The `schema_structure.json` contains the overall pattern of the structure. ## Structure -The structure of the OEMetaData release contents changed a bit. While the known schema, example and template json and python files are still available the new directory 'build_source' is now also part of each release. It contains two sub directories: `build_source/schemas/` includes the schema parts, if you want to extend the OEMetaData specification this is the directory you should maintain. The `build_source/scripts/` implements the tooling. There are 3 scripts for schema ref resolve and schema, example and template JSON file generation. The settings script is used to share common information across python modules, in this case it includes mainly the path´s. +The directory `build_source` contains two parts: -## Usage +### Schemas `build_source/schemas/` + +The schemas are the core of the OEMetadata specification.
+They are separated by category and follow the logic of OEMetadata structure. -Using bash terminal on wsl ubuntu distribution with Python >3.8 installed -Create a python3 environment. +### Scripts `build_source/scripts/` - #assuming you are currently in the oemetadata base directory. +- `create_schema.py` Creates the complete `schema.json` from `schemas` +- `create_template.py` Creates the `template.json` from `schema.json` +- `create_example.py` Creates the `example.json` from `schema.json` + +## Usage + +Create a python3 environment + + cd ../oemetadata/ python3 -m venv env -Install the requirements. +Install the requirements source env/bin/activate pip install -r requirements.txt -Navigate to the tooling directory to ease usage and run the tooling as python script. +Create the OEMetadata json schema from schemas - #assuming you are currently in the oemetadata base directory. - cd metadata/v20/build_source/scripts/ - # generate the oemetadata json schema based on json schemas in the schemas directory - python metadata/v20/build_source/scripts/resolve_schema_refs.py - # use option --debug to show additional logging information - python metadata/v20/build_source/scripts/resolve_schema_refs.py --debug + cd metadata/latest/build_source/scripts/ + python metadata/latest/build_source/scripts/create_schema.py -Generate the example and template +Create the OEMetadata template and example from json schema - python metadata/v20/build_source/scripts/generate_example_from_schema.py - python metadata/v20/build_source/scripts/generate_template_from_schema.py - - + python metadata/latest/build_source/scripts/create_example_from_schema.py + python metadata/latest/build_source/scripts/create_template_from_schema.py diff --git a/metadata/latest/build_source/schema_structure.json b/metadata/latest/build_source/schema_structure.json index 022bf3b1..131fb461 100644 --- a/metadata/latest/build_source/schema_structure.json +++ b/metadata/latest/build_source/schema_structure.json @@ -1,58 +1,32 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/develop/metadata/v20/schema.json", - "description": "Open Energy Platform (OEP) metadata schema latest", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/schema.json", + "description": "Open Energy Metadata (OEMetadata) - metadata schema", "type": "object", - "required": [ - "resources" - ], + "required": ["resources"], "properties": { - "collection": { - "$ref": "collection.json#" - }, + "collection": {"$ref": "collection.json#"}, "resources": { - "description": "A collection of related data resource descriptions and metadata. This may include relational data models which are technically related", + "description": "A collection of related resources.", "type": "array", "items": { "type": "object", "properties": { - "linkedData": { - "$ref": "linked_data.json#" - }, - "general": { - "$ref": "general.json#" - }, - "context": { - "$ref": "context.json#" - }, - "spatial": { - "$ref": "spatial.json#" - }, - "temporal": { - "$ref": "temporal.json#" - }, - "sources": { - "$ref": "sources.json#" - }, - "licenses": { - "$ref": "licenses.json#" - }, - "provenance": { - "$ref": "provenance.json#" - }, - "resource": { - "$ref": "fields.json#" - }, - "review": { - "$ref": "review.json#" - } + "linkedData": {"$ref": "linked_data.json#"}, + "general": {"$ref": "general.json#"}, + "context": {"$ref": "context.json#"}, + "spatial": {"$ref": "spatial.json#"}, + "temporal": {"$ref": "temporal.json#"}, + "sources": {"$ref": "sources.json#"}, + "licenses": {"$ref": "licenses.json#"}, + "provenance": {"$ref": "provenance.json#"}, + "resource": {"$ref": "fields.json#"}, + "review": {"$ref": "review.json#"} } }, "title": "Resources" }, - "meta": { - "$ref": "meta.json#" - } + "meta": {"$ref": "meta.json#"} }, "additionalProperties": true } \ No newline at end of file diff --git a/metadata/latest/build_source/schema_structure.json.license b/metadata/latest/build_source/schema_structure.json.license new file mode 100644 index 00000000..38af0f3f --- /dev/null +++ b/metadata/latest/build_source/schema_structure.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/latest/build_source/schemas/collection.json b/metadata/latest/build_source/schemas/collection.json index a26edcc3..a57f0551 100644 --- a/metadata/latest/build_source/schemas/collection.json +++ b/metadata/latest/build_source/schemas/collection.json @@ -1,49 +1,37 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "general.json#metadata/v20/schemas/collection.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/build_source/schemas/collection.json", "type": "object", "properties": { "name": { "description": "A filename or database conform collection name.", - "example": "oep_oemetadata", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["oep_oemetadata"], "badge": "Iron", "title": "Collection Name" }, "title": { "description": "A human readable collection name.", - "example": "OEP OEMetadata", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["OEP OEMetadata"], "badge": "Bronze", "title": "Collection Title" }, "description": { "description": "A free text description of the collection.", - "example": "A collection of tables for the OEMetadata examples.", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["A collection of tables for the OEMetadata examples."], "badge": "Bronze", "title": "Collection Description" }, "id": { "description": "A unique identifier (UUID/DOI) for the collection.", - "example": "https://databus.openenergyplatform.org/oeplatform/reference", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://databus.openenergyplatform.org/oeplatform/reference"], "badge": "Silver", "title": "Collection Identifier", "format": "uri", - "readonly": true + "readOnly": true } }, "required": ["name"] diff --git a/metadata/latest/build_source/schemas/context.json b/metadata/latest/build_source/schemas/context.json index 7b16c300..6ca97b73 100644 --- a/metadata/latest/build_source/schemas/context.json +++ b/metadata/latest/build_source/schemas/context.json @@ -1,6 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "general.json#metadata/v20/schemas/context.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/build_source/schemas/context.json", "type": "object", "properties": { "context": { @@ -9,103 +9,75 @@ "properties": { "title": { "description": "A title of the associated project.", - "example": "NFDI4Energy", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["NFDI4Energy"], "badge": "Gold", "title": "Context Title" - },"homepage": { + }, + "homepage": { "description": "A URL of the project.", - "example": "https://nfdi4energy.uol.de/", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://nfdi4energy.uol.de/"], "badge": "Gold", "title": "Homepage", "format": "uri" }, + "documentation": { "description": "A URL of the project documentation.", - "example": "https://nfdi4energy.uol.de/sites/about_us/", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://nfdi4energy.uol.de/sites/about_us/"], "badge": "Gold", "title": "Documentation" }, "sourceCode": { "description": "A URL of the source code of the project.", - "example": "https://github.com/NFDI4Energy", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://github.com/NFDI4Energy"], "badge": "Gold", "title": "Source Code" }, "publisher": { "description": "The publishing agency of the data. This can be the OEP.", - "example": "Open Energy Platform (OEP)", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["Open Energy Platform (OEP)"], "badge": "Gold", "title": "Publisher" },"publisherLogo": { "description": "A URL to the logo of the publishing agency of data.", - "example": "https://github.com/OpenEnergyPlatform/organisation/blob/production/logo/OpenEnergyFamily_Logo_OpenEnergyPlatform.svg", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://github.com/OpenEnergyPlatform/organisation/blob/production/logo/OpenEnergyFamily_Logo_OpenEnergyPlatform.svg"], "badge": "Gold", "title": "Publisher Logo", "format": "uri" }, "contact": { "description": "A reference to the creator or maintainer of the data set. This can be an email address or a GitHub handle.", - "example": "contact@example.com", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["contact@example.com"], "badge": "Gold", "title": "E-Mail Contact", "format": "email" }, "fundingAgency": { "description": "A name of the entity providing the funding. This can be a government agency or a company.", - "example": " Deutsche Forschungsgemeinschaft (DFG)", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": [" Deutsche Forschungsgemeinschaft (DFG)"], "badge": "Gold", "title": "Funding Agency" }, "fundingAgencyLogo": { "description": "A URL to the logo or image of the funding agency.", - "example": "https://upload.wikimedia.org/wikipedia/commons/8/86/DFG-logo-blau.svg", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://upload.wikimedia.org/wikipedia/commons/8/86/DFG-logo-blau.svg"], "badge": "Gold", "title": "Funding Agency Logo", "format": "uri" }, "grantNo": { "description": "An identifying grant number. In case of a publicly funded project, this number is assigned by the funding agency.", - "example": "501865131", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["501865131"], "badge": "Gold", "title": "Grant Number" } diff --git a/metadata/latest/build_source/schemas/fields.json b/metadata/latest/build_source/schemas/fields.json index d5b65a19..2f6f3b4f 100644 --- a/metadata/latest/build_source/schemas/fields.json +++ b/metadata/latest/build_source/schemas/fields.json @@ -1,28 +1,22 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "general.json#metadata/v20/schemas/fields.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/build_source/schemas/fields.json", "type": "object", "properties": { "type": { "description": "The 'table' type indicates that the resource is tabular as per 'Frictionless Tabular Data' definition.", - "example": "table", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["table"], "badge": "Gold", - "title": "Profile", + "title": "Type", "options": { "hidden": true } }, "format": { "description": "A file extension format. Possible options are 'csv', 'xlsx', 'json', 'PostgreSQL', 'SQLite' and other standard file extensions.", - "example": "PostgreSQL", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["CSV"], "badge": "Gold", "title": "Format", "options": { @@ -31,11 +25,8 @@ }, "encoding": { "description": "Specifies the character encoding of the resource's data file. The default is 'UTF-8'. The values should be one of the 'Preferred MIME Names'.", - "example": "UTF-8", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["UTF-8"], "badge": "Gold", "title": "Encoding", "options": { @@ -54,54 +45,39 @@ "properties": { "name": { "description": "The name of the field. The name may only consist of lowercase alphanumeric characters or underscores. It must not begin with a number or an underscore.", - "example": "year", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["year"], "badge": "Iron", "title": "Column Name", - "readonly": true + "readOnly": true }, "description": { "description": "A text describing the field.", - "example": "Reference year for which the data was collected.", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["Reference year for which the data was collected."], "badge": "Silver", "title": "Description" }, "type": { "description": "The data type of the field. In case of a geom column in a database, also indicate the shape and CRS.", - "example": "geometry(Point, 4326)", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["geometry(Point, 4326)"], "badge": "Iron", "title": "Type", - "readonly": true + "readOnly": true }, "nullable": { "description": "A boolean key to specify that a column can be nullable. True is the default value.", - "example": true, - "type": [ - "boolean", - "null" - ], + "type": ["boolean", "null"], + "examples": [true], "badge": "Iron", "title": "Nullable", - "readonly": true + "readOnly": true }, "unit": { "description": "The unit of a field. If it does not apply, use 'null'. If the unit is given in a separate field, reference this field (e.g. 'unit'). Use a space between numbers and units (100 m).", - "example": "MW", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["MW"], "badge": "Silver", "title": "Unit" }, @@ -113,21 +89,15 @@ "properties": { "name": { "description": "The class label of the ontology term.", - "example": "wind energy converting unit", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["wind energy converting unit"], "badge": "Platinum", "title": "Name" }, "path": { "description": "The path of the ontology term (IRI).", - "example": "https://openenergyplatform.org/ontology/oeo/OEO_00000044", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://openenergyplatform.org/ontology/oeo/OEO_00000044"], "badge": "Platinum", "title": "Path", "format": "uri" @@ -147,31 +117,22 @@ "properties": { "value": { "description": "The name of the value in the column.", - "example": "onshore", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["onshore"], "badge": "Platinum", "title": "Value" }, "name": { "description": "The class label of the ontology term in the column.", - "example": "onshore wind farm", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["onshore wind farm"], "badge": "Platinum", "title": "Name" }, "path": { "description": "The path of the ontology term (IRI) in the column.", - "example": "https://openenergyplatform.org/ontology/oeo/OEO_00000311", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://openenergyplatform.org/ontology/oeo/OEO_00000311"], "badge": "Platinum", "title": "Path", "format": "uri" @@ -194,11 +155,8 @@ "type": "array", "items": { "description": "The default value is the “id” column.", - "example": ["id"], - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["id"], "badge": "Iron", "title": "Primary key" }, @@ -217,11 +175,8 @@ "type": "array", "items": { "description": "The column in the table that is constrained by the foreign key.", - "example": ["id","version"], - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["id","version"], "badge": "Iron", "title": "Foreign Key Field" }, @@ -234,11 +189,8 @@ "properties": { "resource": { "description": "The referenced foreign table.", - "example": "model_draft.oep_oemetadata_table_example_version", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["model_draft.oep_oemetadata_table_example_version"], "badge": "Iron", "title": "Foreign Resource" }, @@ -247,11 +199,8 @@ "type": "array", "items": { "description": "The foreign resource column.", - "example": ["id","version"], - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["id","version"], "badge": "Iron", "title": "Field" }, @@ -280,21 +229,15 @@ "properties": { "delimiter": { "description": "The delimiter specifies the character sequence which should separate fields (columns). Common characters are ',' (comma), ';' (semicolon), '.' (point) and '\\t' (tab).", - "example": ";", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": [";"], "badge": "Silver", "title": "Delimiter" }, "decimalSeparator": { "description": "The symbol used to separate the integer part from the fractional part of a number written in decimal form. Depending on language and region this symbol can be '.' or ','.", - "example": ".", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["."], "badge": "Silver", "title": "Decimal separator" } diff --git a/metadata/latest/build_source/schemas/general.json b/metadata/latest/build_source/schemas/general.json index 8e2cf5be..1ab4c26d 100644 --- a/metadata/latest/build_source/schemas/general.json +++ b/metadata/latest/build_source/schemas/general.json @@ -1,15 +1,12 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "general.json#metadata/v20/schemas/general.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/build_source/schemas/general.json", "type": "object", "properties": { "name": { "description": "A filename or database conform table name.", - "example": "oep_oemetadata_table_example", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["oep_oemetadata_table_example"], "badge": "Iron", "title": "Name" }, @@ -18,11 +15,8 @@ "type": "array", "items": { "description": "The topics are used to group the data in the database.", - "example": ["model_draft","reference"], - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["model_draft","reference"], "badge": "Bronze", "title": "Keyword" }, @@ -31,32 +25,23 @@ }, "title": { "description": "A human readable table name.", - "example": "OEP OEMetadata Example Table", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["OEP OEMetadata Example Table"], "badge": "Silver", "title": "Title" }, "path": { "description": "A unique identifier (URI/UUID/DOI) for the table or file.", - "example": "http://openenergyplatform.org/dataedit/view/model_draft/oep_oemetadata_table_example", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["http://openenergyplatform.org/dataedit/view/model_draft/oep_oemetadata_table_example"], "badge": "Bronze", "title": "Path", - "readonly": true + "readOnly": true }, "description": { "description": "A description of the table. It should be usable as summary information for the table that is described by the metadata.", - "example": "Example table used to illustrate the OEMetadata structure and meaning.", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["Example table used to illustrate the OEMetadata structure and meaning."], "badge": "Silver", "title": "Description" }, @@ -65,11 +50,8 @@ "type": "array", "items": { "description": "The language keys must follow the Standard IETF (BCP47) and can be repeated if more languages are used.", - "example": ["en-GB", "de-DE"], - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["en-GB", "de-DE"], "badge": "Gold", "title": "Language" }, @@ -84,21 +66,15 @@ "properties": { "name": { "description": "A class label of the ontology term.", - "example": "energy", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["energy"], "badge": "Platinum", "title": "Name" }, "path": { "description": "A unique identifier (URI/IRI) of the ontology class.", - "example": "https://openenergy-platform.org/ontology/oeo/OEO_00000150", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://openenergy-platform.org/ontology/oeo/OEO_00000150"], "badge": "Platinum", "title": "Path", "format": "uri" @@ -115,11 +91,8 @@ "type": "array", "items": { "description": "The keyword are used and managed in the OEP as table tags.", - "example": ["example","ODbL-1.0","NFDI4Energy"], - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["example","ODbL-1.0","NFDI4Energy"], "badge": "Silver", "title": "Keyword" }, @@ -128,11 +101,8 @@ }, "publicationDate": { "description": "A date of publication of the data or metadata. The date format is ISO 8601 (YYYY-MM-DD).", - "example": "2024-10-15", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["2024-10-15"], "badge": "Bronze", "title": "Publication Date", "format": "date" @@ -143,33 +113,24 @@ "properties": { "start": { "description": "The start date of the embargo period. The date of the data (metadata) upload.", - "example": "2024-10-11", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["2024-10-11"], "badge": "Bronze", "title": "Embargo Period Start", "format": "date" }, "end": { "description": "The end date of the embargo period. This is the intended publication date.", - "example": "2025-01-01", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["2025-01-01"], "badge": "Bronze", "title": "Embargo Period End (Publication Date)", "format": "date" }, "isActive": { "description": "A boolean key that indicates if the embargo period is currently active. Must be changed to False on the embargo period end date.", - "example": true, - "type": [ - "boolean", - "null" - ], + "type": ["boolean", "null"], + "examples": [true], "badge": "Bronze", "title": "Embargo Period is Active " } diff --git a/metadata/latest/build_source/schemas/licenses.json b/metadata/latest/build_source/schemas/licenses.json index 93502cd9..521225d7 100644 --- a/metadata/latest/build_source/schemas/licenses.json +++ b/metadata/latest/build_source/schemas/licenses.json @@ -1,6 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "general.json#metadata/v20/schemas/licenses.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/build_source/schemas/licenses.json", "type": "object", "properties": { "licenses": { @@ -11,52 +11,37 @@ "properties": { "name": { "description": "The SPDX identifier.", + "type": ["string", "null"], "example": "ODbL-1.0", - "type": [ - "string", - "null" - ], "badge": "Bronze", "title": "Name" }, "title": { "description": "The official (human readable) title of the license.", + "type": ["string", "null"], "example": "Open Data Commons Open Database License 1.0", - "type": [ - "string", - "null" - ], "badge": "Bronze", "title": "Title" }, "path": { "description": "A link or path to the license text.", + "type": ["string", "null"], "example": "https://opendatacommons.org/licenses/odbl/1-0/index.html", - "type": [ - "string", - "null" - ], "badge": "Bronze", "title": "Path", "format": "uri" }, "instruction": { "description": "A short description of rights and obligations. The use of tl;drLegal is recommended.", + "type": ["string", "null"], "example": "You are free to share and change, but you must attribute, and share derivations under the same license. See https://tldrlegal.com/license/odc-open-database-license-(odbl) for further information.", - "type": [ - "string", - "null" - ], "badge": "Bronze", "title": "Instruction" }, "attribution": { "description": "A copyright holder of the data. Must be provided if attribution licenses are used.", + "type": ["string", "null"], "example": "© Reiner Lemoine Institut", - "type": [ - "string", - "null" - ], "badge": "Bronze", "title": "Attribution" } diff --git a/metadata/latest/build_source/schemas/linked_data.json b/metadata/latest/build_source/schemas/linked_data.json index e16ffa01..47ed1ec4 100644 --- a/metadata/latest/build_source/schemas/linked_data.json +++ b/metadata/latest/build_source/schemas/linked_data.json @@ -1,29 +1,23 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "general.json#metadata/v20/schemas/linked_data.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/build_source/schemas/linked_data.json", "type": "object", "properties": { "@id": { "description": "A Uniform Resource Identifier (URI) that links the resource via the OpenEnergyDatabus (DBpedia Databus).", - "example": "https://databus.openenergyplatform.org/oeplatform/supply/wri_global_power_plant_database/2022-11-07", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://databus.openenergyplatform.org/oeplatform/supply/wri_global_power_plant_database/2022-11-07"], "badge": "Platinum", "title": "@Id", - "readonly": true + "readOnly": true }, "@context": { "description": "Explanation of metadata keys in ontology terms.", - "example": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/context.json", - "type": [ - "string", - "null" - ], + "examples": ["https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/context.json"], + "type": ["string", "null"], "badge": "Platinum", "title": "@context", - "readonly": true + "readOnly": true } } } \ No newline at end of file diff --git a/metadata/latest/build_source/schemas/meta.json b/metadata/latest/build_source/schemas/meta.json index 40704f8a..746b6871 100644 --- a/metadata/latest/build_source/schemas/meta.json +++ b/metadata/latest/build_source/schemas/meta.json @@ -1,6 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "general.json#metadata/v20/schemas/meta.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/build_source/schemas/meta.json", "type": "object", "properties": { "metaMetadata": { @@ -9,45 +9,33 @@ "properties": { "metadataVersion": { "description": "Type and version number of the metadata.", - "example": "OEMetadata-2.0.1", - "type": [ - "string", - "null" - ], + "examples": ["OEMetadata-2.0.1"], + "type": ["string", "null"], "badge": null, "title": "Metadata Version" }, "metadataLicense": { - "description": "The license of the provided metadata. ", + "description": "The license of the OEMetadata. ", "type": "object", "properties": { "name": { - "description": "The [SPDX](https://spdx.org/licenses/) identifier.", - "example": "CC0-1.0", - "type": [ - "string", - "null" - ], + "description": "The SPDX identifier.", + "type": ["string", "null"], + "examples": ["CC0-1.0"], "badge": null, "title": "License Name" }, "title": { - "description": "The official (human-readable) title of the license.", - "example": "Creative Commons Zero v1.0 Universal", - "type": [ - "string", - "null" - ], + "description": "The official (human readable) title of the license.", + "type": ["string", "null"], + "examples": ["Creative Commons Zero v1.0 Universal"], "badge": null, "title": "License Title" }, "path": { "description": "A link or path to the license text.", - "example": "https://creativecommons.org/publicdomain/zero/1.0", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://creativecommons.org/publicdomain/zero/1.0"], "badge": null, "title": "License Path", "format": "uri" diff --git a/metadata/latest/build_source/schemas/provenance.json b/metadata/latest/build_source/schemas/provenance.json index 5520bbbb..9fd4936f 100644 --- a/metadata/latest/build_source/schemas/provenance.json +++ b/metadata/latest/build_source/schemas/provenance.json @@ -1,6 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "general.json#metadata/v20/schemas/provenance.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/build_source/schemas/provenance.json", "type": "object", "properties": { "contributors": { @@ -11,31 +11,22 @@ "properties": { "title": { "description": "A full name of the contributor.", - "example": "Ludwig Hülk", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["Ludwig Hülk"], "badge": "Bronze", "title": "Contributor Title" }, "path": { "description": "A qualified link or path pointing to a relevant location online for the contributor. This can be the GitHub page or ORCID.", - "example": "https://github.com/Ludee", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://github.com/Ludee"], "badge": "Bronze", "title": "Path" }, "organization": { "description": "A string describing the organization this contributor is affiliated to. This can be relevant for the copyright.", - "example": "Reiner Lemoine Institut", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["Reiner Lemoine Institut"], "badge": "Bronze", "title": "Organization" }, @@ -44,11 +35,8 @@ "type": "array", "items": { "description": "A role is recommended to follow an established vocabulary, such as DataCite Metadata Schema’s contributorRole or CreDIT. Useful roles to indicate are: creator, contact, and dataCurator.", - "example": ["creator", "dataCurator"], - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["creator", "dataCurator"], "badge": "Bronze", "title": "Role" }, @@ -57,32 +45,23 @@ }, "date": { "description": "The date of the final contribution. Date Format is ISO 8601.", - "example": "2024-10-21", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["2024-10-21"], "badge": "Bronze", "title": "Date", "format": "date" }, "object": { "description": "The object of the contribution. Which part of the package was supplied or changed.", - "example": "data and metadata", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["data and metadata"], "badge": "Bronze", "title": "Object" }, "comment": { "description": "A free-text commentary on what has been done.", - "example": "Add general context.", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["Add general context."], "badge": "Bronze", "title": "Comment" } diff --git a/metadata/latest/build_source/schemas/review.json b/metadata/latest/build_source/schemas/review.json index 3e22b829..16b1dbd8 100644 --- a/metadata/latest/build_source/schemas/review.json +++ b/metadata/latest/build_source/schemas/review.json @@ -1,6 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "general.json#metadata/v20/schemas/review.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/build_source/schemas/review.json", "type": "object", "properties": { "review": { @@ -9,21 +9,16 @@ "properties": { "path": { "description": "A link or path to the documented open peer review.", - "example": "https://www.example.com", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://www.example.com"], "badge": null, - "title": "Path" + "title": "Path", + "format": "uri" }, "badge": { "description": "A badge of either Iron, Bronze, Silver, Gold or Platinum is used to label the quality of the metadata.", - "example": "Platinum", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["Platinum"], "badge": null, "title": "Badge" } diff --git a/metadata/latest/build_source/schemas/sources.json b/metadata/latest/build_source/schemas/sources.json index aa4a511b..860bd55f 100644 --- a/metadata/latest/build_source/schemas/sources.json +++ b/metadata/latest/build_source/schemas/sources.json @@ -1,6 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "general.json#metadata/v20/schemas/sources.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/build_source/schemas/sources.json", "type": "object", "properties": { "sources": { @@ -11,11 +11,8 @@ "properties": { "title": { "description": "A human readable title of the source, a document title or organisation name.", - "example": "IPCC Sixth Assessment Report (AR6) - Climate Change 2023 - Synthesis Report", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["IPCC Sixth Assessment Report (AR6) - Climate Change 2023 - Synthesis Report"], "badge": "Bronze", "title": "Source Title" }, @@ -24,11 +21,8 @@ "type": "array", "items": { "description": "The authors of the source.", - "example": ["Hoesung Lee","José Romero", "The Core Writing Team"], - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["Hoesung Lee","José Romero", "The Core Writing Team"], "badge": "Bronze", "title": "Keyword" }, @@ -37,31 +31,22 @@ }, "description": { "description": "A free text description of the source.", - "example": "A Report of the Intergovernmental Panel on Climate Change.", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["A Report of the Intergovernmental Panel on Climate Change."], "badge": "Bronze", "title": "Source Description" }, "publicationYear": { "description": "Indicates the year when the work was published.", - "example": "2023", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["2023"], "badge": "Bronze", "title": "Publication Year" }, "path": { "description": "A URL to the original source.", - "example": "https://www.ipcc.ch/report/ar6/syr/downloads/report/IPCC_AR6_SYR_FullVolume.pdf", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://www.ipcc.ch/report/ar6/syr/downloads/report/IPCC_AR6_SYR_FullVolume.pdf"], "badge": "Bronze", "title": "Path", "format": "uri" @@ -74,62 +59,44 @@ "properties": { "name": { "description": "The SPDX identifier.", - "example": "ODbL-1.0", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["ODbL-1.0"], "badge": "Bronze", "title": "Name" }, "title": { "description": "The official (human readable) title of the license.", - "example": "Open Data Commons Open Database License 1.0", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["Open Data Commons Open Database License 1.0"], "badge": "Bronze", "title": "Title" }, "path": { "description": "A link or path to the license text.", - "example": "https://opendatacommons.org/licenses/odbl/1-0/index.html", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://opendatacommons.org/licenses/odbl/1-0/index.html"], "badge": "Bronze", "title": "Path", "format": "uri" }, "instruction": { "description": "A short description of rights and obligations. The use of tl;drLegal is recommended.", - "example": "You are free to share and change, but you must attribute, and share derivations under the same license. See https://tldrlegal.com/license/odc-open-database-license-odbl for further information.", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["You are free to share and change, but you must attribute, and share derivations under the same license. See https://tldrlegal.com/license/odc-open-database-license-odbl for further information."], "badge": "Bronze", "title": "Instruction" }, "attribution": { "description": "A copyright owner of the source. Must be provided if attribution licenses are used.", - "example": "© Intergovernmental Panel on Climate Change 2023", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["© Intergovernmental Panel on Climate Change 2023"], "badge": "Bronze", "title": "Attribution" }, "copyrightStatement": { "description": "A link or path that proves that the source or data has the appropriate license. This can be a page number or website imprint.", - "example": "https://www.ipcc.ch/copyright/", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://www.ipcc.ch/copyright/"], "badge": "Bronze", "title": "Copyright Statement" } diff --git a/metadata/latest/build_source/schemas/spatial.json b/metadata/latest/build_source/schemas/spatial.json index 7c43bfc6..e571aa5d 100644 --- a/metadata/latest/build_source/schemas/spatial.json +++ b/metadata/latest/build_source/schemas/spatial.json @@ -1,6 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "general.json#metadata/v20/schemas/spatial.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/build_source/schemas/spatial.json", "type": "object", "properties": { "spatial": { @@ -13,41 +13,29 @@ "properties": { "address": { "description": "An address of the location of the data. May be specified with street name, house number, zip code, and city name.", - "example": "Rudower Chaussee 12, 12489 Berlin", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["Rudower Chaussee 12, 12489 Berlin"], "badge": "Silver", "title": "Address" }, "@id": { "description": "A path or URI to a specific location. It can use Wikidata or OpenStreetMap.", - "example": "https://www.wikidata.org/wiki/Q77077223", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://www.wikidata.org/wiki/Q77077223"], "badge": "Platinum", "title": "Address" }, "latitude": { "description": "The latitude (lat) information of the location. Specifies the north / south position of the geometry.", - "example": "52.432822", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["52.432822"], "badge": "Gold", "title": "Latitude" }, "longitude": { "description": "The longitude (lon) information of the location. Specifies the east / west position of the geometry.", - "example": "13.5351004", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["13.5351004"], "badge": "Gold", "title": "Longitude" } @@ -61,49 +49,37 @@ "properties": { "name": { "description": "The name of the region.", - "example": "Berlin", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["Berlin"], "badge": "Silver", "title": "Extent Name" }, "@id": { "description": "A URI reference for the region.", - "example": "https://www.wikidata.org/wiki/Q64", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://www.wikidata.org/wiki/Q64"], "format": "uri", "badge": "Platinum", "title": "Extent URI" }, "resolutionValue": { "description": "The value of the resolution.", - "example": "100", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["100"], "badge": "Silver", "title": "Resolution Value" }, "resolutionUnit": { "description": "The unit of the resolution.", - "example": "m", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["m"], "badge": "Silver", "title": "Resolution Unit" }, "boundingBox": { "description": "The covered area specified by the coordinates of a bounding box. The format is [minLon, minLat, maxLon, maxLat] or [W,S,E,N].", - "example": [13.08825, 52.33859, 13.76104, 52.6754], "type": "array", + "examples": [13.08825, 52.33859, 13.76104, 52.6754], "items": { "type": "number" }, @@ -114,11 +90,8 @@ }, "crs": { "description": "The Coordinate Reference System, specified as an EPSG code.", - "example": "EPSG:4326", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["EPSG:4326"], "badge": "Gold", "title": " Coordinate Reference System (CRS)" } diff --git a/metadata/latest/build_source/schemas/temporal.json b/metadata/latest/build_source/schemas/temporal.json index 54852662..c73222a0 100644 --- a/metadata/latest/build_source/schemas/temporal.json +++ b/metadata/latest/build_source/schemas/temporal.json @@ -1,6 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "general.json#metadata/v20/schemas/temporal.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/build_source/schemas/temporal.json", "type": "object", "properties": { "temporal": { @@ -9,11 +9,8 @@ "properties": { "referenceDate": { "description": "A base year, month or day. The time for which the data is should be accurate. Date Format is ISO 8601.", - "example": "2020-01-01", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["2020-01-01"], "badge": "Silver", "title": "Reference Date", "format": "date" @@ -26,53 +23,38 @@ "properties": { "start": { "description": "The start time of a time series.", - "example": "2020-01-01T00:00:00+00:00", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["2020-01-01T00:00:00+00:00"], "badge": "Silver", "title": "Timeseries Start", "format": "date-time" }, "end": { "description": "The temporal end point of a time series.", - "example": "2020-01-01T23:59:30+00:00", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["2020-01-01T23:59:30+00:00"], "badge": "Silver", "title": "Timeseries End", "format": "date-time" }, "resolution": { "description": "The time span between individual information points in a time series.", - "example": " 30 s", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["30 s"], "badge": "Silver", "title": "Timeseries Resolution" }, "alignment": { "description": "An indicator of whether timestamps in a time series are to the left, right or in the centre.", - "example": "left", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["left"], "badge": "Gold", "title": "Timeseries Alignment" }, "aggregationType": { "description": "An indicator of whether the values are a sum, an average or a current value.", - "example": "current", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["current"], "badge": "Gold", "title": "Timeseries Aggregation Type" } diff --git a/metadata/latest/build_source/scripts/generate_example_from_schema.py b/metadata/latest/build_source/scripts/generate_example_from_schema.py index 537075ee..8d3736eb 100644 --- a/metadata/latest/build_source/scripts/generate_example_from_schema.py +++ b/metadata/latest/build_source/scripts/generate_example_from_schema.py @@ -1,26 +1,27 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + """ -Title: create example from json schema -Description: Create example from json schema. -Author: jh-RLI +Title: Create example from schema +Description: Create example.json from schema.json +Author: jh-RLI, Ludee Email: jonas.huber@rl-institut.de Date: 2024-05-30 Version: 1.0.0 """ -# Standard Library Imports -# import os - +# Import import json import logging +import os from typing import Any, Dict, Union, List - -# from datetime import datetime from pathlib import Path - from settings import RESOLVED_SCHEMA_FILE_NAME, EXAMPLE_PATH, LOG_FORMAT # Configuration @@ -32,7 +33,7 @@ def read_schema(filepath: str) -> Dict[str, Any]: """Read a JSON schema from a file. Args: - filename (str): The path to the JSON schema file. + filepath (str): The path to the JSON schema file. Returns: Dict[str, Any]: The JSON schema as a dictionary. @@ -40,26 +41,117 @@ def read_schema(filepath: str) -> Dict[str, Any]: with open(filepath, "r", encoding="utf-8") as file: schema = json.load(file) + print(f"Processing schema: {schema}") return schema -def generate_example( - schema: Dict[str, Any] -) -> Union[Dict[str, Any], List[Any], str, None]: - """Generate a JSON object from the schema using the - example values provided. +def read_metadata_schema(filepath: str) -> Dict[str, Any]: + """Read a JSON schema from a file. Args: - schema (Dict[str, Any]): The JSON schema. + filepath (str): The path to the JSON schema file. Returns: - Union[Dict[str, Any], List[Any], str, None]: - A JSON object generated from the schema. + Dict[str, Any]: The JSON schema as a dictionary. """ - if "example" in schema: - return schema["example"] - - schema_type = schema.get("type", None) + if not os.path.exists(filepath): + print(f"Error: File '{filepath}' does not exist.") + return {} + + try: + with open(filepath, "r", encoding="utf-8") as file: + schema = json.load(file) + + # Basic validation of schema structure + if not isinstance(schema, dict): + print("Error: Schema is not a dictionary. Check the schema format.") + return {} + + print(f"Schema loaded successfully from {filepath}") + print(f"Schema top-level keys: {list(schema.keys())}") + + # Additional debugging info: Check expected keys + if "$schema" not in schema or "type" not in schema: + print( + "Warning: Schema may be missing key fields like '$schema' or 'type'.") + + print( + f"Full schema content (trimmed for large files): {str(schema)[:500]}...") + + return schema + + except json.JSONDecodeError as e: + print(f"Error reading JSON: {e}") + return {} + except Exception as e: + print(f"An unexpected error occurred while reading the schema: {e}") + return {} + + +# def generate_example_old( +# schema: Dict[str, Any] +# ) -> Union[Dict[str, Any], List[Any], str, None]: +# """Generate a JSON object from the schema using the +# example values provided. +# +# Args: +# schema (Dict[str, Any]): The JSON schema. +# +# Returns: +# Union[Dict[str, Any], List[Any], str, None]: +# A JSON object generated from the schema. +# """ +# if "examples" in schema: +# return schema["examples"] +# +# schema_type = schema.get("type", None) +# if isinstance(schema_type, list): +# schema_type = schema_type[0] +# +# if schema_type == "object": +# example_object = {} +# properties = schema.get("properties", {}) +# for key, value in properties.items(): +# example_object[key] = generate_example(value) +# return example_object +# +# elif schema_type == "array": +# items = schema.get("items", {}) +# +# # Fix: Avoid double-wrapping by checking if the generated +# # example is already a list +# example = generate_example(items) +# +# if isinstance(example, list): +# return example # If it's already a list, return it directly +# else: +# return [example] # Otherwise, wrap it in a list +# +# elif schema_type == "string": +# return "" +# +# elif schema_type == "null": +# return None +# +# return None + + +def extract_examples_from_schema(schema: Dict[str, Any]) -> Union[ + Dict[str, Any], List[Any], str, None]: + """Generate a valid example from the schema using the provided example values.""" + + # If the schema has an "examples" field, handle it appropriately + if "examples" in schema: + examples = schema["examples"] + if isinstance(examples, list): + # Return a single value if the list contains one item + if len(examples) == 1: + return examples[0] + return examples # If multiple items, return the whole list + return examples # If it's a single item, return the value + + # If the schema type is an object, process each property recursively + schema_type = schema.get("type") if isinstance(schema_type, list): schema_type = schema_type[0] @@ -67,31 +159,29 @@ def generate_example( example_object = {} properties = schema.get("properties", {}) for key, value in properties.items(): - example_object[key] = generate_example(value) + example_object[key] = extract_examples_from_schema(value) return example_object + # If the schema type is an array, process the items recursively elif schema_type == "array": items = schema.get("items", {}) + example = extract_examples_from_schema(items) + return [example] if not isinstance(example, list) else example - # Fix: Avoid double-wrapping by checking if the generated - # example is already a list - example = generate_example(items) - - if isinstance(example, list): - return example # If it's already a list, return it directly - else: - return [example] # Otherwise, wrap it in a list - + # Handle basic types like string, number, boolean, null elif schema_type == "string": - return "" - + return "" # Example string + elif schema_type == "number": + return 0 # Example number + elif schema_type == "boolean": + return True # Example boolean elif schema_type == "null": - return None + return None # Example null - return None + return None # Default fallback -def generate_json_from_schema(schema_file: str) -> Dict[str, Any]: +def create_json_from_schema(schema_file: str) -> Dict[str, Any]: """Generate a JSON object that conforms to the schema read from a file. Args: @@ -100,8 +190,10 @@ def generate_json_from_schema(schema_file: str) -> Dict[str, Any]: Returns: Dict[str, Any]: A JSON object generated from the schema. """ - schema = read_schema(schema_file) - return generate_example(schema) + schema = read_metadata_schema(schema_file) + print(f"Create JSON from schema: {schema_file}") + return extract_examples_from_schema(schema) + print(f"Create JSON object: {result}") def save_json(data: Dict[str, Any], filename: Path) -> None: @@ -116,10 +208,21 @@ def save_json(data: Dict[str, Any], filename: Path) -> None: logger.info(f"example JSON generated and saved to {filename}") +def test_oemetadata_schema_should_validate_oemetadata_example(example): + from jsonschema import validate, ValidationError + from metadata.latest.schema import OEMETADATA_LATEST_SCHEMA + + try: + validate(example, OEMETADATA_LATEST_SCHEMA) + print("OEMetadata Example is valid OEMetadata Schema (v2.0).") + except ValidationError as e: + print("Cannot validate OEMetadata Example with Schema (v2.0)!", e) + if __name__ == "__main__": - logger.info("Generation started.") + logger.info("Create OEMetadata Example from Schema.") schema_filename = RESOLVED_SCHEMA_FILE_NAME - json_data = generate_json_from_schema(schema_filename) + json_data = create_json_from_schema(schema_filename) save_json(json_data, EXAMPLE_PATH) - logger.info("Generation ended.") + logger.info("OEMetadata Example created!") + test_oemetadata_schema_should_validate_oemetadata_example(json_data) diff --git a/metadata/latest/build_source/scripts/generate_template_from_schema.py b/metadata/latest/build_source/scripts/generate_template_from_schema.py index 2d3722f5..d956b6e9 100644 --- a/metadata/latest/build_source/scripts/generate_template_from_schema.py +++ b/metadata/latest/build_source/scripts/generate_template_from_schema.py @@ -1,15 +1,22 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + """ -Title: create template from json schema -Description: Create template from json schema. -Author: jh-RLI +Title: Create template from schema +Description: Create template.json from schema.json. +Author: jh-RLI, Ludee Email: jonas.huber@rl-institut.de Date: 2024-05-30 Version: 1.0.0 """ +# Import + import json import logging @@ -85,8 +92,22 @@ def main(): logger.info(f"template JSON generated and saved to {template_file_path}") + # WARNING: The metaMetadata is missing and the boundingBox is wrong! + +def test_oemetadata_schema_should_validate_oemetadata_template(): + from jsonschema import validate, ValidationError + from metadata.latest.template import OEMETADATA_LATEST_TEMPLATE + from metadata.latest.schema import OEMETADATA_LATEST_SCHEMA + + try: + validate(OEMETADATA_LATEST_TEMPLATE, OEMETADATA_LATEST_SCHEMA) + print("OEMetadata Template is valid OEMetadata Schema (v2.0).") + except ValidationError as e: + print("Cannot validate OEMetadata Template with Schema (v2.0)!", e) + if __name__ == "__main__": logger.info("Generation started.") main() + test_oemetadata_schema_should_validate_oemetadata_template() logger.info("Generation ended.") diff --git a/metadata/latest/build_source/scripts/resolve_schema_refs.py b/metadata/latest/build_source/scripts/resolve_schema_refs.py index d331570e..e6a0a004 100644 --- a/metadata/latest/build_source/scripts/resolve_schema_refs.py +++ b/metadata/latest/build_source/scripts/resolve_schema_refs.py @@ -1,10 +1,15 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + """ -Title: Resolve schema $ref -Description: Resolve "$ref" elements in schema.json. -Author: jh-RLI +Title: Create OEMetadata schema from schemas +Description: Resolve "$ref" elements in schema.json +Author: jh-RLI, Ludee Email: jonas.huber@rl-institut.de Date: 2024-05-30 Version: 1.0.0 @@ -12,7 +17,7 @@ requires: "pip install jsonschema referencing" Usage: Script with additional arguments --debug for more detailed output. - Requires the folder structure introduced in oemetadata v2.0.1. + Requires the folder structure introduced in OEMetadata v2.0.1. """ # Standard Library Imports @@ -26,7 +31,7 @@ import argparse from referencing import Registry, Resource -from jsonschema import Draft7Validator +from jsonschema import Draft7Validator, Draft202012Validator from settings import ( MAIN_SCHEMA_PATH, @@ -59,7 +64,7 @@ def load_schema(schema_path): # Ensure the schema has the $schema field def ensure_schema_field(schema): if "$schema" not in schema: - schema["$schema"] = "http://json-schema.org/draft-07/schema#" + schema["$schema"] = "https://json-schema.org/draft/2020-12/schema" return schema @@ -164,7 +169,7 @@ def resolve_top_level_properties(schema, registry, base_uri): def validate_schema(resolved_schema, expected_schema): - validator = Draft7Validator(expected_schema) + validator = Draft202012Validator(expected_schema) errors = sorted(validator.iter_errors(resolved_schema), key=lambda e: e.path) for error in errors: print(f"Validation error at {list(error.path)}: {error.message}") diff --git a/metadata/latest/build_source/scripts/settings.py b/metadata/latest/build_source/scripts/settings.py index 22f5ade0..847c876b 100644 --- a/metadata/latest/build_source/scripts/settings.py +++ b/metadata/latest/build_source/scripts/settings.py @@ -1,9 +1,14 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + from pathlib import Path LOG_FORMAT = "%(asctime)s - %(name)s - %(levelname)s - %(message)s" BASE_PATH = Path("metadata/") -VERSION = "v20" +VERSION = "latest" VERSION_PATH = BASE_PATH / VERSION SCHEMA_BUILD_PATH = VERSION_PATH / "build_source" MAIN_SCHEMA_PATH = SCHEMA_BUILD_PATH / "schema_structure.json" diff --git a/metadata/latest/context.json.license b/metadata/latest/context.json.license new file mode 100644 index 00000000..38af0f3f --- /dev/null +++ b/metadata/latest/context.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/latest/example.json b/metadata/latest/example.json index 2c6f72ca..46868573 100644 --- a/metadata/latest/example.json +++ b/metadata/latest/example.json @@ -75,7 +75,7 @@ { "start": "2020-01-01T00:00:00+00:00", "end": "2020-01-01T23:59:30+00:00", - "resolution": " 30 s", + "resolution": "30 s", "alignment": "left", "aggregationType": "current" } @@ -106,11 +106,11 @@ ], "licenses": [ { - "name": "ODbL-1.0", - "title": "Open Data Commons Open Database License 1.0", - "path": "https://opendatacommons.org/licenses/odbl/1-0/index.html", - "instruction": "You are free to share and change, but you must attribute, and share derivations under the same license. See https://tldrlegal.com/license/odc-open-database-license-(odbl) for further information.", - "attribution": "© Reiner Lemoine Institut" + "name": "", + "title": "", + "path": "", + "instruction": "", + "attribution": "" } ], "contributors": [ @@ -128,134 +128,29 @@ } ], "type": "table", - "format": "PostgreSQL", + "format": "CSV", "encoding": "UTF-8", "schema": { "fields": [ - { - "name": "id", - "description": "Unique identifier", - "type": "serial", - "unit": null, - "isAbout": [ - { - "name": null, - "path": null - } - ], - "valueReference": [ - { - "value": null, - "name": null, - "path": null - } - ], - "nullable": null - }, - { - "name": "name", - "description": "Example name", - "type": "text", - "unit": null, - "isAbout": [ - { - "name": "written name", - "path": "https://openenergy-platform.org/ontology/oeo/IAO_0000590" - } - ], - "valueReference": [ - { - "value": null, - "name": null, - "path": null - } - ], - "nullable": null - }, - { - "name": "type", - "description": "Type of wind farm", - "type": "text", - "unit": null, - "isAbout": [ - { - "name": "wind farm", - "path": "https://openenergy-platform.org/ontology/oeo/OEO_00000447" - } - ], - "valueReference": [ - { - "value": "onshore ", - "name": "onshore wind farm", - "path": "https://openenergy-platform.org/ontology/oeo/OEO_00000311" - }, - { - "value": "offshore ", - "name": "offshore wind farm", - "path": "https://openenergy-platform.org/ontology/oeo/OEO_00000308" - } - ], - "nullable": null - }, { "name": "year", - "description": "Reference year", - "type": "integer", - "unit": null, - "isAbout": [ - { - "name": "year", - "path": "https://openenergy-platform.org/ontology/oeo/UO_0000036" - } - ], - "valueReference": [ - { - "value": null, - "name": null, - "path": null - } - ], - "nullable": null - }, - { - "name": "value", - "description": "Example value", - "type": "double precision", - "unit": "MW", - "isAbout": [ - { - "name": "quantity value", - "path": "https://openenergy-platform.org/ontology/oeo/OEO_00000350" - } - ], - "valueReference": [ - { - "value": null, - "name": null, - "path": null - } - ], - "nullable": null - }, - { - "name": "geom", - "description": "Geometry", + "description": "Reference year for which the data was collected.", "type": "geometry(Point, 4326)", - "unit": null, + "nullable": true, + "unit": "MW", "isAbout": [ { - "name": "spatial region", - "path": "https://openenergy-platform.org/ontology/oeo/BFO_0000006" + "name": "wind energy converting unit", + "path": "https://openenergyplatform.org/ontology/oeo/OEO_00000044" } ], "valueReference": [ { - "value": null, - "name": null, - "path": null + "value": "onshore", + "name": "onshore wind farm", + "path": "https://openenergyplatform.org/ontology/oeo/OEO_00000311" } - ], - "nullable": null + ] } ], "primaryKey": [ @@ -264,12 +159,14 @@ "foreignKeys": [ { "fields": [ - "year" + "id", + "version" ], "reference": { - "resource": "schema.table", + "resource": "model_draft.oep_oemetadata_table_example_version", "fields": [ - "year" + "id", + "version" ] } } diff --git a/metadata/latest/example.json.license b/metadata/latest/example.json.license new file mode 100644 index 00000000..38af0f3f --- /dev/null +++ b/metadata/latest/example.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/latest/example.py b/metadata/latest/example.py index 1d30161e..7ccbce8e 100644 --- a/metadata/latest/example.py +++ b/metadata/latest/example.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + import json import os diff --git a/metadata/latest/metadata_key_description.md b/metadata/latest/metadata_key_description.md index 4faa69ef..0518943f 100644 --- a/metadata/latest/metadata_key_description.md +++ b/metadata/latest/metadata_key_description.md @@ -1,3 +1,10 @@ + + # OEMetadata - Key Description This pages describes the key of **OEMetadata version 2.0 .**
diff --git a/metadata/latest/schema.json b/metadata/latest/schema.json index 5d9a822e..8f2418a7 100644 --- a/metadata/latest/schema.json +++ b/metadata/latest/schema.json @@ -1,7 +1,7 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/schema.json", - "description": "Open Energy Platform (OEP) metadata schema latest", + "description": "Open Energy Metadata (OEMetadata) - metadata schema", "type": "object", "required": [ "resources" @@ -9,81 +9,95 @@ "properties": { "name": { "description": "A filename or database conform collection name.", - "example": "oep_oemetadata", "type": [ "string", "null" ], + "examples": [ + "oep_oemetadata" + ], "badge": "Iron", "title": "Collection Name" }, "title": { "description": "A human readable collection name.", - "example": "OEP OEMetadata", "type": [ "string", "null" ], + "examples": [ + "OEP OEMetadata" + ], "badge": "Bronze", "title": "Collection Title" }, "description": { "description": "A free text description of the collection.", - "example": "A collection of tables for the OEMetadata examples.", "type": [ "string", "null" ], + "examples": [ + "A collection of tables for the OEMetadata examples." + ], "badge": "Bronze", "title": "Collection Description" }, "id": { "description": "A unique identifier (UUID/DOI) for the collection.", - "example": "https://databus.openenergyplatform.org/oeplatform/reference", "type": [ "string", "null" ], + "examples": [ + "https://databus.openenergyplatform.org/oeplatform/reference" + ], "badge": "Silver", "title": "Collection Identifier", "format": "uri", - "readonly": true + "readOnly": true }, "resources": { - "description": "A collection of related data resource descriptions and metadata. This may include relational data models which are technically related", + "description": "A collection of related resources.", "type": "array", "items": { "type": "object", "properties": { "@id": { "description": "A Uniform Resource Identifier (URI) that links the resource via the OpenEnergyDatabus (DBpedia Databus).", - "example": "https://databus.openenergyplatform.org/oeplatform/supply/wri_global_power_plant_database/2022-11-07", "type": [ "string", "null" ], + "examples": [ + "https://databus.openenergyplatform.org/oeplatform/supply/wri_global_power_plant_database/2022-11-07" + ], "badge": "Platinum", "title": "@Id", - "readonly": true + "readOnly": true }, "@context": { "description": "Explanation of metadata keys in ontology terms.", - "example": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/context.json", + "examples": [ + "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/context.json" + ], "type": [ "string", "null" ], "badge": "Platinum", "title": "@context", - "readonly": true + "readOnly": true }, "name": { "description": "A filename or database conform table name.", - "example": "oep_oemetadata_table_example", "type": [ "string", "null" ], + "examples": [ + "oep_oemetadata_table_example" + ], "badge": "Iron", "title": "Name" }, @@ -92,14 +106,14 @@ "type": "array", "items": { "description": "The topics are used to group the data in the database.", - "example": [ - "model_draft", - "reference" - ], "type": [ "string", "null" ], + "examples": [ + "model_draft", + "reference" + ], "badge": "Bronze", "title": "Keyword" }, @@ -108,32 +122,38 @@ }, "title": { "description": "A human readable table name.", - "example": "OEP OEMetadata Example Table", "type": [ "string", "null" ], + "examples": [ + "OEP OEMetadata Example Table" + ], "badge": "Silver", "title": "Title" }, "path": { "description": "A unique identifier (URI/UUID/DOI) for the table or file.", - "example": "http://openenergyplatform.org/dataedit/view/model_draft/oep_oemetadata_table_example", "type": [ "string", "null" ], + "examples": [ + "http://openenergyplatform.org/dataedit/view/model_draft/oep_oemetadata_table_example" + ], "badge": "Bronze", "title": "Path", - "readonly": true + "readOnly": true }, "description": { "description": "A description of the table. It should be usable as summary information for the table that is described by the metadata.", - "example": "Example table used to illustrate the OEMetadata structure and meaning.", "type": [ "string", "null" ], + "examples": [ + "Example table used to illustrate the OEMetadata structure and meaning." + ], "badge": "Silver", "title": "Description" }, @@ -142,14 +162,14 @@ "type": "array", "items": { "description": "The language keys must follow the Standard IETF (BCP47) and can be repeated if more languages are used.", - "example": [ - "en-GB", - "de-DE" - ], "type": [ "string", "null" ], + "examples": [ + "en-GB", + "de-DE" + ], "badge": "Gold", "title": "Language" }, @@ -164,21 +184,25 @@ "properties": { "name": { "description": "A class label of the ontology term.", - "example": "energy", "type": [ "string", "null" ], + "examples": [ + "energy" + ], "badge": "Platinum", "title": "Name" }, "path": { "description": "A unique identifier (URI/IRI) of the ontology class.", - "example": "https://openenergy-platform.org/ontology/oeo/OEO_00000150", "type": [ "string", "null" ], + "examples": [ + "https://openenergy-platform.org/ontology/oeo/OEO_00000150" + ], "badge": "Platinum", "title": "Path", "format": "uri" @@ -195,15 +219,15 @@ "type": "array", "items": { "description": "The keyword are used and managed in the OEP as table tags.", - "example": [ - "example", - "ODbL-1.0", - "NFDI4Energy" - ], "type": [ "string", "null" ], + "examples": [ + "example", + "ODbL-1.0", + "NFDI4Energy" + ], "badge": "Silver", "title": "Keyword" }, @@ -212,11 +236,13 @@ }, "publicationDate": { "description": "A date of publication of the data or metadata. The date format is ISO 8601 (YYYY-MM-DD).", - "example": "2024-10-15", "type": [ "string", "null" ], + "examples": [ + "2024-10-15" + ], "badge": "Bronze", "title": "Publication Date", "format": "date" @@ -227,33 +253,39 @@ "properties": { "start": { "description": "The start date of the embargo period. The date of the data (metadata) upload.", - "example": "2024-10-11", "type": [ "string", "null" ], + "examples": [ + "2024-10-11" + ], "badge": "Bronze", "title": "Embargo Period Start", "format": "date" }, "end": { "description": "The end date of the embargo period. This is the intended publication date.", - "example": "2025-01-01", "type": [ "string", "null" ], + "examples": [ + "2025-01-01" + ], "badge": "Bronze", "title": "Embargo Period End (Publication Date)", "format": "date" }, "isActive": { "description": "A boolean key that indicates if the embargo period is currently active. Must be changed to False on the embargo period end date.", - "example": true, "type": [ "boolean", "null" ], + "examples": [ + true + ], "badge": "Bronze", "title": "Embargo Period is Active " } @@ -267,105 +299,125 @@ "properties": { "title": { "description": "A title of the associated project.", - "example": "NFDI4Energy", "type": [ "string", "null" ], + "examples": [ + "NFDI4Energy" + ], "badge": "Gold", "title": "Context Title" }, "homepage": { "description": "A URL of the project.", - "example": "https://nfdi4energy.uol.de/", "type": [ "string", "null" ], + "examples": [ + "https://nfdi4energy.uol.de/" + ], "badge": "Gold", "title": "Homepage", "format": "uri" }, "documentation": { "description": "A URL of the project documentation.", - "example": "https://nfdi4energy.uol.de/sites/about_us/", "type": [ "string", "null" ], + "examples": [ + "https://nfdi4energy.uol.de/sites/about_us/" + ], "badge": "Gold", "title": "Documentation" }, "sourceCode": { "description": "A URL of the source code of the project.", - "example": "https://github.com/NFDI4Energy", "type": [ "string", "null" ], + "examples": [ + "https://github.com/NFDI4Energy" + ], "badge": "Gold", "title": "Source Code" }, "publisher": { "description": "The publishing agency of the data. This can be the OEP.", - "example": "Open Energy Platform (OEP)", "type": [ "string", "null" ], + "examples": [ + "Open Energy Platform (OEP)" + ], "badge": "Gold", "title": "Publisher" }, "publisherLogo": { "description": "A URL to the logo of the publishing agency of data.", - "example": "https://github.com/OpenEnergyPlatform/organisation/blob/production/logo/OpenEnergyFamily_Logo_OpenEnergyPlatform.svg", "type": [ "string", "null" ], + "examples": [ + "https://github.com/OpenEnergyPlatform/organisation/blob/production/logo/OpenEnergyFamily_Logo_OpenEnergyPlatform.svg" + ], "badge": "Gold", "title": "Publisher Logo", "format": "uri" }, "contact": { "description": "A reference to the creator or maintainer of the data set. This can be an email address or a GitHub handle.", - "example": "contact@example.com", "type": [ "string", "null" ], + "examples": [ + "contact@example.com" + ], "badge": "Gold", "title": "E-Mail Contact", "format": "email" }, "fundingAgency": { "description": "A name of the entity providing the funding. This can be a government agency or a company.", - "example": " Deutsche Forschungsgemeinschaft (DFG)", "type": [ "string", "null" ], + "examples": [ + " Deutsche Forschungsgemeinschaft (DFG)" + ], "badge": "Gold", "title": "Funding Agency" }, "fundingAgencyLogo": { "description": "A URL to the logo or image of the funding agency.", - "example": "https://upload.wikimedia.org/wikipedia/commons/8/86/DFG-logo-blau.svg", "type": [ "string", "null" ], + "examples": [ + "https://upload.wikimedia.org/wikipedia/commons/8/86/DFG-logo-blau.svg" + ], "badge": "Gold", "title": "Funding Agency Logo", "format": "uri" }, "grantNo": { "description": "An identifying grant number. In case of a publicly funded project, this number is assigned by the funding agency.", - "example": "501865131", "type": [ "string", "null" ], + "examples": [ + "501865131" + ], "badge": "Gold", "title": "Grant Number" } @@ -383,41 +435,49 @@ "properties": { "address": { "description": "An address of the location of the data. May be specified with street name, house number, zip code, and city name.", - "example": "Rudower Chaussee 12, 12489 Berlin", "type": [ "string", "null" ], + "examples": [ + "Rudower Chaussee 12, 12489 Berlin" + ], "badge": "Silver", "title": "Address" }, "@id": { "description": "A path or URI to a specific location. It can use Wikidata or OpenStreetMap.", - "example": "https://www.wikidata.org/wiki/Q77077223", "type": [ "string", "null" ], + "examples": [ + "https://www.wikidata.org/wiki/Q77077223" + ], "badge": "Platinum", "title": "Address" }, "latitude": { "description": "The latitude (lat) information of the location. Specifies the north / south position of the geometry.", - "example": "52.432822", "type": [ "string", "null" ], + "examples": [ + "52.432822" + ], "badge": "Gold", "title": "Latitude" }, "longitude": { "description": "The longitude (lon) information of the location. Specifies the east / west position of the geometry.", - "example": "13.5351004", "type": [ "string", "null" ], + "examples": [ + "13.5351004" + ], "badge": "Gold", "title": "Longitude" } @@ -431,54 +491,62 @@ "properties": { "name": { "description": "The name of the region.", - "example": "Berlin", "type": [ "string", "null" ], + "examples": [ + "Berlin" + ], "badge": "Silver", "title": "Extent Name" }, "@id": { "description": "A URI reference for the region.", - "example": "https://www.wikidata.org/wiki/Q64", "type": [ "string", "null" ], + "examples": [ + "https://www.wikidata.org/wiki/Q64" + ], "format": "uri", "badge": "Platinum", "title": "Extent URI" }, "resolutionValue": { "description": "The value of the resolution.", - "example": "100", "type": [ "string", "null" ], + "examples": [ + "100" + ], "badge": "Silver", "title": "Resolution Value" }, "resolutionUnit": { "description": "The unit of the resolution.", - "example": "m", "type": [ "string", "null" ], + "examples": [ + "m" + ], "badge": "Silver", "title": "Resolution Unit" }, "boundingBox": { "description": "The covered area specified by the coordinates of a bounding box. The format is [minLon, minLat, maxLon, maxLat] or [W,S,E,N].", - "example": [ + "type": "array", + "examples": [ 13.08825, 52.33859, 13.76104, 52.6754 ], - "type": "array", "items": { "type": "number" }, @@ -489,11 +557,13 @@ }, "crs": { "description": "The Coordinate Reference System, specified as an EPSG code.", - "example": "EPSG:4326", "type": [ "string", "null" ], + "examples": [ + "EPSG:4326" + ], "badge": "Gold", "title": " Coordinate Reference System (CRS)" } @@ -511,11 +581,13 @@ "properties": { "referenceDate": { "description": "A base year, month or day. The time for which the data is should be accurate. Date Format is ISO 8601.", - "example": "2020-01-01", "type": [ "string", "null" ], + "examples": [ + "2020-01-01" + ], "badge": "Silver", "title": "Reference Date", "format": "date" @@ -528,53 +600,63 @@ "properties": { "start": { "description": "The start time of a time series.", - "example": "2020-01-01T00:00:00+00:00", "type": [ "string", "null" ], + "examples": [ + "2020-01-01T00:00:00+00:00" + ], "badge": "Silver", "title": "Timeseries Start", "format": "date-time" }, "end": { "description": "The temporal end point of a time series.", - "example": "2020-01-01T23:59:30+00:00", "type": [ "string", "null" ], + "examples": [ + "2020-01-01T23:59:30+00:00" + ], "badge": "Silver", "title": "Timeseries End", "format": "date-time" }, "resolution": { "description": "The time span between individual information points in a time series.", - "example": " 30 s", "type": [ "string", "null" ], + "examples": [ + "30 s" + ], "badge": "Silver", "title": "Timeseries Resolution" }, "alignment": { "description": "An indicator of whether timestamps in a time series are to the left, right or in the centre.", - "example": "left", "type": [ "string", "null" ], + "examples": [ + "left" + ], "badge": "Gold", "title": "Timeseries Alignment" }, "aggregationType": { "description": "An indicator of whether the values are a sum, an average or a current value.", - "example": "current", "type": [ "string", "null" ], + "examples": [ + "current" + ], "badge": "Gold", "title": "Timeseries Aggregation Type" } @@ -597,11 +679,13 @@ "properties": { "title": { "description": "A human readable title of the source, a document title or organisation name.", - "example": "IPCC Sixth Assessment Report (AR6) - Climate Change 2023 - Synthesis Report", "type": [ "string", "null" ], + "examples": [ + "IPCC Sixth Assessment Report (AR6) - Climate Change 2023 - Synthesis Report" + ], "badge": "Bronze", "title": "Source Title" }, @@ -610,15 +694,15 @@ "type": "array", "items": { "description": "The authors of the source.", - "example": [ - "Hoesung Lee", - "Jos\u00e9 Romero", - "The Core Writing Team" - ], "type": [ "string", "null" ], + "examples": [ + "Hoesung Lee", + "Jos\u00e9 Romero", + "The Core Writing Team" + ], "badge": "Bronze", "title": "Keyword" }, @@ -627,31 +711,37 @@ }, "description": { "description": "A free text description of the source.", - "example": "A Report of the Intergovernmental Panel on Climate Change.", "type": [ "string", "null" ], + "examples": [ + "A Report of the Intergovernmental Panel on Climate Change." + ], "badge": "Bronze", "title": "Source Description" }, "publicationYear": { "description": "Indicates the year when the work was published.", - "example": "2023", "type": [ "string", "null" ], + "examples": [ + "2023" + ], "badge": "Bronze", "title": "Publication Year" }, "path": { "description": "A URL to the original source.", - "example": "https://www.ipcc.ch/report/ar6/syr/downloads/report/IPCC_AR6_SYR_FullVolume.pdf", "type": [ "string", "null" ], + "examples": [ + "https://www.ipcc.ch/report/ar6/syr/downloads/report/IPCC_AR6_SYR_FullVolume.pdf" + ], "badge": "Bronze", "title": "Path", "format": "uri" @@ -664,62 +754,74 @@ "properties": { "name": { "description": "The SPDX identifier.", - "example": "ODbL-1.0", "type": [ "string", "null" ], + "examples": [ + "ODbL-1.0" + ], "badge": "Bronze", "title": "Name" }, "title": { "description": "The official (human readable) title of the license.", - "example": "Open Data Commons Open Database License 1.0", "type": [ "string", "null" ], + "examples": [ + "Open Data Commons Open Database License 1.0" + ], "badge": "Bronze", "title": "Title" }, "path": { "description": "A link or path to the license text.", - "example": "https://opendatacommons.org/licenses/odbl/1-0/index.html", "type": [ "string", "null" ], + "examples": [ + "https://opendatacommons.org/licenses/odbl/1-0/index.html" + ], "badge": "Bronze", "title": "Path", "format": "uri" }, "instruction": { "description": "A short description of rights and obligations. The use of tl;drLegal is recommended.", - "example": "You are free to share and change, but you must attribute, and share derivations under the same license. See https://tldrlegal.com/license/odc-open-database-license-odbl for further information.", "type": [ "string", "null" ], + "examples": [ + "You are free to share and change, but you must attribute, and share derivations under the same license. See https://tldrlegal.com/license/odc-open-database-license-odbl for further information." + ], "badge": "Bronze", "title": "Instruction" }, "attribution": { "description": "A copyright owner of the source. Must be provided if attribution licenses are used.", - "example": "\u00a9 Intergovernmental Panel on Climate Change 2023", "type": [ "string", "null" ], + "examples": [ + "\u00a9 Intergovernmental Panel on Climate Change 2023" + ], "badge": "Bronze", "title": "Attribution" }, "copyrightStatement": { "description": "A link or path that proves that the source or data has the appropriate license. This can be a page number or website imprint.", - "example": "https://www.ipcc.ch/copyright/", "type": [ "string", "null" ], + "examples": [ + "https://www.ipcc.ch/copyright/" + ], "badge": "Bronze", "title": "Copyright Statement" } @@ -745,52 +847,52 @@ "properties": { "name": { "description": "The SPDX identifier.", - "example": "ODbL-1.0", "type": [ "string", "null" ], + "example": "ODbL-1.0", "badge": "Bronze", "title": "Name" }, "title": { "description": "The official (human readable) title of the license.", - "example": "Open Data Commons Open Database License 1.0", "type": [ "string", "null" ], + "example": "Open Data Commons Open Database License 1.0", "badge": "Bronze", "title": "Title" }, "path": { "description": "A link or path to the license text.", - "example": "https://opendatacommons.org/licenses/odbl/1-0/index.html", "type": [ "string", "null" ], + "example": "https://opendatacommons.org/licenses/odbl/1-0/index.html", "badge": "Bronze", "title": "Path", "format": "uri" }, "instruction": { "description": "A short description of rights and obligations. The use of tl;drLegal is recommended.", - "example": "You are free to share and change, but you must attribute, and share derivations under the same license. See https://tldrlegal.com/license/odc-open-database-license-(odbl) for further information.", "type": [ "string", "null" ], + "example": "You are free to share and change, but you must attribute, and share derivations under the same license. See https://tldrlegal.com/license/odc-open-database-license-(odbl) for further information.", "badge": "Bronze", "title": "Instruction" }, "attribution": { "description": "A copyright holder of the data. Must be provided if attribution licenses are used.", - "example": "\u00a9 Reiner Lemoine Institut", "type": [ "string", "null" ], + "example": "\u00a9 Reiner Lemoine Institut", "badge": "Bronze", "title": "Attribution" } @@ -809,31 +911,37 @@ "properties": { "title": { "description": "A full name of the contributor.", - "example": "Ludwig H\u00fclk", "type": [ "string", "null" ], + "examples": [ + "Ludwig H\u00fclk" + ], "badge": "Bronze", "title": "Contributor Title" }, "path": { "description": "A qualified link or path pointing to a relevant location online for the contributor. This can be the GitHub page or ORCID.", - "example": "https://github.com/Ludee", "type": [ "string", "null" ], + "examples": [ + "https://github.com/Ludee" + ], "badge": "Bronze", "title": "Path" }, "organization": { "description": "A string describing the organization this contributor is affiliated to. This can be relevant for the copyright.", - "example": "Reiner Lemoine Institut", "type": [ "string", "null" ], + "examples": [ + "Reiner Lemoine Institut" + ], "badge": "Bronze", "title": "Organization" }, @@ -842,14 +950,14 @@ "type": "array", "items": { "description": "A role is recommended to follow an established vocabulary, such as DataCite Metadata Schema\u2019s contributorRole or CreDIT. Useful roles to indicate are: creator, contact, and dataCurator.", - "example": [ - "creator", - "dataCurator" - ], "type": [ "string", "null" ], + "examples": [ + "creator", + "dataCurator" + ], "badge": "Bronze", "title": "Role" }, @@ -858,32 +966,38 @@ }, "date": { "description": "The date of the final contribution. Date Format is ISO 8601.", - "example": "2024-10-21", "type": [ "string", "null" ], + "examples": [ + "2024-10-21" + ], "badge": "Bronze", "title": "Date", "format": "date" }, "object": { "description": "The object of the contribution. Which part of the package was supplied or changed.", - "example": "data and metadata", "type": [ "string", "null" ], + "examples": [ + "data and metadata" + ], "badge": "Bronze", "title": "Object" }, "comment": { "description": "A free-text commentary on what has been done.", - "example": "Add general context.", "type": [ "string", "null" ], + "examples": [ + "Add general context." + ], "badge": "Bronze", "title": "Comment" } @@ -896,24 +1010,28 @@ }, "type": { "description": "The 'table' type indicates that the resource is tabular as per 'Frictionless Tabular Data' definition.", - "example": "table", "type": [ "string", "null" ], + "examples": [ + "table" + ], "badge": "Gold", - "title": "Profile", + "title": "Type", "options": { "hidden": true } }, "format": { "description": "A file extension format. Possible options are 'csv', 'xlsx', 'json', 'PostgreSQL', 'SQLite' and other standard file extensions.", - "example": "PostgreSQL", "type": [ "string", "null" ], + "examples": [ + "CSV" + ], "badge": "Gold", "title": "Format", "options": { @@ -922,11 +1040,13 @@ }, "encoding": { "description": "Specifies the character encoding of the resource's data file. The default is 'UTF-8'. The values should be one of the 'Preferred MIME Names'.", - "example": "UTF-8", "type": [ "string", "null" ], + "examples": [ + "UTF-8" + ], "badge": "Gold", "title": "Encoding", "options": { @@ -945,54 +1065,64 @@ "properties": { "name": { "description": "The name of the field. The name may only consist of lowercase alphanumeric characters or underscores. It must not begin with a number or an underscore.", - "example": "year", "type": [ "string", "null" ], + "examples": [ + "year" + ], "badge": "Iron", "title": "Column Name", - "readonly": true + "readOnly": true }, "description": { "description": "A text describing the field.", - "example": "Reference year for which the data was collected.", "type": [ "string", "null" ], + "examples": [ + "Reference year for which the data was collected." + ], "badge": "Silver", "title": "Description" }, "type": { "description": "The data type of the field. In case of a geom column in a database, also indicate the shape and CRS.", - "example": "geometry(Point, 4326)", "type": [ "string", "null" ], + "examples": [ + "geometry(Point, 4326)" + ], "badge": "Iron", "title": "Type", - "readonly": true + "readOnly": true }, "nullable": { "description": "A boolean key to specify that a column can be nullable. True is the default value.", - "example": true, "type": [ "boolean", "null" ], + "examples": [ + true + ], "badge": "Iron", "title": "Nullable", - "readonly": true + "readOnly": true }, "unit": { "description": "The unit of a field. If it does not apply, use 'null'. If the unit is given in a separate field, reference this field (e.g. 'unit'). Use a space between numbers and units (100 m).", - "example": "MW", "type": [ "string", "null" ], + "examples": [ + "MW" + ], "badge": "Silver", "title": "Unit" }, @@ -1004,21 +1134,25 @@ "properties": { "name": { "description": "The class label of the ontology term.", - "example": "wind energy converting unit", "type": [ "string", "null" ], + "examples": [ + "wind energy converting unit" + ], "badge": "Platinum", "title": "Name" }, "path": { "description": "The path of the ontology term (IRI).", - "example": "https://openenergyplatform.org/ontology/oeo/OEO_00000044", "type": [ "string", "null" ], + "examples": [ + "https://openenergyplatform.org/ontology/oeo/OEO_00000044" + ], "badge": "Platinum", "title": "Path", "format": "uri" @@ -1038,31 +1172,37 @@ "properties": { "value": { "description": "The name of the value in the column.", - "example": "onshore", "type": [ "string", "null" ], + "examples": [ + "onshore" + ], "badge": "Platinum", "title": "Value" }, "name": { "description": "The class label of the ontology term in the column.", - "example": "onshore wind farm", "type": [ "string", "null" ], + "examples": [ + "onshore wind farm" + ], "badge": "Platinum", "title": "Name" }, "path": { "description": "The path of the ontology term (IRI) in the column.", - "example": "https://openenergyplatform.org/ontology/oeo/OEO_00000311", "type": [ "string", "null" ], + "examples": [ + "https://openenergyplatform.org/ontology/oeo/OEO_00000311" + ], "badge": "Platinum", "title": "Path", "format": "uri" @@ -1089,13 +1229,13 @@ "type": "array", "items": { "description": "The default value is the \u201cid\u201d column.", - "example": [ - "id" - ], "type": [ "string", "null" ], + "examples": [ + "id" + ], "badge": "Iron", "title": "Primary key" }, @@ -1114,14 +1254,14 @@ "type": "array", "items": { "description": "The column in the table that is constrained by the foreign key.", - "example": [ - "id", - "version" - ], "type": [ "string", "null" ], + "examples": [ + "id", + "version" + ], "badge": "Iron", "title": "Foreign Key Field" }, @@ -1134,11 +1274,13 @@ "properties": { "resource": { "description": "The referenced foreign table.", - "example": "model_draft.oep_oemetadata_table_example_version", "type": [ "string", "null" ], + "examples": [ + "model_draft.oep_oemetadata_table_example_version" + ], "badge": "Iron", "title": "Foreign Resource" }, @@ -1147,14 +1289,14 @@ "type": "array", "items": { "description": "The foreign resource column.", - "example": [ - "id", - "version" - ], "type": [ "string", "null" ], + "examples": [ + "id", + "version" + ], "badge": "Iron", "title": "Field" }, @@ -1190,21 +1332,25 @@ "properties": { "delimiter": { "description": "The delimiter specifies the character sequence which should separate fields (columns). Common characters are ',' (comma), ';' (semicolon), '.' (point) and '\\t' (tab).", - "example": ";", "type": [ "string", "null" ], + "examples": [ + ";" + ], "badge": "Silver", "title": "Delimiter" }, "decimalSeparator": { "description": "The symbol used to separate the integer part from the fractional part of a number written in decimal form. Depending on language and region this symbol can be '.' or ','.", - "example": ".", "type": [ "string", "null" ], + "examples": [ + "." + ], "badge": "Silver", "title": "Decimal separator" } @@ -1221,21 +1367,26 @@ "properties": { "path": { "description": "A link or path to the documented open peer review.", - "example": "https://www.example.com", "type": [ "string", "null" ], + "examples": [ + "https://www.example.com" + ], "badge": null, - "title": "Path" + "title": "Path", + "format": "uri" }, "badge": { "description": "A badge of either Iron, Bronze, Silver, Gold or Platinum is used to label the quality of the metadata.", - "example": "Platinum", "type": [ "string", "null" ], + "examples": [ + "Platinum" + ], "badge": null, "title": "Badge" } @@ -1255,7 +1406,9 @@ "properties": { "metadataVersion": { "description": "Type and version number of the metadata.", - "example": "OEMetadata-2.0.1", + "examples": [ + "OEMetadata-2.0.1" + ], "type": [ "string", "null" @@ -1264,36 +1417,42 @@ "title": "Metadata Version" }, "metadataLicense": { - "description": "The license of the provided metadata. ", + "description": "The license of the OEMetadata. ", "type": "object", "properties": { "name": { - "description": "The [SPDX](https://spdx.org/licenses/) identifier.", - "example": "CC0-1.0", + "description": "The SPDX identifier.", "type": [ "string", "null" ], + "examples": [ + "CC0-1.0" + ], "badge": null, "title": "License Name" }, "title": { - "description": "The official (human-readable) title of the license.", - "example": "Creative Commons Zero v1.0 Universal", + "description": "The official (human readable) title of the license.", "type": [ "string", "null" ], + "examples": [ + "Creative Commons Zero v1.0 Universal" + ], "badge": null, "title": "License Title" }, "path": { "description": "A link or path to the license text.", - "example": "https://creativecommons.org/publicdomain/zero/1.0", "type": [ "string", "null" ], + "examples": [ + "https://creativecommons.org/publicdomain/zero/1.0" + ], "badge": null, "title": "License Path", "format": "uri" diff --git a/metadata/latest/schema.json.license b/metadata/latest/schema.json.license new file mode 100644 index 00000000..38af0f3f --- /dev/null +++ b/metadata/latest/schema.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/latest/schema.py b/metadata/latest/schema.py index 2af91a92..a8c27a1f 100644 --- a/metadata/latest/schema.py +++ b/metadata/latest/schema.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + import json import os diff --git a/metadata/latest/template.json b/metadata/latest/template.json index 98a9fe45..a122c847 100644 --- a/metadata/latest/template.json +++ b/metadata/latest/template.json @@ -57,9 +57,6 @@ "resolutionValue": "", "resolutionUnit": "", "boundingBox": [ - 0, - 0, - 0, 0 ], "crs": "" @@ -174,11 +171,11 @@ } ], "metaMetadata": { - "metadataVersion": "OEMetadata-2.0.1", + "metadataVersion": "", "metadataLicense": { - "name": "CC0-1.0", - "title": "Creative Commons Zero v1.0 Universal", - "path": "https://creativecommons.org/publicdomain/zero/1.0" + "name": "", + "title": "", + "path": "" } } } \ No newline at end of file diff --git a/metadata/latest/template.json.license b/metadata/latest/template.json.license new file mode 100644 index 00000000..38af0f3f --- /dev/null +++ b/metadata/latest/template.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/latest/template.py b/metadata/latest/template.py index 78a3a705..110d7cda 100644 --- a/metadata/latest/template.py +++ b/metadata/latest/template.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + import json import os diff --git a/metadata/v10/v130/example.json.license b/metadata/v10/v130/example.json.license new file mode 100644 index 00000000..38af0f3f --- /dev/null +++ b/metadata/v10/v130/example.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/v10/v130/example.py b/metadata/v10/v130/example.py index cb3be007..3416440f 100644 --- a/metadata/v10/v130/example.py +++ b/metadata/v10/v130/example.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + import json import os diff --git a/metadata/v10/v130/schema.json.license b/metadata/v10/v130/schema.json.license new file mode 100644 index 00000000..38af0f3f --- /dev/null +++ b/metadata/v10/v130/schema.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/v10/v130/schema.py b/metadata/v10/v130/schema.py index 2526f4a3..c7b0845a 100644 --- a/metadata/v10/v130/schema.py +++ b/metadata/v10/v130/schema.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + import json import os diff --git a/metadata/v10/v130/template.json.license b/metadata/v10/v130/template.json.license new file mode 100644 index 00000000..38af0f3f --- /dev/null +++ b/metadata/v10/v130/template.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/v10/v130/template.py b/metadata/v10/v130/template.py index 0727081d..c417ca40 100644 --- a/metadata/v10/v130/template.py +++ b/metadata/v10/v130/template.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + import json import os diff --git a/metadata/v10/v140/example.json.license b/metadata/v10/v140/example.json.license new file mode 100644 index 00000000..38af0f3f --- /dev/null +++ b/metadata/v10/v140/example.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/v10/v140/example.py b/metadata/v10/v140/example.py index 1c939064..fdf03900 100644 --- a/metadata/v10/v140/example.py +++ b/metadata/v10/v140/example.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + import json import os diff --git a/metadata/v10/v140/metadata_key_description.md b/metadata/v10/v140/metadata_key_description.md index abfc245c..683bbf01 100644 --- a/metadata/v10/v140/metadata_key_description.md +++ b/metadata/v10/v140/metadata_key_description.md @@ -1,3 +1,11 @@ + + # Open Energy Metadata ## Open Energy Metadata Description diff --git a/metadata/v10/v140/schema.json.license b/metadata/v10/v140/schema.json.license new file mode 100644 index 00000000..38af0f3f --- /dev/null +++ b/metadata/v10/v140/schema.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/v10/v140/schema.py b/metadata/v10/v140/schema.py index 27e5a63a..fc3b2b0b 100644 --- a/metadata/v10/v140/schema.py +++ b/metadata/v10/v140/schema.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + import json import os diff --git a/metadata/v10/v140/template.json.license b/metadata/v10/v140/template.json.license new file mode 100644 index 00000000..38af0f3f --- /dev/null +++ b/metadata/v10/v140/template.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/v10/v140/template.py b/metadata/v10/v140/template.py index 380306df..785d48aa 100644 --- a/metadata/v10/v140/template.py +++ b/metadata/v10/v140/template.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + import json import os diff --git a/metadata/v10/v141/example.json.license b/metadata/v10/v141/example.json.license new file mode 100644 index 00000000..38af0f3f --- /dev/null +++ b/metadata/v10/v141/example.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/v10/v141/example.py b/metadata/v10/v141/example.py index 6a1960dd..d7994d41 100644 --- a/metadata/v10/v141/example.py +++ b/metadata/v10/v141/example.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + import json import os diff --git a/metadata/v10/v141/metadata_key_description.md b/metadata/v10/v141/metadata_key_description.md index efeef703..c5bed139 100644 --- a/metadata/v10/v141/metadata_key_description.md +++ b/metadata/v10/v141/metadata_key_description.md @@ -1,3 +1,11 @@ + + # Open Energy Metadata ## Open Energy Metadata Description diff --git a/metadata/v10/v141/schema.json.license b/metadata/v10/v141/schema.json.license new file mode 100644 index 00000000..38af0f3f --- /dev/null +++ b/metadata/v10/v141/schema.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/v10/v141/schema.py b/metadata/v10/v141/schema.py index d694d543..6a56d301 100644 --- a/metadata/v10/v141/schema.py +++ b/metadata/v10/v141/schema.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + import json import os diff --git a/metadata/v10/v141/template.json.license b/metadata/v10/v141/template.json.license new file mode 100644 index 00000000..38af0f3f --- /dev/null +++ b/metadata/v10/v141/template.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/v10/v141/template.py b/metadata/v10/v141/template.py index f6cdcc39..634ba3e6 100644 --- a/metadata/v10/v141/template.py +++ b/metadata/v10/v141/template.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + import json import os diff --git a/metadata/v10/v150/README.md b/metadata/v10/v150/README.md index 9e4c6f90..7fcf95bb 100644 --- a/metadata/v10/v150/README.md +++ b/metadata/v10/v150/README.md @@ -1,3 +1,11 @@ + + OpenEnergyMetadata OpenEnergyPlatform diff --git a/metadata/v10/v150/context.json.license b/metadata/v10/v150/context.json.license new file mode 100644 index 00000000..38af0f3f --- /dev/null +++ b/metadata/v10/v150/context.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/v10/v150/example.json.license b/metadata/v10/v150/example.json.license new file mode 100644 index 00000000..38af0f3f --- /dev/null +++ b/metadata/v10/v150/example.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/v10/v150/example.py b/metadata/v10/v150/example.py index 75f18fe1..6f22aa2b 100644 --- a/metadata/v10/v150/example.py +++ b/metadata/v10/v150/example.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + import json import os diff --git a/metadata/v10/v150/metadata_key_description.md b/metadata/v10/v150/metadata_key_description.md index ac0d9593..443e0880 100644 --- a/metadata/v10/v150/metadata_key_description.md +++ b/metadata/v10/v150/metadata_key_description.md @@ -1,3 +1,11 @@ + + # Open Energy Metadata ## Open Energy Metadata Description diff --git a/metadata/v10/v150/schema.json.license b/metadata/v10/v150/schema.json.license new file mode 100644 index 00000000..38af0f3f --- /dev/null +++ b/metadata/v10/v150/schema.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/v10/v150/schema.py b/metadata/v10/v150/schema.py index c7689409..38413494 100644 --- a/metadata/v10/v150/schema.py +++ b/metadata/v10/v150/schema.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + import json import os diff --git a/metadata/v10/v150/schema_old.json b/metadata/v10/v150/schema_old.json deleted file mode 100644 index 98232a9a..00000000 --- a/metadata/v10/v150/schema_old.json +++ /dev/null @@ -1,711 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/oemetadata/v150/schema.json", - "description": "Open Energy Plaftorm (OEP) metadata schema v1.5.0", - "type": "object", - "properties": { - "@context": { - "description": "Explanation of metadata keys in ontology terms. Example: https://raw.githubusercontent.com/LOD-GEOSS/databus-snippets/production/oep_metadata/context.jsonld", - "type": [ - "string", - "null" - ] - }, - "name": { - "description": "File name or database table name. Example: oep_metadata_table_example_v15", - "type": [ - "string", - "null" - ] - }, - "title": { - "description": "Human readable title. Example: Metadata Example Table", - "type": [ - "string", - "null" - ] - }, - "id": { - "description": "Uniform Resource Identifier (URI) that unambiguously identifies the resource. This can be a URL on the data set. It can also be a Digital Object Identifier (DOI). Example: https://example.com", - "type": [ - "string", - "null" - ] - }, - "@id": { - "description": "Uniform Resource Identifier (URI) that links the resource via the databus", - "type": [ - "string", - "null" - ] - }, - "description": { - "description": "A description of the package. It should be usable as summary information for the entire package that is described by the metadata. Example: Example table used to illustrate the metadata structure and meaning", - "type": [ - "string", - "null" - ] - }, - "subject": { - "description": "Reference the topic of the resource in ontology terms", - "type": [ - "string", - "null" - ] - }, - "language": { - "description": "Language used within the described data structures (e.g. titles, descriptions). The language key can be repeated if more languages are used. Standard: IETF (BCP47). Example: [en-GB, de-DE, fr-FR]", - "type": "array", - "items": { - "type": [ - "string", - "null" - ] - } - }, - "keywords": { - "description": "An array of string keywords to assist users searching for the package in catalogs. Example: [example, template, test]", - "type": "array", - "items": { - "type": [ - "string", - "null" - ] - } - }, - "publicationDate": { - "description": "Date of publishing. Date Format is ISO 8601 (YYYY-MM-DD). Example: 2019-02-06", - "type": [ - "string", - "null" - ] - }, - "context": { - "description": "Object. Contains name-value-pairs that describe the general setting, environment or project leading to the creation or maintenance of this dataset.", - "type": "object", - "properties": { - "homepage": { - "description": "URL of project. Example: https://openenergy-platform.org/", - "type": [ - "string", - "null" - ] - }, - "documentation": { - "description": "URL of project documentation. Example: https://github.com/OpenEnergyPlatform/metadata/wiki/Metadata-Description", - "type": [ - "string", - "null" - ] - }, - "sourceCode": { - "description": "Url of project source code. Example: https://github.com/OpenEnergyPlatform", - "type": [ - "string", - "null" - ] - }, - "contact": { - "description": "Reference to the creator or maintainer of the data set. Example: contact@example.com", - "type": [ - "string", - "null" - ] - }, - "grantNo": { - "description": "In a publicly funded Project: the identifying grant number. Example: 01AB2345", - "type": [ - "string", - "null" - ] - }, - "fundingAgency": { - "description": "In a funded Project: The name of the funding agency. Example: Bundesministerium für Wirtschaft und Energie", - "type": [ - "string", - "null" - ] - }, - "fundingAgencyLogo": { - "description": "In a publicly funded Project: A link to the Logo of the funding agency. Example: https://www.innovation-beratung-foerderung.de/INNO/Redaktion/DE/Bilder/Titelbilder/titel_foerderlogo_bmwi.jpg?__blob=poster&v=2", - "type": [ - "string", - "null" - ] - }, - "publisherLogo": { - "description": "Link to the logo of the publishing institution. Example: https://reiner-lemoine-institut.de//wp-content/uploads/2015/09/rlilogo.png", - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - }, - "spatial": { - "description": "Object. Contains name-value-pairs describing the spatial context of the contained data.", - "type": "object", - "properties": { - "location": { - "description": "In the case of data where the location can be described as a point. May come as coordinates, URI or addresses with street, house number and zip code. Example: 52.433509, 13.535855", - "type": [ - "string", - "null" - ] - }, - "extent": { - "description": "Covered area. May be the name of a region, or the geometry of a bounding box. Example: Europe", - "type": [ - "string", - "null" - ] - }, - "resolution": { - "description": "Pixel size in case of a regular raster image. Reference to administrative level or other spatial division that is present as the smallest spatially distinguished unit size. Example: 30 m", - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - }, - "temporal": { - "description": "Temporal object. Time period covered in the data. Temporal information should either contain a \"referenceDate\" or the keys describing a time series; in rare cases both. Use null for the ones that don't apply.", - "type": "object", - "properties": { - "referenceDate": { - "description": "Base year, month or day. Point in time for which the data is meant to be accurate. A census will generally have a reference year. A satellite image will have a reference date. Date Format is ISO 8601. Example: 2016-01-01", - "type": [ - "string", - "null" - ] - }, - "timeseries": { - "description": "Times series object in temporal object, contains start, end, resolution, alignment and aggregation type properties.", - "type": [ - "array", - "null" - ], - "properties": { - "start": { - "description": "The beginning point in time of a time series. Example: 2019-02-06T10:12:04+00:00", - "type": [ - "string", - "null" - ] - }, - "end": { - "description": "The end point in time of a time series. Example: 2019-02-07T10:12:04+00:00", - "type": [ - "string", - "null" - ] - }, - "resolution": { - "description": "The time span between individual points of information in a time series. Example: 30 s", - "type": [ - "string", - "null" - ] - }, - "alignment": { - "description": "Indicator whether stamps in a time series are left, right or middle. \"null\" if there is no time series. Example: left", - "type": [ - "string", - "null" - ] - }, - "aggregationType": { - "description": "Indicates whether the values are a sum, average or current. Example: sum", - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - "sources": { - "description": "List of source objects. Each object has all name-value-pairs.", - "type": "array", - "items": { - "description": "Source object in list of source objects. Each object has all name-value-pairs.", - "type": "object", - "properties": { - "title": { - "description": "Human readable title of the source, e.g. document title or organisation name. Example: IPCC Fifth Assessment Report", - "type": [ - "string", - "null" - ] - }, - "description": { - "description": "Free text description of the data set. Example: Scientific climate change report by the UN", - "type": [ - "string", - "null" - ] - }, - "path": { - "description": "URL to original source. Example: https://www.ipcc.ch/site/assets/uploads/2018/02/ipcc_wg3_ar5_full.pdf", - "type": [ - "string", - "null" - ] - }, - "licenses": { - "description": "The license(s) under which the source(s) is/are provided. List of objects.", - "type": "array", - "items": { - "description": "A license object under which the described source is provided. Each object has all name-value-pairs.", - "type": "object", - "properties": { - "name": { - "description": "SPDX identifier: Example: ODbL-1.0", - "type": [ - "string", - "null" - ] - }, - "title": { - "description": "Official (human readable) title. Example: Open Data Commons Open Database License 1.0", - "type": [ - "string", - "null" - ] - }, - "path": { - "description": "A link to the license. Example: https://opendatacommons.org/licenses/odbl/1-0/index.html", - "type": [ - "string", - "null" - ] - }, - "instruction": { - "description": "Short description of rights and restrictions. Example: You are free to share and change, but you must attribute, and share derivations under the same license.", - "type": [ - "string", - "null" - ] - }, - "attribution": { - "description": "Copyright holder of the source. Example: © Intergovernmental Panel on Climate Change 2014", - "type": [ - "string", - "null" - ] - } - } - } - } - }, - "additionalProperties": false - } - }, - "licenses": { - "description": "The license(s) under which the described package is provided. List of objects.", - "type": "array", - "items": { - "description": "A license object under which the described package is provided. Each object has all name-value-pairs.", - "type": "object", - "properties": { - "name": { - "description": "SPDX identifier. Example: ODbL-1.0", - "type": [ - "string", - "null" - ] - }, - "title": { - "description": "Official (human readable) title. Example: Open Data Commons Open Database License 1.0", - "type": [ - "string", - "null" - ] - }, - "path": { - "description": "A url-or-path string, that is a fully qualified HTTP address, or a relative POSIX path (see the url-or-path definition in Data Resource for details). Example: https://opendatacommons.org/licenses/odbl/1-0/index.html", - "type": [ - "string", - "null" - ] - }, - "instruction": { - "description": "Short description of rights and restrictions. Example: You are free to share and change, but you must attribute, and share derivations under the same license.", - "type": [ - "string", - "null" - ] - }, - "attribution": { - "description": "Copyright holder of the produced data set. Example: © Reiner Lemoine Institut", - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "contributors": { - "description": "The people or organizations who contributed to this data package. List of objects.", - "type": "array", - "items": { - "description": "A person or organizations who contributed to this data package. Each object refers to one contributor. Every contributor must have a title and property. A path, email, role and organization properties are optional extras.", - "type": "object", - "properties": { - "title": { - "description": "Name/title of the contributor (name for a person, name or title for an organization). Example: Jon Doe", - "type": [ - "string", - "null" - ] - }, - "email": { - "description": "E-mail address of the contributor. Example: contact@example.com", - "type": [ - "string", - "null" - ] - }, - "date": { - "description": "Date of the contribution. If the contribution took more than a day, use the date of the final contribution. Date Format is ISO 8601. Example: 2016-06-16", - "type": [ - "string", - "null" - ] - }, - "object": { - "description": "Target of contribution. Which part of the package was supplied/changed. Example: Metadata", - "type": [ - "string", - "null" - ] - }, - "comment": { - "description": "Free text comment on what's been done. Example: Fixed a typo in the title", - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "resources": { - "description": "Resources, described as a list of data resource format objects.", - "type": "array", - "items": { - "description": "The data resource format describes a data resource as an individual file or table.", - "type": "object", - "properties": { - "profile": { - "description": "A string identifying the profile of this descriptor as per the profiles specification. This information is retained in order to comply with the \"Tabular Data Package\" standard. If at all in doubt the value should read \"tabular-data-resource\". Example: tabular-data-resource", - "type": [ - "string", - "null" - ] - }, - "name": { - "description": "A resource MUST contain a name unique to amongst all resources in this data package. To comply with the data package standard it must consist of only lowercase alphanumeric character plus \".\", \"-\" and \"_\". It may not start with a number. In a database this will be the name of the table within its containing schema. It would be usual for the name to correspond to the file name (minus the file-extension) of the data file the resource describes. Example: sandbox.example_table", - "type": [ - "string", - "null" - ] - }, - "path": { - "description": "A url-or-path string, that should be a permanent http(s) address or other path directly linking to the resource. Example: directly linking to the resource. https://openenergy-platform.org/dataedit/view/openstreetmap/osm_deu_roads", - "type": [ - "string", - "null" - ] - }, - "format": { - "description": "\"csv\", \"xls\", \"json\" etc. would be expected to be the standard file extension for this type of resource. When you upload your data to the OEP, in the shown metadata string, the format will be changed accordingly to \"PostgreSQL\", since the data there are stored in a database. Example: csv", - "type": [ - "string", - "null" - ] - }, - "encoding": { - "description": "Specifies the character encoding of the resource's data file. The values should be one of the \"Preferred MIME Names\" for a character encoding registered with IANA. If no value for this key is specified then the default is UTF-8. Example: UTF-8", - "type": [ - "string", - "null" - ] - }, - "schema": { - "description": "Object containing fields, primary key and for foreign keys. Describes the structure of the present data.", - "type": "object", - "properties": { - "fields": { - "description": "List of field objects.", - "type": "array", - "items": { - "description": "Field object. Every object describes a column and provides name, description, type and unit.", - "type": "object", - "properties": { - "name": { - "description": "Name string unique within its scope. Example: year", - "type": [ - "string", - "null" - ] - }, - "description": { - "description": "Free-text describing the field. Example: Reference year for which the data were collected.", - "type": [ - "string", - "null" - ] - }, - "type": { - "description": "Data type of the field. In case of a geom-column in a database, also indicate the shape and CRS. Example: geometry(Point, 4326)", - "type": [ - "string", - "null" - ] - }, - "is_about": { - "description": "Ontology URI to describe the column header", - "type": [ - "string", - "null" - ] - }, - "value_reference": { - "description": "Ontology URI for an extended description of the values in the column", - "type": [ - "string", - "null" - ] - }, - "unit": { - "description": "Unit, preferably SI-Unit, that values in this field are mapped to. If \"unit\" doesn't apply to a field, use \"null\". Example: MW", - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "primaryKey": { - "description": "A primary key is a field or set of fields that uniquely identifies each row in the table. It's recorded as a list of strings, since it is possible to define the primary key as made up of several columns. Example: id", - "type": "array", - "items": { - "type": [ - "string", - "null" - ] - } - }, - "foreignKeys": { - "description": "List of foreign keys.", - "type": "array", - "items": { - "description": "A foreign key is a field that refers to a column in another table.", - "type": "object", - "properties": { - "fields": { - "description": "The column (as list of items) in the table that is constrained by the foreign key. Example: version", - "type": "array", - "items": { - "type": [ - "string", - "null" - ] - } - }, - "reference": { - "description": "The reference to the foreign table.", - "type": "object", - "properties": { - "resource": { - "description": "The foreign resource (table). Example: schema.table", - "type": [ - "string", - "null" - ] - }, - "fields": { - "description": "The foreign resource column. List of fields. Example: version", - "type": "array", - "items": { - "type": [ - "string", - "null" - ] - } - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - } - }, - "additionalProperties": false - }, - "dialect": { - "description": "Object. A CSV Dialect defines a simple format to describe the various dialects of CSV files in a language agnostic manner. In case of a database, the values in the containing fields are \"null\".", - "type": "object", - "properties": { - "delimiter": { - "description": "Specifies the character sequence which should separate fields (aka columns). Common characters are \",\" (comma), \".\" (point) and \"\t\" (tab). Example: ,", - "type": [ - "string", - "null" - ] - }, - "decimalSeparator": { - "description": "Symbol used to separate the integer part from the fractional part of a number written in decimal form. Depending on language and region this symbol can be \".\" or \",\". Example: .", - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "review": { - "description": "Data uploaded through the OEP needs to go through review. The review will cover the areas described here: https://github.com/OpenEnergyPlatform/data-preprocessing/wiki and carried out by a team of the platform. The review itself is documented at the specified path and a badge is rewarded with regards to completeness.", - "type": "object", - "properties": { - "path": { - "description": "A URL or path string, that should be a permanent http(s) address directly linking to the documented review. Example: https://www.example.com", - "type": [ - "string", - "null" - ] - }, - "badge": { - "description": "A badge of either Bronze, Silver, Gold or Platinum is used to label the given metadata based on its quality. Example: Platinum", - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - }, - "metaMetadata": { - "description": "Object. Description about the metadata themselves, their format, version and license. These fields should already be provided when you’re filling out your metadata.", - "type": "object", - "properties": { - "metadataVersion": { - "description": "Type and version number of the metadata. Example: OEP-1.5", - "type": [ - "string", - "null" - ] - }, - "metadataLicense": { - "description": "Object describing the license of the provided metadata.", - "type": "object", - "properties": { - "name": { - "description": "SPDX identifier. Example: CC0-1.0", - "type": [ - "string", - "null" - ] - }, - "title": { - "description": "Official (human readable) license title. Example: Creative Commons Zero v1.0 Universal", - "type": [ - "string", - "null" - ] - }, - "path": { - "description": "Url or path string, that is a fully qualified HTTP address. Example: https://creativecommons.org/publicdomain/zero/1.0/", - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - "_comment": { - "description": "Object. The “_comment”-section is used as a self-description of the final metadata-file. It is text, intended for humans and can include a link to the metadata documentation(s), required value formats and similar remarks. The comment section has no fix structure or mandatory values, but a useful self-description, similar to the one depicted here, is encouraged.", - "type": "object", - "properties": { - "metadata": { - "description": "Reference to the metadata documentation in use. Example: Metadata documentation and explanation (https://github.com/OpenEnergyPlatform/organisation/wiki/metadata)", - "type": [ - "string", - "null" - ] - }, - "dates": { - "description": "Comment on data/time format. Example: Dates and time must follow the ISO8601 including time zone (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss±hh)", - "type": [ - "string", - "null" - ] - }, - "units": { - "description": "Comment on units. Example: If you must use units in cells (which is discouraged), leave a space between numbers and units (100 m)", - "type": [ - "string", - "null" - ] - }, - "languages": { - "description": "Comment on language format. Example: Languages must follow the IETF (BCP47) format (en-GB, en-US, de-DE)", - "type": [ - "string", - "null" - ] - }, - "licenses": { - "description": "Reference to license format. Example: License name must follow the SPDX License List (https://spdx.org/licenses/)", - "type": [ - "string", - "null" - ] - }, - "review": { - "description": "Reference to review documentation. Example: Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/wiki)", - "type": [ - "string", - "null" - ] - }, - "null": { - "description": "Feel free to add more descriptive comments. Like \"null\". Example: If a field is not applicable just enter \"null\"", - "type": [ - "string", - "null" - ] - }, - "todo": { - "description": "If an applicable value is not yet available and will be inserted later on use: 'todo' ", - "type": [ - "string", - "null" - ] - } - } - } - }, - "additionalProperties": false -} \ No newline at end of file diff --git a/metadata/v10/v150/template.json.license b/metadata/v10/v150/template.json.license new file mode 100644 index 00000000..38af0f3f --- /dev/null +++ b/metadata/v10/v150/template.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/v10/v150/template.py b/metadata/v10/v150/template.py index f584abe1..db25c07a 100644 --- a/metadata/v10/v150/template.py +++ b/metadata/v10/v150/template.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + import json import os diff --git a/metadata/v10/v151/README.md b/metadata/v10/v151/README.md index 161336f9..b675bfb4 100644 --- a/metadata/v10/v151/README.md +++ b/metadata/v10/v151/README.md @@ -1,3 +1,11 @@ + + OpenEnergyMetadata OpenEnergyPlatform diff --git a/metadata/v10/v151/context.json.license b/metadata/v10/v151/context.json.license new file mode 100644 index 00000000..38af0f3f --- /dev/null +++ b/metadata/v10/v151/context.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/v10/v151/example.json.license b/metadata/v10/v151/example.json.license new file mode 100644 index 00000000..38af0f3f --- /dev/null +++ b/metadata/v10/v151/example.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/v10/v151/example.py b/metadata/v10/v151/example.py index 5058e7a9..20ca3ad9 100644 --- a/metadata/v10/v151/example.py +++ b/metadata/v10/v151/example.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + import json import os diff --git a/metadata/v10/v151/metadata_key_description.md b/metadata/v10/v151/metadata_key_description.md index 46bc7680..96b4b055 100644 --- a/metadata/v10/v151/metadata_key_description.md +++ b/metadata/v10/v151/metadata_key_description.md @@ -1,3 +1,11 @@ + + # OEMetadata - Key Description This pages describes the key of **OEMetadata version 1.5.1.**
diff --git a/metadata/v10/v151/schema.json.license b/metadata/v10/v151/schema.json.license new file mode 100644 index 00000000..38af0f3f --- /dev/null +++ b/metadata/v10/v151/schema.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/v10/v151/schema.py b/metadata/v10/v151/schema.py index 749ba41e..2be291e9 100644 --- a/metadata/v10/v151/schema.py +++ b/metadata/v10/v151/schema.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + import json import os diff --git a/metadata/v10/v151/template.json.license b/metadata/v10/v151/template.json.license new file mode 100644 index 00000000..38af0f3f --- /dev/null +++ b/metadata/v10/v151/template.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/v10/v151/template.py b/metadata/v10/v151/template.py index 16da240a..f2430967 100644 --- a/metadata/v10/v151/template.py +++ b/metadata/v10/v151/template.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + import json import os diff --git a/metadata/v10/v152/README.md b/metadata/v10/v152/README.md index 90d8a15d..3409d589 100644 --- a/metadata/v10/v152/README.md +++ b/metadata/v10/v152/README.md @@ -1,3 +1,11 @@ + + OpenEnergyMetadata OpenEnergyPlatform diff --git a/metadata/v10/v152/context.json.license b/metadata/v10/v152/context.json.license new file mode 100644 index 00000000..38af0f3f --- /dev/null +++ b/metadata/v10/v152/context.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/v10/v152/example.json.license b/metadata/v10/v152/example.json.license new file mode 100644 index 00000000..38af0f3f --- /dev/null +++ b/metadata/v10/v152/example.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/v10/v152/example.py b/metadata/v10/v152/example.py index 29b5852a..a49697ab 100644 --- a/metadata/v10/v152/example.py +++ b/metadata/v10/v152/example.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + import json import os diff --git a/metadata/v10/v152/metadata_key_description.md b/metadata/v10/v152/metadata_key_description.md index f380dabe..75b4dd7e 100644 --- a/metadata/v10/v152/metadata_key_description.md +++ b/metadata/v10/v152/metadata_key_description.md @@ -1,3 +1,11 @@ + + # OEMetadata - Key Description This pages describes the key of **OEMetadata version 1.5.2 .**
diff --git a/metadata/v10/v152/schema.json.license b/metadata/v10/v152/schema.json.license new file mode 100644 index 00000000..38af0f3f --- /dev/null +++ b/metadata/v10/v152/schema.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/v10/v152/schema.py b/metadata/v10/v152/schema.py index fe0f567f..d59d5efb 100644 --- a/metadata/v10/v152/schema.py +++ b/metadata/v10/v152/schema.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + import json import os diff --git a/metadata/v10/v152/template.json.license b/metadata/v10/v152/template.json.license new file mode 100644 index 00000000..38af0f3f --- /dev/null +++ b/metadata/v10/v152/template.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/v10/v152/template.py b/metadata/v10/v152/template.py index 859f17ef..7d646399 100644 --- a/metadata/v10/v152/template.py +++ b/metadata/v10/v152/template.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + import json import os diff --git a/metadata/v10/v160/README.md b/metadata/v10/v160/README.md index 54abee80..0d7473f0 100644 --- a/metadata/v10/v160/README.md +++ b/metadata/v10/v160/README.md @@ -1,3 +1,11 @@ + + OpenEnergyMetadata OpenEnergyPlatform diff --git a/metadata/v10/v160/context.json.license b/metadata/v10/v160/context.json.license new file mode 100644 index 00000000..38af0f3f --- /dev/null +++ b/metadata/v10/v160/context.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/v10/v160/example.json.license b/metadata/v10/v160/example.json.license new file mode 100644 index 00000000..38af0f3f --- /dev/null +++ b/metadata/v10/v160/example.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/v10/v160/example.py b/metadata/v10/v160/example.py index f42bf01e..4dcc38fe 100644 --- a/metadata/v10/v160/example.py +++ b/metadata/v10/v160/example.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + import json import os diff --git a/metadata/v10/v160/metadata_key_description.md b/metadata/v10/v160/metadata_key_description.md index a32cd9ef..543bf603 100644 --- a/metadata/v10/v160/metadata_key_description.md +++ b/metadata/v10/v160/metadata_key_description.md @@ -1,3 +1,11 @@ + + # OEMetadata - Key Description This pages describes the key of **OEMetadata version 1.6.0 .**
diff --git a/metadata/v10/v160/schema.json.license b/metadata/v10/v160/schema.json.license new file mode 100644 index 00000000..38af0f3f --- /dev/null +++ b/metadata/v10/v160/schema.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/v10/v160/schema.py b/metadata/v10/v160/schema.py index 9520533b..e732f552 100644 --- a/metadata/v10/v160/schema.py +++ b/metadata/v10/v160/schema.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + import json import os diff --git a/metadata/v10/v160/template.json.license b/metadata/v10/v160/template.json.license new file mode 100644 index 00000000..38af0f3f --- /dev/null +++ b/metadata/v10/v160/template.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/v10/v160/template.py b/metadata/v10/v160/template.py index 2c418fe7..c0ea7a97 100644 --- a/metadata/v10/v160/template.py +++ b/metadata/v10/v160/template.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + import json import os diff --git a/metadata/v20/v20/README.md b/metadata/v20/v20/README.md index 22aa875e..8faf9ab0 100644 --- a/metadata/v20/v20/README.md +++ b/metadata/v20/v20/README.md @@ -1,3 +1,10 @@ + + OpenEnergyMetadata OpenEnergyPlatform OpenEnergyMetadata diff --git a/metadata/v20/v20/build_source/README.md b/metadata/v20/v20/build_source/README.md index 1c8b89dc..edd69676 100644 --- a/metadata/v20/v20/build_source/README.md +++ b/metadata/v20/v20/build_source/README.md @@ -1,39 +1,52 @@ -# Oemetadata build tooling + -Over the years it also became an constant issue to keep all parts of the release consistent with all changes made to the schema.json. The tooling enables developers to only edit the schema.json and then generate the relevant example and template JSON files based on the OEMetaData specification and the example values available as part of the schema.json. +# OEMetadata Build Source + +The OEMetadata uses the [JSON Schema](https://json-schema.org/) specification +to define the structure of the metadata.
+It offers the possibility to make the `schema.json` more modular.
+For better maintenance the file is split into separate files.
+The `schema_structure.json` contains the overall pattern of the structure. ## Structure -The structure of the OEMetaData release contents changed a bit. While the known schema, example and template json and python files are still available the new directory 'build_source' is now also part of each release. It contains two sub directories: `build_source/schemas/` includes the schema parts, if you want to extend the OEMetaData specification this is the directory you should maintain. The `build_source/scripts/` implements the tooling. There are 3 scripts for schema ref resolve and schema, example and template JSON file generation. The settings script is used to share common information across python modules, in this case it includes mainly the path´s. +The directory `build_source` contains two parts: -## Usage +### Schemas `build_source/schemas/` + +The schemas are the core of the OEMetadata specification.
+They are separated by category and follow the logic of OEMetadata structure. -Using bash terminal on wsl ubuntu distribution with Python >3.8 installed -Create a python3 environment. +### Scripts `build_source/scripts/` - #assuming you are currently in the oemetadata base directory. +- `create_schema.py` Creates the complete `schema.json` from `schemas` +- `create_template.py` Creates the `template.json` from `schema.json` +- `create_example.py` Creates the `example.json` from `schema.json` + +## Usage + +Create a python3 environment + + cd ../oemetadata/ python3 -m venv env -Install the requirements. +Install the requirements source env/bin/activate pip install -r requirements.txt -Navigate to the tooling directory to ease usage and run the tooling as python script. +Create the OEMetadata json schema from schemas - #assuming you are currently in the oemetadata base directory. - cd metadata/v20/build_source/scripts/ - # generate the oemetadata json schema based on json schemas in the schemas directory - python metadata/v20/build_source/scripts/resolve_schema_refs.py - # use option --debug to show additional logging information - python metadata/v20/build_source/scripts/resolve_schema_refs.py --debug + cd metadata/v2/v20/build_source/scripts/ + python metadata/v2/v20/build_source/scripts/create_schema.py -Generate the example and template +Create the OEMetadata template and example from json schema - python metadata/v20/build_source/scripts/generate_example_from_schema.py - python metadata/v20/build_source/scripts/generate_template_from_schema.py - - + python metadata/v2/v20/build_source/scripts/create_example_from_schema.py + python metadata/v2/v20/build_source/scripts/create_template_from_schema.py diff --git a/metadata/v20/v20/build_source/schema_structure.json.license b/metadata/v20/v20/build_source/schema_structure.json.license new file mode 100644 index 00000000..38af0f3f --- /dev/null +++ b/metadata/v20/v20/build_source/schema_structure.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/v20/v20/build_source/schemas/fields.json b/metadata/v20/v20/build_source/schemas/fields.json index 73f7adde..c6e5f518 100644 --- a/metadata/v20/v20/build_source/schemas/fields.json +++ b/metadata/v20/v20/build_source/schemas/fields.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v20/v20/fields.json", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v20/v20/build_source/schemas/fields.json", "type": "object", "properties": { "type": { diff --git a/metadata/v20/v20/build_source/schemas/licenses.json b/metadata/v20/v20/build_source/schemas/licenses.json index bfbc928b..94f33c62 100644 --- a/metadata/v20/v20/build_source/schemas/licenses.json +++ b/metadata/v20/v20/build_source/schemas/licenses.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v20/v20/licenses.json", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v20/v20/build_source/schemas/licenses.json", "type": "object", "properties": { "licenses": { diff --git a/metadata/v20/v20/build_source/schemas/meta.json b/metadata/v20/v20/build_source/schemas/meta.json index 675a36d7..d4407ebc 100644 --- a/metadata/v20/v20/build_source/schemas/meta.json +++ b/metadata/v20/v20/build_source/schemas/meta.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v20/v20/meta.json", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v20/v20/build_source/schemas/meta.json", "type": "object", "properties": { "metaMetadata": { diff --git a/metadata/v20/v20/build_source/schemas/provenance.json b/metadata/v20/v20/build_source/schemas/provenance.json index 53681279..e7cdb31c 100644 --- a/metadata/v20/v20/build_source/schemas/provenance.json +++ b/metadata/v20/v20/build_source/schemas/provenance.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v20/v20/provenance.json", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v20/v20/build_source/schemas/provenance.json", "type": "object", "properties": { "contributors": { diff --git a/metadata/v20/v20/build_source/schemas/review.json b/metadata/v20/v20/build_source/schemas/review.json index 6dad0d92..182cc95f 100644 --- a/metadata/v20/v20/build_source/schemas/review.json +++ b/metadata/v20/v20/build_source/schemas/review.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v20/v20/review.json", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v20/v20/build_source/schemas/review.json", "type": "object", "properties": { "review": { diff --git a/metadata/v20/v20/build_source/schemas/sources.json b/metadata/v20/v20/build_source/schemas/sources.json index f53d0c03..74e247ea 100644 --- a/metadata/v20/v20/build_source/schemas/sources.json +++ b/metadata/v20/v20/build_source/schemas/sources.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v20/v20/sources.json", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v20/v20/build_source/schemas/sources.json", "type": "object", "properties": { "sources": { diff --git a/metadata/v20/v20/build_source/schemas/spatial.json b/metadata/v20/v20/build_source/schemas/spatial.json index 51a4bd16..1a5447f6 100644 --- a/metadata/v20/v20/build_source/schemas/spatial.json +++ b/metadata/v20/v20/build_source/schemas/spatial.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v20/v20/spatial.json", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v20/v20/build_source/schemas/spatial.json", "type": "object", "properties": { "spatial": { diff --git a/metadata/v20/v20/build_source/scripts/generate_example_from_schema.py b/metadata/v20/v20/build_source/scripts/generate_example_from_schema.py index 9c152802..7f86ba6b 100644 --- a/metadata/v20/v20/build_source/scripts/generate_example_from_schema.py +++ b/metadata/v20/v20/build_source/scripts/generate_example_from_schema.py @@ -1,18 +1,21 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + """ -Title: create example from json schema -Description: Create example from json schema. +Title: Create example from schema +Description: Create example.json from schema.json Author: jh-RLI, Ludee Email: jonas.huber@rl-institut.de Date: 2024-05-30 Version: 1.0.0 """ -# Standard Library Imports -# import os - +# Import import json import logging import os @@ -85,52 +88,52 @@ def read_metadata_schema(filepath: str) -> Dict[str, Any]: return {} -def generate_example_old( - schema: Dict[str, Any] -) -> Union[Dict[str, Any], List[Any], str, None]: - """Generate a JSON object from the schema using the - example values provided. - - Args: - schema (Dict[str, Any]): The JSON schema. - - Returns: - Union[Dict[str, Any], List[Any], str, None]: - A JSON object generated from the schema. - """ - if "examples" in schema: - return schema["examples"] - - schema_type = schema.get("type", None) - if isinstance(schema_type, list): - schema_type = schema_type[0] - - if schema_type == "object": - example_object = {} - properties = schema.get("properties", {}) - for key, value in properties.items(): - example_object[key] = generate_example(value) - return example_object - - elif schema_type == "array": - items = schema.get("items", {}) - - # Fix: Avoid double-wrapping by checking if the generated - # example is already a list - example = generate_example(items) - - if isinstance(example, list): - return example # If it's already a list, return it directly - else: - return [example] # Otherwise, wrap it in a list - - elif schema_type == "string": - return "" - - elif schema_type == "null": - return None - - return None +# def generate_example_old( +# schema: Dict[str, Any] +# ) -> Union[Dict[str, Any], List[Any], str, None]: +# """Generate a JSON object from the schema using the +# example values provided. +# +# Args: +# schema (Dict[str, Any]): The JSON schema. +# +# Returns: +# Union[Dict[str, Any], List[Any], str, None]: +# A JSON object generated from the schema. +# """ +# if "examples" in schema: +# return schema["examples"] +# +# schema_type = schema.get("type", None) +# if isinstance(schema_type, list): +# schema_type = schema_type[0] +# +# if schema_type == "object": +# example_object = {} +# properties = schema.get("properties", {}) +# for key, value in properties.items(): +# example_object[key] = generate_example(value) +# return example_object +# +# elif schema_type == "array": +# items = schema.get("items", {}) +# +# # Fix: Avoid double-wrapping by checking if the generated +# # example is already a list +# example = generate_example(items) +# +# if isinstance(example, list): +# return example # If it's already a list, return it directly +# else: +# return [example] # Otherwise, wrap it in a list +# +# elif schema_type == "string": +# return "" +# +# elif schema_type == "null": +# return None +# +# return None def extract_examples_from_schema(schema: Dict[str, Any]) -> Union[ diff --git a/metadata/v20/v20/build_source/scripts/generate_template_from_schema.py b/metadata/v20/v20/build_source/scripts/generate_template_from_schema.py index 35f5ffca..2725586c 100644 --- a/metadata/v20/v20/build_source/scripts/generate_template_from_schema.py +++ b/metadata/v20/v20/build_source/scripts/generate_template_from_schema.py @@ -1,15 +1,22 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + """ -Title: create template from json schema -Description: Create template from json schema. +Title: Create template from schema +Description: Create template.json from schema.json. Author: jh-RLI, Ludee Email: jonas.huber@rl-institut.de Date: 2024-05-30 Version: 1.0.0 """ +# Import + import json import logging diff --git a/metadata/v20/v20/build_source/scripts/resolve_schema_refs.py b/metadata/v20/v20/build_source/scripts/resolve_schema_refs.py index ff7fae36..e6a0a004 100644 --- a/metadata/v20/v20/build_source/scripts/resolve_schema_refs.py +++ b/metadata/v20/v20/build_source/scripts/resolve_schema_refs.py @@ -1,10 +1,15 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + """ -Title: Resolve schema $ref -Description: Resolve "$ref" elements in schema.json. -Author: jh-RLI +Title: Create OEMetadata schema from schemas +Description: Resolve "$ref" elements in schema.json +Author: jh-RLI, Ludee Email: jonas.huber@rl-institut.de Date: 2024-05-30 Version: 1.0.0 @@ -12,7 +17,7 @@ requires: "pip install jsonschema referencing" Usage: Script with additional arguments --debug for more detailed output. - Requires the folder structure introduced in oemetadata v2.0.1. + Requires the folder structure introduced in OEMetadata v2.0.1. """ # Standard Library Imports diff --git a/metadata/v20/v20/build_source/scripts/settings.py b/metadata/v20/v20/build_source/scripts/settings.py index 0a107377..966b619c 100644 --- a/metadata/v20/v20/build_source/scripts/settings.py +++ b/metadata/v20/v20/build_source/scripts/settings.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + from pathlib import Path LOG_FORMAT = "%(asctime)s - %(name)s - %(levelname)s - %(message)s" diff --git a/metadata/v20/v20/context.json.license b/metadata/v20/v20/context.json.license new file mode 100644 index 00000000..38af0f3f --- /dev/null +++ b/metadata/v20/v20/context.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/v20/v20/example.json.license b/metadata/v20/v20/example.json.license new file mode 100644 index 00000000..38af0f3f --- /dev/null +++ b/metadata/v20/v20/example.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/v20/v20/example.py b/metadata/v20/v20/example.py index 6a282876..1c1d0138 100644 --- a/metadata/v20/v20/example.py +++ b/metadata/v20/v20/example.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + import json import os diff --git a/metadata/v20/v20/metadata_key_description.md b/metadata/v20/v20/metadata_key_description.md index 4faa69ef..0518943f 100644 --- a/metadata/v20/v20/metadata_key_description.md +++ b/metadata/v20/v20/metadata_key_description.md @@ -1,3 +1,10 @@ + + # OEMetadata - Key Description This pages describes the key of **OEMetadata version 2.0 .**
diff --git a/metadata/v20/v20/schema.json.license b/metadata/v20/v20/schema.json.license new file mode 100644 index 00000000..38af0f3f --- /dev/null +++ b/metadata/v20/v20/schema.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/v20/v20/schema.py b/metadata/v20/v20/schema.py index cfd58cbb..97d783c7 100644 --- a/metadata/v20/v20/schema.py +++ b/metadata/v20/v20/schema.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + import json import os diff --git a/metadata/v20/v20/template.json.license b/metadata/v20/v20/template.json.license new file mode 100644 index 00000000..38af0f3f --- /dev/null +++ b/metadata/v20/v20/template.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/v20/v20/template.py b/metadata/v20/v20/template.py index 4d03f5c0..14c5387c 100644 --- a/metadata/v20/v20/template.py +++ b/metadata/v20/v20/template.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + import json import os diff --git a/mkdocs.yml b/mkdocs.yml index 14f37848..05cc2a10 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# +# SPDX-License-Identifier: CC0-1.0 + # Project site_name: Open Energy Metadata site_url: diff --git a/tests/metadata/json_schema/draft07/test_jsonschema.py b/tests/metadata/json_schema/draft07/test_jsonschema.py index 5e491003..0fb89f6a 100644 --- a/tests/metadata/json_schema/draft07/test_jsonschema.py +++ b/tests/metadata/json_schema/draft07/test_jsonschema.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: CC0-1.0 + def test_jsonschema_should_load(): try: from metadata.json_schema.draft07.schema \ diff --git a/tests/metadata/json_schema/draft2020_12/test_jsonschema.py b/tests/metadata/json_schema/draft2020_12/test_jsonschema.py index f4d1b66a..a0b944c8 100644 --- a/tests/metadata/json_schema/draft2020_12/test_jsonschema.py +++ b/tests/metadata/json_schema/draft2020_12/test_jsonschema.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: CC0-1.0 + def test_jsonschema_should_load(): try: from metadata.json_schema.draft2020_12.schema \ diff --git a/tests/metadata/latest/test_example.py b/tests/metadata/latest/test_example.py index 11047fc1..2ba924d8 100644 --- a/tests/metadata/latest/test_example.py +++ b/tests/metadata/latest/test_example.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + def test_oemetadata_example_should_load(): try: from metadata.latest.example import OEMETADATA_LATEST_EXAMPLE diff --git a/tests/metadata/latest/test_schema.py b/tests/metadata/latest/test_schema.py index 46f1693e..98add167 100644 --- a/tests/metadata/latest/test_schema.py +++ b/tests/metadata/latest/test_schema.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + def test_oemetadata_schema_should_load(): try: from metadata.latest.schema import OEMETADATA_LATEST_SCHEMA @@ -8,12 +13,12 @@ def test_oemetadata_schema_should_load(): def test_jsonschema_should_validate_oemetadata_schema(): from jsonschema import validate, ValidationError from metadata.latest.schema import OEMETADATA_LATEST_SCHEMA - from metadata.json_schema.draft07.schema \ - import OEMETADATA_JSONSCHEMA_DRAFT07_SCHEMA + from metadata.json_schema.draft2020_12.schema \ + import OEMETADATA_JSONSCHEMA_DRAFT202012_SCHEMA try: - validate(OEMETADATA_LATEST_SCHEMA, OEMETADATA_JSONSCHEMA_DRAFT07_SCHEMA) - print("OEMetadata Schema (latest) is valid JSON Schema.") + validate(OEMETADATA_LATEST_SCHEMA, OEMETADATA_JSONSCHEMA_DRAFT202012_SCHEMA) + print("OEMetadata Schema (latest) is valid JSON Schema (Draft 2020-12).") except ValidationError as e: print("Cannot validate OEMetadata Schema with JSON Schema (latest)!", e) @@ -26,7 +31,7 @@ def get_string(s): return string.printable + s + string.printable assert get_string(OEMETADATA_LATEST_SCHEMA["$schema"]) == get_string( - "http://json-schema.org/draft-07/schema#" + "https://json-schema.org/draft/2020-12/schema" ), "Wrong schema path in OEMetadata Schema (latest)!" assert get_string(OEMETADATA_LATEST_SCHEMA["$id"]) == get_string( diff --git a/tests/metadata/latest/test_template.py b/tests/metadata/latest/test_template.py index e0eaf4a8..671fd4f5 100644 --- a/tests/metadata/latest/test_template.py +++ b/tests/metadata/latest/test_template.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + def test_oemetadata_template_should_load(): try: from metadata.latest.template import OEMETADATA_LATEST_TEMPLATE diff --git a/tests/metadata/v10/v130/test_example.py b/tests/metadata/v10/v130/test_example.py index cb2d2377..c989ed96 100644 --- a/tests/metadata/v10/v130/test_example.py +++ b/tests/metadata/v10/v130/test_example.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + def test_oemetadata_example_should_load(): try: from metadata.v10.v130.example import OEMETADATA_V130_EXAMPLE diff --git a/tests/metadata/v10/v130/test_schema.py b/tests/metadata/v10/v130/test_schema.py index b426a65d..9e30b21b 100644 --- a/tests/metadata/v10/v130/test_schema.py +++ b/tests/metadata/v10/v130/test_schema.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + def test_oemetadata_schema_should_load(): try: from metadata.v10.v130.schema import OEMETADATA_V130_SCHEMA diff --git a/tests/metadata/v10/v130/test_template.py b/tests/metadata/v10/v130/test_template.py index dbdc408a..f7749c05 100644 --- a/tests/metadata/v10/v130/test_template.py +++ b/tests/metadata/v10/v130/test_template.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + def test_oemetadata_template_should_load(): try: from metadata.v10.v130.template import OEMETADATA_V130_TEMPLATE diff --git a/tests/metadata/v10/v140/test_example.py b/tests/metadata/v10/v140/test_example.py index 6833fe97..7a937af1 100644 --- a/tests/metadata/v10/v140/test_example.py +++ b/tests/metadata/v10/v140/test_example.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + def test_oemetadata_example_should_load(): try: from metadata.v10.v140.example import OEMETADATA_V140_EXAMPLE diff --git a/tests/metadata/v10/v140/test_schema.py b/tests/metadata/v10/v140/test_schema.py index b57383df..866397fb 100644 --- a/tests/metadata/v10/v140/test_schema.py +++ b/tests/metadata/v10/v140/test_schema.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + def test_oemetadata_schema_should_load(): try: from metadata.v10.v140.schema import OEMETADATA_V140_SCHEMA diff --git a/tests/metadata/v10/v140/test_template.py b/tests/metadata/v10/v140/test_template.py index 85064c93..ce65825e 100644 --- a/tests/metadata/v10/v140/test_template.py +++ b/tests/metadata/v10/v140/test_template.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + def test_oemetadata_template_should_load(): try: from metadata.v10.v140.template import OEMETADATA_V140_TEMPLATE diff --git a/tests/metadata/v10/v141/test_example.py b/tests/metadata/v10/v141/test_example.py index 49d14e90..21418b44 100644 --- a/tests/metadata/v10/v141/test_example.py +++ b/tests/metadata/v10/v141/test_example.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + def test_oemetadata_example_should_load(): try: from metadata.v10.v141.example import OEMETADATA_V141_EXAMPLE diff --git a/tests/metadata/v10/v141/test_schema.py b/tests/metadata/v10/v141/test_schema.py index 5efe7daf..80577eac 100644 --- a/tests/metadata/v10/v141/test_schema.py +++ b/tests/metadata/v10/v141/test_schema.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + def test_oemetadata_schema_should_load(): try: from metadata.v10.v141.schema import OEMETADATA_V141_SCHEMA diff --git a/tests/metadata/v10/v141/test_template.py b/tests/metadata/v10/v141/test_template.py index 49ed3ed4..2b221e9b 100644 --- a/tests/metadata/v10/v141/test_template.py +++ b/tests/metadata/v10/v141/test_template.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + def test_oemetadata_template_should_load(): try: from metadata.v10.v141.template import OEMETADATA_V141_TEMPLATE diff --git a/tests/metadata/v10/v150/test_example.py b/tests/metadata/v10/v150/test_example.py index 9900c339..b3316248 100644 --- a/tests/metadata/v10/v150/test_example.py +++ b/tests/metadata/v10/v150/test_example.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + def test_oemetadata_example_should_load(): try: from metadata.v10.v150.example import OEMETADATA_V150_EXAMPLE diff --git a/tests/metadata/v10/v150/test_schema.py b/tests/metadata/v10/v150/test_schema.py index 81c73ec5..27413449 100644 --- a/tests/metadata/v10/v150/test_schema.py +++ b/tests/metadata/v10/v150/test_schema.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + def test_oemetadata_schema_should_load(): try: from metadata.v10.v150.schema import OEMETADATA_V150_SCHEMA diff --git a/tests/metadata/v10/v150/test_template.py b/tests/metadata/v10/v150/test_template.py index e11c411b..3976e05d 100644 --- a/tests/metadata/v10/v150/test_template.py +++ b/tests/metadata/v10/v150/test_template.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + def test_oemetadata_template_should_load(): try: from metadata.v10.v150.template import OEMETADATA_V150_TEMPLATE diff --git a/tests/metadata/v10/v151/test_example.py b/tests/metadata/v10/v151/test_example.py index 38662abd..40e446c1 100644 --- a/tests/metadata/v10/v151/test_example.py +++ b/tests/metadata/v10/v151/test_example.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + def test_oemetadata_example_should_load(): try: from metadata.v10.v151.example import OEMETADATA_V151_EXAMPLE diff --git a/tests/metadata/v10/v151/test_schema.py b/tests/metadata/v10/v151/test_schema.py index 09de4d05..82217de9 100644 --- a/tests/metadata/v10/v151/test_schema.py +++ b/tests/metadata/v10/v151/test_schema.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + def test_oemetadata_schema_should_load(): try: from metadata.v10.v151.schema import OEMETADATA_V151_SCHEMA diff --git a/tests/metadata/v10/v151/test_template.py b/tests/metadata/v10/v151/test_template.py index fcbfa519..d06fa498 100644 --- a/tests/metadata/v10/v151/test_template.py +++ b/tests/metadata/v10/v151/test_template.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + def test_oemetadata_template_should_load(): try: from metadata.v10.v151.template import OEMETADATA_V151_TEMPLATE diff --git a/tests/metadata/v10/v152/test_example.py b/tests/metadata/v10/v152/test_example.py index 536874c7..3faaf1a9 100644 --- a/tests/metadata/v10/v152/test_example.py +++ b/tests/metadata/v10/v152/test_example.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + def test_oemetadata_example_should_load(): try: from metadata.v10.v152.example import OEMETADATA_V152_EXAMPLE diff --git a/tests/metadata/v10/v152/test_schema.py b/tests/metadata/v10/v152/test_schema.py index ddd2481b..30384d06 100644 --- a/tests/metadata/v10/v152/test_schema.py +++ b/tests/metadata/v10/v152/test_schema.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + def test_oemetadata_schema_should_load(): try: from metadata.v10.v152.schema import OEMETADATA_V152_SCHEMA diff --git a/tests/metadata/v10/v152/test_template.py b/tests/metadata/v10/v152/test_template.py index 1a8291b0..865c6372 100644 --- a/tests/metadata/v10/v152/test_template.py +++ b/tests/metadata/v10/v152/test_template.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + def test_oemetadata_template_should_load(): try: from metadata.v10.v152.template import OEMETADATA_V152_TEMPLATE diff --git a/tests/metadata/v10/v160/test_example.py b/tests/metadata/v10/v160/test_example.py index ecf2b63b..c19e9beb 100644 --- a/tests/metadata/v10/v160/test_example.py +++ b/tests/metadata/v10/v160/test_example.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT def test_oemetadata_example_should_load(): try: from metadata.v10.v160.example import OEMETADATA_V160_EXAMPLE diff --git a/tests/metadata/v10/v160/test_schema.py b/tests/metadata/v10/v160/test_schema.py index 96422cf2..03aca020 100644 --- a/tests/metadata/v10/v160/test_schema.py +++ b/tests/metadata/v10/v160/test_schema.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT def test_oemetadata_schema_should_load(): try: from metadata.v10.v160.schema import OEMETADATA_V160_SCHEMA diff --git a/tests/metadata/v10/v160/test_template.py b/tests/metadata/v10/v160/test_template.py index cf8827b8..12a79767 100644 --- a/tests/metadata/v10/v160/test_template.py +++ b/tests/metadata/v10/v160/test_template.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT def test_oemetadata_template_should_load(): try: from metadata.v10.v160.template import OEMETADATA_V160_TEMPLATE diff --git a/tests/metadata/v20/v20/test_example.py b/tests/metadata/v20/v20/test_example.py index 0f9206c1..31ae1e25 100644 --- a/tests/metadata/v20/v20/test_example.py +++ b/tests/metadata/v20/v20/test_example.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + def test_oemetadata_example_should_load(): try: from metadata.v20.v20.example import OEMETADATA_V20_EXAMPLE diff --git a/tests/metadata/v20/v20/test_schema.py b/tests/metadata/v20/v20/test_schema.py index 3442b7ca..01c86c8a 100644 --- a/tests/metadata/v20/v20/test_schema.py +++ b/tests/metadata/v20/v20/test_schema.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + def test_oemetadata_schema_should_load(): try: from metadata.v20.v20.schema import OEMETADATA_V20_SCHEMA diff --git a/tests/metadata/v20/v20/test_template.py b/tests/metadata/v20/v20/test_template.py index 529695b2..c052b073 100644 --- a/tests/metadata/v20/v20/test_template.py +++ b/tests/metadata/v20/v20/test_template.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + def test_oemetadata_template_should_load(): try: from metadata.v20.v20.template import OEMETADATA_V20_TEMPLATE