-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
enforce order of installing python dependencies #1149
Changes from all commits
97c2629
8fec8ce
9f8355f
a23606d
8095db3
a6c147d
5a4eb3b
2652600
da3ab27
256cf55
c06482f
caee9ee
84f58be
64071fc
81f1fc1
f08fd37
f4bfe21
dbc779d
afe7299
011a911
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,10 @@ airbytePython { | |
dependencies { | ||
implementation files(project(':airbyte-integrations:bases:base-singer').airbyteDocker.outputs) | ||
} | ||
|
||
// used to allow local iteration to work | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so should we be doing this in all singer sources or just this one if just this one can you explain why in the comment? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if all of them do we need to document it? put it in the template, etc. okay if this happens in a separae commit if that's the case. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ideally we do all of them, but it's lower priority than getting something working. Since we only had two cases where it didn't align, and both are easily fixable with this, it seems easiest to do this here. If we split it for every singer source, we shouldn't do it here; it should be part of a singer integration plugin. |
||
task('installSingerTap', type: PythonTask) { | ||
module = "pip" | ||
command = "install tap-adwords==1.12.0" | ||
} | ||
installReqs.dependsOn installSingerTap |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ | |
author="Airbyte", | ||
author_email="[email protected]", | ||
packages=find_packages(), | ||
install_requires=["airbyte-protocol", "tap-shopify==1.2.6", "ShopifyAPI==8.0.4"], | ||
install_requires=["airbyte-protocol", "ShopifyAPI==8.0.4"], | ||
package_data={"": ["*.json"]}, | ||
setup_requires=["pytest-runner"], | ||
tests_require=["pytest"], | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ class AirbytePythonPlugin implements Plugin<Project> { | |
pip 'mypy:0.790' | ||
pip 'isort:5.6.4' | ||
pip 'pytest:6.1.2' | ||
pip 'pip:20.3' | ||
} | ||
|
||
project.task('blackFormat', type: PythonTask) { | ||
|
@@ -48,23 +49,25 @@ class AirbytePythonPlugin implements Plugin<Project> { | |
command = "install -r requirements.txt" | ||
inputs.file('requirements.txt') | ||
outputs.file('build/installedlocalreqs.txt') | ||
outputs.cacheIf { true } | ||
|
||
// HACK: makes all integrations depend on installing requirements for bases. long term we should resolve deps and install in order. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
what will that look like? should we just have an if you add issue also add its number to the comment. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm still figuring out precisely how to do this. I'll post on here later with the improvement ticket, but this HACK should be gone by EOW. |
||
if(project.getPath().startsWith(":airbyte-integrations:connectors")) { | ||
dependsOn project.rootProject.getTasksByName("airbytePythonApply", true).findAll { it.project.getPath().startsWith(":airbyte-integrations:bases")} | ||
} | ||
} | ||
|
||
project.task('installReqs', type: PythonTask, dependsOn: project.installLocalReqs) { | ||
module = "pip" | ||
command = "install .[main]" | ||
inputs.file('setup.py') | ||
outputs.file('build/installedreqs.txt') | ||
outputs.cacheIf { true } | ||
} | ||
|
||
project.task('installTestReqs', type: PythonTask, dependsOn: project.installReqs) { | ||
module = "pip" | ||
command = "install .[tests]" | ||
inputs.file('setup.py') | ||
outputs.file('build/installedtestreqs.txt') | ||
outputs.cacheIf { true } | ||
} | ||
|
||
if(project.file('unit_tests').exists()) { | ||
|
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.
how did you think about picking :installReqs versus just depending on the build of that module? i'm wondering if we are going to make a bad assumption in the future. i'm also fine with keeping this though if you think it's the right way.
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 should go away in the future, and it may go away in favor of the build step. However, the build step in the future might not match what we have now, so I think this is the lightest weight shim to tide us over.