-
Notifications
You must be signed in to change notification settings - Fork 48
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
Manage dependencies #113
Manage dependencies #113
Conversation
@dimberman @tatiana - Do you guys have any suggestion to test this with UT? |
"SQLAlchemy==1.3.24", | ||
"sqlalchemy-bigquery==1.3.0" | ||
"apache-airflow-providers-postgres", |
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.
If a user needs Postgres support, they’d install astro[postgres]
and pick up the Postgres provider from the extra, so this line shouldn’t be needed.
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.
So Postgre is default DB until we have support for sqlite.
src/astro/utils/dependencies.py
Outdated
def __getattr__(self, item): | ||
raise RuntimeError( | ||
f"Error loading the module {self.module_name}," | ||
f" please make sure all the dependencies are installed" |
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.
What do you think if we gave a more helpful message, telling the users how to install the missing packages?
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.
Yes, I agree, I think we can point out the command to run in error message itself.
Like then they can do pip install astro-project[aws]
if package related to AWS was missing.
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.
That would be awesome, @utkarsharma2 !
pyproject.toml
Outdated
"s3fs", | ||
"smart-open[s3]>=5.2.1", | ||
] | ||
gcs = [ |
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.
it may be worth renaming gcs
to gcp
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.
I'll update this.
FYI - @dimberman
@utkarsharma2 it's great to see progress in this stream!
|
"s3fs", | ||
"smart-open[s3]>=5.2.1", | ||
] | ||
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.
@uranusjr Does all
keyword work with flit -- pypa/flit#488
I wanted to use flit
for https://github.com/astronomer/astronomer-providers/ but the following two issues made me think otherwise:
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.
The keys here can be arbitrary, everything should work. (Well, if it is a valid extra name.)
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.
Flit currently only puts license information in trove classifiers. The license field is pending standardisation. (If we really want to we can probably extend Flit to add that field to the wheel, but the value wouldn’t be very useful due to its lack of standardisation.)
The second issue you linked is requesting a “magic” extra that’s added automatically without declaring. IMO that’s not that good an idea, but manually declaring all
should work just fine.
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.
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.
It looks great, thank you very much @utkarsharma2 !
Handled missing providers. Co-authored-by: utkarsh sharma <utkarsharma@utkarshs-MacBook-Pro.local>
Resolves #82