Closed Guts closed 1 year ago
It is awesome!
I will review of PR in few days
Can you do a rebase? I separated lint and test jobs in github actions
Can you do a rebase? I separated lint and test jobs in github actions
Done.
@daxartio I've finally fixed every warning but I'm still convinced that setup is overkill for a project of this size!
Your project, your choice, fine. But please, make it more explicit by documenting how to work locally and usable than hidden under the hood of a makefile (not cross-platform) and a 3rd part tool (even as common as poetry is).
(sorry if my ton is too harsh, I'm not native English speaking)
Thank you for your changes!
I got it about makefile. I will think about it. I usually use code tools in any project, because sometimes i make mistakes.
Also you can run a code tool from cli just copy it from makefile and delete poetry run
. E.g. mypy termynal
, black --check termynal
, ruff termynal
Thank you for your changes!
Thank you for accepting PR and reviewing fast.
I got it about makefile. I will think about it. I usually use code tools in any project, because i sometimes do mistakes.
Thank you for taking it into account!
Also you can run a code tool from cli just copy it from makefile and delete poetry run. E.g. mypy termynal, black --check termynal, ruff termynal
As said in my description, I ran the commands manually (except mypy) but it was not giving the same result.
What about a PR introducing pre-commit? It's another way to check before CI, it's locally, eventually verbose and manage configuration.
Yeah. But i really don't like pre-commit, sorry. Because it usually works slowly and can be broken. I think about use it only for checking conventional commits.
Can you show some examples?
As said in my description, I ran the commands manually (except mypy) but it was not giving the same result.
Did you use a common venv for the project? I usually use a venv in the a project in a .venv dir. And i install deps from lock file, cause different deps can give different result
termynal on ξ feature/make-it-configurable is π¦ v0.3.1 via π v3.8.10
β― make all
poetry run ruff --fix termynal tests
RuntimeError
The Poetry configuration is invalid:
- Additional properties are not allowed ('group' was unexpected)
at ~/.poetry/lib/poetry/_vendor/py3.10/poetry/core/factory.py:43 in create_poetry
39β message = ""
40β for error in check_result["errors"]:
41β message += " - {}\n".format(error)
42β
β 43β raise RuntimeError("The Poetry configuration is invalid:\n" + message)
44β
45β # Load package
46β name = local_config["name"]
47β version = local_config["version"]
make: *** [Makefile:55 : format] Erreur 1
I looked at your error again and understood that you used version of poetry less then 1.3.2
Did you use a common venv for the project? I usually use a venv in the a project in a .venv dir. And i install deps from lock file, cause different deps can give different result
Of course I'm in a venv (.venv too). I do not install from the lock, I pin versions.
I looked at your error again and understood that you used version of poetry less then 1.3.2
Indeed:
β― poetry --version
Poetry version 1.1.13
I've installed poetry using the command available in official documentation. Rerunning it:
β― curl -sSL https://install.python-poetry.org | python3 -
Retrieving Poetry metadata
The latest version (1.5.1) is already installed.
Running self update:
β― poetry self update
Updating to 1.5.1
RuntimeError
Could not find poetry-1.5.1-linux.sha256sum file
at .poetry/lib/poetry/console/commands/self/update.py:260 in _update
256β try:
257β r = urlopen(base_url + "/{}/{}".format(version, checksum))
258β except HTTPError as e:
259β if e.code == 404:
β 260β raise RuntimeError("Could not find {} file".format(checksum))
261β
262β raise
263β
264β checksum = r.read().decode().strip()
This is why I don't like this superset of Python environment tooling!
This is why I don't like this superset of Python environment tooling!
I see! So i think about Rust π
Hello @daxartio, in this PR, I propose to expose some options related to termynal.js to the markdown processor.
Given this markdown:
You can then use this:
And so, through the Mkdocs plugin:
For now, the only supported option is
prompt_literal_start
, corresponding to thedata-ty-prompt
of termynal.js.Sorry for the multiple commits, I've been interrupted so it's quite messy. If you want, I can squash.
About the tooling
As said in my previous PR, I don't use poetry and I'm not willing to. But to play fair, I tried to comply with the required setup to contribute to your project and I've installed poetry (running Ubuntu 22.04).
Still, I'm facing this issue:
Then I'm using
ruff
too, but installing it with pip and running it, I do not have the same error than in the CI...