702: nicer error when entities update specified but entity list not attached#859
Open
lindsay-stevens wants to merge 19 commits into
Open
702: nicer error when entities update specified but entity list not attached#859lindsay-stevens wants to merge 19 commits into
lindsay-stevens wants to merge 19 commits into
Conversation
- resolve new warnings on RUF059 (unused vars) and B017 (broad err). - re-checked commented out rules with ruff version markers, and the noted issues are still present, so updated the noted version.
- removes strenum copy which is only present in py3.11+ so that change is not backwards compatible. However, ruff warns that keeping it no good either since StrEnum exists in py311.
- refurb "A tool for refurbishing and modernizing Python codebases."
- the full pydocstyle ruleset has many changes so enabling some of them individually to keep the diffs manageable.
- the full pydocstyle ruleset has many changes so enabling some of them individually to keep the diffs manageable.
- the full pydocstyle ruleset has many changes so enabling some of them individually to keep the diffs manageable.
- the full pydocstyle ruleset has many changes so enabling some of them individually to keep the diffs manageable. - D415 is a bit strange when it comes to indented inline code blocks, so added backticks for those cases as well as URLs.
- the full pydocstyle ruleset has many changes so enabling some of them individually to keep the diffs manageable.
- the full pydocstyle ruleset has many changes so enabling some of them individually to keep the diffs manageable.
- The previous few commits selectively enabled the pydocstyle rules that resulted in changes that seemed reasonable to accept now. - The rules now in the ignore list are ones that would require a lot of manual rewrites (most of them have dozens of hits). - So this rearrangement enables other potentially useful pydocstyle rules that aren't currently triggering changes or warnings.
- `flynt is a command line tool to automatically convert a project's Python code from old "%-formatted" and .format(...) strings into Python 3.6+'s "f-strings".`
- conversion result in next commit so that file history is kept.
- used `pandoc --wrap=preserve -f rst -t gfm README.rst -o README.md` - markdown easier to remember and maintain - fixed grammatical error L112 "in a easily navigable format" - removed badges since this info is available on the same page as the readme (either GitHub or PyPI) and so one less thing to update.
- this problem is caught by ODK Validate, but the error is somewhat cryptic since it refers to instance() expressions generated by pyxform for entity attributes (as shown in the replaced test test_implicit_update_mode__instance_required__error). - xls2json.py: existing secondary_instances tracking to include the file type, update question_types/geo.py accordingly
- previously the code seemed to be repetitively and inconsistently identifying the select types, so now there's 3 distinct branches: external selects, internal selects, select_from_file.
- now suggests adding a list or checking spelling. - it seems there was no existing test for the old message so new tests are added for the pass/fail cases.
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.
Closes #702
Why is this the best possible solution? Were any other approaches considered?
Branch based on deps-update / PR 853 branch so only commit 42bc8ab is relevant.
Catches the missing secondary instance reference to show a nicer and more specific error message. Per commit message:
Also includes a couple of seemingly straightforward refactoring improvements in code updated for / nearby 42bc8ab:
What are the regression risks?
Low risk. An external tool or training material may expect the ODK Validate message. The selects refactoring passes existing tests, although as noted in f4bda32 there are some seemingly obvious / basic scenarios that don't (or didn't) have tests.
Does this change require updates to documentation? If so, please file an issue here and include the link below.
No
Before submitting this PR, please make sure you have:
testspython -m unittestand verified all tests passruff format pyxform testsandruff check pyxform teststo lint code