Skip to content

Commit df6468b

Browse files
authored
SYNPY-1285: Create pipfile (#984)
* Create pipfile/pipfile.lock and update contributing docs to reflect the new pipfile
1 parent 24b5e7d commit df6468b

3 files changed

Lines changed: 1480 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ Welcome, and thanks for your interest in contributing to the Synapse Python clie
44

55
By contributing, you are agreeing that we may redistribute your work under this [license](LICENSE.md).
66

7+
- [How to contribute](#how-to-contribute)
8+
- [Reporting bugs or feature requests](#reporting-bugs-or-feature-requests)
9+
- [The development life cycle](#the-development-life-cycle)
10+
- [Fork and clone this repository](#fork-and-clone-this-repository)
11+
- [Installing the Python Client in a virtual environment with pipenv](#installing-the-python-client-in-a-virtual-environment-with-pipenv)
12+
- [Development](#development)
13+
- [Testing](#testing)
14+
- [Repository Admins](#repository-admins)
15+
716
## I don't want to read this whole thing I just have a question!
817

918
> **Note:** Please don't file an issue to ask a question. You'll get faster results by using the resources below.
@@ -44,6 +53,25 @@ Developing on the Python client starts with picking a issue to work on in JIRA!
4453
git pull upstream develop
4554
```
4655
56+
#### Installing the Python Client in a virtual environment with pipenv
57+
Perform the following one-time steps to set up your local environment.
58+
59+
1. This package uses Python, if you have not already, please install [pyenv](https://github.com/pyenv/pyenv#installation) to manage your Python versions. Versions supported by this package are all versions >=3.8 and <=3.11. If you do not install `pyenv` make sure that Python and `pip` are installed correctly and have been added to your PATH by running `python3 --version` and `pip3 --version`. If your installation was successful, your terminal will return the versions of Python and `pip` that you installed. **Note**: If you have `pyenv` it will install a specific version of Python for you.
60+
61+
2. Install `pipenv` by running `pip install pipenv`.
62+
63+
3. Install `synapseclient` locally using pipenv:
64+
65+
* pipenv
66+
```bash
67+
# Verify you are at the root directory for the cloned repository (ie: `cd synapsePythonClient`)
68+
pipenv install
69+
# To develop locally you want to add --dev
70+
# pipenv install --dev
71+
pipenv shell
72+
```
73+
74+
4. Once completed you are ready to start developing. Commands run through the CLI, or through an IDE like visual studio code within the virtual environment will have all required dependencies automatically installed. Try running `synapse -h` in your shell to read over the available CLI commands. Or view the `Usage as a library` section in the README.md to get started using the library to write more python.
4775
#### Development
4876
4977
Now that you have chosen a JIRA ticket and have your own fork of this repository. It's time to start development!
@@ -129,6 +157,7 @@ You can verify your code matches these expectations by running the **flake8** co
129157
130158
```
131159
# ensure that you have the flake8 package installed
160+
# Note: This is not required if using the pipenv virtual environment
132161
pip install flake8
133162
134163
flake8

Pipfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[[source]]
2+
name = "pypi"
3+
url = "https://pypi.org/simple"
4+
verify_ssl = true
5+
6+
[packages]
7+
synapseclient = {file = ".", editable = true, path = "."}
8+
9+
[requires]
10+
python_version = "3.11.3"
11+
12+
[dev-packages]
13+
synapseclient = {file = ".", editable = true, path = ".", extras = ["dev", "tests", "pandas", "pysftp", "boto3", "docs"]}

0 commit comments

Comments
 (0)