Skip to content

Commit dd11f65

Browse files
author
Christopher Sellers
committed
ADD: Initial commit
0 parents  commit dd11f65

116 files changed

Lines changed: 4677 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Set standard UNIX/Linux/macOS line endings
2+
* text eol=lf

.github/ISSUE_TEMPLATE.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
### Expected Behavior
2+
Add here.
3+
4+
### Actual Behavior
5+
Add here.
6+
7+
### Steps to Reproduce the Problem
8+
9+
1.
10+
2.
11+
3.
12+
13+
### Specifications
14+
15+
- OS Platform:
16+
- Databento Version:

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
## Description
2+
3+
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
4+
5+
Fixes # (issue)
6+
7+
### Type of change
8+
9+
Please delete options that are not relevant.
10+
11+
- [ ] Bug fix (non-breaking change which fixes an issue)
12+
- [ ] New feature (non-breaking change which adds functionality)
13+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
14+
- [ ] This change requires a documentation update
15+
16+
### How Has This Been Tested?
17+
18+
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
19+
20+
- [ ] Test A
21+
- [ ] Test B
22+
23+
24+
### Checklist:
25+
26+
- [ ] My code follows the style guidelines of this project
27+
- [ ] I have made corresponding changes to the documentation
28+
- [ ] My changes generate no new warnings
29+
- [ ] I have added tests that prove my fix is effective or that my feature works
30+
- [ ] New and existing unit tests pass locally with my changes

.github/workflows/release.yml

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
name: release
2+
3+
# Release Python client library on successful completion of the `test` workflow
4+
5+
on:
6+
workflow_run:
7+
workflows:
8+
- test
9+
branches: [ main ]
10+
types:
11+
- completed
12+
13+
jobs:
14+
15+
tag-release:
16+
name: tag-release - Python 3.9 (ubuntu-latest)
17+
runs-on: ubuntu-latest
18+
outputs:
19+
upload_url: ${{ steps.create-release.outputs.upload_url }}
20+
21+
steps:
22+
- uses: actions/checkout@v2
23+
with:
24+
fetch-depth: 2
25+
26+
# Python setup
27+
- name: Set up Python environment
28+
uses: actions/setup-python@v2
29+
with:
30+
python-version: "3.9"
31+
32+
# Install dependencies
33+
- name: Install dependencies
34+
run: |
35+
python -m pip install --upgrade pip setuptools wheel
36+
pip install -r requirements.txt
37+
pip install -r requirements_dev.txt
38+
39+
# Tag the commit with the library version
40+
- name: Create git tag
41+
uses: salsify/action-detect-and-tag-new-version@v2
42+
with:
43+
version-command: cat VERSION
44+
45+
# Set release output variables
46+
- name: Set output
47+
id: vars
48+
run: |
49+
echo "::set-output name=tag_name::v$(cat VERSION)"
50+
echo "::set-output name=release_name::$(cat VERSION)"
51+
52+
# Create GitHub release
53+
- name: Create release
54+
id: create-release
55+
uses: actions/create-release@v1
56+
env:
57+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58+
TAG_NAME: ${{ steps.vars.outputs.tag_name }}
59+
RELEASE_NAME: ${{ steps.vars.outputs.release_name }}
60+
with:
61+
tag_name: ${{ env.TAG_NAME }}
62+
release_name: ${{ env.RELEASE_NAME }}
63+
draft: false
64+
prerelease: false
65+
66+
publish:
67+
needs: [ tag-release ]
68+
name: publish-sdist - Python 3.9 (ubuntu-latest)
69+
runs-on: ubuntu-latest
70+
71+
steps:
72+
- uses: actions/checkout@v2
73+
74+
# Python setup
75+
- name: Set up Python environment
76+
uses: actions/setup-python@v2
77+
with:
78+
python-version: "3.9"
79+
80+
# Install release dependencies
81+
- name: Install release dependencies
82+
run: python -m pip install --upgrade pip setuptools wheel twine
83+
84+
# Set release output variables
85+
- name: Set output
86+
id: vars
87+
run: |
88+
echo "::set-output name=asset_path::$(find ./dist -mindepth 1 -print -quit)"
89+
cd dist
90+
echo "::set-output name=asset_name::$(printf '%s\0' * | awk 'BEGIN{RS="\0"} {print; exit}')"
91+
92+
# Create distributions
93+
- name: Package for release
94+
run: python setup.py sdist bdist_wheel
95+
96+
# Upload release asset
97+
- name: Upload release asset
98+
id: upload-release-asset
99+
uses: actions/upload-release-asset@v1
100+
env:
101+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
102+
ASSET_PATH: ${{ steps.vars.outputs.asset_path }}
103+
ASSET_NAME: ${{ steps.vars.outputs.asset_name }}
104+
with:
105+
upload_url: ${{ needs.tag-release.outputs.upload_url }}
106+
asset_path: ${{ env.ASSET_PATH }}
107+
asset_name: ${{ env.ASSET_NAME }}
108+
asset_content_type: application/zip
109+
110+
# Publish to PyPI
111+
- name: Publish to PyPI
112+
run: python twine upload -r databento -u ${{ secrets.PYPI_USERNAME }} - p ${{ secrets.PYPI_TOKEN }}

