mirror of https://github.com/kianby/stacosys
Feature rye (#17)
Migrate from Poetry to Rye Adaptat github actions Group build targets in makefilepull/18/head
parent
b57c4f1ae6
commit
6d53fdecac
@ -1,16 +1,35 @@
|
||||
all: black test typehint lint
|
||||
ifeq (run,$(firstword $(MAKECMDGOALS)))
|
||||
# use the rest as arguments for "run"
|
||||
RUN_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
|
||||
# ...and turn them into do-nothing targets
|
||||
$(eval $(RUN_ARGS):;@:)
|
||||
endif
|
||||
|
||||
black:
|
||||
poetry run isort --multi-line 3 --profile black stacosys/ tests/
|
||||
poetry run black --target-version py311 stacosys/ tests/
|
||||
.PHONY: all build run test
|
||||
|
||||
# code quality
|
||||
all: black typehint lint
|
||||
|
||||
test:
|
||||
poetry run coverage run -m --source=stacosys pytest
|
||||
poetry run coverage report
|
||||
black:
|
||||
rye run isort --multi-line 3 --profile black src/ tests/
|
||||
rye run black --target-version py311 src/ tests/
|
||||
|
||||
typehint:
|
||||
poetry run mypy --ignore-missing-imports stacosys/ tests/
|
||||
rye run mypy --ignore-missing-imports src/ tests/
|
||||
|
||||
lint:
|
||||
poetry run pylint stacosys/
|
||||
rye run pylint src/
|
||||
|
||||
# test
|
||||
test:
|
||||
rye run coverage run -m --source=stacosys pytest tests
|
||||
rye run coverage report
|
||||
|
||||
# build
|
||||
#rye run pyinstaller src/stacosys/run.py --name stacosys --onefile
|
||||
build:
|
||||
rye run pyinstaller --clean stacosys.spec
|
||||
|
||||
# run
|
||||
run:
|
||||
rye run python src/stacosys/run.py $(RUN_ARGS)
|
@ -1,9 +1,12 @@
|
||||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "debian/bullseye64"
|
||||
config.vm.provider :virtualbox do |vb|
|
||||
vb.memory = 1024
|
||||
vb.cpus = 1
|
||||
end
|
||||
|
||||
config.vm.define "master" do |master|
|
||||
master.vm.hostname = "master"
|
||||
master.vm.provision "shell", inline: <<-SHELL
|
||||
mkdir /home/vagrant/stacosys
|
||||
SHELL
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
#pyinstaller stacosys/run.py --name stacosys --onefile
|
||||
poetry run pyinstaller stacosys.spec
|
@ -1,4 +0,0 @@
|
||||
[flake8]
|
||||
max-line-length = 88
|
||||
extend-ignore = E203
|
||||
spellcheck-targets=comments
|
File diff suppressed because it is too large
Load Diff
@ -1,3 +0,0 @@
|
||||
[virtualenvs]
|
||||
in-project = true
|
||||
prefer-active-python = true
|
@ -1,30 +1,42 @@
|
||||
[tool.poetry]
|
||||
[project]
|
||||
name = "stacosys"
|
||||
version = "3.3"
|
||||
description = "STAtic COmmenting SYStem"
|
||||
authors = ["Yax"]
|
||||
authors = [
|
||||
{ name = "Yax" }
|
||||
]
|
||||
readme = "README.md"
|
||||
requires-python = ">= 3.8"
|
||||
dependencies = [
|
||||
"pyrss2gen>=1.1",
|
||||
"markdown>=3.5.1",
|
||||
"requests>=2.31.0",
|
||||
"background>=0.2.1",
|
||||
"Flask>=3.0.0",
|
||||
"types-markdown>=3.5.0.1",
|
||||
"pydal>=20230521.1"
|
||||
]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = ">=3.9.0,<3.12"
|
||||
pyrss2gen = "^1.1"
|
||||
markdown = "^3.1.1"
|
||||
requests = "^2.25.1"
|
||||
coverage = "^6.5"
|
||||
background = "^0.2.1"
|
||||
Flask = "^2.1.1"
|
||||
types-markdown = "^3.4.2.1"
|
||||
pydal = "^20221110.1"
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
pylint = "^2.15"
|
||||
mypy = "^0.991"
|
||||
pytest = "^7.2.0"
|
||||
coveralls = "^3.3.1"
|
||||
pytest-cov = "^4.0.0"
|
||||
black = "^22.10.0"
|
||||
pyinstaller = "^5.9.0"
|
||||
[tool.pytest.ini_options]
|
||||
pythonpath = [
|
||||
"src"
|
||||
]
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core>=1.0.0"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[tool.rye]
|
||||
managed = true
|
||||
dev-dependencies = [
|
||||
"pylint>=3.0.2",
|
||||
"mypy>=1.6.1",
|
||||
"pytest>=7.4.3",
|
||||
"coveralls>=3.3.1",
|
||||
"pytest-cov>=4.1.0",
|
||||
"black>=23.10.1",
|
||||
"pyinstaller>=6.1.0",
|
||||
]
|
||||
|
||||
[tool.hatch.metadata]
|
||||
allow-direct-references = true
|
||||
|
@ -0,0 +1,53 @@
|
||||
# generated by rye
|
||||
# use `rye lock` or `rye sync` to update this lockfile
|
||||
#
|
||||
# last locked with the following flags:
|
||||
# pre: false
|
||||
# features: []
|
||||
# all-features: false
|
||||
|
||||
-e file:.
|
||||
altgraph==0.17.4
|
||||
astroid==3.0.1
|
||||
background==0.2.1
|
||||
black==23.11.0
|
||||
blinker==1.7.0
|
||||
certifi==2023.7.22
|
||||
charset-normalizer==3.3.2
|
||||
click==8.1.7
|
||||
coverage==6.5.0
|
||||
coveralls==3.3.1
|
||||
dill==0.3.7
|
||||
docopt==0.6.2
|
||||
exceptiongroup==1.1.3
|
||||
flask==3.0.0
|
||||
idna==3.4
|
||||
iniconfig==2.0.0
|
||||
isort==5.12.0
|
||||
itsdangerous==2.1.2
|
||||
jinja2==3.1.2
|
||||
markdown==3.5.1
|
||||
markupsafe==2.1.3
|
||||
mccabe==0.7.0
|
||||
mypy==1.6.1
|
||||
mypy-extensions==1.0.0
|
||||
packaging==23.2
|
||||
pathspec==0.11.2
|
||||
platformdirs==3.11.0
|
||||
pluggy==1.3.0
|
||||
pydal==20230521.1
|
||||
pyinstaller==6.1.0
|
||||
pyinstaller-hooks-contrib==2023.10
|
||||
pylint==3.0.2
|
||||
pyrss2gen==1.1
|
||||
pytest==7.4.3
|
||||
pytest-cov==4.1.0
|
||||
requests==2.31.0
|
||||
tomli==2.0.1
|
||||
tomlkit==0.12.2
|
||||
types-markdown==3.5.0.1
|
||||
typing-extensions==4.8.0
|
||||
urllib3==2.0.7
|
||||
werkzeug==3.0.1
|
||||
# The following packages are considered to be unsafe in a requirements file:
|
||||
setuptools==68.2.2
|
@ -0,0 +1,26 @@
|
||||
# generated by rye
|
||||
# use `rye lock` or `rye sync` to update this lockfile
|
||||
#
|
||||
# last locked with the following flags:
|
||||
# pre: false
|
||||
# features: []
|
||||
# all-features: false
|
||||
|
||||
-e file:.
|
||||
background==0.2.1
|
||||
blinker==1.7.0
|
||||
certifi==2023.7.22
|
||||
charset-normalizer==3.3.2
|
||||
click==8.1.7
|
||||
flask==3.0.0
|
||||
idna==3.4
|
||||
itsdangerous==2.1.2
|
||||
jinja2==3.1.2
|
||||
markdown==3.5.1
|
||||
markupsafe==2.1.3
|
||||
pydal==20230521.1
|
||||
pyrss2gen==1.1
|
||||
requests==2.31.0
|
||||
types-markdown==3.5.0.1
|
||||
urllib3==2.0.7
|
||||
werkzeug==3.0.1
|
@ -1 +0,0 @@
|
||||
RSS
|
Loading…
Reference in New Issue