Page MenuHomePhabricator

[electrum] initial monorepo integration
ClosedPublic

Authored by PiRK on Jun 20 2023, 08:28.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC3b500943df11: [electrum] initial monorepo integration
Summary

This is a copy of the ElectrumABC repository as of commit https://github.com/Bitcoin-ABC/ElectrumABC/commit/9b72b3efe62a12f8f5abf883656af17992dd6c85

Two files related to CI and linting have been removed: .pre-commit-config.yaml and .cirrus.yml.
A new configuration file .isort.cfg has been added to mark the main packages as know first party packages to prevent isort from sorting them as third-party packages.

Permanent linter settings:

  • The main modules are excluded from lint-python-shebang as a shebang does not make sense for non-scripts.
  • Auto-generated files (protobuf and icons.py) are excluded from linters.

Temporary linter exclusions (to be fixed in separate diffs):

  • flake8, because of remaining warnings from flake8 plugins (A001, A002, C401...)
  • lint-python-encoding
  • shellcheck
  • flynt (low priority)
  • mypy (low priority and difficult to fix)

Linter related changes:

  • corrected spelling
  • corrected and added bash shebangs
  • added export LC_ALL=C.UTF-8 to shell

Other changes:

  • adapted the build scripts to work when the directory mapped to ELECTRUM_ROOT inside the docker is not the root of a git repo
Test Plan

arc lint --everything

Make sure Electrum ABC works: cd electrum && ./electrum-abc

Check the Help > Report Bug menu now points to the Bitcoin-ABC repo

Make sure the build toolchains work:

cd electrum
contrib/build-wine/build.sh
contrib/build-linux/appimage/build.sh
contrib/build-linux/srcdist-docker/build.sh

Diff Detail

Event Timeline

PiRK edited the summary of this revision. (Show Details)

make the build scripts work when the is no git root (when bitcoin-abc/electrum becomes the root dir inside the docker)

PiRK published this revision for review.Jun 21 2023, 07:11
Fabien requested changes to this revision.Jun 21 2023, 14:41
Fabien added inline comments.
electrum/LICENCE
20 ↗(On Diff #40895)

That's the licence of the monorepo already, I don't think it's needed to duplicate it

electrum/MANIFEST.in
1 ↗(On Diff #40895)

And so it should be removed from here

electrum/contrib/update_checker/README.md
9 ↗(On Diff #40895)

This will stop working unless we create a repo mirroring automation

electrum/contrib/update_checker/releases.json
2 ↗(On Diff #40895)

That's outdated ?

This revision now requires changes to proceed.Jun 21 2023, 14:41

fix REPOSITORY_NAME, REPOSITORY_URL, RELEASES_JSON_URL in constants.py

add a comment in MANIFEST.in about the duplicated license file

This revision is now accepted and ready to land.Jun 22 2023, 14:10

Note: the version bump will be managed in another diff

This revision was automatically updated to reflect the committed changes.