.github/workflows/test.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: test
2+
3+
# Test the Python client library
4+
5+
on:
6+
push:
7+
branches: [ main, dev ]
8+
pull_request:
9+
branches: [ main, dev ]
10+
11+
jobs:
12+
test:
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
os: [ ubuntu-latest, macos-latest, windows-latest ]
17+
python-version: [ "3.6", "3.7", "3.8", "3.9", "3.10" ]
18+
name: build - Python ${{ matrix.python-version }} (${{ matrix.os }})
19+
runs-on: ${{ matrix.os }}
20+
21+
steps:
22+
- uses: actions/checkout@v2
23+
24+
# Python setup
25+
- name: Set up Python environment
26+
uses: actions/setup-python@v2
27+
with:
28+
python-version: ${{ matrix.python-version }}
29+
30+
# Install dependencies
31+
- name: Install dependencies
32+
run: |
33+
python -m pip install --upgrade pip setuptools wheel
34+
pip install -r requirements.txt
35+
pip install -r requirements_dev.txt
36+
37+
# Test pip installation
38+
- name: Test pip installation
39+
run: pip install .
40+
41+
# Run tests
42+
- name: Run tests
43+
run: pytest tests .
44+
45+
# Upload coverage report to codecov
46+
# - name: Upload coverage report
47+
# uses: codecov/codecov-action@v1
48+
# with:
49+
# token: ${{ secrets.CODECOV_TOKEN }}
50+
# file: ./coverage.xml
51+
# verbose: true

.gitignore

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
pip-wheel-metadata/
24+
share/python-wheels/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
MANIFEST
29+
30+
# Unit test / coverage reports
31+
htmlcov/
32+
.tox/
33+
.nox/
34+
.coverage
35+
.coverage.*
36+
.cache
37+
nosetests.xml
38+
coverage.xml
39+
*.cover
40+
.hypothesis/
41+
.pytest_cache/
42+
43+
# pyenv
44+
.python-version
45+
46+
# Environments
47+
.env
48+
.venv
49+
env/
50+
venv/
51+
ENV/
52+
env.bak/
53+
venv.bak/
54+
55+
# Visual Studio Code
56+
.vscode/*
57+
!.vscode/settings.json
58+
!.vscode/tasks.json
59+
!.vscode/launch.json
60+
!.vscode/extensions.json

CHANGELOG.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Changelog and versioning
2+
3+
## Versioning Policy
4+
5+
Our API and its client libraries adopt MAJOR.MINOR.PATCH format
6+
for version numbers. These version numbers conform to
7+
[semantic versioning](https://semver.org). This means that you can upgrade
8+
minor or patch versions to pick up new functionality and fixes, without breaking
9+
your integration.
10+
11+
Most often, we introduce backward-compatible changes between minor versions
12+
in the form of:
13+
14+
- New data formats or encodings.
15+
- Additional fields to existing data formats.
16+
- Additional batch download customizations.
17+
18+
Our API and official client libraries are kept in sync with same-day releases
19+
for major and minor versions. For instance, `v1.2.x` of the Python client
20+
library will use the same functionality found in `v1.2.y` of the HTTP API.
21+
22+
Each major version is guaranteed to operate for two years after the date
23+
of the subsequent major release. For example, if `v2.0.0` is released on
24+
January 1, 2022, then all versions `v1.x.y` of the API and client libraries
25+
are deprecated after January 1, 2024. When a version is deprecated,
26+
any calls made to the API will be defaulted to the next oldest, usable version.
27+
However, you should assume that the calls will not work. Likewise, the client
28+
libraries rely on the API and cannot be assumed to work against later versions
29+
of the API.
30+
31+
We recommend to pin your version requirements against `0.x.*` or `0.x.y`.
32+
Either one of the following is fine:
33+
34+
```
35+
databento>=0.2,<1.0
36+
databento==0.3.0
37+
```
38+
39+
Additionally note:
40+
- All undocumented APIs are considered internal. They are not part of this contract.
41+
42+
- Certain features (e.g. integrations) may be explicitly called out as
43+
"experimental" or "unstable" in the documentation.
44+
45+
46+
47+
## 0.2.0 - 2021-12-10
48+
- Added backend endpoint APIs.
49+
- Added async stream support.
50+
- Added `BentoIOBase` convenience objects.
51+
- Updated Changelog and versioning policy.
52+
53+
## 0.1.0 - 2021-08-30
54+
- Added support for remote procedure call (RPC) streaming requests.
55+
- Refactored legacy code.

0 commit comments

Comments
 (0)