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

Generate requirements_* from manifests #22718

Merged
merged 9 commits into from
Apr 5, 2019
Merged

Conversation

rohankapoorcom
Copy link
Member

@rohankapoorcom rohankapoorcom commented Apr 4, 2019

Description:

Generate requirements_* from manifests (if present). If not, fallback to the current approach of reading REQUIREMENTS from the module attribute. I disabled exploring the children of the homeassistant.components.* packages since that will just add a dependency (from the manifest) due to each of the python files in the package. Just having one for the top level package should be sufficient.

Related issue (if applicable): relates to #22700

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.

@homeassistant homeassistant added cla-signed small-pr PRs with less than 30 lines. labels Apr 4, 2019
@ghost ghost assigned rohankapoorcom Apr 4, 2019
@ghost ghost added the in progress label Apr 4, 2019
@robbiet480 robbiet480 requested a review from balloob April 4, 2019 09:07
@robbiet480
Copy link
Member

1000 points to @rohankapoorcom for taking the initiative on this without prompting!

@balloob balloob mentioned this pull request Apr 4, 2019
13 tasks
@codecov
Copy link

codecov bot commented Apr 4, 2019

Codecov Report

Merging #22718 into dev will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev   #22718      +/-   ##
==========================================
- Coverage   93.83%   93.83%   -0.01%     
==========================================
  Files         449      448       -1     
  Lines       36584    36524      -60     
==========================================
- Hits        34330    34271      -59     
+ Misses       2254     2253       -1
Impacted Files Coverage Δ
homeassistant/requirements.py

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eadc1e0...8f06cc2. Read the comment docs.

Copy link
Contributor

@awarecan awarecan left a comment

Choose a reason for hiding this comment

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

We should do following in same PR

  • Remove all REQUIREMENTS from .py code
  • Change Pull Request template
  • Change dev doc (in dev doc repo of course, but link to here)

script/gen_requirements_all.py Outdated Show resolved Hide resolved
script/gen_requirements_all.py Outdated Show resolved Hide resolved
@rohankapoorcom
Copy link
Member Author

Reading #22700, I got the feeling that each of those were intended to be separate tasks. If you think they shouldn't be, I'm happy to make the changes.

@balloob
Copy link
Member

balloob commented Apr 4, 2019

I suggest we make them new tasks.

@awarecan
Copy link
Contributor

awarecan commented Apr 4, 2019

Your call. But the elif block need remove, we have manifest validator is running on CI to ensure all components has to have manifest.json

@rohankapoorcom
Copy link
Member Author

rohankapoorcom commented Apr 4, 2019

Your call. But the elif block need remove, we have manifest validator is running on CI to ensure all components has to have manifest.json

It's still needed for scripts/auth. I'm breaking them out into different methods per @balloob's above comment: #22718 (comment)

@rohankapoorcom
Copy link
Member Author

Changes pushed up.

@awarecan
Copy link
Contributor

awarecan commented Apr 4, 2019

This order changed. Any chance we can keep it ordered?
image

@awarecan
Copy link
Contributor

awarecan commented Apr 4, 2019

I just merged a new integration in, #22684. Please rebase.

@rohankapoorcom
Copy link
Member Author

I'll look at ordering and will rebase in the evening. Just headed into the office.

@awarecan awarecan force-pushed the generate-requirements-manifest branch from 6e6b8a9 to f42df1c Compare April 4, 2019 17:28
@ghost ghost assigned awarecan Apr 4, 2019
@awarecan
Copy link
Contributor

awarecan commented Apr 4, 2019

I rebased and fixed the error. But not fix order yet.

EDIT: order is done.

@rohankapoorcom
Copy link
Member Author

Thanks for the assist @awarecan!

@rohankapoorcom rohankapoorcom force-pushed the generate-requirements-manifest branch from 97f47dd to 8f06cc2 Compare April 5, 2019 03:42
@rohankapoorcom
Copy link
Member Author

Rebased again - @balloob @awarecan - are we good to go here?

Copy link
Member

@robbiet480 robbiet480 left a comment

Choose a reason for hiding this comment

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

If we aren't good, we'll fix it in post, lets get this show on the road

@robbiet480 robbiet480 merged commit d15eedc into dev Apr 5, 2019
@delete-merged-branch delete-merged-branch bot deleted the generate-requirements-manifest branch April 5, 2019 04:29
@ghost ghost removed the in progress label Apr 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed small-pr PRs with less than 30 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants