taspinar / twitterscraper

Scrape Twitter for Tweets
MIT License
2.39k stars 579 forks source link

For developers comfort: Add `Dockerfile.dev` and VSCode extension "Remote Development" setting file #252

Closed nukopy closed 3 years ago

nukopy commented 4 years ago

I made this pull request for developer comfort.

Current Problems

In existing Dockerfile, our edits are not reflected in import twitterscraper in Python files and difficult to experiment because twitterscraper is installed from PyPI. If developers wanna reflect their edits to twitterscraper, they have to edit /usr/local/lib/python3.7/site-packages/twitterscraper.

Pull Request Contents

To overcome the above situation, I added and edited the followings:

Dockerfile.dev

Dockerfile.dev enables developers to use editable twitterscraper. When executing import twitterscraper, they can import cloned twitterscraper, not from PyPI, because twitterscraper is added to PYTHONPATH in Dockerfile.dev. Naturally git is also installed unlike existing Dockerfile.

The container build by Dockerfile.dev will make developing more comfortable.

.devcontainer/devcontainer.json

This file is for Visual Studio Code(VSCode) users. As you know, VSCode offers a very convenient extension "Remote Development". By adding this extension's setting file, I make developers start developing easily on VSCode.

In this setting file Dockerfile.dev is used, so developers use editable twitterscraper, too.

README.rst

Due to adding the above file, I added item For Developers to README.rst. However, my English would be awful, so you can throw away this changes.

I hope my changes will make twitterscraper developers comfortable.