Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

[INT-442] Poetry #375

Merged
merged 11 commits into from
Dec 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,25 @@ jobs:
image: ubuntu-2004:202101-01
steps:
- checkout
- run:
- run:
name: Install dependencies
command: etc/testing/circle/install.sh
- when:
condition:
condition:
not:
equal: [ lint, <<parameters.toxenv>> ]
equal: [ lint, <<parameters.toxenv>> ]
steps:
- run:
- run:
name: Start minikube
command: etc/testing/circle/start-minikube.sh
- run:
name: Deploy pachyderm
command: etc/testing/circle/deploy-pachyderm.sh
- run:
command: etc/testing/circle/deploy-pachyderm.sh
- run:
name: TOXENV=<<parameters.toxenv>> tox
command: |
pachctl port-forward &
pachctl port-forward &
source $HOME/.poetry/env
python3 -m tox
environment:
TOXENV: << parameters.toxenv >>
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ __pycache__/
src/python_pachyderm/version.py

# virtualenv
.venv
.python-version
venv
.python-version
14 changes: 0 additions & 14 deletions MANIFEST.in

This file was deleted.

8 changes: 2 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,17 @@ src/python_pachyderm/proto/v2: docker-build-proto

init:
git submodule update --init
python -m pip install -U pip wheel setuptools
python -m pip install -e ".[DEV]"
pre-commit install

release:
git checkout origin/master
rm -rf build dist
python3 setup.py sdist
twine upload dist/*
poetry publish --build

test-release:
git checkout origin/master
rm -rf build dist
python3 setup.py sdist
twine upload --repository testpypi dist/*
poetry publish --build --repository testpypi

lint:
black --check --diff .
Expand Down
13 changes: 10 additions & 3 deletions contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,18 @@

## Getting started

Setup & initialize virtualenv, for example:
We use [poetry](https://python-poetry.org/) to both manage dependencies
and publish this package. You can find information about installing this
software [here](https://python-poetry.org/docs/).


Once both `poetry` is installed, you can use `poetry` to create your
virtual environment for this project. The following command
(run at the root of this project) will create a virtual environment
within the `.venv` directory:
```bash
python3 -m venv venv
source venv/bin/activate
poetry install
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this install the dev dependencies as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep! When run like this on the repo poetry will install all dependencies, including dev dependencies.

source .venv/bin/activate
```

Run the init script which pulls submodules as well as sets up the Python project and install development tools locally:
Expand Down
4 changes: 4 additions & 0 deletions etc/testing/circle/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,7 @@ sudo dpkg -i /tmp/pachctl.deb

# Install tox
pip3 install tox

# Install poetry
curl -fsS -o get-poetry.py https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py
python get-poetry.py -y
Loading