Welcome, and thank you for your interest in contributing to the NBA_API!
There are many ways in which you can contribute, beyond writing code. The goal of this document is to provide a high-level overview of how you can get involved.
Have a question? Rather than opening an issue, head over to the Slack to connect with others, chat, and receive help.
Have you identified a reproducible problem? Have a feature request? Identified a missing endpoint? Here's how you can make reporting your issue as effective as possible.
Before you create a new issue, please do a search in open issues to see if the issue or feature request has already been filed.
If you find your issue already exists, make relevant comments and add your reaction. Use a reaction in place of a "+1" comment:
- 👍 - upvote
- 👎 - downvote
If you cannot find an existing issue that describes your bug or feature, create a new issue using the guidelines below.
File a single issue per problem and feature request. Do not enumerate multiple bugs or feature requests in the same issue.
Do not add your issue as a comment to an existing issue unless it's for the identical input. Many issues look similar, but have different causes.
The more information you can provide, the more likely someone will be successful at reproducing the issue and finding a fix.
Please include the following with each issue:
-
Version of the nba_api you are using
-
Reproducible steps (1... 2... 3...) that cause the issue
-
What you expected to occur, versus what you actually occur
-
A code snippet that demonstrates the issue or a link to a code repository that can easily be pull down to recreate the issue locally
- Note: Because the developers need to copy and paste the code snippet, including a code snippet as a media file (i.e. .gif) is not sufficient.
Please remember to do the following:
-
Search the issue repository to ensure your report is a new issue
-
Recreate the issue
-
Simplify your code around the issue to better isolate the problem <<<<<<< HEAD
The nba_api
project has been setup in a way to support development across a wide range of operating systems including Linux, macOS, and Windows. Contributions are managed via GitHub forks and pull requests.
- Code submitted should follow the style of the code already found throughout the repository.
- The structure of data returned to the consumer of the library should align with the data structures already found throughout the library.
- Unit tests should accompany your code wherever possible
- Use
git rebase -i
to organize your commits (Write Better Commits, Build Better Projects)
Should you wish to make a significant change within the project, please open a GitHub Issue using the prefix PROPOSAL:
within the subject.
GitHub allows developers the ability to draft pull requestes. This is incredibly useful to get feedback early within the development cycle when making large or complex changes.
Supported versions can be found within the build script.
While nba_api
makes every attempt to provide compatibility with Supported Versions of Python, libraries that the nba_api
depends on may not offer that same compatibility. Should this occur, the nba_api
will support the next Supported Version of Python in which all libraries share mutual compatibility.
Development on nba_api
requires Poetry. Poetry provides environment isolation managing all dependencies and packaging in a deterministic way.
The nba_api
project supports pyenv and includes a poetry.lock
file to recognize the currently active environment.
[virtualenvs]
prefer-active-python = true
This guide assume familiarity with using GitHub and git
.
Follow the pyenv installation instructions.
Follow the Poetry installation instructions.
Follow GitHub's instructions on how to fork a repository and clone that repository for local development.
# Create a isolated virtual environment inclusive of all dependencies
poetry install
# Once the environment has been created, active the environment for development
Poetry shell
Poetry provides all of the developer dependencies through the pyproject.toml
file. This allows you to begin using the required development tools immediately.
# Run Unit Test (all tests should pass)
pytest
# Validate for Style using Flake8 (only errors will be displayed)
flake8
When you have completed your development and uploaded your changes to GitHub, create a pull request to have your changes reviewed.