Contributing¶
重要
Read through the Scrapy Contribution Docs for tips relating to writing patches, reporting bugs, and project coding style
These docs describe how to setup and contribute to Scrapyd.
Reporting Issues & Bugs¶
Issues should be reported to the Scrapyd project issue tracker on GitHub
Tests¶
Tests are implemented using the Twisted unit-testing framework. Scrapyd uses trial
as the test running application.
Running tests¶
To run all tests go to the root directory of the Scrapyd source code and run:
trial scrapyd
To run a specific test (say tests/test_poller.py
) use:
trial scrapyd.tests.test_poller
Writing tests¶
All functionality (including new features and bug fixes) should include a test case to check that it works as expected, so please include tests for your patches if you want them to get accepted sooner.
Scrapyd uses unit-tests, which are located in the scrapyd/tests directory. Their module name typically resembles the full path of the module they're testing. For example, the scheduler code is in:
scrapyd.scheduler
And their unit-tests are in:
scrapyd/tests/test_scheduler.py
Installing Locally¶
To install a locally edited version of Scrapyd onto the system to use and test, inside the project root run:
pip install -e .