-
Notifications
You must be signed in to change notification settings - Fork 30
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Although I don't know poetry that well, this looks really useful!
```bash | ||
python3 -m venv venv | ||
source venv/bin/activate | ||
poetry install |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
Just to confirm, if we want to bump the python-pachyderm version, we need to update it in |
pyproject.toml
Outdated
name = "python-pachyderm" | ||
version = "7.2.0" | ||
description = "Python Pachyderm Client" | ||
authors = ["Pachyderm <[email protected]>"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use the email [email protected]
instead. @albscui thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I grabbed this from this issue on a whim. Happy to change it to the correct one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! This integrations email is the one we're using for managing all integrations-related projects moving forward.
# Python version compatibility. | ||
try: | ||
# >= 3.8 | ||
import importlib.metadata as metadata |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this read directly from pyproject.toml
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, packages keep their official version in an associated METADATA
file that these modules attempt to read (this is how pip can report the version of installed packages without a lock file).
@@ -0,0 +1,2 @@ | |||
[virtualenvs] | |||
in-project = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this file do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
poetry
by default tries to create all you virtual environments in your home directory, this just tells poetry to create the virtual environment in the project
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just one question up above
Switch from
setup.py
topoetry
/pyproject.toml
This changes the following things:
setup.py
file, so it gets deleted. Building the wheel is done throughpoetry build
and the the dependencies are tracked withpyproject.toml
andpoetry.lock
MANIFEST.in
file aspoetry
does all of that in thepyproject.toml
file. There should probably be a review of this to ensure that the proper things get included in the package that were previously specified in the manifest.poetry
installs the virtual environment at.venv
instead ofvenv
. No way I know around this unfortunately.__version__
value gets specified. The modern way to do this is to look at the metadata of the installed package -- this functionality is built into the language in python >=3.8, but there is backport (importlib-metadata
) for older versions.poetry
must have the version specified in thepyproject.toml
so there should probably be a discussion on how this meshes with theversion.json
file.author
of the package on whim toPachyderm <[email protected]>
, but I can revert to JD if that was a mistake.Follow ons:
^
dependency selector should be used over>/=>
for package dependencies.