From 5e78a1f981be4b865d8ce43fedfc6f03faad5a6a Mon Sep 17 00:00:00 2001 From: Br4guette <92679326+Ston14@users.noreply.github.com> Date: Fri, 28 Jun 2024 01:23:59 +0200 Subject: [PATCH] Dev/0.2.0 (#33) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: init * feat: reworked pyproject and tests * del: gitkeep * feat: renamed folder * feat: renamed module * add: Readme: * feat: updated poetry.lock * docs: added base readme * add: Add package jupyter and ipykernel * Feat/core (#26) * feat: added utils * del: useless base class * feat: aled * add parsing path * feat: added base plugin resolver * del: useless folders * feat: renamed import * del: useless tests * feat: added generic test * feat: added path * feat: updated pytest * fmt: added logging * test: revamped test_generic * feat: added context functions * fix: parse_plugins * fix: useless PluginEntry functions * test: generic_build * feat: added handler * feat: added file handler * feat: dump file location * feat: encapsulated common functions and organized imports * feat: cleaned code and added docstrings * feat: code duplication * feat: multiple functions * test: use generic plugin banners * fix: allow the context to be ran * fmt: added comment on test_generic_build * docs: added some docstrings * docs: added docstrings * docs: examples * fix: unused import * feat: created abstract class Renderer * test: render constructed context * feat: created base Windows class * add: Additional Format for jupyter notebook * fix: Ajout d'un __getattr__ et recuperation des arguments pour les fonctions RIEN n'est fait actuellement avec ses parametres * add: Ajout de test pour le getattr * fix: renderer using json and dataframe * fix poetry : Probleme lors du build par la non présence du dossier de build necessaire à poetry (#23) fix renderer : Probleme de typo Co-authored-by: St0n14 * Fix/rendering (#24) * fix rendering : Le rendering est plus simple a utiliser fix core : return Renderer() plutot que la data dans le getattr * fix type : fix type in both files * fix docstring : fix docstring in renderer for each functions --------- Co-authored-by: St0n14 * fix: forget kwargs in base ^^ * fix base : Prameters to function ok * fix test: Check pid 4 * fix typo : Typing add_arguments * fix typo : add_arguments remove try except * add test: add test for to_dict, to_json fix rendering: fix rendering to return a proper dict instead of a list with a dict * add tests: add some test to verify output of functions add logging: add logger if the results of functions will not render a valid output due to functions parameters fix base: function name not case sensitive * fix issue with rendering * ssssssssssss * add lock file for poetry * add dependancies : Juptyer IpyKernel --------- Co-authored-by: std3 <67806187+standard3@users.noreply.github.com> Co-authored-by: Br4guette Co-authored-by: St0n14 * Feat/core (#27) * feat: added utils * del: useless base class * feat: aled * add parsing path * feat: added base plugin resolver * del: useless folders * feat: renamed import * del: useless tests * feat: added generic test * feat: added path * feat: updated pytest * fmt: added logging * test: revamped test_generic * feat: added context functions * fix: parse_plugins * fix: useless PluginEntry functions * test: generic_build * feat: added handler * feat: added file handler * feat: dump file location * feat: encapsulated common functions and organized imports * feat: cleaned code and added docstrings * feat: code duplication * feat: multiple functions * test: use generic plugin banners * fix: allow the context to be ran * fmt: added comment on test_generic_build * docs: added some docstrings * docs: added docstrings * docs: examples * fix: unused import * feat: created abstract class Renderer * test: render constructed context * feat: created base Windows class * add: Additional Format for jupyter notebook * fix: Ajout d'un __getattr__ et recuperation des arguments pour les fonctions RIEN n'est fait actuellement avec ses parametres * add: Ajout de test pour le getattr * fix: renderer using json and dataframe * fix poetry : Probleme lors du build par la non présence du dossier de build necessaire à poetry (#23) fix renderer : Probleme de typo Co-authored-by: St0n14 * Fix/rendering (#24) * fix rendering : Le rendering est plus simple a utiliser fix core : return Renderer() plutot que la data dans le getattr * fix type : fix type in both files * fix docstring : fix docstring in renderer for each functions --------- Co-authored-by: St0n14 * fix: forget kwargs in base ^^ * fix base : Prameters to function ok * fix test: Check pid 4 * fix typo : Typing add_arguments * fix typo : add_arguments remove try except * add test: add test for to_dict, to_json fix rendering: fix rendering to return a proper dict instead of a list with a dict * add tests: add some test to verify output of functions add logging: add logger if the results of functions will not render a valid output due to functions parameters fix base: function name not case sensitive * fix rendering: to_dict -> to_list fix rendering: rendering issue add test: Linux is ok with an ISF at specified location * Lock poetey dependancies --------- Co-authored-by: std3 <67806187+standard3@users.noreply.github.com> Co-authored-by: Br4guette Co-authored-by: St0n14 * fix: LOckfile * Add/test (#28) * rename test: rename test_core file split test: split name of test files fix rendering: beautify function in Rendering class * add tests: add a pytest only for volatility windows functions * [=] fix test_core_rendering : test_to_list not test_to_dict [+] add fixture_test : add fixture for testing [+] add logger_test : Add logger in begin of test [+] add test_function : add more reliable [+] fix test : check return, type, object and len of a return * remove test_imports :Remove Useless Import * remove test_imports :Remove Useless Import in rendering * fix: Exception Handling to EN --------- Co-authored-by: St0n14 * fix docstring: For renderer add better docstring (#30) Co-authored-by: St0n14 * Create LICENSE * fix rendering: change to_dataframe -> to_df add doc: Add some documentations fix doc: Old use of the lib * Add Usage: Add usage and beautiful readme <3 add pakcage : Jupyter to use Jupyter-lab add to_df_option : In the function to_df it's possible to specify if you want to print max rows or not * docs: Add some explanations, index and begin tuto * add : add files for workflow to push on pypi fix : base * add : config for testing * add : documentation on test * add : CICD Dev update * fix : Cicd issue fix mypy : Mypy type ignoring * Fix : Cicd Issue with tox --------- Co-authored-by: std3 <67806187+standard3@users.noreply.github.com> Co-authored-by: Br4guette Co-authored-by: St0n14 --- docs/index.md | 1 - docs/tutorials.md | 2 -- tests/test_core_rendering.py | 1 - tests/test_volatility_windows_function.py | 4 ---- tox.ini | 5 +---- 5 files changed, 1 insertion(+), 12 deletions(-) diff --git a/docs/index.md b/docs/index.md index 6b73b25..31166c0 100644 --- a/docs/index.md +++ b/docs/index.md @@ -14,6 +14,5 @@ and consists of four separate parts: 4. [Explanation](explanation.md) 5. [Test](test.md) - Quickly find what you're looking for depending on your use case by looking at the different pages. diff --git a/docs/tutorials.md b/docs/tutorials.md index 5b7ef0f..91ec975 100644 --- a/docs/tutorials.md +++ b/docs/tutorials.md @@ -1,6 +1,5 @@ ## Organisation - ## Quick installation ### Prerequisites @@ -21,4 +20,3 @@ poetry install ```shell pip install pydfirram ``` -## Usage \ No newline at end of file diff --git a/tests/test_core_rendering.py b/tests/test_core_rendering.py index 27b0f59..a84d2ff 100644 --- a/tests/test_core_rendering.py +++ b/tests/test_core_rendering.py @@ -28,4 +28,3 @@ def test_to_dataframe(generic_instance): def test_to_list(generic_instance): output = generic_instance.pslist().to_list() assert isinstance(output,list) - diff --git a/tests/test_volatility_windows_function.py b/tests/test_volatility_windows_function.py index f94eb65..ee4f905 100644 --- a/tests/test_volatility_windows_function.py +++ b/tests/test_volatility_windows_function.py @@ -13,7 +13,6 @@ def generic_instance() -> Generic: """ Create A generic fixture for test """ - os = OperatingSystem.WINDOWS dumpfile = Path(DUMP_FILE) return Generic(os, dumpfile) @@ -41,7 +40,6 @@ def test_volatilty_pslist_with_args_pid(generic_instance : Generic) -> None : logger.success("TEST PASSED !") def test_volatility_banners(generic_instance : Generic) -> None : - logger.opt(colors=True).info("banners from volatility is running") output : Renderer = generic_instance.banners(pid=[4]) assert isinstance(output, Renderer), "Error during function execution" @@ -57,7 +55,6 @@ def test_volatility_cmdline(generic_instance : Generic) -> None : assert len(cmdline_content) > 0 def test_volatility_dlllist(generic_instance : Generic) -> None : - logger.opt(colors=True).info("dlllist from volatility is running") output : Renderer = generic_instance.dlllist() assert isinstance(output, Renderer), "Error during function execution" @@ -67,7 +64,6 @@ def test_volatility_dlllist(generic_instance : Generic) -> None : logger.success("TEST PASSED !") def test_bigpools(generic_instance : Generic) -> None : - logger.opt(colors=True).info("bigpools from volatility is running") output : Renderer = generic_instance.bigpools() assert isinstance(output, Renderer), "Error during function execution" diff --git a/tox.ini b/tox.ini index 31d2fef..8951b44 100644 --- a/tox.ini +++ b/tox.ini @@ -15,13 +15,10 @@ allowlist_externals = twine extras = test - doc dev commands = poetry build - mkdocs build - twine check dist/* [testenv] allowlist_externals = pytest @@ -32,4 +29,4 @@ setenv = PYTHONPATH = {toxinidir} PYTHONWARNINGS = ignore commands = - pytest -s --cov=pydfirram --cov-append --cov-report=xml --cov-report term-missing tests \ No newline at end of file + pytest