Skip to content

Commit

Permalink
build(chore): update project configuration and dependencies
Browse files Browse the repository at this point in the history
- Remove obsolete configuration files: .flake8, mypy.ini, setup.cfg, and setup.py to clean up the repository.
- Add new documentation file `packages/poetry.md` for managing dependencies and workflows with Poetry.
- Update `.gitignore` to include necessary patterns for ignoring files and directories.
- Modify `packages/requirements-dev.txt` to reflect the latest development dependencies.
- Update `poetry.lock` and `pyproject.toml` to synchronize with the current project dependencies and settings.
  • Loading branch information
MohmdFo committed Aug 10, 2024
1 parent 9944eab commit 2af4cf6
Show file tree
Hide file tree
Showing 9 changed files with 180 additions and 110 deletions.
4 changes: 0 additions & 4 deletions .flake8

This file was deleted.

14 changes: 9 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ celerybeat.pid

# SageMath parsed files
*.sage.py
sage.py

# Environments
.env
Expand Down Expand Up @@ -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/

Expand All @@ -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
10 changes: 0 additions & 10 deletions mypy.ini

This file was deleted.

30 changes: 30 additions & 0 deletions packages/poetry.md
Original file line number Diff line number Diff line change
@@ -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.
22 changes: 19 additions & 3 deletions packages/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
40 changes: 28 additions & 12 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

123 changes: 94 additions & 29 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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]
Expand Down
19 changes: 0 additions & 19 deletions setup.cfg

This file was deleted.

28 changes: 0 additions & 28 deletions setup.py

This file was deleted.

0 comments on commit 2af4cf6

Please sign in to comment.