-
Notifications
You must be signed in to change notification settings - Fork 14
Meg interest calculator #31
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
Conversation
…t.values["calc"]. It's a good place to PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pushing this Paul! I had a quick look in the morning and finally got some time to go through it.
I've added a bunch of comments/suggestions, not sure if you want to add them all or if we should do it as a follow up? 🤔 I can also push them if you would like
TODO.md
Outdated
## Eventually | ||
|
||
- Get nox to work with downloaded pyodide/pyscript | ||
- Get rid of Poetry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most just asking - are you planning on using something else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm up for listening to your POV. We can stick to Poetry. We can go back to just pip, perhaps with some pip extras. Or something else, as long as it doesn't put up a barrier for contribution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be good to have users create a single env for this, personally I enjoy using conda with poetry but that might be too confusing for someone just starting. Simple pip could work and it would lower the entry barrier since folks won't need to learn a new tool that they might not know about
codecov.yaml
Outdated
status: | ||
project: | ||
default: | ||
target: "100" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In another project I maintain we aim for 100% but sometimes this can be a bit hard to achieve, any opinions about going for maybe 98-99?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is going to be a good conversation, perhaps in a ticket or discussions. There's coverage in the PSC itself, then there's coverage in examples. So my first question: do you want the same number for both? Or do you view them as different vis a vis coverage goals?
I do this all the time. Ugh. Co-authored-by: Fábio Rosado <hello@fabiorosado.dev>
@@ -1,8 +1,8 @@ | |||
"""Provide a web server to browse the examples.""" | |||
import contextlib | |||
from collections.abc import Iterator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a really good catch. I always get this wrong. I probably should write some flake8 extension that complains. 😀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is specifically to latest python versions right?
I was used to do from typings import blah
haha
@@ -90,7 +90,7 @@ def test_html_page() -> None: | |||
"""Make an instance of a .html Page resource and test it.""" | |||
this_page = Page(path=PurePath("contributing")) | |||
assert this_page.title == "Contributing" | |||
assert this_page.subtitle == "How to get involved in the PyCharm Collective." | |||
assert this_page.subtitle == "How to get involved in the PyScript Collective." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New rule: Every time I do this, I owe you $20.
tests/test_fixtures.py
Outdated
|
||
|
||
def test_fake_element_find_element(fake_document, fake_element) -> None: | ||
def test_fake_element_find_element(fake_document: FakeDocument, fake_element: function) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's your feeling on my commitment to typing? Too much?
My plan is: actual examples don't have to use typing. Perhaps even - never use typing. But the PSC itself does aim for good typing coverage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are the type of issues I still need to see if I can make mypy happy.
In general I am in favor of typing, but I think in a lot of cases we will have mypy break for examples when we do Element
it complains that its not defined.
Your idea is great, keeping the examples easy to follow for new folks is great and enforcing typing there will make things more complicated 😄
tests/test_fixtures.py
Outdated
Element # noqa | ||
|
||
|
||
def test_fake_element_installed(fake_element: function) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You annotated with function
. Perhaps you meant Callable
with the right params?
tests/test_fixtures.py
Outdated
from psc.here import STATIC | ||
|
||
|
||
Element = cast("Unknown", "Element") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The addition of this line causes some tests to fail, as Element
should only exist in tests that ask for the fake_element
fixture.
Here's is a draft of the work I've done while processing the first PR for an example. It also includes a few of the examples in PyScript main.
It currently fails in my mocking of document. It's a good place for Fabio Rosado and I to start talking.