Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

Latest commit

 

History

History
133 lines (75 loc) · 5.84 KB

CONTRIBUTING.md

File metadata and controls

133 lines (75 loc) · 5.84 KB

Contributing to the NBA_APIV3

Welcome, and thank you for your interest in contributing to the NBA_APIV3!

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.

Reporting Issues

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.

Look For an Existing Issue

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.

Writing Good Bug Reports and Feature Requests

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.

Final Checklist

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

Contributing Code

The nba_apiv3 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.

Style Guidlines

  • 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)

Collaborating on Open Source

Proposals

Should you wish to make a significant change within the project, please open a GitHub Issue using the prefix PROPOSAL: within the subject.

Code Reviews

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.

Requirements

Python Supported Versions

While nba_apiv3 makes every attempt to provide compatibility with Supported Versions of Python, libraries that the nba_apiv3 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.

Poetry

Development on nba_apiv3 requires Poetry. Poetry provides environment isolation managing all dependencies and packaging in a deterministic way.

pyenv (optional)

The nba_apiv3 project supports pyenv and includes a poetry.lock file to recognize the currently active environment.

[virtualenvs]
prefer-active-python = true

Setting up your environment

This guide assume familiarity with using GitHub and git.

1. Install and configure pyenv (optional)

Follow the pyenv installation instructions.

2. Install Poetry

Follow the Poetry installation instructions.

3. Fork the nba_apiv3

Follow GitHub's instructions on how to fork a repository and clone that repository for local development.

4. Using Poetry with nba_apiv3

# Create a isolated virtual environment inclusive of all dependencies
poetry install

# Once the environment has been created, active the environment for development
Poetry shell 

5. Validating Your Environment

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

6. When Complete, Open a PR

When you have completed your development and uploaded your changes to GitHub, create a pull request to have your changes reviewed.