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.
- Getting Started
- Development Setup
- How to Contribute
- Code Style
- Testing
- Submitting a Pull Request
- Release Steps
- License
Before you begin contributing, please familiarize yourself with the following:
- Project Overview: Read the README.md to understand the purpose and features of this project.
- Code of Conduct: Please adhere to the project's Code of Conduct in all interactions.
To set up your local development environment, follow these steps:
- Clone the Repository
Start by cloning the repository to your local machine:
git clone https://github.com/matecsaj/ebay_rest.git
cd ebay_rest
- Create a virtual environment.
python -m venv myenv
- Activate the virtual environment:
- On Linux/Mac:
source myenv/bin/activate
- On Windows:
myenv\Scripts\activate
- Install Dependencies Both end user and developer.
pip install '.[complete,dev]'
playwright install chromium
- Install the current stable 3.x.x version of Swagger Codegen.
- On Mac utilizing Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install swagger-codegen
-
In the test directory, copy "ebay_rest_sample.json" to "ebay_rest.json" and follow the instructions in the file.
-
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.
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.
- 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.
We use black to enforce code style. Please format your code before submitting a pull request:
black .
We use unittest for testing. Please ensure that all tests pass before submitting your changes:
python -m unittest discover
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.
- 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
- edit the pyproject.toml file
- update the section install_requires per the output from pipregs
- advance the Semantic three-part version number
- repeat until error-free
- run /ebay_rest/scripts/generate_code.py
- run /test/ebay_rest.py
- resolve any errors but don't directly edit the code generated by generate_code.py
- in the root directory of the project, run CLI commands
- python3 -m build
- python3 -m twine upload dist/*1.0.XX* -u token -p <your token!>
- in place of 0.0.xx put the new version number
- username: __token__
- password: your token
By contributing to ebay_rest, you agree that your contributions will be licensed under the MIT License.