Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/cla.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CLA Assistant

on:
issue_comment:
types: [created]
pull_request_target:
types: [opened, closed, synchronize]

permissions:
actions: write
contents: write
pull-requests: write
statuses: write

env:
SIGNATURES_BRANCH: cla-signatures
SIGNATURES_PATH: signatures/version1/cla.json

jobs:
cla:
name: Contributor License Agreement
if: github.event_name == 'pull_request_target' || contains(github.event.comment.body, 'I have read the CLA Document and I hereby sign the CLA') || github.event.comment.body == 'recheck'
runs-on: ubuntu-latest
steps:
- name: Create the signatures branch and file when missing
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api "repos/$GITHUB_REPOSITORY/git/ref/heads/$SIGNATURES_BRANCH" > /dev/null 2>&1 \
|| gh api --method POST "repos/$GITHUB_REPOSITORY/git/refs" -f "ref=refs/heads/$SIGNATURES_BRANCH" -f "sha=$GITHUB_SHA"
gh api "repos/$GITHUB_REPOSITORY/contents/$SIGNATURES_PATH?ref=$SIGNATURES_BRANCH" > /dev/null 2>&1 \
|| gh api --method PUT "repos/$GITHUB_REPOSITORY/contents/$SIGNATURES_PATH" -f "branch=$SIGNATURES_BRANCH" -f "message=Create the file storing the CLA signatures" -f "content=$(printf '{ "signedContributors": [] }' | base64 -w0)"

- name: Check the agreement
uses: contributor-assistant/github-action@ca4a40a7d1004f18d9960b404b97e5f30a505a08 # v2.6.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
path-to-document: https://github.com/${{ github.repository }}/blob/main/CLA.md
path-to-signatures: ${{ env.SIGNATURES_PATH }}
branch: ${{ env.SIGNATURES_BRANCH }}
allowlist: louis-rt,louis-rt-2,*[bot]
custom-notsigned-prcomment: >-
Thank you for the pull request, I appreciate the help.
Before I can accept a contribution, I ask $you to sign the
[Contributor License Agreement](https://github.com/${{ github.repository }}/blob/main/CLA.md).
One signature covers this and every later pull request,
and it is given by posting the sentence below as a comment:
52 changes: 52 additions & 0 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Publish to PyPI

on:
release:
types: [published]

permissions:
contents: read

jobs:
build:
name: Build the distributions
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v7

- name: Install uv
uses: astral-sh/setup-uv@v10.0.1

- name: Check the release tag names the project version
run: |
version="$(uv version --short)"
test "v$version" = "$GITHUB_REF_NAME" || { echo "tag $GITHUB_REF_NAME does not name version $version" >&2; exit 1; }

- name: Build the source distribution and the wheel
run: uv build

- name: Keep the distributions for the publish job
uses: actions/upload-artifact@v7
with:
name: distributions
path: dist/

publish:
name: Publish to PyPI
needs: build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/robottraderslab-envelope
permissions:
id-token: write
steps:
- name: Download the distributions
uses: actions/download-artifact@v8
with:
name: distributions
path: dist/

- name: Publish the distributions with their attestations
uses: pypa/gh-action-pypi-publish@release/v1
27 changes: 27 additions & 0 deletions CLA.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Individual Contributor License Agreement ("Agreement")

Robot Traders OÜ (the "Company") must have on file a signed Contributor License Agreement ("CLA") from each Contributor, indicating agreement with the license terms below, to clarify the intellectual property license granted with Contributions from any person or entity. This agreement is for your protection as a Contributor as well as the protection of the Company and its users. It does not change your rights to use your own Contributions for any other purpose.

You accept and agree to the following terms and conditions for Your Contributions (present and future) that you submit to the Company. Except for the license granted herein to the Company and recipients of software distributed by the Company, You reserve all right, title, and interest in and to Your Contributions.

1. Definitions.

"You" (or "Your") shall mean the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with the Company. For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single Contributor. 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.

"Contribution" shall mean any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You to the Company for inclusion in, or documentation of, any of the products owned or managed by the Company (the "Work"). For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Company 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 Company for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by You as "Not a Contribution."

2. Grant of Copyright License. Subject to the terms and conditions of this Agreement, You hereby grant to the Company and to recipients of software distributed by the Company 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 Your Contributions and such derivative works.

3. Grant of Patent License. Subject to the terms and conditions of this Agreement, You hereby grant to the Company and to recipients of software distributed by the Company 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 You that are necessarily infringed by Your Contribution(s) alone or by combination of Your Contribution(s) with the Work to which such Contribution(s) was submitted. If any entity institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that your Contribution, or the Work to which you have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement for that Contribution or Work shall terminate as of the date such litigation is filed.

4. You represent that you are legally entitled to grant the above license. If your employer(s) has rights to intellectual property that you create that includes your Contributions, you represent that you have received permission to make Contributions on behalf of that employer, that your employer has waived such rights for your Contributions to the Company, or that your employer has executed a separate Corporate CLA with the Company.

5. You represent that each of Your Contributions is Your original creation (see section 7 for submissions on behalf of others). You represent that Your Contribution submissions include complete details of any third-party license or other restriction (including, but not limited to, related patents and trademarks) of which you are personally aware and which are associated with any part of Your Contributions.

6. You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your 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.

7. Should You wish to submit work that is not Your original creation, You may submit it to the Company separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which you are personally aware, and conspicuously marking the work as "Submitted on behalf of a third-party: [named here]".

8. You agree to notify the Company of any facts or circumstances of which you become aware that would make these representations inaccurate in any respect.

This Agreement follows the Apache Software Foundation's Individual Contributor License Agreement, version 2.2, with Robot Traders OÜ as the entity.
17 changes: 17 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Contributing

The Envelope strategy is licensed under the [Apache License 2.0](LICENSE), and a contribution merged into this repository ships under that licence. Robot Traders OÜ sells products built on the RobotTradersLab engine alongside the open code, the exchange connectors shipped as compiled wheels under the Robot Traders Software License among them, and the [Contributor License Agreement](CLA.md) grants the Company the rights that let a contribution be part of them. Each contributor signs it once.

## Signing the agreement

The first pull request from a GitHub account triggers the agreement check. It comments on the pull request with the agreement and the sentence to post, and holds a failing check until the author posts that sentence as a comment:

```text
I have read the CLA Document and I hereby sign the CLA
```

The signature is recorded in this repository, on the `cla-signatures` branch, and every later pull request from that account passes the check without being asked. An account whose written agreement with Robot Traders OÜ already covers its work is never asked.

## Credit

A merged contribution keeps its author in the commit history, and GitHub lists every author on the repository's contributors page.
Loading
Loading