Skip to content
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

[feathr] Add manifest file to include data files #85

Merged
merged 2 commits into from
Mar 23, 2022
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
1 change: 1 addition & 0 deletions feathr_project/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
recursive-include feathrcli/data *
14 changes: 0 additions & 14 deletions feathr_project/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,3 @@ Ref: [Installing packages using pip and virtual environments](https://packaging.
* Then follow [Installation](#Installation) and [Usage](#CLI-Usage).
* To deactivate: `conda deactivate`
Ref: [Managing environments](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html)

## Distribute Feathr Python Library via PYPI
* Install build tool: `python3 -m pip install --upgrade build`
* Do NOT use `python3 -m build` since it will result in unknown issues.
* Wheel is preferred since package installation with wheel is faster.
* Generate wheel: `python3 -m build --wheel`. A .whl file will be generated.
* Generate sdist: `python3 -m build --sdist`. A tar.gz file will be generated.
* Upload to Pypi. If you want to upload feathr-0.1.9-py3-none-any.whl, then `python3 -m twine upload dist/feathr-0.1.9-py3-none-any.whl`. Username and password of your pypi.org account is needed to finish the uploading.
* If upload completed, you can see your new version in https://pypi.org/manage/project/feathr/.
* You can also delete the uploaded package in https://pypi.org/manage/project/feathr/releases/.

### FAQ
* File already exists. Error: 1. You may be using old dist files. Clear your dist folder. 2. You can't upload same version to Pypi. Change your patch version if you want to re-upload.
Ref [Packaging Python Projects](https://packaging.python.org/en/latest/tutorials/packaging-projects/)
27 changes: 27 additions & 0 deletions feathr_project/python_developer_guide/python_project_release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Python Project Build and Release Guide
=============================

# Python Project Build Guide
## Include non-code data files
* Set `include_package_data=True` in `setup.py` file
* Update `MANIFEST.in` to include the data files you wanted.
* For example, `recursive-include feathrcli/data *` will include everything under `feathrcli/data/` folder.

# Distribute Feathr Python Library via PYPI
* Install build tool: `python3 -m pip install --upgrade build twine`
* Do NOT use `python3 -m build` since it will result in unknown issues.
* Wheel is preferred since package installation with wheel is faster.
* Empty the folder in dist.
* Cd into feathr_project `cd feathr_project`.
* Generate wheel: `python3 -m build --wheel`. A .whl file will be generated.
* Generate sdist: `python3 -m build --sdist`. A tar.gz file will be generated.
* Check the `dist` folder and you should see only two newly generated files, one for wheel(`.wheel`) and one for dist(`.gz`).
* Upload to Pypi `python3 -m twine upload dist/*`. This will upload both wheel and dist to Pypi. Username and password
of your pypi.org account is needed to finish the uploading.
* If upload completed, you can see your new version in https://pypi.org/manage/project/feathr/.
* You can also delete the uploaded package in https://pypi.org/manage/project/feathr/releases/.


# FAQ
* File already exists. Error: 1. You may be using old dist files. Clear your dist folder. 2. You can't upload same version to Pypi. Change your patch version if you want to re-upload.
Ref [Packaging Python Projects](https://packaging.python.org/en/latest/tutorials/packaging-projects/)
2 changes: 1 addition & 1 deletion feathr_project/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name='feathr',
version='0.1.1',
version='0.2.1',
long_description=long_description,
long_description_content_type="text/markdown",
author_email="[email protected]",
Expand Down