Skip to content

Commit

Permalink
Refactor cyberowl core code (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
karimhabush committed Aug 16, 2022
1 parent 57f85e1 commit 58d27bb
Show file tree
Hide file tree
Showing 41 changed files with 923 additions and 532 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/auto_update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: auto_update_cron_job

on:
schedule:
- cron: '0 9,21 * * *'
workflow_dispatch:

jobs:
run-and-commit:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.9'
architecture: 'x64'
- run: python -m pip install poetry
- run: python -m poetry install
- run: python -m poetry run python src/main.py

- name: Setup git config
run: |
git config user.name "CyberOwl Bot"
git config user.email "<>"
- name: Commit
run: |
git add README.md
git commit -m "Automatic update with GitHub Actions"
git push origin ${GITHUB_REF##*/}
33 changes: 0 additions & 33 deletions .github/workflows/cyberowl_CI.yml

This file was deleted.

33 changes: 0 additions & 33 deletions .github/workflows/main.yml

This file was deleted.

135 changes: 135 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# Poetry lock file
poetry.lock


# Vscode
.vscode/
50 changes: 50 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: check-ast
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: debug-statements
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/pycqa/bandit
rev: 1.7.4
hooks:
- id: bandit
args: [ "-iii", "-ll" ]
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort
args: ["--profile", "black"]
# - repo: https://gitlab.com/pycqa/flake8
# rev: 3.9.2
# hooks:
# - id: flake8
# additional_dependencies: [
# "flake8-bugbear",
# "flake8-comprehensions",
# "flake8-mutable",
# "flake8-print",
# "flake8-simplify",
# ]
- repo: https://github.com/humitos/mirrors-autoflake
rev: v1.3
hooks:
- id: autoflake
files: '\.py$'
exclude: '^\..*'
args: ["--in-place"]

- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
args: ["--target-version", "py38"]
- repo: https://github.com/asottile/pyupgrade
rev: v2.31.1
hooks:
- id: pyupgrade
args: [--py37-plus]
Loading

0 comments on commit 58d27bb

Please sign in to comment.