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

[FEATURE] run nox -rs generate in CI #618

Closed
dblock opened this issue Nov 28, 2023 · 2 comments · Fixed by #660
Closed

[FEATURE] run nox -rs generate in CI #618

dblock opened this issue Nov 28, 2023 · 2 comments · Fixed by #660
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@dblock
Copy link
Member

dblock commented Nov 28, 2023

Is your feature request related to a problem?

The generator may be modifying code when run that corresponds to a change currently being made.

What solution would you like?

We want to make sure the generator runs clean as part of every PR. Run nox -rs generate in CI and fail if there are more changes to files.

@dblock dblock added enhancement New feature or request untriaged Need triage good first issue Good for newcomers and removed untriaged Need triage labels Nov 28, 2023
@github-actions github-actions bot added the untriaged Need triage label Nov 28, 2023
@saimedhi saimedhi removed the untriaged Need triage label Nov 28, 2023
@saimedhi
Copy link
Collaborator

+1

@saimedhi
Copy link
Collaborator

Currently nox -rs generate is broken, likely due to recent addition of tests to nox -rs format

nox -rs generate
nox > Running session generate
nox > Re-using existing virtual environment at .nox/generate.
nox > python -m pip install -rdev-requirements.txt
nox > python utils/generate_api.py
nox > python -m pip install .
nox > python -m pip install black isort
nox > isort setup.py noxfile.py opensearchpy/ test_opensearchpy/ utils/ samples/ benchmarks/ docs/
Fixing /Users/saimedhi/opensearchpycode/opensearch-py/opensearchpy/_async/client/ingest.py
Fixing /Users/saimedhi/opensearchpycode/opensearch-py/opensearchpy/_async/client/tasks.py
Fixing /Users/saimedhi/opensearchpycode/opensearch-py/opensearchpy/_async/client/dangling_indices.py
Fixing /Users/saimedhi/opensearchpycode/opensearch-py/opensearchpy/_async/client/cat.py
Fixing /Users/saimedhi/opensearchpycode/opensearch-py/opensearchpy/_async/client/security.py
Fixing /Users/saimedhi/opensearchpycode/opensearch-py/opensearchpy/_async/client/__init__.py
Fixing /Users/saimedhi/opensearchpycode/opensearch-py/opensearchpy/_async/client/cluster.py
Fixing /Users/saimedhi/opensearchpycode/opensearch-py/opensearchpy/_async/client/remote_store.py
Fixing /Users/saimedhi/opensearchpycode/opensearch-py/opensearchpy/_async/client/indices.py
Fixing /Users/saimedhi/opensearchpycode/opensearch-py/opensearchpy/_async/client/nodes.py
Fixing /Users/saimedhi/opensearchpycode/opensearch-py/opensearchpy/_async/client/snapshot.py
Fixing /Users/saimedhi/opensearchpycode/opensearch-py/opensearchpy/client/ingest.py
Fixing /Users/saimedhi/opensearchpycode/opensearch-py/opensearchpy/client/tasks.py
Fixing /Users/saimedhi/opensearchpycode/opensearch-py/opensearchpy/client/dangling_indices.py
Fixing /Users/saimedhi/opensearchpycode/opensearch-py/opensearchpy/client/cat.py
Fixing /Users/saimedhi/opensearchpycode/opensearch-py/opensearchpy/client/security.py
Fixing /Users/saimedhi/opensearchpycode/opensearch-py/opensearchpy/client/__init__.py
Fixing /Users/saimedhi/opensearchpycode/opensearch-py/opensearchpy/client/cluster.py
Fixing /Users/saimedhi/opensearchpycode/opensearch-py/opensearchpy/client/remote_store.py
Fixing /Users/saimedhi/opensearchpycode/opensearch-py/opensearchpy/client/indices.py
Fixing /Users/saimedhi/opensearchpycode/opensearch-py/opensearchpy/client/nodes.py
Fixing /Users/saimedhi/opensearchpycode/opensearch-py/opensearchpy/client/snapshot.py
nox > black setup.py noxfile.py opensearchpy/ test_opensearchpy/ utils/ samples/ benchmarks/ docs/
All done! ✨ 🍰 ✨
227 files left unchanged.
nox > python utils/license_headers.py fix setup.py noxfile.py opensearchpy/ test_opensearchpy/ utils/ samples/ benchmarks/ docs/
nox > python -m pip install flake8 black mypy isort pylint types-requests types-six types-simplejson types-python-dateutil types-PyYAML types-mock types-pytz
nox > isort --check setup.py noxfile.py opensearchpy/ test_opensearchpy/ utils/ samples/ benchmarks/ docs/
nox > black --check setup.py noxfile.py opensearchpy/ test_opensearchpy/ utils/ samples/ benchmarks/ docs/
All done! ✨ 🍰 ✨
227 files would be left unchanged.
nox > flake8 setup.py noxfile.py opensearchpy/ test_opensearchpy/ utils/ samples/ benchmarks/ docs/
nox > pylint setup.py noxfile.py opensearchpy/ test_opensearchpy/ utils/ samples/ benchmarks/ docs/

