Skip to content

Add instructions on how to set up for development / how to run tests locally #1070

@filmaj

Description

@filmaj

I would like to contribute to this project, so I would like to know how to set up this project on my machine for development and ideally how to run tests locally.

I looked at the .github/workflows/ci-build.yml file to deduce how to install dependencies and what command to run to execute the tests. However, some issues I hit quickly, and how I resolved them:

  • installing dependencies to the system location yielded permissions issues on my machine (I got around this by installing to the user directory via pip install -U)
  • installing to the user directory caused dependency version clashes (botocore3, probably because I have the aws CLI tools installed globally and that relies on botocore)
  • I avoided dependency version issues by creating a new virtualenv via python3 -m venv .venv and then re-running the dependency installation commands

My suggestion would be to add documentation to either the README or to the documentation under docs/ (or both?) on how to get set up for contributing locally. Do the project maintainers recommend creating a virtualenv to store project dependencies, or some other system?

I would love to contribute a documentation solution to this so that other developers that possibly have the same questions as me can feel confident when contributing to the project.

Side note: I also had trouble getting the tests to pass locally (on a Mac, python 3.9). The test run via python setup.py validate sits stuck at tests/slack_sdk/socket_mode/test_interactions_websocket_client.py indefinitely. UPDATE: after running with the CI_UNSTABLE_TESTS_SKIP_ENABLED and PYTHON_SLACK_SDK_MOCK_SERVER_MODE environment variables set as per the GitHub Actions CI yaml, I was able to run the tests, though I still get one failure (TestSCIMClient.test_users, happy to provide the log, though perhaps that can be considered a separate issue from this documentation-specific one).

Metadata

Metadata

Assignees

Labels

docsM-T: Documentation work only

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions