Rye migration
This commit is contained in:
parent
b57c4f1ae6
commit
46a6358c5b
27 changed files with 138 additions and 1139 deletions
24
Makefile
24
Makefile
|
@ -1,16 +1,28 @@
|
|||
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
|
||||
|
||||
all: black test typehint lint
|
||||
|
||||
black:
|
||||
poetry run isort --multi-line 3 --profile black stacosys/ tests/
|
||||
poetry run black --target-version py311 stacosys/ tests/
|
||||
poetry run isort --multi-line 3 --profile black src/ tests/
|
||||
poetry run black --target-version py311 src/ tests/
|
||||
|
||||
test:
|
||||
poetry run coverage run -m --source=stacosys pytest
|
||||
poetry run coverage report
|
||||
rye run coverage run -m --source=stacosys pytest tests
|
||||
rye run coverage report
|
||||
|
||||
typehint:
|
||||
poetry run mypy --ignore-missing-imports stacosys/ tests/
|
||||
rye run mypy --ignore-missing-imports stacosys/ tests/
|
||||
|
||||
lint:
|
||||
poetry run pylint stacosys/
|
||||
rye run pylint src/
|
||||
|
||||
build:
|
||||
rye run pyinstaller stacosys.spec
|
||||
|
||||
run:
|
||||
rye run python src/stacosys/run.py $(RUN_ARGS)
|
3
vagrant/Vagrantfile → Vagrantfile
vendored
3
vagrant/Vagrantfile → Vagrantfile
vendored
|
@ -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
|
3
build.sh
3
build.sh
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
#pyinstaller stacosys/run.py --name stacosys --onefile
|
||||
poetry run pyinstaller stacosys.spec
|
1098
poetry.lock
generated
1098
poetry.lock
generated
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,37 @@
|
|||
[tool.poetry]
|
||||
[project]
|
||||
name = "stacosys"
|
||||
version = "3.3"
|
||||
description = "STAtic COmmenting SYStem"
|
||||
authors = ["Yax"]
|
||||
authors = [
|
||||
{ name = "Yax" }
|
||||
]
|
||||
readme = "README.md"
|
||||
|
||||
[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"
|
||||
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"
|
||||
]
|
||||
|
||||
[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
|
||||
|
|
51
requirements-dev.lock
Normal file
51
requirements-dev.lock
Normal file
|
@ -0,0 +1,51 @@
|
|||
# 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
|
||||
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
|
||||
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
|
26
requirements.lock
Normal file
26
requirements.lock
Normal file
|
@ -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
|
3
run.sh
3
run.sh
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
python3 stacosys/run.py "$@"
|
||||
|
7
src/stacosys/__init__.py
Normal file
7
src/stacosys/__init__.py
Normal file
|
@ -0,0 +1,7 @@
|
|||
# from run import stacosys_server
|
||||
#
|
||||
# if __name__ == '__main__':
|
||||
# parser = argparse.ArgumentParser()
|
||||
# parser.add_argument("config", help="config path name")
|
||||
# args = parser.parse_args()
|
||||
# stacosys_server(args.config)
|
|
@ -5,10 +5,10 @@ block_cipher = None
|
|||
|
||||
|
||||
a = Analysis(
|
||||
['stacosys/run.py'],
|
||||
['src/stacosys/run.py'],
|
||||
pathex=[],
|
||||
binaries=[],
|
||||
datas=[('stacosys/interface/templates/*.html', 'stacosys/interface/templates/')],
|
||||
datas=[('src/stacosys/interface/templates/*.html', 'src/stacosys/interface/templates/')],
|
||||
hiddenimports=[],
|
||||
hookspath=[],
|
||||
hooksconfig={},
|
||||
|
|
Loading…
Add table
Reference in a new issue