Skip to content

Commit

Permalink
CHORE: switch to splitted requirements (#113, #114)
Browse files Browse the repository at this point in the history
* docs: update invalid RPC docs link

* docs: add Discord widget from shields.io

* docs: add a disclaimer about semantic commit messages technique in CONTRIBUTING.md

* docs: add a disclaimer about semantic commit messages to the web docs

* docs: add semantic sommits sections to the CONTRIBUTING ru

* Update 2_contributing-index.md

* feat(optional_queue): make path parameter in event decorator optional, if it's None use func.__name__ instead of it

* chore: switch to new requirements

* chore: remove my previous changes

* chore: requirements fixes

* chore: add pydantic_settings & async_sqs packages

* chore: move types-redis & types-PyYAML to lint dependencies

* chore: add types-redis & types-PyYAML back to main requirements

* Update requirements.txt

* Update requirements.lint.txt

* Update requirements.test.txt

---------

Co-authored-by: Pastukhov Nikita <diementros@yandex.ru>
  • Loading branch information
kolkre and Lancetnik committed Aug 4, 2023
1 parent 366a509 commit 7b56310
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 59 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ jobs:
with:
key: ${{ github.ref }}
path: .cache
- run: pip install mkdocs-material mkdocs-static-i18n mdx-include mkdocs-macros-plugin mkdocs-glightbox pillow cairosvg
- run: pip install -r requirements.docs.txt
- working-directory: ./docs
run: mkdocs gh-deploy --force
14 changes: 7 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-test-v03
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: pip install -e .[test]
run: pip install -r requirements.test.txt .[async-rabbit,async-kafka,async-nats,async-redis,async-sqs,doc]
- name: Install Pydantic v1
if: matrix.pydantic-version == 'pydantic-v1'
run: pip install "pydantic>=1.10.0,<2.0.0"
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
cache-dependency-path: pyproject.toml
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: pip install -e .[testsuite,async-nats]
run: pip install -r requirements.test.txt .[async-nats]
- run: mkdir coverage
- name: Test
run: coverage run -m pytest -m "run and nats" tests/cli/test_run.py
Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:
cache-dependency-path: pyproject.toml
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: pip install -e .[testsuite,async-rabbit]
run: pip install -r requirements.test.txt .[async-rabbit]
- run: mkdir coverage
- name: Test
run: coverage run -m pytest -m "run and rabbit" tests/cli/test_run.py
Expand Down Expand Up @@ -176,7 +176,7 @@ jobs:
cache-dependency-path: pyproject.toml
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: pip install -e .[testsuite,async-kafka]
run: pip install -r requirements.test.txt .[async-kafka]
- run: mkdir coverage
- name: Test
run: coverage run -m pytest -m "run and kafka" tests/cli/test_run.py
Expand Down Expand Up @@ -206,7 +206,7 @@ jobs:
cache-dependency-path: pyproject.toml
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: pip install -e .[testsuite,async-sqs]
run: pip install -r requirements.test.txt .[async-sqs]
- run: mkdir coverage
- name: Test
run: coverage run -m pytest -m "run and sqs" tests/cli/test_run.py
Expand Down Expand Up @@ -236,7 +236,7 @@ jobs:
cache-dependency-path: pyproject.toml
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: pip install -e .[testsuite,async-redis]
run: pip install -r requirements.test.txt .[async-redis]
- run: mkdir coverage
- name: Test
run: coverage run -m pytest -m "run and redis" tests/cli/test_run.py
Expand Down Expand Up @@ -294,4 +294,4 @@ jobs:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
jobs: ${{ toJSON(needs) }}
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ $ python -m pip install --upgrade pip
After activating the environment as described above:

```bash
$ pip install -e ".[dev]"
$ pip install -r requirements.txt
```

It will install all the dependencies and your local Propan in your local environment.
Expand Down
50 changes: 0 additions & 50 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,56 +82,6 @@ doc = [
"uvicorn",
]

testsuite = [
"coverage[toml]>=7.2",
"pytest==7.4.0",
"pytest-asyncio>=0.21",
"asyncmock; python_version < '3.8'",

"pydantic-settings>=2.0a1",
"python-dotenv",
]

test = [
"propan[doc]",
"propan[async-rabbit]",
"propan[async-nats]",
"propan[async-redis]",
"propan[async-kafka]",
"propan[async-sqs]",
"propan[testsuite]",

"fastapi>=0.100.0",
"httpx",
]

dev-doc = [
"mkdocs-material >=8.1.4,<9.0.0",
"mkdocs-static-i18n",
"mdx-include >=1.4.1,<2.0.0",
"mkdocs-macros-plugin",
"mkdocs-glightbox",
"pillow",
"cairosvg",

"typer[all]",
]

dev = [
"propan[test]",
"propan[dev-doc]",

"types-redis",
"types-PyYAML",

"mypy==1.4.1",
"black==23.3.0",
"isort>=5",
"ruff==0.0.275",
"pyupgrade-directories",
"typer[all]",
]

[project.urls]
Homepage = "https://lancetnik.github.io/Propan/"
Documentation = "https://lancetnik.github.io/Propan/"
Expand Down
8 changes: 8 additions & 0 deletions requirements.docs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
mkdocs-material >=8.1.4,<9.0.0
mkdocs-static-i18n
mdx-include >=1.4.1,<2.0.0
mkdocs-macros-plugin
# images zoom
mkdocs-glightbox
pillow
cairosvg
8 changes: 8 additions & 0 deletions requirements.lint.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
types-redis
types-PyYAML

mypy==1.4.1
black==23.3.0
isort>=5
ruff==0.0.275
pyupgrade-directories
10 changes: 10 additions & 0 deletions requirements.test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
coverage[toml]>=7.2
pytest==7.4.0
pytest-asyncio>=0.21
asyncmock
pydantic_settings

pydantic-settings>=2.0a1
python-dotenv
fastapi>=0.100.0b
httpx
13 changes: 13 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
-e .
-e .[doc]
-e .[async-rabbit]
-e .[async-nats]
-e .[async-sqs]
-e .[async-kafka]
-e .[async-redis]

-r requirements.test.txt
-r requirements.docs.txt
-r requirements.lint.txt

typer[all]

0 comments on commit 7b56310

Please sign in to comment.