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

Style: go to pyproject.toml #53

Merged
merged 16 commits into from
Mar 19, 2024

Conversation

manawasp
Copy link

@manawasp manawasp commented Mar 4, 2024

Hello !

This PR is still in draft state.

While migrating to pyproject.toml I got issue with Sphinx and I was wondering if you want to keep Sphinx or If I could migrate to mkdocs with material theme ?

@manawasp manawasp marked this pull request as draft March 4, 2024 14:59
@wbarnha
Copy link
Member

wbarnha commented Mar 4, 2024

Thanks for the PR! I'm not a fan of how things are currently set up with Sphinx, so if switching to mkdocs makes things more readable, then sure! Let me look around at the changes to see if this is a good switch.

@manawasp
Copy link
Author

manawasp commented Mar 7, 2024

Small update here @wbarnha :

Screenshot of the documentation:

Main page
screen

References
screen-refs

  1. I think the main content can be reworked in a later PR
  2. The main documentation color can be changed as you please, here are default but we can set any hexa color.

You can serve documentation locally by running in new venv pip install -r requirements.txt then make serve-docs (or just mkdocs serve).

About this PR I still have:

  • Validate command to build package
  • Handle versioning correctly
  • I don't know if Makefile is usefull or can be dropped I feel other python OSS prefer scripts/*
  • Pass the pipeline ✔️

@wbarnha wbarnha self-requested a review March 8, 2024 02:35
Copy link
Member

@wbarnha wbarnha left a comment

Choose a reason for hiding this comment

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

I definitely like this documentation style much more. Once the CI/CD builds pass again, I support the changes! Obviously I'll run things locally to see how they look to get a better glimpse. Sorry for the late response.

@manawasp manawasp force-pushed the style/go-to-pyproject-toml branch 3 times, most recently from 0e7497f to 14aebb8 Compare March 9, 2024 09:38
Copy link

codecov bot commented Mar 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.39%. Comparing base (5994429) to head (2273567).
Report is 49 commits behind head on master.

❗ Current head 2273567 differs from pull request most recent head 5e4bb4c. Consider uploading reports for the commit 5e4bb4c to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #53      +/-   ##
==========================================
- Coverage   94.86%   93.39%   -1.47%     
==========================================
  Files          28       28              
  Lines        4031     3999      -32     
  Branches      449      614     +165     
==========================================
- Hits         3824     3735      -89     
- Misses        188      200      +12     
- Partials       19       64      +45     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@manawasp manawasp force-pushed the style/go-to-pyproject-toml branch 4 times, most recently from 08e3de7 to 8c6fa5a Compare March 10, 2024 09:12
@manawasp
Copy link
Author

manawasp commented Mar 12, 2024

No problem ! The work on the documentation is done. I have fixed the pipeline except on related pypy locally I can't reproduce the issue do you have an idea of the current issue ? @wbarnha

@wbarnha
Copy link
Member

wbarnha commented Mar 12, 2024

No problem ! The work on the documentation is done. I have fixed the pipeline except on related pypy locally I can't reproduce the issue do you have an idea of the current issue ? @wbarnha

PyPy tends to be a bit quirky. Let's add a test for PyPy 3.9 again as well, out of curiosity.

@wbarnha
Copy link
Member

wbarnha commented Mar 12, 2024

Oh, 3.9 failed as well.

@wbarnha
Copy link
Member

wbarnha commented Mar 12, 2024

I'll need a bit to revisit this, I'm in the middle of some things at the moment.

@manawasp
Copy link
Author

I'll need a bit to revisit this, I'm in the middle of some things at the moment.

👌 in other case I will try to reproduce it this weekend locally via Docker maybe I will catch it :D

@manawasp
Copy link
Author

Some news !

I started to backport changes little by little starting again from master and the pipeline is passing... So I will do it carely to catch to thing generating this issue.

https://github.com/manawasp/mode/pull/2/files

(And finally I will update changes here)

Copy link
Member

@wbarnha wbarnha left a comment

Choose a reason for hiding this comment

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

From https://doc.pypy.org/en/latest/cpython_differences.html:

