Skip to content

Latest commit

 

History

History
146 lines (108 loc) · 4.61 KB

CONTRIBUTING.md

File metadata and controls

146 lines (108 loc) · 4.61 KB

Contributing to ebay_rest

Thank you for your interest in contributing to ebay_rest! We welcome contributions from the community and are excited to work with you to make this project better.

Table of Contents

Getting Started

Before you begin contributing, please familiarize yourself with the following:

  1. Project Overview: Read the README.md to understand the purpose and features of this project.
  2. Code of Conduct: Please adhere to the project's Code of Conduct in all interactions.

Development Setup

To set up your local development environment, follow these steps:

  1. Clone the Repository

Start by cloning the repository to your local machine:

git clone https://github.com/matecsaj/ebay_rest.git
cd ebay_rest
  1. Create a virtual environment.
python -m venv myenv
  1. Activate the virtual environment:
  • On Linux/Mac:
source myenv/bin/activate
  • On Windows:
myenv\Scripts\activate
  1. Install Dependencies Both end user and developer.
pip install '.[complete,dev]'
playwright install chromium
  1. Install the current stable 3.x.x version of Swagger Codegen.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install swagger-codegen
  1. In the test directory, copy "ebay_rest_sample.json" to "ebay_rest.json" and follow the instructions in the file.

  2. Verify the Installation Ensure that the installation was successful by running the following commands:

black --version
This should return the version of black installed, indicating that the dev dependencies are set up correctly.

How to Contribute

We welcome various types of contributions, including:

  • Bug Fixes: If you find a bug, please consider fixing it and submitting a pull request.
  • Feature Requests: If you have an idea for a new feature, feel free to submit an issue or a pull request.
  • Documentation: Improvements to documentation are always appreciated.

Code Hints

  • The error number guide is found in the Error class definition.
  • Watch for README.md files in directories; they contain warnings about generated code and perhaps other things.
  • Do test driven development; while adding features or fixing bugs, modify /test/ebay_rest.py and run it.
  • Periodically run /script/generate_code.py to get the latest API information from eBay and generate code.
  • Content-dependent unit tests can randomly fail; eBay's sandbox resets daily, so retry tomorrow.

Code Style

We use black to enforce code style. Please format your code before submitting a pull request:

black .

Testing

We use unittest for testing. Please ensure that all tests pass before submitting your changes:

python -m unittest discover

Submitting a Pull Request

To submit a pull request:

Fork the repository: Create your fork on GitHub. Create a branch: Create a feature or bugfix branch (git checkout -b my-feature-branch). Commit your changes: Use descriptive commit messages. Push to your fork: (git push origin my-feature-branch). Submit a pull request: Go to the original repository on GitHub and submit a pull request.

Release Steps

  1. in the root directory of the project, run CLI commands, the first will only work on macOS.
brew update && brew upgrade && brew cleanup
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade '.[complete,dev]'
playwright install chromium
black .
pipreqs --print src
  1. edit the pyproject.toml file
    1. update the section install_requires per the output from pipregs
    2. advance the Semantic three-part version number
  2. repeat until error-free
    1. run /ebay_rest/scripts/generate_code.py
    2. run /test/ebay_rest.py
    3. resolve any errors but don't directly edit the code generated by generate_code.py
  3. in the root directory of the project, run CLI commands
    1. python3 -m build
    2. python3 -m twine upload dist/*1.0.XX* -u token -p <your token!>
      1. in place of 0.0.xx put the new version number
      2. username: __token__
      3. password: your token

License

By contributing to ebay_rest, you agree that your contributions will be licensed under the MIT License.