-
Notifications
You must be signed in to change notification settings - Fork 275
[Docs] Improve contributing docs #1965
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
da811be
to
dfead2e
Compare
I originally was going to propose removing |
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.
Thanks for updating the contributing docs!
i think we'd want to remove the virtualenv
instructions on L43 since we use poetry to manage python env
mkdocs/docs/contributing.md
Outdated
@@ -37,7 +37,7 @@ The PyIceberg Project is hosted on GitHub at <https://github.com/apache/iceberg- | |||
For the development, Poetry is used for packing and dependency management. You can install this using: | |||
|
|||
```bash | |||
pip install poetry | |||
make install-poetry | |||
``` | |||
|
|||
Make sure you're using an up-to-date environment from venv |
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.
this is indeed out of date. poetry is used to manage the python environment. we dont need to use virtualenv at all
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.
ah, i didn't realize poetry handles venv under the hood. Pretty neat. I removed the venv part from the instructions.
mkdocs/docs/contributing.md
Outdated
@@ -48,7 +48,7 @@ python -m venv ./venv | |||
source ./venv/bin/activate | |||
``` | |||
|
|||
To get started, you can run `make install`, which installs Poetry and all the dependencies of the Iceberg library. This also installs the development dependencies. If you don't want to install the development dependencies, you need to install using `poetry install --no-dev`. | |||
To get started, you can run `make install`, which installs all the dependencies of the Iceberg library. This also installs the development dependencies. If you don't want to install the development dependencies, you need to install using `poetry install --no-dev` instead of `make 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.
nit: the previous wording is more clear to me
make install
runs both install-poetry
(installs poetry) and install-dependencies
(install all deps)
Line 40 in 34c8949
install: | install-poetry install-dependencies |
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.
Hmm, my intention here was that running make install
would run make install-dependencies
, which runs poetry install --all-extras
without the --no-dev
flag, which ends up installing the dev dependencies. If the user were to run make install
then poetry install --no-dev
, they would end up installing the dev dependencies, hence why I felt the need to make this change.
I do see that my proposed wording leaves out install-poetry
part. I guess we could create a new make command install-without-dev
that runs poetry install beforehand. What do you think?
install-without-dev: | install-poetry
poetry install --all-extras --without dev
(also FYI --no-dev
was deprecated so i changed it to --without dev
)
Closes #1964
Rationale for this change
Following all steps in the contributing docs leads to error. Running
make install-poetry
should be done before the environment is activated.Are these changes tested?
Yes
Are there any user-facing changes?
No