Skip to content

Commit

Permalink
chore: consolidate python utils
Browse files Browse the repository at this point in the history
  • Loading branch information
hoffstadt committed Oct 31, 2022
1 parent 988c1fe commit 6cc2ab1
Show file tree
Hide file tree
Showing 51 changed files with 3,149 additions and 3,279 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import shutil
import subprocess

wip_version = "1.7.3"
wip_version = "1.8.0"

def version_number():
"""This function reads the version number which is populated by github actions"""
Expand Down
9 changes: 2 additions & 7 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,8 @@ set(MARVEL_SOURCES
"$<$<PLATFORM_ID:Linux>:mvGraphics_linux.cpp>"

# python
"mvPyObject.cpp"
"mvPythonTranslator.cpp"
"mvPythonParser.cpp"
"mvPythonExceptions.cpp"
"mvGlobalIntepreterLock.cpp"
"mvPythonTypeChecker.cpp"
"mvCustomTypes.cpp"
"mvPyUtils.cpp"
"mvCustomTypes.cpp"

# ui
"mvBasicWidgets.cpp"
Expand Down
2 changes: 1 addition & 1 deletion src/composite/mvFileDialog.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "mvFileDialog.h"
#include "mvFileExtension.h"
#include "mvItemRegistry.h"
#include "mvPythonExceptions.h"
#include "mvPyUtils.h"
#include "mvLog.h"

static void Panel(const char* vFilter, IGFDUserDatas vUserDatas, bool* vCantContinue)
Expand Down
2 changes: 1 addition & 1 deletion src/composite/mvFileExtension.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "mvFileExtension.h"
#include "mvFileDialog.h"
#include "mvItemRegistry.h"
#include "mvPythonExceptions.h"
#include "mvPyUtils.h"
#include "mvLog.h"

void mvFileExtension::applySpecificTemplate(mvAppItem* item)
Expand Down
2 changes: 1 addition & 1 deletion src/custom/mvDatePicker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <implot_internal.h>
#include <misc/cpp/imgui_stdlib.h>
#include "mvItemRegistry.h"
#include "mvPythonExceptions.h"
#include "mvPyUtils.h"
#include "mvFontItems.h"
#include "mvThemes.h"
#include "mvContainers.h"
Expand Down
2 changes: 1 addition & 1 deletion src/custom/mvSlider3D.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "mvSlider3D.h"
#include "mvPythonExceptions.h"
#include "mvPyUtils.h"
#include "mvFontItems.h"
#include "mvThemes.h"
#include "mvContainers.h"
Expand Down
2 changes: 1 addition & 1 deletion src/custom/mvTimePicker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <misc/cpp/imgui_stdlib.h>
#include "mvContext.h"
#include "mvItemRegistry.h"
#include "mvPythonExceptions.h"
#include "mvPyUtils.h"
#include "mvFontItems.h"
#include "mvThemes.h"
#include "mvContainers.h"
Expand Down
3 changes: 1 addition & 2 deletions src/dearpygui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@
#include <cstdlib>
#include "mvToolManager.h"
#include "mvCustomTypes.h"
#include "mvPythonExceptions.h"
#include "mvPyUtils.h"
#include "mvViewport.h"
#include <stb_image.h>
#include "mvLog.h"
#include "mvProfiler.h"

#include "dearpygui_commands.h"
#include "dearpygui_parsers.h"

Expand Down
5 changes: 1 addition & 4 deletions src/dearpygui.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@

#include <map>
#include <vector>
#include "mvPythonParser.h"

#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include "mvPyUtils.h"

PyMODINIT_FUNC PyInit__dearpygui(void);

Expand Down
2 changes: 1 addition & 1 deletion src/dearpygui_commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <cstdlib>
#include "mvToolManager.h"
#include "mvCustomTypes.h"
#include "mvPythonExceptions.h"
#include "mvPyUtils.h"
#include "mvViewport.h"
#include "stb_image.h"
#include "stb_image_write.h"
Expand Down
2 changes: 1 addition & 1 deletion src/dearpygui_parsers.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <cstdlib>
#include "mvToolManager.h"
#include "mvCustomTypes.h"
#include "mvPythonExceptions.h"
#include "mvPyUtils.h"
#include "mvViewport.h"
#include <stb_image.h>
#include "mvLog.h"
Expand Down
5 changes: 1 addition & 4 deletions src/mvAppItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@
#include "mvContext.h"
#include "mvItemRegistry.h"
#include "mvCore.h"
#include "mvPythonExceptions.h"
#include "mvGlobalIntepreterLock.h"
#include "mvAppItemCommons.h"
#include "mvLog.h"
#include "mvPythonTypeChecker.h"
#include "mvPyObject.h"
#include "mvPyUtils.h"

static void
UpdateLocations(std::vector<std::shared_ptr<mvAppItem>>* children, i32 slots)
Expand Down
2 changes: 1 addition & 1 deletion src/mvAppItem.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <imgui.h>
#include "mvAppItemState.h"
#include "mvCallbackRegistry.h"
#include "mvPythonTranslator.h"
#include "mvPyUtils.h"
#include <implot_internal.h>
#include "mvAppItemTypes.inc"

Expand Down
2 changes: 1 addition & 1 deletion src/mvAppItemState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <imgui.h>
#include "mvAppItem.h"
#include "mvContext.h"
#include "mvPyObject.h"
#include "mvPyUtils.h"

void
ResetAppItemState(mvAppItemState& state)
Expand Down
3 changes: 1 addition & 2 deletions src/mvBasicWidgets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
#include "mvFontItems.h"
#include "mvThemes.h"
#include "mvContainers.h"
#include "mvPyObject.h"
#include "mvPyUtils.h"
#include "mvItemHandlers.h"
#include "mvPythonExceptions.h"
#include <misc/cpp/imgui_stdlib.h>
#include "mvTextureItems.h"

Expand Down
4 changes: 1 addition & 3 deletions src/mvCallbackRegistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
#include <iostream>
#include "mvItemRegistry.h"
#include "mvAppItemCommons.h"
#include "mvGlobalIntepreterLock.h"
#include "mvPythonExceptions.h"
#include "mvPyObject.h"
#include "mvPyUtils.h"

void mvRunTasks()
{
Expand Down
2 changes: 1 addition & 1 deletion src/mvColors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "mvContext.h"
#include <array>
#include "mvItemRegistry.h"
#include "mvPythonExceptions.h"
#include "mvPyUtils.h"
#include "mvFontItems.h"
#include "mvThemes.h"
#include "mvContainers.h"
Expand Down
3 changes: 1 addition & 2 deletions src/mvContainers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
#include "mvFontItems.h"
#include "mvThemes.h"
#include "mvContainers.h"
#include "mvPyObject.h"
#include "mvPyUtils.h"
#include "mvItemHandlers.h"
#include "mvPythonExceptions.h"
#include <misc/cpp/imgui_stdlib.h>
#include "mvTextureItems.h"

Expand Down
4 changes: 1 addition & 3 deletions src/mvContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
#include <implot.h>
#include "mvFontManager.h"
#include "mvCallbackRegistry.h"
#include "mvPythonTranslator.h"
#include "mvPythonExceptions.h"
#include "mvGlobalIntepreterLock.h"
#include "mvPyUtils.h"
#include <frameobject.h>
#include "mvLog.h"
#include "mvToolManager.h"
Expand Down
5 changes: 1 addition & 4 deletions src/mvContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,10 @@
#include <atomic>
#include <memory>
#include "mvCore.h"
#include "mvPythonParser.h"
#include "mvPyUtils.h"
#include "mvTypes.h"
#include "mvGraphics.h"

#define PY_SSIZE_T_CLEAN
#include <Python.h>

//-----------------------------------------------------------------------------
// forward declarations
//-----------------------------------------------------------------------------
Expand Down
4 changes: 1 addition & 3 deletions src/mvCustomTypes.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#include "mvCustomTypes.h"
#include <string>
#include "mvTypes.h"
#include "mvPythonTranslator.h"
#include "mvPythonExceptions.h"
#include "mvPythonTypeChecker.h"
#include "mvPyUtils.h"

static void
intialize_mvMat4(mvMat4* a,
Expand Down
2 changes: 1 addition & 1 deletion src/mvDocWindow.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <map>
#include "mvPythonParser.h"
#include "mvPyUtils.h"
#include "mvDocWindow.h"
#include "dearpygui.h"

Expand Down
2 changes: 1 addition & 1 deletion src/mvDrawings.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "mvDrawings.h"
#include "mvLog.h"
#include "mvItemRegistry.h"
#include "mvPythonExceptions.h"
#include "mvPyUtils.h"
#include "mvAppItemCommons.h"
#include <math.h>
#include "mvContext.h"
Expand Down
2 changes: 1 addition & 1 deletion src/mvFontItems.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "mvFontItems.h"
#include "mvTextureItems.h"
#include "mvPythonExceptions.h"
#include "mvPyUtils.h"
#include "mvLog.h"
#include "mvToolManager.h"
#include "mvFontManager.h"
Expand Down
2 changes: 1 addition & 1 deletion src/mvFontManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "mvCore.h"
#include "mvItemRegistry.h"
#include "mvViewport.h"
#include "mvPythonExceptions.h"
#include "mvPyUtils.h"
#include <frameobject.h>
#include "mvTextureItems.h"
#include <CustomFont.cpp>
Expand Down
2 changes: 1 addition & 1 deletion src/mvGlobalHandlers.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "mvGlobalHandlers.h"
#include "mvPythonExceptions.h"
#include "mvPyUtils.h"
#include "mvLog.h"
#include "mvUtilities.h"

Expand Down
15 changes: 0 additions & 15 deletions src/mvGlobalIntepreterLock.cpp

This file was deleted.

15 changes: 0 additions & 15 deletions src/mvGlobalIntepreterLock.h

This file was deleted.

2 changes: 1 addition & 1 deletion src/mvItemHandlers.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "mvItemHandlers.h"
#include "mvPythonExceptions.h"
#include "mvPyUtils.h"
#include "mvLog.h"

void mvItemHandlerRegistry::checkEvents(void* data)
Expand Down
7 changes: 1 addition & 6 deletions src/mvItemRegistry.cpp
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
#include "mvItemRegistry.h"
#include "mvProfiler.h"
#include "mvContext.h"
#include "mvItemRegistry.h"
#include "mvAppItemCommons.h"
#include "mvLog.h"
#include "mvPythonExceptions.h"
#include "mvToolManager.h"
#include "mvPythonExceptions.h"
#include "mvPyUtils.h"
#include "mvToolManager.h"
#include "mvFontManager.h"
#include "mvPythonTypeChecker.h"
#include "mvGlobalIntepreterLock.h"

mvItemRegistry::mvItemRegistry()
{
Expand Down
2 changes: 1 addition & 1 deletion src/mvItemRegistry.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <mutex>
#include <map>
#include "mvAppItem.h"
#include "mvPyObject.h"
#include "mvPyUtils.h"

//-----------------------------------------------------------------------------
// forward declarations
Expand Down
3 changes: 1 addition & 2 deletions src/mvNodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
#include "mvContext.h"
#include "mvItemRegistry.h"
#include "mvLog.h"
#include "mvPythonExceptions.h"
#include "mvPyObject.h"
#include "mvPyUtils.h"
#include "mvItemHandlers.h"
#include "mvThemes.h"
#include "mvContainers.h"
Expand Down
3 changes: 1 addition & 2 deletions src/mvPlotting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
#include "mvCore.h"
#include "mvContext.h"
#include "mvItemRegistry.h"
#include "mvPythonExceptions.h"
#include "mvPyUtils.h"
#include "mvFontItems.h"
#include "mvThemes.h"
#include "mvContainers.h"
#include "mvPyObject.h"
#include "mvTextureItems.h"
#include "mvItemHandlers.h"

Expand Down
Loading

0 comments on commit 6cc2ab1

Please sign in to comment.