-
Notifications
You must be signed in to change notification settings - Fork 26
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
Add pre- and post-build script to work around Poetry bug #868
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,8 +21,8 @@ maintainers = [ | |
"Niels Rogge <[email protected]>", | ||
] | ||
repository = "https://github.com/ml6team/fondant" | ||
include = ["*.txt", "*.rst", "*.md", "src/fondant/components/**/*.yaml"] | ||
exclude = ["src/fondant/components"] # Exclude everything except for component specs | ||
include = ["*.txt", "*.rst", "*.md", "fondant/components/**/*.yaml"] | ||
exclude = ["fondant/components"] # Exclude everything except for component specs | ||
classifiers = [ | ||
"Development Status :: 2 - Pre-Alpha", | ||
"Intended Audience :: Developers", | ||
|
@@ -75,6 +75,9 @@ vertex = ["docker", "kfp", "google-cloud-aiplatform"] | |
sagemaker = ["sagemaker", "boto3"] | ||
docker = ["docker"] | ||
|
||
all = ["dask", "dask-cuda", "s3fs", "adlfs", "gcsfs", "docker", "kfp", "google-cloud-aiplatform", | ||
"sagemaker", "boto3"] | ||
|
||
[tool.poetry.group.test] | ||
optional = true | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
# This script reverts the `scripts/pre-build.sh` script by moving the package code back into a | ||
# `src` directory. | ||
# It should be run after running scripts/pre-build.sh and building the fondant package | ||
set -e | ||
|
||
scripts_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) | ||
root_path=$(dirname "$scripts_path") | ||
|
||
pushd "$root_path" | ||
mkdir -p src/fondant | ||
mv fondant/* src/fondant | ||
rm -rf fondant | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
# This script unpacks the src folder before building to make the poetry `include` and `exclude` | ||
# sections work correctly for both sdist and wheel | ||
# (https://github.com/python-poetry/poetry/issues/8994) | ||
# Building without running this script also works, but includes the full code for the components. | ||
# This script makes changes to the local files, which should not be committed to git. Run | ||
# scripts/post-build.sh to clean them up. | ||
set -e | ||
|
||
scripts_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) | ||
root_path=$(dirname "$scripts_path") | ||
|
||
pushd "$root_path" | ||
mkdir fondant | ||
mv src/fondant/* fondant | ||
rm -rf src | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Guess this is useful for local development in case you want to install all dependencies. Should we adjust the readme?
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.
For local development, this can still be done with
poetry install --all-extras
. I just needed this to install all extras when installing from the wheel, which I think is only needed in our CI/CD.