Skip to content

Commit

Permalink
Consolidate all project files into pyproject.toml (#235)
Browse files Browse the repository at this point in the history
* Consolidate all project files into pyproject.toml

* Update pyproject.toml

Co-authored-by: Martin Hjelmare <[email protected]>

---------

Co-authored-by: Martin Hjelmare <[email protected]>
  • Loading branch information
ludeeus and MartinHjelmare authored Mar 15, 2024
1 parent d2f4a47 commit a45e11b
Show file tree
Hide file tree
Showing 8 changed files with 177 additions and 138 deletions.
17 changes: 12 additions & 5 deletions .devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"name": "NabuCasa SniTun dev",
"name": "NabuCasa SniTun Dev",
"image": "mcr.microsoft.com/vscode/devcontainers/python:0-3.8",
"postCreateCommand": "pip3 install tox && pip3 install -r requirements_tests.txt",
"postStartCommand": "pip3 install -e .",
"postCreateCommand": "python3 -m pip install -e .[test]",
"postStartCommand": "python3 -m pip install -e .",
"containerUser": "vscode",
"containerEnv": {
"GIT_EDITOR": "code --wait"
},
"customizations": {
"vscode": {
"extensions": [
"esbenp.prettier-vscode",
"ms-python.python",
"ms-python.vscode-pylance",
"visualstudioexptteam.vscodeintellicode",
"esbenp.prettier-vscode"
"visualstudioexptteam.vscodeintellicode"
],
"settings": {
"python.pythonPath": "/usr/local/bin/python",
Expand All @@ -27,6 +27,13 @@
"editor.formatOnPaste": false,
"editor.formatOnSave": true,
"editor.formatOnType": true,
"editor.rulers": [
88
],
"editor.codeActionsOnSave": {
"source.fixAll": "always",
"source.organizeImports": "always"
},
"files.trimTrailingWhitespace": true,
"terminal.integrated.profiles.linux": {
"zsh": {
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install setuptools build
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python setup.py sdist bdist_wheel
python -m build
twine upload dist/*
43 changes: 0 additions & 43 deletions pylintrc

This file was deleted.

163 changes: 163 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=62.3",
]

[project]
authors = [
{name = "Nabu Casa, Inc.", email = "[email protected]"},
]
classifiers = [
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: OS Independent",
"Topic :: Internet :: Proxy Servers",
"Topic :: Software Development :: Libraries :: Python Modules",
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"attrs>=18.2.0",
"async_timeout>=3.0.1",
"cryptography>=2.5",
]
description = "SNI proxy with TCP multiplexer"
keywords = ["sni", "proxy", "multiplexer", "tls"]
license = {text = "GPL v3"}
name = "snitun"
requires-python = ">=3.8"
version = "0.36.2"

[project.optional-dependencies]
test = [
"flake8==6.1.0",
"pylint==3.0.2",
"pytest==7.4.3",
"pytest-timeout==2.2.0",
"pytest-aiohttp==1.0.5",
"black==23.11.0",
]

[project.urls]
Homepage = "https://www.nabucasa.com/"
Repository = "https://github.com/NabuCasa/snitun.git"

[tool.isort]
combine_as_imports = true
default_section = "THIRDPARTY"
force_grid_wrap = 0
force_sort_within_sections = true
forced_separate = "tests"
include_trailing_comma = true
indent = " "
line_length = 88
multi_line_output = 3
sections = [
"FUTURE",
"STDLIB",
"THIRDPARTY",
"FIRSTPARTY",
"LOCALFOLDER",
]
use_parentheses = true

[tool.tox]
legacy_tox_ini = """
[tox]
envlist = lint, tests, black
[testenv]
basepython = python3
deps =
-e '.[test]'
[testenv:lint]
ignore_errors = True
commands =
pylint snitun
[testenv:tests]
commands =
pytest tests
[testenv:black]
commands =
black --target-version py38 --check snitun tests
"""

[tool.pylint.BASIC]
disable = [
"abstract-method",
"cyclic-import",
"duplicate-code",
"global-statement",
"locally-disabled",
"not-context-manager",
"too-few-public-methods",
"too-many-arguments",
"too-many-branches",
"too-many-instance-attributes",
"too-many-lines",
"too-many-locals",
"too-many-public-methods",
"too-many-return-statements",
"too-many-statements",
"unused-argument",
"missing-docstring",
"line-too-long",
"too-few-public-methods",
"too-many-locals",
"too-many-branches",
]
generated-members=[
"botocore.errorfactory",
]
good-names= [
"_",
"ex",
"fp",
"i",
"id",
"iv",
"j",
"k",
"Run",
"T",
]


[tool.pylint.EXCEPTIONS]
overgeneral-exceptions=[
"builtins.Exception",
]

[tool.pylint.MAIN]
ignore=[
"tests_*",
]
reports=false

[tool.pytest.ini_options]
asyncio_mode = "auto"

[tool.setuptools]
include-package-data = true
platforms = [
"any",
]
zip-safe = false

[tool.setuptools.packages.find]
include = [
"snitun",
"snitun.server",
"snitun.client",
"snitun.multiplexer",
"snitun.utils",
]
6 changes: 0 additions & 6 deletions requirements_tests.txt

This file was deleted.

20 changes: 0 additions & 20 deletions setup.cfg

This file was deleted.

41 changes: 0 additions & 41 deletions setup.py

This file was deleted.

21 changes: 0 additions & 21 deletions tox.ini

This file was deleted.

0 comments on commit a45e11b

Please sign in to comment.