-
Notifications
You must be signed in to change notification settings - Fork 378
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
Fix sdist package #4074
Fix sdist package #4074
Conversation
Setuptools_scm forcibly includes all files under version control into the sdist package, ignoring `MANIFEST.in` and `find_packages`. This fixes this by replacing the `find_files` function with a dummy one (`see setup.py::EggInfo.__init__()`). See pypa/setuptools-scm#190
@@ -4,15 +4,22 @@ | |||
from eth_utils import to_canonical_address | |||
from gevent.pool import Pool | |||
|
|||
from raiden import raiden_service # pylint: disable=unused-import |
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.
can you please just import RaidenService
class directly here?
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.
Also, this can be wrapped in if TYPE_CHECKING, import RaidenService
since we're keeping the type "quoted" in the function declarations
Codecov Report
@@ Coverage Diff @@
## master #4074 +/- ##
=========================================
- Coverage 77.84% 76.3% -1.54%
=========================================
Files 113 112 -1
Lines 15584 15568 -16
Branches 2177 2183 +6
=========================================
- Hits 12131 11879 -252
- Misses 2697 2932 +235
- Partials 756 757 +1
Continue to review full report at Codecov.
|
@@ -175,10 +189,10 @@ def _add_onchain_locksroot_to_snapshot( | |||
channel["our_state"]["onchain_locksroot"] = serialize_bytes(our_locksroot) | |||
channel["partner_state"]["onchain_locksroot"] = serialize_bytes(partner_locksroot) | |||
|
|||
return json.dumps(snapshot, indent=4), snapshot_record.identifier | |||
return json.dumps(snapshot, indent=4), snapshot_record.state_change_identifier |
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.
Not sure if this is what we want here: snapshot_record.identifier
should/does exist and is the unique id for the affected snapshot. Why did you change it?
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.
Because snapshot_record
is a StateChangeRecord
(at least according to the function annotation) and therefore mypy (and PyCharm) complained.
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.
yeah, the typing of the signature is incorrect then: https://github.com/raiden-network/raiden/pull/4074/files#diff-30896e13fdd21557ed5512f90093e729R196
Should be a
raiden/raiden/storage/sqlite.py
Line 24 in 6cc35dc
class SnapshotRecord(NamedTuple): |
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.
Ok makes sense. I changed it.
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.
setuptools_scm
forcibly includes all files under version control into the sdist package, ignoringMANIFEST.in
andfind_packages
.This fixes this by replacing the
find_files
function with a dummy one (seesetup.py::EggInfo.__init__()
).See pypa/setuptools-scm#190
Additionally this uncovered that we had two directories that were missing
__init__.py
files (thereby being turned into namespace packages). That lead to mypy and pylint not covering them.This is now also fixed here (including two bugs in migrations mypy found).