--------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)

nox > python utils/license_headers.py check setup.py noxfile.py opensearchpy/ test_opensearchpy/ utils/ samples/ benchmarks/ docs/
All files had license header
nox > python -m pip install aiohttp
Requirement already satisfied: aiohttp in ./.nox/generate/lib/python3.10/site-packages (3.9.1)
Requirement already satisfied: attrs>=17.3.0 in ./.nox/generate/lib/python3.10/site-packages (from aiohttp) (23.2.0)
Requirement already satisfied: multidict<7.0,>=4.5 in ./.nox/generate/lib/python3.10/site-packages (from aiohttp) (6.0.4)
Requirement already satisfied: yarl<2.0,>=1.0 in ./.nox/generate/lib/python3.10/site-packages (from aiohttp) (1.9.4)
Requirement already satisfied: frozenlist>=1.1.1 in ./.nox/generate/lib/python3.10/site-packages (from aiohttp) (1.4.1)
Requirement already satisfied: aiosignal>=1.1.2 in ./.nox/generate/lib/python3.10/site-packages (from aiohttp) (1.3.1)
Requirement already satisfied: async-timeout<5.0,>=4.0 in ./.nox/generate/lib/python3.10/site-packages (from aiohttp) (4.0.3)
Requirement already satisfied: idna>=2.0 in ./.nox/generate/lib/python3.10/site-packages (from yarl<2.0,>=1.0->aiohttp) (3.6)
nox > mypy --strict setup.py noxfile.py opensearchpy/ test_opensearchpy/ utils/ samples/ benchmarks/ docs/
utils/build_dists.py:47: error: The return type of a generator function should be "Generator" or one of its supertypes  [misc]
test_opensearchpy/test_async/test_http_connection.py:59: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_async/test_http_connection.py:91: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_server/test_helpers/test_document.py:263: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_helpers/test_wrappers.py:35: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_helpers/test_wrappers.py:51: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_helpers/test_wrappers.py:65: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_helpers/test_wrappers.py:80: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_helpers/test_wrappers.py:93: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_helpers/test_result.py:39: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_helpers/test_faceted_search.py:162: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_helpers/conftest.py:36: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_helpers/conftest.py:46: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_helpers/conftest.py:95: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_helpers/conftest.py:110: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_async/test_server/test_helpers/test_actions.py:447: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_async/test_server/test_helpers/test_actions.py:680: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_async/test_server/test_helpers/test_actions.py:808: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_async/test_server/test_helpers/test_actions.py:890: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_server/conftest.py:46: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_server/conftest.py:86: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_server/test_helpers/test_faceted_search.py:69: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_server/test_helpers/test_faceted_search.py:94: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_server/test_helpers/test_faceted_search.py:115: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_server/test_helpers/conftest.py:47: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_server/test_helpers/conftest.py:54: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_server/test_helpers/conftest.py:64: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_server/test_helpers/conftest.py:71: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_server/test_helpers/conftest.py:84: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_server/test_helpers/conftest.py:108: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_helpers/test_actions.py:121: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_async/test_connection.py:346: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_async/test_server_secured/test_security_plugin.py:13: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_async/test_server_secured/test_security_plugin.py:25: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_async/test_server/conftest.py:42: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_async/test_server/__init__.py:28: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_async/test_server/__init__.py:36: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_server/test_rest_api_spec.py:464: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_server/test_rest_api_spec.py:543: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_async/test_helpers/conftest.py:23: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_async/test_helpers/conftest.py:33: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_async/test_helpers/conftest.py:82: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_async/test_helpers/conftest.py:97: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_async/test_server/test_rest_api_spec.py:212: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_async/test_server/test_rest_api_spec.py:219: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_async/test_helpers/test_faceted_search.py:145: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_async/test_server/test_helpers/test_document.py:252: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_async/test_server/test_helpers/test_faceted_search.py:57: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_async/test_server/test_helpers/test_faceted_search.py:82: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_async/test_server/test_helpers/test_faceted_search.py:103: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_async/test_server/test_helpers/conftest.py:37: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_async/test_server/test_helpers/conftest.py:44: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_async/test_server/test_helpers/conftest.py:54: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_async/test_server/test_helpers/conftest.py:61: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_async/test_server/test_helpers/conftest.py:74: error: Unused "type: ignore" comment  [unused-ignore]
test_opensearchpy/test_async/test_server/test_helpers/conftest.py:98: error: Unused "type: ignore" comment  [unused-ignore]
Found 56 errors in 23 files (checked 227 source files)
nox > Command mypy --strict setup.py noxfile.py opensearchpy/ test_opensearchpy/ utils/ samples/ benchmarks/ docs/ failed with exit code 1
nox > Session generate failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants