-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6aa8be4
commit bf82314
Showing
9 changed files
with
109 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | ||
|
||
name: Python package | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.10", "3.11", "3.12"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install tox | ||
- name: Run tox | ||
run: | | ||
tox r |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
MIT License | ||
=========== | ||
|
||
Copyright (c) 2024 Nasdaq | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
Developer's Guide | ||
================= | ||
|
||
This guide is intended for developers who want to contribute to the | ||
development of the `nasdaq-protocols` library. | ||
|
||
|
||
Guidelines | ||
---------- | ||
Before merging to main, please ensure that the following guidelines are met: | ||
|
||
- All existing tests are passing. | ||
- New tests are added when needed. | ||
- Pylint reports no errors, 10/10 | ||
- Code is documented and docstrings are added when needed. | ||
- Documentation is included in the rst files. | ||
|
||
|
||
Building | ||
________ | ||
.. code-block:: console | ||
$ tox r | ||
`tox r` will execute all of the following. | ||
|
||
- `tox -e lint` - Runs linter and validates the code | ||
- `tox -e test` - Runs the pytest test cases | ||
- `tox -e build` - Builds the package sdist and wheel | ||
- `tox -e doc` - Builds the documentation | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
[tox] | ||
requires = | ||
tox>4 | ||
virtualenv>20.2 | ||
env_list = | ||
lint | ||
test | ||
build | ||
doc | ||
|
||
[testenv:lint] | ||
description = Run pylint | ||
deps = pylint | ||
commands = pylint --fail-under=10.0 "--ignore-patterns=.*egg-info.*,.*test.*" src/* | ||
|
||
|
||
[testenv:test] | ||
description = Run pytest | ||
deps = | ||
pytest | ||
pytest-asyncio | ||
pytest-sugar | ||
pytest-cov | ||
commands = pytest --cov-fail-under=94.5 # Locking down the current cov percent as baseline | ||
|
||
|
||
[testenv:build] | ||
description = Build package | ||
deps = build | ||
commands = python -m build | ||
|
||
|
||
[testenv:doc] | ||
description = Build documenation | ||
deps = sphinx | ||
commands = make html | ||
change_dir = docs | ||
allowlist_externals = make |