diff --git a/.flake8 b/.flake8 deleted file mode 100644 index 848f4fb..0000000 --- a/.flake8 +++ /dev/null @@ -1,4 +0,0 @@ -[flake8] -max-line-length = 88 -extend-ignore = E203, W503 -exclude = docs diff --git a/.gitignore b/.gitignore index 7bae8cb..aaa549e 100644 --- a/.gitignore +++ b/.gitignore @@ -120,7 +120,6 @@ celerybeat.pid # SageMath parsed files *.sage.py -sage.py # Environments .env @@ -152,6 +151,15 @@ dmypy.json # pytype static type analyzer .pytype/ +# local files +run.py +*/run.py +sage.py +*/sage.py + +# ruff +.ruff_cache/ + # Cython debug symbols cython_debug/ @@ -161,7 +169,3 @@ cython_debug/ # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ - -# local files -run.py -*/run.py diff --git a/mypy.ini b/mypy.ini deleted file mode 100644 index 4f3e3d3..0000000 --- a/mypy.ini +++ /dev/null @@ -1,10 +0,0 @@ -[mypy] -mypy_path = stubs -disallow_untyped_calls = true -disallow_untyped_defs = true -ignore_missing_imports = true -explicit_package_bases = true -exclude = ^(docs/source/conf.py|build/|tests/|stubs/) - -[mypy-sage_imap.*] -ignore_missing_imports = True \ No newline at end of file diff --git a/packages/poetry.md b/packages/poetry.md new file mode 100644 index 0000000..8609167 --- /dev/null +++ b/packages/poetry.md @@ -0,0 +1,30 @@ +To export a `requirements-dev.txt` file containing both the main dependencies and the development dependencies from your `pyproject.toml` using Poetry, you can use the `--with` option to include the development dependencies. + +Here is the command you can use: + +```bash +poetry export -f requirements.txt --output requirements-dev.txt --with dev +``` + +Explanation: +- `-f requirements.txt`: Specifies the format of the output file. +- `--output requirements-dev.txt`: Specifies the name of the output file. +- `--with dev`: Includes the dependencies from the `dev` group. + +This command will generate a `requirements-dev.txt` file that includes both the main dependencies and the development dependencies. + +If you want to export the main dependencies to `requirements.txt` and the combined dependencies (main + dev) to `requirements-dev.txt`, you can use the following commands: + +1. Export main dependencies to `requirements.txt`: + + ```bash + poetry export -f requirements.txt --output requirements.txt + ``` + +2. Export main + dev dependencies to `requirements-dev.txt`: + + ```bash + poetry export -f requirements.txt --output requirements-dev.txt --with dev + ``` + +This way, you'll have two separate files: `requirements.txt` for the main dependencies and `requirements-dev.txt` for both the main and development dependencies. \ No newline at end of file diff --git a/packages/requirements-dev.txt b/packages/requirements-dev.txt index 0b00834..1d7c075 100644 --- a/packages/requirements-dev.txt +++ b/packages/requirements-dev.txt @@ -488,6 +488,25 @@ questionary==2.0.1 ; python_version >= "3.12" and python_version < "4.0" \ requests==2.32.3 ; python_version >= "3.12" and python_version < "4.0" \ --hash=sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760 \ --hash=sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6 +ruff==0.5.7 ; python_version >= "3.12" and python_version < "4.0" \ + --hash=sha256:00cc8872331055ee017c4f1071a8a31ca0809ccc0657da1d154a1d2abac5c0be \ + --hash=sha256:083bbcbe6fadb93cd86709037acc510f86eed5a314203079df174c40bbbca6b3 \ + --hash=sha256:2dca26154ff9571995107221d0aeaad0e75a77b5a682d6236cf89a58c70b76f4 \ + --hash=sha256:33d61fc0e902198a3e55719f4be6b375b28f860b09c281e4bdbf783c0566576a \ + --hash=sha256:4a09ea2c3f7778cc635e7f6edf57d566a8ee8f485f3c4454db7771efb692c499 \ + --hash=sha256:548992d342fc404ee2e15a242cdbea4f8e39a52f2e7752d0e4cbe88d2d2f416a \ + --hash=sha256:7e31c9bad4ebf8fdb77b59cae75814440731060a09a0e0077d559a556453acbb \ + --hash=sha256:7f70284e73f36558ef51602254451e50dd6cc479f8b6f8413a95fcb5db4a55fc \ + --hash=sha256:8d796327eed8e168164346b769dd9a27a70e0298d667b4ecee6877ce8095ec8e \ + --hash=sha256:8dfc0a458797f5d9fb622dd0efc52d796f23f0a1493a9527f4e49a550ae9a7e5 \ + --hash=sha256:9369c218f789eefbd1b8d82a8cf25017b523ac47d96b2f531eba73770971c9e5 \ + --hash=sha256:9ccd078c66a8e419475174bfe60a69adb36ce04f8d4e91b006f1329d5cd44bcf \ + --hash=sha256:a01c34400097b06cf8a6e61b35d6d456d5bd1ae6961542de18ec81eaf33b4cb8 \ + --hash=sha256:a36d8dcf55b3a3bc353270d544fb170d75d2dff41eba5df57b4e0b67a95bb64e \ + --hash=sha256:a78ad870ae3c460394fc95437d43deb5c04b5c29297815a2a1de028903f19692 \ + --hash=sha256:b88ca3db7eb377eb24fb7c82840546fb7acef75af4a74bd36e9ceb37a890257e \ + --hash=sha256:eaf3d86a1fdac1aec8a3417a63587d93f906c678bb9ed0b796da7b59c1114a1e \ + --hash=sha256:fcc8054f1a717e2213500edaddcf1dbb0abad40d98e1bd9d0ad364f75c763eea snowballstemmer==2.2.0 ; python_version >= "3.12" and python_version < "4.0" \ --hash=sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1 \ --hash=sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a @@ -527,9 +546,6 @@ tomlkit==0.13.0 ; python_version >= "3.12" and python_version < "4.0" \ tox==4.16.0 ; python_version >= "3.12" and python_version < "4.0" \ --hash=sha256:43499656f9949edb681c0f907f86fbfee98677af9919d8b11ae5ad77cb800748 \ --hash=sha256:61e101061b977b46cf00093d4319438055290ad0009f84497a07bf2d2d7a06d0 -types-setuptools==71.1.0.20240726 ; python_version >= "3.12" and python_version < "4.0" \ - --hash=sha256:85ba28e9461bb1be86ebba4db0f1c2408f2b11115b1966334ea9dc464e29303e \ - --hash=sha256:a7775376f36e0ff09bcad236bf265777590a66b11623e48c20bfc30f1444ea36 typing-extensions==4.12.2 ; python_version >= "3.12" and python_version < "4.0" \ --hash=sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d \ --hash=sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8 diff --git a/poetry.lock b/poetry.lock index d8eb0f1..c7f688a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -984,6 +984,33 @@ urllib3 = ">=1.21.1,<3" socks = ["PySocks (>=1.5.6,!=1.5.7)"] use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] +[[package]] +name = "ruff" +version = "0.5.7" +description = "An extremely fast Python linter and code formatter, written in Rust." +optional = false +python-versions = ">=3.7" +files = [ + {file = "ruff-0.5.7-py3-none-linux_armv6l.whl", hash = "sha256:548992d342fc404ee2e15a242cdbea4f8e39a52f2e7752d0e4cbe88d2d2f416a"}, + {file = "ruff-0.5.7-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:00cc8872331055ee017c4f1071a8a31ca0809ccc0657da1d154a1d2abac5c0be"}, + {file = "ruff-0.5.7-py3-none-macosx_11_0_arm64.whl", hash = "sha256:eaf3d86a1fdac1aec8a3417a63587d93f906c678bb9ed0b796da7b59c1114a1e"}, + {file = "ruff-0.5.7-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a01c34400097b06cf8a6e61b35d6d456d5bd1ae6961542de18ec81eaf33b4cb8"}, + {file = "ruff-0.5.7-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fcc8054f1a717e2213500edaddcf1dbb0abad40d98e1bd9d0ad364f75c763eea"}, + {file = "ruff-0.5.7-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7f70284e73f36558ef51602254451e50dd6cc479f8b6f8413a95fcb5db4a55fc"}, + {file = "ruff-0.5.7-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:a78ad870ae3c460394fc95437d43deb5c04b5c29297815a2a1de028903f19692"}, + {file = "ruff-0.5.7-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9ccd078c66a8e419475174bfe60a69adb36ce04f8d4e91b006f1329d5cd44bcf"}, + {file = "ruff-0.5.7-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7e31c9bad4ebf8fdb77b59cae75814440731060a09a0e0077d559a556453acbb"}, + {file = "ruff-0.5.7-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8d796327eed8e168164346b769dd9a27a70e0298d667b4ecee6877ce8095ec8e"}, + {file = "ruff-0.5.7-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:4a09ea2c3f7778cc635e7f6edf57d566a8ee8f485f3c4454db7771efb692c499"}, + {file = "ruff-0.5.7-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:a36d8dcf55b3a3bc353270d544fb170d75d2dff41eba5df57b4e0b67a95bb64e"}, + {file = "ruff-0.5.7-py3-none-musllinux_1_2_i686.whl", hash = "sha256:9369c218f789eefbd1b8d82a8cf25017b523ac47d96b2f531eba73770971c9e5"}, + {file = "ruff-0.5.7-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:b88ca3db7eb377eb24fb7c82840546fb7acef75af4a74bd36e9ceb37a890257e"}, + {file = "ruff-0.5.7-py3-none-win32.whl", hash = "sha256:33d61fc0e902198a3e55719f4be6b375b28f860b09c281e4bdbf783c0566576a"}, + {file = "ruff-0.5.7-py3-none-win_amd64.whl", hash = "sha256:083bbcbe6fadb93cd86709037acc510f86eed5a314203079df174c40bbbca6b3"}, + {file = "ruff-0.5.7-py3-none-win_arm64.whl", hash = "sha256:2dca26154ff9571995107221d0aeaad0e75a77b5a682d6236cf89a58c70b76f4"}, + {file = "ruff-0.5.7.tar.gz", hash = "sha256:8dfc0a458797f5d9fb622dd0efc52d796f23f0a1493a9527f4e49a550ae9a7e5"}, +] + [[package]] name = "snowballstemmer" version = "2.2.0" @@ -1207,17 +1234,6 @@ virtualenv = ">=20.26.3" docs = ["furo (>=2024.5.6)", "sphinx (>=7.3.7)", "sphinx-argparse-cli (>=1.16)", "sphinx-autodoc-typehints (>=2.2.2)", "sphinx-copybutton (>=0.5.2)", "sphinx-inline-tabs (>=2023.4.21)", "sphinxcontrib-towncrier (>=0.2.1a0)", "towncrier (>=23.11)"] testing = ["build[virtualenv] (>=1.2.1)", "covdefaults (>=2.3)", "detect-test-pollution (>=1.2)", "devpi-process (>=1)", "diff-cover (>=9.1)", "distlib (>=0.3.8)", "flaky (>=3.8.1)", "hatch-vcs (>=0.4)", "hatchling (>=1.25)", "psutil (>=6)", "pytest (>=8.2.2)", "pytest-cov (>=5)", "pytest-mock (>=3.14)", "pytest-xdist (>=3.6.1)", "re-assert (>=1.1)", "setuptools (>=70.2)", "time-machine (>=2.14.2)", "wheel (>=0.43)"] -[[package]] -name = "types-setuptools" -version = "71.1.0.20240726" -description = "Typing stubs for setuptools" -optional = false -python-versions = ">=3.8" -files = [ - {file = "types-setuptools-71.1.0.20240726.tar.gz", hash = "sha256:85ba28e9461bb1be86ebba4db0f1c2408f2b11115b1966334ea9dc464e29303e"}, - {file = "types_setuptools-71.1.0.20240726-py3-none-any.whl", hash = "sha256:a7775376f36e0ff09bcad236bf265777590a66b11623e48c20bfc30f1444ea36"}, -] - [[package]] name = "typing-extensions" version = "4.12.2" @@ -1290,4 +1306,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.12" -content-hash = "a2b3ad073d817d945baf9772a6e43af7fa6dc083b90ffe97c953cb0837e28cf2" +content-hash = "1cb03d0196d79d8a2f61ecd3f2d95b84a3ee24a51f053d5a03e1853953beaa5e" diff --git a/pyproject.toml b/pyproject.toml index c963401..d2a6477 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,32 +37,8 @@ pytest-cov = "^5.0.0" sphinx-rtd-theme = "^2.0.0" commitizen = "^3.28.0" docformatter = "^1.7.5" -types-setuptools = "^71.1.0.20240726" codecov = "^2.1.13" - -[tool.black] -line-length = 88 -target-version = ['py38'] -exclude = ''' -/( - \.git - | \.hg - | \.mypy_cache - | \.tox - | \.venv - | _build - | buck-out - | build - | dist - | docs -)/ -''' - -[tool.isort] -profile = "black" -line_length = 88 -known_first_party = ["sage_bbb"] -skip = ["docs"] +ruff = "^0.5.7" [tool.mypy] mypy_path = "stubs" @@ -74,16 +50,105 @@ exclude = ''' ^docs/source/conf.py| ^build/| ^tests/| -^stubs/ +^stubs/| +^kernel/ ''' +[tool.black] +line-length = 88 +exclude = ''' +/( + \.git + | \.venv + | build + | dist + | migrations + | venv + | env + | __pycache__ + | static + | media + | node_modules + | env + | kernel + | \.mypy_cache + | \.pytest_cache + | .*\.egg-info +)/ +''' + +[tool.isort] +profile = "black" +line_length = 88 +skip = [ + "venv", + ".venv", + "build", + "dist", + ".git", + "__pycache__", + "*.egg-info", + ".mypy_cache", + ".pytest_cache", + "migrations", + "static", + "media", + "node_modules", + "env", + "kernel" +] + [tool.commitizen] name = "cz_conventional_commits" version = "0.1.0" -[tool.pytest.ini_options] -addopts = "--strict-markers" -testpaths = ["tests"] +[tool.commitizen.settings] +increment_types = ["feat", "fix"] + +[tool.pylint] +disable = [ + "C0114", # Missing module docstring + "C0115", # Missing class docstring + "C0116", # Missing function or method docstring + "E1101", # Instance of 'Foo' has no 'bar' member (Django dynamic attributes) + "W0212", # Access to a protected member _foo of a client class + "C0330", # Wrong hanging indentation before block (conflicts with Black) +] +max-line-length = 88 +ignore = [ + "migrations/*", + "venv/*", + "build/*", + "dist/*", + ".git/*", + "__pycache__/*", + "*.egg-info/*", + ".mypy_cache/*", + ".pytest_cache/*" +] +load-plugins = [ + "pylint_django", + "pylint.extensions.docparams", +] +django-settings-module = "myproject.settings" +good-names = [ + "qs", # QuerySet abbreviation + "pk", # Primary key abbreviation + "id", # Identifier +] +suggestion-mode = true +const-rgx = "([A-Z_][A-Z0-9_]*)|(__.*__)" +attr-rgx = "[a-z_][a-z0-9_]{2,30}$" +variable-rgx = "[a-z_][a-z0-9_]{2,30}$" +argument-rgx = "[a-z_][a-z0-9_]{2,30}$" +argument-name-hint = [ + "cls", # class method first argument + "self", # instance method first argument +] +method-rgx = "[a-z_][a-z0-9_]{2,30}$" +function-rgx = "[a-z_][a-z0-9_]{2,30}$" +class-rgx = "[A-Z_][a-zA-Z0-9]+$" +module-rgx = "(([a-z_][a-z0-9_]*)|(__.*__))$" [build-system] diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index da0f2e0..0000000 --- a/setup.cfg +++ /dev/null @@ -1,19 +0,0 @@ -[metadata] -description-file = README.md -mypy_path = stubs - -[isort] -profile=black -skip = build,.tox,venv -skip_glob=**/migrations -group_by_package=true -known_django=django -sections=FUTURE,STDLIB,DJANGO,THIRDPARTY,FIRSTPARTY,LOCALFOLDER -# length_sort_sections=future,stdlib,django,thirdparty -lines_after_imports = 2 -multi_line_output = 3 -include_trailing_comma = True -force_grid_wrap = 0 -use_parentheses = True -ensure_newline_before_comments = True -line_length = 88 \ No newline at end of file diff --git a/setup.py b/setup.py deleted file mode 100644 index 2e277cc..0000000 --- a/setup.py +++ /dev/null @@ -1,28 +0,0 @@ -from setuptools import find_packages, setup - -with open("README.md", encoding="utf-8") as f: - long_description = f.read() - -setup( - name="python_sage_bbb", - version="0.1.1", - author="Mohammad Fotouhi", - author_email="mohammad@sageteam.org", - description="A Python client library for managing BigBlueButton connections and operations.", - long_description=long_description, - long_description_content_type="text/markdown", - url="https://github.com/sageteamorg/python-sage-bbb", - projcet_urls={ - "Documentation": "https://python-sage-bbb.readthedocs.io/en/latest/", - "Source Code": "https://github.com/sageteamorg/python-sage-bbb", - "Issues": "https://github.com/sageteamorg/python-sage-bbb/issues", - }, - packages=find_packages(), - classifiers=[ - "Programming Language :: Python :: 3", - "License :: OSI Approved :: MIT License", - "Operating System :: OS Independent", - "Intended Audience :: Developers", - ], - python_requires=">=3.6", -)