Skip to content

validation of sample flow with mypy + packaging#1676

Merged
romain-intel merged 16 commits intoNetflix:feat/stubs-generator-cmdfrom
mt-ob:stubs-validation
Jan 17, 2024
Merged

validation of sample flow with mypy + packaging#1676
romain-intel merged 16 commits intoNetflix:feat/stubs-generator-cmdfrom
mt-ob:stubs-validation

Conversation

@mt-ob
Copy link
Collaborator

@mt-ob mt-ob commented Jan 10, 2024

No description provided.

@mt-ob mt-ob changed the base branch from feat/autodocs to feat/stubs-generator-cmd January 12, 2024 20:22
@mt-ob mt-ob changed the title validation of sample flow with mypy validation of sample flow with mypy + packaging Jan 12, 2024
@romain-intel romain-intel force-pushed the feat/stubs-generator-cmd branch from 87e81a9 to 1a627ca Compare January 14, 2024 10:01
...
out: |
main:3: error: Argument 1 to "conda" has incompatible type "type[NonFlowDecorator]"; expected "dict[str, str]" [arg-type]
main:4: error: Too many positional arguments for "conda" [misc]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@romain-intel the conda decorator probably has some issues with mypy


@conda
@step
def wrong_no_arg(self):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@romain-intel this case shouldn't have been wrong...

@romain-intel romain-intel merged commit 404e424 into Netflix:feat/stubs-generator-cmd Jan 17, 2024
@mt-ob mt-ob deleted the stubs-validation branch January 17, 2024 10:50
romain-intel added a commit that referenced this pull request Jan 23, 2024
* Added a stub command; moved script to new location.

* validation of sample flow with mypy + packaging (#1676)

* validate sample flow with mypy

* also install metaflow in CI

* change commands

* package generated stubs with metaflow

* don't do editable install

* re-introduce setup.py

* update publish action

* point to dist

* check common cases with pytest-mypy plugin

* Updated stub tests; added kw only args to stub generator

* remove test flow

* kubernetes validity

* add tests for environment, card, catch, conda

* add tests for timeout, secrets, retry, resources decorators

* add tests for conda_base, schedule, trigger, trigger_on_finish decorators

* Get tests to pass again

---------

Co-authored-by: Romain Cledat <[email protected]>

* fix checking of stubs package (#1689)

* Properly uninstall packages that provide stubs before installing a new one.

* Add a few more cases to the stub generator

* add tests for pypi and pypi_base decorators (#1694)

* Remove print; better setup.py

---------

Co-authored-by: madhur-ob <[email protected]>
romain-intel added a commit that referenced this pull request Jan 29, 2024
* Fix some docstrings and add Add To Current

* Docstring changes

* More docstrings

* Stub generator script

* More docstring fixes

* Improve stub generator script

Now:
  - deals with static and class methods
  - better handling of forward types or types and files with __annotations__
  - better handling of default values

* Add specialized function in the client to get proper return types

* Fix invalid docstrings

* Fixup more stuff in stub generator

* make docstrings consistent

* Small fixes

* Move current.py to metaflow_current.py

* Minor tweaks

* Added MANIFEST.in

* Fix issues with numpydoc compilation

* Updated stub generator to include step and type check decorators better

* Addressed comments

* Added a stub command; moved script to new location. (#1682)

* Added a stub command; moved script to new location.

* validation of sample flow with mypy + packaging (#1676)

* validate sample flow with mypy

* also install metaflow in CI

* change commands

* package generated stubs with metaflow

* don't do editable install

* re-introduce setup.py

* update publish action

* point to dist

* check common cases with pytest-mypy plugin

* Updated stub tests; added kw only args to stub generator

* remove test flow

* kubernetes validity

* add tests for environment, card, catch, conda

* add tests for timeout, secrets, retry, resources decorators

* add tests for conda_base, schedule, trigger, trigger_on_finish decorators

* Get tests to pass again

---------

Co-authored-by: Romain Cledat <[email protected]>

* fix checking of stubs package (#1689)

* Properly uninstall packages that provide stubs before installing a new one.

* Add a few more cases to the stub generator

* add tests for pypi and pypi_base decorators (#1694)

* Remove print; better setup.py

---------

Co-authored-by: madhur-ob <[email protected]>

* Small fixes to be better with PyCharm

* Example test with more flexible verification for mypy

* use regex for mypy tests (#1697)

* use regex for mypy tests

* fix regex

* edit testing CI (#1699)

* separate workflow for testing stubs (#1701)

* separate workflow for testing stubs

* remove 3.5 and 3.6

* fix test stubs workflow (#1702)

* install build via pip

* install pytest

* add timeout (#1703)

* remove on_retry_command

* Fix issue with stub generator for TypeVar

* Add extra requires to main setup.py

* publish stubs package before (#1705)

* Change color of 'valid'

---------

Co-authored-by: Ville Tuulos <[email protected]>
Co-authored-by: madhur-ob <[email protected]>
Co-authored-by: Madhur Tandon <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants