Skip to content

Latest commit

 

History

History
65 lines (47 loc) · 1.47 KB

CONTRIBUTING.md

File metadata and controls

65 lines (47 loc) · 1.47 KB

Contributing

Local development

Follow these instructions to start developing locally.

Install prerequisites

  • Install virtualenv using pip if you don't have it already.
pip install virtualenv

Clone and setup virtual environment

  • Fork the repo.
  • Run the script below in bash to clone the repository and install the required programs in your Python virtual environment, replacing YOUR_GITHUB_USERNAME with your GitHub username.
git clone https://github.com/YOUR_GITHUB_USERNAME/WiktionaryParser && \
  cd WiktionaryParser && \
  virtualenv venv && \ 
  source ./venv/scripts/activate && \
  pip install -r requirements.txt && \
  pip install -e .

Remember to always run source ./venv/scripts/activate to activate your virtual environment before coding.

Optional instructions for Visual Studio Code users

If you're using Visual Studio Code, create a file at .vscode/settings.json with the content below.

{
    "python.pythonPath": "venv\\Scripts\\python.exe",
    "python.testing.unittestArgs": [
        "-v",
        "-s",
        "./tests",
        "-p",
        "*test*.py"
    ],
    "python.testing.pytestEnabled": false,
    "python.testing.nosetestsEnabled": false,
    "python.testing.unittestEnabled": true
}

This will setup autocompletion and the test explorer.

Running tests

To run all tests, run the following command.

python -m unittest discover tests