Skip to content

Makes project to be packaging-ready and executable, includes some list of refactoring and improvements#7

Open
o-murphy wants to merge 3 commits into
kaganisildak:mainfrom
vaultbin:main
Open

Makes project to be packaging-ready and executable, includes some list of refactoring and improvements#7
o-murphy wants to merge 3 commits into
kaganisildak:mainfrom
vaultbin:main

Conversation

@o-murphy

@o-murphy o-murphy commented Jul 15, 2025

Copy link
Copy Markdown

Changes

  • sources refactored to src-based layout
  • fixed bare except warnings
  • updated README.md
  • added .gitignore
  • build system configured
  • added app entry-point
  • added dev deps group
  • added CI workflows for mypy and ruff check
  • sources formatted with ruff format
  • ChatMode refactored to much more pythonic approach and type annotated
  • improved logging and CLI args parsing
    • uses built-in python logging
    • uses argparse for CLI args to setup debug mode, logging, get cli and usage help
  • Improved nickname management
    • added -n/--name CLI argument
    • if name is not provided or not in state.json it would be randomized
    • added /h alias to /help
  • prevent empty input handling
  • add setuptools-csm for version extracting from git tags
  • uses zlib built-in by default (lz4 is optional now)
  • some messages formatting adjusted to original ones
  • pytest added as --dev dependency, tests_refactored
  • added fallback for the platforms that raises EOF with aioconsole.ainput()
  • init the I/O compatibility layer for Pythonista iOS app (not fully complete)

> Pytest CI runs (link)

Known issues

Also I can

  • setup CI for publish to pypi on release (you just have to setup trusted publisher on pypi, or i can deploy on my own pypi account with given owner/maintainer rules to you)
  • update type annotations

@o-murphy o-murphy changed the title Makes project to be packaging-ready Makes project to be packaging-ready and executable Jul 17, 2025
@o-murphy o-murphy force-pushed the main branch 3 times, most recently from 04e4199 to d2b039d Compare July 17, 2025 09:20
jflaflamme added a commit to jflaflamme/bitchat-python that referenced this pull request Jul 17, 2025
@o-murphy o-murphy changed the title Makes project to be packaging-ready and executable Makes project to be packaging-ready and executable, includes some list of refactoring and improvements Jul 17, 2025
@o-murphy o-murphy force-pushed the main branch 4 times, most recently from 33eb64a to 7ea6e29 Compare July 18, 2025 08:46
@o-murphy o-murphy force-pushed the main branch 5 times, most recently from 203b617 to 11e535d Compare July 21, 2025 14:35
@o-murphy

o-murphy commented Jul 23, 2025

Copy link
Copy Markdown
Author

@kaganisildak Bro, I'm disappointed, you made the project open and available to the public, but you ignore it. You give no reply to PR and issues. You added changes to original code with no fixes of existing issues and discovered problems and with no merges of other contributors fixes. Also I see you directly copied part of my Readme.md with no even functionality realised. I am waiting for a response.

@kaganisildak

Copy link
Copy Markdown
Owner

@o-murphy First off, you’re totally right and I’m really sorry. I haven’t been as responsive as the project deserves. I’ve been dealing with some health issues and, with the little time I had, I focused almost exclusively on getting Noise protocol support in place. That ended up pushing everything else to the back burner—PRs, issues, and even merging fixes from contributors like you.

Noise support just landed, so if you could update your PRs to match the new structure, I’d really appreciate it. Once those updates are in, I’ll go through each PR, test, and get them merged as quickly as I can.

@o-murphy

Copy link
Copy Markdown
Author

@kaganisildak Okay i'll update it

* sources refactored to `src-based` layout
* fixed bare `except` linter warnings
* updated `README.md`
* added .gitignore
* build system configured
* added app entry-point
* added dev deps
* added CI workflows for `mypy` and `ruff check`
* sources formatted with `ruff format`
* ChatMode dataclass refactored to Chat dataclass with mode: ChatMode(Enum) field and appropriate factory methods, Codebase cleanup

* Logging and CLI args parsing
  * uses built-in python `logging`
  * uses argparse for CLI args parsing to setup debug mode, logging, get help and usage

* Improved nickname management
  * added `-n/--name` CLI argument
  * if name is not provided it would be randomized
  * added `/h` alias to `/help`

* add setuptools-csm for version extraction from git
* prevent empty input handling
* add /q alias for /exit
* revert ver number

* Use zlib for compression by default
  * lz4 should be optional, install via `.[full]` dependency group
* improved messages formatting (adjusted to original app format stype)
* BitchatMessage.from_bytes and BitchatPacket.from_bytes factory classmethods
* replaced `==` equalisation to `is` for enums checking
@o-murphy

o-murphy commented Jul 25, 2025

Copy link
Copy Markdown
Author

@kaganisildak The conflicts resolving done! But there the new issue after "noise encryption" changes: DM chats are completely not working between python and android app v0.7..v0.7.3 Idk why but message never received from python and from android client. It happen even without adding changes from #7

@kaganisildak

Copy link
Copy Markdown
Owner

@o-murphy did android version got noise support? I didnt check yet but im testing python version with ios app

@o-murphy

Copy link
Copy Markdown
Author

@o-murphy did android version got noise support? I didnt check yet but im testing python version with ios app

Not yet!, but anyway you can merge my test and then merge changes from #7, It is not mutate existing functionality for now and just extends it and makes development/usage environment reproducible and friendly

@o-murphy

Copy link
Copy Markdown
Author

@kaganisildak
Can you test #7 with iOS app? I can't access to iOS bitchat TestFlight (it's full for now), so i can test with android/pc only

@o-murphy o-murphy force-pushed the main branch 3 times, most recently from 35a4355 to 62c10d0 Compare July 27, 2025 18:38
@o-murphy

Copy link
Copy Markdown
Author

@kaganisildak I got iOS app, I can now test it

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