Skip to content

[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

Merged
merged 2 commits into from
May 9, 2025

Conversation

petern48
Copy link
Contributor

@petern48 petern48 commented May 3, 2025

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

@petern48 petern48 force-pushed the improve_contributing_docs branch from da811be to dfead2e Compare May 3, 2025 21:20
@petern48
Copy link
Contributor Author

petern48 commented May 3, 2025

I originally was going to propose removing install-poetry from install in Makefile, but then realize it's still useful / convenienet for the CI commands, so I decided to leave it in.

Copy link
Contributor

@kevinjqliu kevinjqliu left a 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

@@ -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
Copy link
Contributor

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

Copy link
Contributor Author

@petern48 petern48 May 6, 2025

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

ty!

@@ -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`.
Copy link
Contributor

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)

install: | install-poetry install-dependencies

Copy link
Contributor Author

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)

Copy link
Contributor

Choose a reason for hiding this comment

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

since this is part of the "Contributing to PyIceberg" docs, i think its rare to not install the dev dependencies. I think the current wording makes sense though. Thanks!

@kevinjqliu kevinjqliu merged commit 45e2e91 into apache:main May 9, 2025
3 checks passed
@kevinjqliu
Copy link
Contributor

Thanks @petern48 for the contribution! Always love docs improvements :)

Note the change wont show up in https://py.iceberg.apache.org/ until we run the github action, which we usually do after every minor release.

@petern48 petern48 deleted the improve_contributing_docs branch May 10, 2025 04:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Docs] Improve contributing instructions
2 participants