assignment to class is limited to the cases where it works on CPython 2.5. On CPython 2.6 and 2.7 it works in a bit more cases, which are not supported by PyPy so far. (If needed, it could be supported, but then it will likely work in many more case on PyPy than on CPython 2.6/2.7.) In PyPy 3, class attribute assignment between heaptypes and non heaptypes. CPython allows that for module subtypes, but not for e.g. int or float subtypes. Currently PyPy does not support the class attribute assignment for any non heaptype subtype.

So how did it even work to begin with? 😅 "Heaptypes" should be defined in https://docs.python.org/3/c-api/type.html#creating-heap-allocated-types and https://docs.python.org/3/c-api/typeobj.html#heap-types but I don't immediately see anything in the diff that could make this issue apparent.

Copy link
Member

@wbarnha wbarnha left a comment

Choose a reason for hiding this comment

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

It's hard to decipher what could be responsible for breaking PyPy tests. It seems to be pointing to something related to the setup.

@manawasp
Copy link
Author

Finally a green pipeline @wbarnha !! Look like related to this option --cov=mode.

I will rebase all commits to make something cleaner

@wbarnha wbarnha marked this pull request as ready for review March 17, 2024 14:59
Copy link
Member

@wbarnha wbarnha left a comment

Choose a reason for hiding this comment

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

Thanks for your hard work, LGTM!

@wbarnha wbarnha merged commit ab58416 into faust-streaming:master Mar 19, 2024
11 checks passed
@manawasp
Copy link
Author

manawasp commented Mar 19, 2024

Thanks for your hard work, LGTM!

Your welcome! I didn't have time to rewrite commit but that's fine.

We should try to generate the new documentation but to do that we need to publish a new tag and a release, maybe a pre-release could work ? 🤔

@manawasp
Copy link
Author

@wbarnha little ping just to be sure you if you caught my previous message :D

@wbarnha
Copy link
Member

wbarnha commented Mar 29, 2024

Sorry! Got distracted by other projects. I was going to try to add a small feature before the next release. I agree, a pre-release could work. Let's do a beta release and see what happens.

@wbarnha
Copy link
Member

wbarnha commented Mar 29, 2024

Warning: Trusted Publishers allows publishing packages to PyPI from automated environments like GitHub Actions without needing to use username/password combinations or API tokens to authenticate with PyPI. Read more: https://docs.pypi.org/trusted-publishers
Checking dist/mode_streaming-0.3.5-py2.py3-none-any.whl: PASSED
Uploading distributions to https://upload.pypi.org/legacy/
Uploading mode_streaming-0.3.5-py2.py3-none-any.whl
25l
  0% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.0/115.1 kB--:-- • ?
  0% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.0/115.1 kB--:-- • ?
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 115.1/115.1 kB00:003.0 MB/s
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 115.1/115.1 kB00:003.0 MB/s
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 115.1/115.1 kB00:003.0 MB/s
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 115.1/115.1 kB00:003.0 MB/s
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 115.1/115.1 kB00:003.0 MB/s
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 115.1/115.1 kB00:003.0 MB/s
25hWARNING  Error during upload. Retry with the --verbose option for more details. 
ERROR    HTTPError: 400 Bad Request from https://upload.pypi.org/legacy/        
         File already exists. See https://pypi.org/help/#file-name-reuse for    
         more information.                                                      

Welp. Looks like something got broken. Did setuptools-scm get removed inadvertently?

@wbarnha
Copy link
Member

wbarnha commented Mar 29, 2024

This is weird, I don't recall my Github Pages deployment workflow being this janky. Apparently last deployment was in 2022. I don't remember what got altered...

@wbarnha
Copy link
Member

wbarnha commented Mar 29, 2024

There we go, it's on https://faust-streaming.github.io/mode/ now! I forgot about the workflow I configured for deploying pages. It's been a while and it's such a small, easy detail to overlook.

@wbarnha
Copy link
Member

wbarnha commented Mar 29, 2024

These pages are so nice. Thank you so much for your work, @manawasp!

@manawasp
Copy link
Author

Was a pleasure ! Don't hesitate to ping me if you need some help here.
I will be a bit busy the following weeks but I would like to give a shot on enabling mypy again.

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