Skip to content

Commit

Permalink
SYNPY-1285: Create pipfile (#984)
Browse files Browse the repository at this point in the history
* Create pipfile/pipfile.lock and update contributing docs to reflect the new pipfile
  • Loading branch information
BryanFauble authored Oct 13, 2023
1 parent 24b5e7d commit df6468b
Show file tree
Hide file tree
Showing 3 changed files with 1,480 additions and 0 deletions.
29 changes: 29 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ Welcome, and thanks for your interest in contributing to the Synapse Python clie

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

- [How to contribute](#how-to-contribute)
- [Reporting bugs or feature requests](#reporting-bugs-or-feature-requests)
- [The development life cycle](#the-development-life-cycle)
- [Fork and clone this repository](#fork-and-clone-this-repository)
- [Installing the Python Client in a virtual environment with pipenv](#installing-the-python-client-in-a-virtual-environment-with-pipenv)
- [Development](#development)
- [Testing](#testing)
- [Repository Admins](#repository-admins)

## I don't want to read this whole thing I just have a question!

> **Note:** Please don't file an issue to ask a question. You'll get faster results by using the resources below.
Expand Down Expand Up @@ -44,6 +53,25 @@ Developing on the Python client starts with picking a issue to work on in JIRA!
git pull upstream develop
```

#### Installing the Python Client in a virtual environment with pipenv
Perform the following one-time steps to set up your local environment.

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.

2. Install `pipenv` by running `pip install pipenv`.

3. Install `synapseclient` locally using pipenv:

* pipenv
```bash
# Verify you are at the root directory for the cloned repository (ie: `cd synapsePythonClient`)
pipenv install
# To develop locally you want to add --dev
# pipenv install --dev
pipenv shell
```

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.
#### Development

Now that you have chosen a JIRA ticket and have your own fork of this repository. It's time to start development!
Expand Down Expand Up @@ -129,6 +157,7 @@ You can verify your code matches these expectations by running the **flake8** co
```
# ensure that you have the flake8 package installed
# Note: This is not required if using the pipenv virtual environment
pip install flake8
flake8
Expand Down
13 changes: 13 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[packages]
synapseclient = {file = ".", editable = true, path = "."}

[requires]
python_version = "3.11.3"

[dev-packages]
synapseclient = {file = ".", editable = true, path = ".", extras = ["dev", "tests", "pandas", "pysftp", "boto3", "docs"]}
Loading

0 comments on commit df6468b

Please sign in to comment.