Skip to content

Commit

Permalink
chg: [style] Configured black with isort and pre-commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricbonhomme committed Dec 11, 2023
1 parent d4b63a4 commit caf3055
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,5 @@ A documentation is available [here](https://pumpkin-project.readthedocs.io).
`Pumpkin` is distributed under the terms of the
[GNU Affero General Public License version 3](https://www.gnu.org/licenses/agpl-3.0.html).

Copyright (C) 2022-2023 [Cédric Bonhomme](https://www.cedricbonhomme.org)
Copyright (C) 2022-2023 [Cédric Bonhomme](https://www.cedricbonhomme.org)
Copyright (C) 2022-2023 CIRCL - Computer Incident Response Center Luxembourg
3 changes: 2 additions & 1 deletion api/crud.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from sqlalchemy.orm import Session

from . import models, schemas
from . import models
from . import schemas


def get_items(db: Session, skip: int = 0, limit: int = 100):
Expand Down
13 changes: 10 additions & 3 deletions api/main.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
from typing import List
from fastapi import Depends, FastAPI, HTTPException

from fastapi import Depends
from fastapi import FastAPI
from fastapi import HTTPException
from sqlalchemy.orm import Session

from . import crud, models, schemas
from .database import SessionLocal, engine
from . import crud
from . import models
from . import schemas
from .database import engine
from .database import SessionLocal

models.Base.metadata.create_all(bind=engine)

app = FastAPI()


# Dependency
def get_db():
db = SessionLocal()
Expand Down
4 changes: 3 additions & 1 deletion api/models.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from sqlalchemy import Boolean, Column, Integer
from sqlalchemy import Boolean
from sqlalchemy import Column
from sqlalchemy import Integer
from sqlalchemy.dialects.postgresql import JSONB

from .database import Base
Expand Down
6 changes: 3 additions & 3 deletions docs/deployment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Choose an XMPP server. Visit this [page](https://xmpp.org/software/servers.html)
We mainly tested with [Prosody](https://prosody.im).

To create a new XMPP account you can follow the steps
[here](https://xmpp.org/getting-started/).
[here](https://xmpp.org/getting-started/).
Create an XMPP account for each demon.
Each demon will have a different JID and a different password.

Expand All @@ -18,7 +18,7 @@ Main steps:
- configuration of the server (OMEMO, etc.);
- creation of the required accounts for the correlation engine and the probes;
- configuration of Pumpkin;
-
-

Description of the steps:

Expand Down Expand Up @@ -69,7 +69,7 @@ Luanching the correlation engine:

.. code-block:: bash
$ python pumpkin/correlation.py
$ python pumpkin/correlation.py
Password for correlation-engine@localhost:
Agent starting . . .
Expand Down
5 changes: 1 addition & 4 deletions docs/formats.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ HTTP API

Documentation is OpenAPI Specification v3.1.0 compliant.

`FastAPI <https://fastapi.tiangolo.com>`_ is used.
`FastAPI <https://fastapi.tiangolo.com>`_ is used.
For production you can use `Uvicorn <https://www.uvicorn.org>`_. It's up to you.


Expand Down Expand Up @@ -66,6 +66,3 @@ Agent configuration
"jid": "",
"passwd": ""
}
2 changes: 0 additions & 2 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,3 @@ This will install FastAPI with its dependencies and SPADE.
INFO: Started server process [19752]
INFO: Waiting for application startup.
INFO: Application startup complete.
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,7 @@ show_error_context = true
pretty = true

exclude = "build|dist|docs"


[tool.isort]
profile = "black"

0 comments on commit caf3055

Please sign in to comment.