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

Generalize template for GUI framework plugins #82

Merged
merged 7 commits into from
Nov 18, 2023

Conversation

rmartin16
Copy link
Member

@rmartin16 rmartin16 commented Nov 9, 2023

Changes

BRIEFCASE_REPO: https://github.com/rmartin16/briefcase
BRIEFCASE_REF: run-app-in-ci-testing

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

@rmartin16 rmartin16 marked this pull request as draft November 10, 2023 01:52
@rmartin16 rmartin16 force-pushed the gui-plugin-support branch 10 times, most recently from bfcb075 to 748b541 Compare November 12, 2023 18:14
@rmartin16 rmartin16 marked this pull request as ready for review November 12, 2023 20:46
Copy link
Member

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

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

Mostly straightforward stuff, subject to the changes in the matching Briefcase PR. Only major issue is about testing strategy; details inline.

requirements.txt Outdated
pre-commit ==3.5.0
pytest ==7.4.3
toml ==0.10.2
tox ==4.11.3
Copy link
Member

Choose a reason for hiding this comment

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

Slightly odd whitespace usage here...

Copy link
Member Author

@rmartin16 rmartin16 Nov 13, 2023

Choose a reason for hiding this comment

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

I was inspired by the way that these constraints are interpreted by the packaging infrastructure such that the operator is really a part of the version.

>>> from packaging.requirements import Requirement
>>> str(Requirement("toga == 0.4.0").specifier)
'==0.4.0'
>>> str(Requirement("toga >= 0.4.0, < 1").specifier)
'<1,>=0.4.0'

But I should make them consistent with the rest of our dependency specifications.

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure this test is validating what it once did. Previously, it was a check that the code generated by the template was actually valid, and passes flake8; however, now, it's doing those checks mostly on values that have been provided by the test itself. All the interesting logic that needs validation is in the Briefcase repo now.

A briefcase new --noinput && briefcase build check is probably called for to ensure the template is actually valid and results in compilable content; but beyond that, the place we need to test this is in Briefcase.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah; that's something I've been struggling with for these changes. I have a similar comment in beeware/briefcase#1524.

I think the tests here are still relevant as-is, though....since the template itself does have some control over creating a valid project....as I've learned by having to seemingly endlessly tweak the jinja2 templating to play nicely.

We can consider the broader testing strategy in beeware/briefcase#1524.

Copy link
Member

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

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

One error found in the template, but otherwise this looks good to go once the repo reference is updated.

]
{{- cookiecutter.pyproject_table_windows }}
{% endif %}
{% if cookiecutter.pyproject_table_macOS or cookiecutter.pyproject_table_android %}
Copy link
Member

Choose a reason for hiding this comment

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

Should this be iOS, not macOS?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep; thought I got em all. Thanks.

Copy link
Member

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

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

Marking as approved, conditional on changes that are needed as part of the beeware/briefcase#1524 landing strategy

@rmartin16 rmartin16 force-pushed the gui-plugin-support branch 5 times, most recently from ea8b3aa to 2d90800 Compare November 17, 2023 23:04
Copy link
Member

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

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

Approved for final ship

@rmartin16 rmartin16 merged commit 0a22308 into beeware:main Nov 18, 2023
@rmartin16 rmartin16 deleted the gui-plugin-support branch November 18, 2023 01:15
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