diff --git a/.auto-changelog b/.auto-changelog index 67bf500..f09eede 100644 --- a/.auto-changelog +++ b/.auto-changelog @@ -1,13 +1,11 @@ { "output": "CHANGELOG.md", "template": ".auto-changelog-template.hbs", - "tagPrefix": "synthesis-workflow-v", "commitLimit": false, "backfillLimit": false, "ignoreCommitPattern": "^Release:? [0-9]+\\.[0-9]+\\.[0-9]+( ?\\(#[0-9]+\\))?$|^Update CHANGELOG.*|.*\\[skip-changelog\\].*|^\\[pre-commit.ci\\]|^\\(dependabot\\) .*", - "commitUrl": "https://bbpgitlab.epfl.ch/neuromath/synthesis-workflow/commit/{id}", - "issueUrl": "https://bbpgitlab.epfl.ch/neuromath/synthesis-workflow/issues/{id}", - "mergeUrl": "https://bbpgitlab.epfl.ch/neuromath/synthesis-workflow/merge_requests/{id}", - "compareUrl": "https://bbpgitlab.epfl.ch/neuromath/synthesis-workflow/compare/{from}...{to}", - "startingVersion": "0.1.1" + "commitUrl": "https://github.com/BlueBrain/synthesis-workflow/commit/{id}", + "issueUrl": "https://github.com/BlueBrain/synthesis-workflow/issues/{id}", + "mergeUrl": "https://github.com/BlueBrain/synthesis-workflow/pull/{id}", + "compareUrl": "https://github.com/BlueBrain/synthesis-workflow/compare/{from}..{to}" } diff --git a/.codespellrc b/.codespellrc index bfea5b8..4ee856e 100644 --- a/.codespellrc +++ b/.codespellrc @@ -1,3 +1,2 @@ [codespell] skip = .git/* -ignore-regex = @groupes.epfl.ch|hist|INT|INH diff --git a/.copier-answers.yml b/.copier-answers.yml index dc7185e..3f23a7c 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,26 +1,26 @@ # Changes here will be overwritten by Copier -_commit: 0.1.63 +_commit: 0.1.65 _src_path: git@bbpgitlab.epfl.ch:neuromath/python-template.git -author_email: bbp-ou-cells@groupes.epfl.ch -author_name: bbp-ou-cells -copyright_license: BBP-internal-confidential +author_email: '' +author_name: Blue Brain Project, EPFL +copyright_license: Apache License 2.0 copyright_year: '2022' distribution_name: synthesis-workflow -download_url: https://bbpgitlab.epfl.ch/neuromath/synthesis-workflow +download_url: https://github.com/BlueBrain/synthesis-workflow init_git: false -maintainer: '' +maintainer: Adrien Berchet package_name: synthesis_workflow project_description: Workflow used for synthesis and its validation. project_name: Synthesis Workflow -project_url: https://bbpteam.epfl.ch/documentation/projects/synthesis-workflow +project_url: https://synthesis_workflow.readthedocs.io repository_name: synthesis-workflow -repository_namespace: neuromath -repository_provider: gitlab +repository_namespace: BlueBrain +repository_provider: github setup_codeql: false -ssh_url: git@bbpgitlab.epfl.ch:neuromath/synthesis-workflow.git -team_name: neuromath -tracker_url: https://bbpteam.epfl.ch/project/issues/projects/CELLS/issues +ssh_url: git@github.com:BlueBrain/synthesis-workflow.git +team_name: '' +tracker_url: https://github.com/BlueBrain/synthesis-workflow/issues use_pyproject_toml: false version: 0.1.2.dev1 diff --git a/.coveragerc b/.coveragerc index e06e37b..6079959 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,11 +1,6 @@ [paths] source_paths = - src/synthesis_workflow + synthesis_workflow */site-packages/synthesis_workflow - */synthesis_workflow/src/synthesis_workflow - */synthesis-workflow/src/synthesis_workflow - -source_morphval = - src/morphval - */site-packages/morphval - */synthesis-workflow/src/morphval + */synthesis_workflow/synthesis_workflow + */synthesis-workflow/synthesis_workflow diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml new file mode 100644 index 0000000..1921990 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -0,0 +1,114 @@ +# docs https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms +# https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema + +name: Create a bug report regarding Synthesis Workflow runtime behavior +description: Errors and regression reports with complete reproducing test cases and/or stack traces. +labels: [bug] +title: "[Bug report] " +body: + - type: markdown + attributes: + value: " +Thanks for taking the time to fill out this bug report! + + +Before submitting, make sure you search in the [issue list](https://github.com/BlueBrain/synthesis-workflow/issues) that a similar issue was not already reported. +If it is not the case, please read the following guidelines. + +### GUIDELINES FOR REPORTING BUGS + +Bug reports that are not properly formulated and formatted or without enough details can be very hard for us to understand and fix. +In order to ensure we can help you fixing your bug, please follow these guidelines. + + +Your reports must include the following features: + +1. **succinct description** of the problem - typically a line or two at most. + +2. **succinct, dependency-free code** which reproduces the problem, otherwise known as a [Minimal, Complete, and Verifiable](https://stackoverflow.com/help/mcve) example. + IF YOU DO NOT HAVE A COMPLETE, RUNNABLE TEST CASE WRITTEN DIRECTLY IN THE TEXTAREA BELOW, YOUR ISSUE MAY BE CLOSED. + +3. **complete stack traces for all errors** - please avoid screenshots, use formatted text inside issues. + +4. other relevant things as applicable: **dependencies**, **comparative performance timings** for performance issues, etc. +" + + - type: textarea + attributes: + label: Describe the bug + description: A clear and concise description of what the bug is. + validations: + required: true + + - type: input + id: relevant_documentation + attributes: + label: Optional link from https://synthesis_workflow.readthedocs.io which documents the behavior that is expected + description: " +Please make sure the behavior you are seeing is definitely in contradiction to what's documented as the correct behavior. +" + validations: + required: false + + - type: textarea + attributes: + label: To Reproduce + description: " +Provide your [Minimal, Complete, and Verifiable](https://stackoverflow.com/help/mcve) example here." + placeholder: "# Insert code here (text area already python formatted)" + render: Python + validations: + required: true + + - type: textarea + attributes: + label: Error + description: " +Provide the complete text of any errors received **including the complete stack trace**. +If the message is a warning, run your program with the ``-Werror`` flag: ``python -Werror myprogram.py`` +" + placeholder: "# Copy the complete stack trace and error message here (text area already formatted for Python backtrace)" + render: Python traceback + validations: + required: true + + - type: textarea + attributes: + label: Additional context + description: Add any other context about the problem here. + validations: + required: false + + - type: input + id: package_version + attributes: + label: synthesis_workflow Version in Use + description: e.g. 1.4.42, 2.0.2, etc or commit hash + validations: + required: true + + - type: input + id: python_version + attributes: + label: Python Version + description: Assumes cpython unless otherwise stated, e.g. 3.10, 3.11, pypy + validations: + required: true + + - type: dropdown + id: os + attributes: + label: Operating system + description: Check all that apply + multiple: true + options: + - Linux + - MacOS + - Windows + - Other + validations: + required: true + + - type: markdown + attributes: + value: "### Thanks! Have a nice day!" diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..0086358 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: true diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml new file mode 100644 index 0000000..1b4267d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -0,0 +1,56 @@ +# docs https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms +# https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema + +name: Request a new use case +description: Support for new features +labels: [enhancement] +title: "[Feature request] " +body: + - type: markdown + attributes: + value: " +Thanks for taking the time to fill out this feature request! + + +Before submitting, make sure the feature does not already exist in the [documentation](https://synthesis_workflow.readthedocs.io) and that you searched in the [issue list](https://github.com/BlueBrain/synthesis-workflow/issues) that a similar feature request has not already been reported. +If it is not the case, please read the following guidelines. + +### GUIDELINES FOR REQUESTING HELP + +Feature requests that are not properly formulated and formatted or without enough details can be very hard for us to understand. +In order to ensure we can help you, please follow these guidelines. + + +Your requests must include the following features: + +1. **succinct description** of the feature - typically a line or two at most to describe what the new feature would do. + +2. **succinct, dependency-free code** which shows how you would like to use this feature, otherwise known as a [Minimal, Complete, and Verifiable](https://stackoverflow.com/help/mcve) example. + +3. Why do you need this feature? What would be the use cases? +" + + - type: textarea + attributes: + label: Describe the feature + description: A clear and concise description of what the feature would consist in. + validations: + required: true + + - type: textarea + attributes: + label: Example Use + description: Provide a clear example of what the usage of this feature would look like. + validations: + required: true + + - type: textarea + attributes: + label: Use cases + description: Add as much information as possible about the use cases here. + validations: + required: true + + - type: markdown + attributes: + value: "### Thanks! Have a nice day!" diff --git a/.github/ISSUE_TEMPLATE/how_to_use.yaml b/.github/ISSUE_TEMPLATE/how_to_use.yaml new file mode 100644 index 0000000..a6bc893 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/how_to_use.yaml @@ -0,0 +1,91 @@ +# docs https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms +# https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema + +name: Ask for help about Synthesis Workflow +description: Questions about synthesis_workflow features. +labels: [how to use] +title: "[How to use] " +body: + - type: markdown + attributes: + value: " +Thanks for using this package and taking the time to fill out this help request! + + +Before submitting, make sure you read the [documentation](https://synthesis_workflow.readthedocs.io) carefully. +If you still have a question, you should search in the [issue list](https://github.com/BlueBrain/synthesis-workflow/issues) that a similar issue has not already been reported, you might find your answer there. +If it is not the case, please read the following guidelines. + +### GUIDELINES FOR REQUESTING HELP + +Questions that are not properly formulated and formatted or without enough details can be very hard for us to understand. +In order to ensure we can help you, please follow these guidelines. + + +Your requests must include the following features: + +1. **succinct description** of the problem - typically a line or two at most to describe what you want to achieve. + +2. **succinct, dependency-free code** which shows what you tried to do, otherwise known as a [Minimal, Complete, and Verifiable Example](https://stackoverflow.com/help/mcve). + +3. **expected results** + +4. **complete stack traces for all errors** if you have any - please avoid screenshots, use formatted text inside issues. + +5. other relevant things: **dependencies**, **operating system**, **comparative performance timings** for performance issues. +" + + - type: textarea + attributes: + label: Describe the problem + description: A clear and concise description of what you want to achieve. + validations: + required: true + + - type: textarea + attributes: + label: Show what you tried to do. + description: " +Provide your [Minimal, Complete, and Verifiable Example](https://stackoverflow.com/help/mcve) here." + placeholder: "# Insert code here (text area already python formatted)" + render: Python + validations: + required: true + + - type: textarea + attributes: + label: Describe what you expected. + description: A clear and concise description of what you which result you expected by doing this. + validations: + required: true + + - type: textarea + attributes: + label: Error + description: " +If you are facing an arror, provide the complete text of any errors received **including the complete stack trace**. +If the message is a warning, run your program with the ``-Werror`` flag: ``python -Werror myprogram.py`` +" + placeholder: "# Copy the complete stack trace and error message here (text area already formatted for Python backtrace)" + render: Python traceback + validations: + required: false + + - type: textarea + attributes: + label: Additional context + description: Add any other context about the problem here. + validations: + required: false + + - type: input + id: package_version + attributes: + label: synthesis_workflow Version in Use + description: e.g. 1.4.42, 2.0.2, etc or commit hash + validations: + required: true + + - type: markdown + attributes: + value: "### Thanks! Have a nice day!" diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..a6aa10a --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,16 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + # Configure check for outdated GitHub Actions actions in workflows. + # See: https://docs.github.com/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot + - package-ecosystem: "github-actions" + directory: "/" # Check the repository's workflows under /.github/workflows/ + schedule: + interval: "weekly" + commit-message: + # Prefix all commit messages with "CI(dependabot): " + prefix: "CI(dependabot): " diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..a3728e0 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,24 @@ + + + +### Description + + +### Checklist + + +This pull request is: + +- [ ] A documentation / typographical error fix + - Good to go, no issue or tests are needed +- [ ] A short code fix + - [ ] Please include: `Fixes: #` in the description if it solves an existing issue + (which must include a complete example of the issue). + - [ ] Please include tests that fail with the `main` branch and pass with the provided fix. +- [ ] A new feature implementation or update an existing feature + - [ ] Please include: `Fixes: #` in the description if it solves an existing issue + (which must include a complete example of the feature). + - [ ] Please include tests that cover every lines of the new/updated feature. + - [ ] Please update the documentation to describe the new/updated feature. + + diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml new file mode 100644 index 0000000..14a08fc --- /dev/null +++ b/.github/workflows/commitlint.yml @@ -0,0 +1,21 @@ +name: Check PR titles using commitlint + +on: + pull_request: + types: [edited, opened, reopened, synchronize] + +jobs: + check-pr-title: + name: Check PR title + runs-on: ubuntu-latest + env: + PR_TITLE: ${{ github.event.pull_request.title }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '20' + - run: npm install -g --force commitlint @commitlint/cli commitlint-plugin-cleanfeet + - run: npm install conventional-changelog-conventionalcommits + - run: touch .git/COMMIT_EDITMSG + - run: echo "$PR_TITLE" | commitlint diff --git a/.github/workflows/publish-sdist.yml b/.github/workflows/publish-sdist.yml new file mode 100644 index 0000000..362a947 --- /dev/null +++ b/.github/workflows/publish-sdist.yml @@ -0,0 +1,25 @@ +name: Publish sdist tarball to PyPi + +on: + push: + tags: + - '[0-9]+.[0-9]+.[0-9]+' + +jobs: + build-n-publish: + name: Build and publish on PyPI + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.10 + uses: actions/setup-python@v5 + with: + python-version: "3.10" + - name: Build a wheel and a source tarball + run: | + pip install setuptools>=42 build setuptools_scm[toml]>=3.4 + python -m build -o dist + - name: Publish distribution package to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.github/workflows/run-tox.yml b/.github/workflows/run-tox.yml new file mode 100644 index 0000000..be0401f --- /dev/null +++ b/.github/workflows/run-tox.yml @@ -0,0 +1,88 @@ +name: Run all tox jobs using Python3 + +on: + pull_request: + push: + branches: + - main + workflow_dispatch: + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12"] + min_versions: ["min_versions", "latest_versions"] + exclude: + - min_versions: "min_versions" + include: + - python-version: "3.9" + min_versions: "min_versions" + + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Get current month + id: date + run: echo "date=$(date +'%Y-%m')" >> $GITHUB_OUTPUT + - name: Cache APT Packages + # This action should only be used when you need extra system packages + uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: graphviz + version: 1.0 + execute_install_scripts: true + - name: Cache tox and precommit environments + uses: actions/cache@v4 + with: + path: | + .tox + ~/.cache/pre-commit + key: ${{ runner.os }}-${{ matrix.python-version }}-${{ steps.date.outputs.date }}-${{ hashFiles('setup.py') }}-${{ hashFiles('.pre-commit-config.yaml') }} + - name: Register dot plugin + # This step should only be used when you need dot / graphviz + run: | + sudo dot -c + - name: Clear results in tox environments + run: | + rm -rf .tox/*/tmp + - name: Run tox with latest versions + if: ${{ matrix.min_versions == 'latest_versions' }} + run: | + python -m pip install --upgrade pip setuptools + pip install tox-gh-actions + tox + - name: Run tox with min versions + if: ${{ matrix.min_versions == 'min_versions' }} + run: | + python -m pip install --upgrade pip setuptools + pip install tox + tox run -e min_versions + - name: JUnit Report Action + uses: mikepenz/action-junit-report@v4 + if: always() # always run even if the previous step fails + with: + report_paths: 'reports/pytest-*.xml' + - name: Upload to codecov + uses: codecov/codecov-action@v4 + with: + fail_ci_if_error: false + directory: ./reports + flags: pytest + name: "synthesis-workflow-py${{ matrix.python-version }}-${{ matrix.min_versions }}" + token: ${{ secrets.CODECOV_TOKEN }} + - name: Upload test artifacts + uses: actions/upload-artifact@v4 + if: always() + with: + name: tests-${{ matrix.python-version }}-${{ matrix.min_versions }} + retention-days: 4 + path: | + .tox/py*/tmp + docs/build + reports diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 0000000..91cce21 --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,22 @@ +# .readthedocs.yml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +build: + os: ubuntu-22.04 + tools: + python: "3.11" + +sphinx: + configuration: docs/source/conf.py + fail_on_warning: true + +python: + install: + - method: pip + path: . + extra_requirements: + - docs diff --git a/AUTHORS.md b/AUTHORS.md new file mode 100644 index 0000000..814515a --- /dev/null +++ b/AUTHORS.md @@ -0,0 +1,5 @@ +# Maintainer + +Adrien Berchet + +# Contributors diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..a4ba867 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,170 @@ +# Contributing + +We would love for you to contribute to this package and help make it even better than it is today! +As a contributor, here are the guidelines we would like you to follow: +* [Issues and Bugs](#issue) +* [Feature Requests](#feature) +* [Submission Guidelines](#submit) + +## Got a question or found a bug? + +If you have a question or find a bug in the source code, you can help us by +[submitting an issue](#submit-issue) to our [GitHub Repository][github]. Even better, you can +[submit a Pull Request](#submit-pr) with a fix. + +## Missing a Feature? + +You can *request* a new feature by [submitting an issue](#submit-issue) to our +[GitHub Repository][github]. If you would like to *implement* a new feature, please submit an +issue with a proposal for your work first, to be sure that we can use it. Then +[submit a Pull Request](#submit-pr) that points to this issue. + +Please consider what kind of change it is: +* For a **Major Feature**, first open an issue and outline your proposal so that it can be +discussed. This will also allow us to better coordinate our efforts, prevent duplication of work, +and help you to craft the change so that it is successfully accepted into the project. +* **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr). + +## Submission Guidelines + +### Submitting an Issue + +Before you submit an issue, please search the issue tracker, maybe an issue for your problem +already exists and the discussion might inform you of workarounds readily available. + +We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce +and confirm it. In order to reproduce bugs we will need as much information as possible, a +[Minimal Working Example](https://stackoverflow.com/help/minimal-reproducible-example), and +preferably be in touch with you to gather information. + +### Submitting a Pull Request (PR) + +When you wish to contribute to the code base, please consider the following guidelines: +* Make a [fork](https://guides.github.com/activities/forking/) of this repository. +* Make your changes in your fork, in a new git branch: + + ```shell + git checkout -b my-fix-branch main + ``` + +* Create your patch, **including appropriate test cases** (please note that the coverage must + always be equal to 100%). +* Run the full test suite, and ensure that all tests pass (at least with one of the required + python interpreters): + + ```shell + tox + ``` + + or + + ```shell + tox -e py39 -e lint -e docs -e check-packaging + ``` + +* Commit your changes using a descriptive commit message. + + ```shell + git commit -a + ``` + + Note: the optional commit `-a` command line option will automatically **add** and **rm** edited + files. +* Push your branch to GitHub: + + ```shell + git push --set-upstream origin my-fix-branch + ``` + +* In GitHub, send a Pull Request to the `main` branch of the upstream repository of the relevant + component. +* If we suggest changes then: + * Make the required updates. + * Re-run the test suites to ensure tests are still passing. + * Rebase your branch and force push to your GitHub repository (this will update your Pull + Request): + + ```shell + git rebase main -i + git push -f + ``` + +That's it! Thank you for your contribution! + +#### After your pull request is merged + +After your pull request is merged, you can safely delete your branch and pull the changes from the +main (upstream) repository: +* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows: + + ```shell + git push origin --delete my-fix-branch + ``` + +* Check out the main branch: + + ```shell + git checkout main + ``` + +* Delete the local branch: + + ```shell + git branch -D my-fix-branch + ``` + +* Update your main with the latest upstream version: + + ```shell + git pull --ff upstream main + ``` + +### Releasing a new version + +Releasing a new version can only be done by the maintainers. + +The release process is the following: +* Checkout the main branch and ensure your local version is up to date: + + ```shell + git checkout main + git pull + ``` + +* Create a new branch locally: + + ```shell + git checkout -b release_X.Y.Z + ``` + +* Update the CHANGELOG file using auto-changelog (see https://www.npmjs.com/package/auto-changelog): + + ```shell + auto-changelog -v X.Y.Z + ``` + +* Commit and push the new changelog: + + ```shell + git commit -m "Release X.Y.Z" + git push --set-upstream origin release_X.Y.Z + ``` + +* Open a new pull request from this branch and merge it. +* Create a new release on GitHub. +* Checkout the main branch and update it: + + ```shell + git checkout main + git pull + ``` + +* Remove your local branch: + + ```shell + git branch -D release_X.Y.Z + ``` + +After these steps the CI should automatically build the wheel and push it to pypi. + +[github]: https://github.com/BlueBrain/synthesis-workflow diff --git a/LICENSE.txt b/LICENSE.txt index 3d181f2..43846d5 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,2 +1,201 @@ - Blue Brain Project Internal License - Copyright 2022 Blue Brain Project, EPFL, all rights reserved + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2022 Blue Brain Project, EPFL + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000..2570b01 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,4 @@ +comment: + layout: "diff, flags, files" + behavior: default + require_changes: true diff --git a/pyproject.toml b/pyproject.toml index e8bf1af..ff4729e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,11 @@ [build-system] requires = [ "setuptools>=45", + "setuptools_scm[toml]>=6.2", ] build-backend = "setuptools.build_meta" +[tool.setuptools_scm] [tool.black] line-length = 100