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

Make the switch to docc #833

Merged
merged 13 commits into from
Jan 9, 2024
Merged

Make the switch to docc #833

merged 13 commits into from
Jan 9, 2024

Conversation

SamWilsn
Copy link
Collaborator

@SamWilsn SamWilsn commented Sep 7, 2023

What changed?

This rips out sphinx and replaces it with docc.

Opening this as a draft because I'm still waiting on a few upstream PRs to merge.

Review Suggestions

I very strongly suggest doing this review one commit at a time. Several commits are just fixing formatting/flake8 problems that came up after updating the packages.

Cute Animal Picture

cat

Copy link
Collaborator

@petertdavies petertdavies left a comment

Choose a reason for hiding this comment

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

I haven't reviewed docc itself, but this all looks good.

Update doc build to use docc

Update pyproject.toml

Update gh-pages.yaml

Start a docc plugin for diffs

Fix build inside of tox

Get diff working

Use ins/del instead of div

Reduce irrelevant diffs in name nodes

Pass through parent instead of creating div

Support markdown diff

pull in latest fladrif

Group diffs where possible

Show diffs in directory listings

Exclude ethereum_{optimized,spec_tools}

Switch to published docc
For some reason, pypy (and cpython on GitHub) cannot seem to correctly
patch the london hardfork using the `patch` function. I've switched to
using the `patch.object` function since you can explicitly provide the
object, bypassing the import error. I'm not 100% sure this is correct.
Comment on lines +105 to +110
fork_module = importlib.import_module(
f"ethereum.{load.fork_module}.fork"
)
with patch.object(
fork_module,
"validate_proof_of_work",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@gurukamath @petertdavies if you could double check that this change maintains the original behaviour, I'd appreciate it!

@codecov-commenter
Copy link

codecov-commenter commented Nov 7, 2023

Codecov Report

Attention: 10 lines in your changes are missing coverage. Please review.

Comparison is base (3fe6514) 74.10% compared to head (1fcbcf9) 74.11%.

Files Patch % Lines
src/ethereum/arrow_glacier/fork.py 0.00% 2 Missing ⚠️
src/ethereum/gray_glacier/fork.py 0.00% 2 Missing ⚠️
src/ethereum/arrow_glacier/trie.py 0.00% 1 Missing ⚠️
src/ethereum/crypto/finite_field.py 66.66% 1 Missing ⚠️
src/ethereum/dao_fork/trie.py 0.00% 1 Missing ⚠️
src/ethereum/gray_glacier/trie.py 0.00% 1 Missing ⚠️
src/ethereum/muir_glacier/trie.py 0.00% 1 Missing ⚠️
src/ethereum/rlp.py 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #833      +/-   ##
==========================================
+ Coverage   74.10%   74.11%   +0.01%     
==========================================
  Files         572      572              
  Lines       32028    32411     +383     
==========================================
+ Hits        23733    24022     +289     
- Misses       8295     8389      +94     
Flag Coverage Δ
unittests 74.11% <82.45%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@SamWilsn SamWilsn marked this pull request as ready for review December 22, 2023 17:06
Copy link
Collaborator

@petertdavies petertdavies left a comment

Choose a reason for hiding this comment

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

LGTM!

@SamWilsn SamWilsn merged commit 559ba54 into master Jan 9, 2024
5 checks passed
@SamWilsn SamWilsn deleted the docc branch January 9, 2024 14:18
Comment on lines +88 to +96
if isinstance(pkg.module_finder, importlib.abc.MetaPathFinder):
found = pkg.module_finder.find_module(pkg.name, None)
else:
found = pkg.module_finder.find_module(pkg.name)

if not found:
raise Exception(f"unable to load module {pkg.name}")

mod = found.load_module(pkg.name)
Copy link
Collaborator

Choose a reason for hiding this comment

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

@SamWilsn After some investigation, I have narrowed it down and it seems to me that these changes (L88 - L96) are causing a memory bloat while loading and running evm tools tests. Not entirely sure why though. Would you have any thoughts?

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.

4 participants