Move fourfront from pytest 2.9 to 3.10#1435
Draft
netsettler wants to merge 36 commits into
Draft
Conversation
…tilities level. (Many are unused but may back other code we want to port.) Rename src/encoded/utils.py to src/encoded/util.py so these filenames will align again. Adjust files that import the renamed file. Also adjust test_indexing.py to use meta = MetaData(...); meta.reflect() instead of meta = MetaData(..., reflect=True).
…kibana-start-test and use poetry 1.1.4 in Makefile.
…ile.ZipFile) from cgap-portal version of scr/encoded/xlreader.py
… beause they'd be complicated to fix right now.
…src/encoded/tests/test_access_key.py
…on't special-case GET and HEAD methods.
…iverges. Add a TEST_PREFIX variable for symmetry. Compute the letter pairs needed for accession ids by looking at the schema files.
…CCEPT, which is more like what browsers would do and is needed for some ported changes from cgap-portal. Light PEP8. Remove pytest_plugins setting, which is deprecated; this info is now in pytest.ini. Change pytest.ini to have markers in line with cgap-portal, to use testpaths rather than a --pyargs setting, and to use -p to handle plugins.
…/renderers.py. Some PEP8.
…nge the way commits work to be more incremental.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR has been superseded by fourfront PR #1437.
Substantive changes and bug fixes:
In
src/encoded/authentication.pyGETandHEADmethods.pyproject.tomlpytestto version 3.10 and related libraries in some ways.awscli,boto3,botocore,netaddr,boto3-stubs.In
src/encoded/schema_formats.pyandsrc/encoded/server_defaults.py:ACCESSION_PREFIXvariable to minimize number of places code diverges.TEST_PREFIXvariable for symmetry. Compute the letter pairs needed for accession ids by looking at the schema files.src/encoded/loadxl.pypost_only=argument forload_allandload_all_gen.src/encoded/renderers.pysrc/encoded/tests/conftest.pyhtmltestappandanonhtmltestappto passHTTP_ACCEPT, which is more like what browsers would do, and which is needed for changes ported from CGAP.pytest_pluginssetting, which is deprecated. This info is now inpytest.ini.pytest.initestpathsrather than a--pyargsargument being added.-pto handle plugins, in lieu of settingpytest_plugins.src/encoded/tests/test_indexing.pymeta = MetaData(...); meta.reflect()to instead bemeta = MetaData(..., reflect=True).Makefile:scripts/kibana-startandscripts/psql-startscripts to support targetskibana-start-testandpsql-test, respectively.poetry 1.1.4conftest.pytempfile.tempdirto'/tmp'.src/encoded/commands/purge_item_type.pySimple changes and small bug fixes (mostly found by better warnings):
Port new file
src/encoded/tests/test_renderers.pyfrom CGAP.src/encoded/types/page.pysrc/encoded/tests/test_types_biosample.pybiosample_relationas a fixture. It's just a function.Add support for rewriting
"~1.2.3"insetup_eb.py. Add test cases intest_setup_eb.py.src/encoded/commands/spreadsheet_to_json.pyargparse.src/encoded/xlreader.pyzipfile.ZipFile).Relock
poetry.lock.Rename
src/encoded/utils.pyback tosrc/encoded/util.pyfor alignment with cgap-portal, and with history. Bad idea to have renamed it in the first place.Port various utilities that might not be used, just in case they're needed for other ports. We can clean this up later.
Update callers to import from
util:src/encoded/types/file.pysrc/encoded/tests/test_search.pysrc/encoded/tests/test_types_init_collections.pysrc/encoded/tests/test_types_protocol.pysrc/encoded/tests/test_util.py(wastest_utils.py, but renamed as well)src/encoded/tests/test_validation_errors.pysrc/encoded/tests/test_aggregation.pysrc/encoded/tests/test_batch_download.pyCosmetic changes:
Change
.encryptto.hashinsrc/encoded/tests/test_access_key.pysrc/encoded/types/access_key.pysrc/encoded/tests/test_edw_hash.pyUse
dcicutils.misc_utils.TestAppinstead ofwebtest.TestAppin:src/encoded/commands/import_data.pysrc/encoded/commands/load_access_keys.py.ebextensions/13_run_npm.config.gitignoresrc/encoded/commands/configure_kibana_index.py{'use_ssl': True}.src/encoded/dev_servers.pyAlso misc PEP8 in various files, including:
src/encoded/root.py