Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
- Install the necessary dependencies found on the README.md
- Clone the repository
- Open in VSCode
- From the root of the repository make a branch
- ```git checkout -b <new-branch-name>```
- From the root of the repository make a branch according to your feature or bug
- ```git checkout -b <feature-name>```
- This is the branch you will make your changes in
- Always make sure you base your branch off of the updated master branch!!
- Make a virtual python enviornment in the repository
- ```python -m venv dev```
- Load into the environment
Expand All @@ -18,9 +19,10 @@
- Any changes now made in the local version of the package will be on the branch and reflected in the environment

## Developing
- Before changing code, verify that you're writing on a branch other than ```main``` and that your command line is in the virtual enviornment
- Before changing code, verify that you're writing on your new branch and that your command line is in the virtual enviornment
- Develop and make some changes
- To test the package features create a file in the root of the repository called ```test.py```
- In ```test.py``` import mediaComp with ```from mediaComp import *```
- Test the features you were working on and continue developing, making commits when progess is made
- When finished working on a feature, push the branch to GitHub and open a pull request to merge your branch into ```main```
- Request review from Dave Largent
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ MediaComp is strongly dependent on several libraries. Most of the these will ins
| wxPython | > 4.2.0 |
| pillow | > 11.0.0 |
| pygame | > 2.5.0 |
| matplotlib | >= 3.10.0 |
| numpy | >= 2.2.1 |
| sounddevice | >= 0.5.2 |

Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ version = "0.4.10"
dependencies = [
"pillow>11.0.0",
"pygame>2.5.0",
"matplotlib>=3.10.0",
"numpy>=2.2.1",
"sounddevice>=0.5.2",
]
Expand Down
8 changes: 2 additions & 6 deletions src/mediaComp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@ def _cleanup_if_last_window():
getPixelAt, setRed, setGreen, setBlue, getRed, getGreen, getBlue, getColor, setColor, getX, getY,
writePictureTo, setAllPixelsToAColor, copyInto, duplicatePicture, cropPicture, calculateNeededFiller,
requestInteger, requestNumber, requestIntegerInRange, requestString, showWarning, showInformation, showError,
playMovie, writeQuicktime, writeAVI, makeMovie, makeMovieFromInitialFile, addFrameToMovie, writeFramesToDirectory,
samplesToSound, makeSound, makeEmptySound, makeEmptySoundBySeconds, duplicateSound, getSamples, soundTool,
play, stopPlaying, playAtRate, playAtRateDur, getSampleAt, playInRange, playAtRateInRange, getSamplingRate, getSampleValueAt, setSampleValueAt, setSampleValue,
getSampleValue, getSound, getNumSamples, getDuration, writeSoundTo, randomSamples, getIndex,
playNote, turn, turnRight, turnToFace, turnLeft, forward, backward, moveTo, makeTurtle, penUp,
penDown, drop, getXPos, getYPos, getHeading, makeWorld, getTurtleList, blue, red,
playNote, blue, red,
green, gray, darkGray, lightGray, yellow, orange, pink, magenta, cyan, white, black
)

Expand All @@ -47,12 +45,10 @@ def _cleanup_if_last_window():
"getPixelAt", "setRed", "setGreen", "setBlue", "getRed", "getGreen", "getSampleAt", "getBlue", "getColor", "setColor", "getX", "getY",
"writePictureTo", "setAllPixelsToAColor", "copyInto", "duplicatePicture", "cropPicture", "calculateNeededFiller",
"requestInteger", "requestNumber", "requestIntegerInRange", "requestString", "showWarning", "showInformation", "showError",
"playMovie", "writeQuicktime", "writeAVI", "makeMovie", "makeMovieFromInitialFile", "addFrameToMovie", "writeFramesToDirectory",
"samplesToSound", "makeSound", "makeEmptySound", "makeEmptySoundBySeconds", "duplicateSound", "getSamples", "soundTool",
"play", "stopPlaying", "playAtRate", "playAtRateDur", "playInRange", "playAtRateInRange", "getSamplingRate", "getSampleValueAt", "setSampleValueAt", "setSampleValue",
"getSampleValue", "getSound", "getNumSamples", "getDuration", "writeSoundTo", "randomSamples", "getIndex",
"playNote", "turn", "turnRight", "turnToFace", "turnLeft", "forward", "backward", "moveTo", "makeTurtle", "penUp",
"penDown", "drop", "getXPos", "getYPos", "getHeading", "makeWorld", "getTurtleList", "blue", "red",
"playNote", "blue", "red",
"green", "gray", "darkGray", "lightGray", "yellow", "orange", "pink", "magenta", "cyan", "white", "black", "config"
]

Expand Down
5 changes: 1 addition & 4 deletions src/mediaComp/core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
from .color import *
from .utils import *
from .image import *
from .movie import *
from .sound import *
from .turtle import *
from .world import *
from .sound import *
83 changes: 0 additions & 83 deletions src/mediaComp/core/movie.py

This file was deleted.

25 changes: 25 additions & 0 deletions src/mediaComp/core/root_manager.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import tkinter as tk

_root = None
_mainloop_started = False

def get_root():
global _root
if _root is None:
_root = tk.Tk()
_root.withdraw()
return _root


def start_mainloop():
global _mainloop_started
root = get_root()
if not _mainloop_started:
_mainloop_started = True
root.mainloop()

def _cleanup_if_last_window():
global _root
if _root and _root.winfo_exists() and not _root.winfo_children():
_root.destroy()
_root = None
117 changes: 0 additions & 117 deletions src/mediaComp/core/turtle.py

This file was deleted.

1 change: 0 additions & 1 deletion src/mediaComp/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import subprocess
from math import inf
import tkinter as tk
from tkinter import messagebox
from ..models.Config import ConfigManager
from pathlib import Path
from mediaComp import get_root, _cleanup_if_last_window
Expand Down
14 changes: 0 additions & 14 deletions src/mediaComp/core/world.py

This file was deleted.

36 changes: 0 additions & 36 deletions src/mediaComp/models/Movie.py

This file was deleted.

2 changes: 1 addition & 1 deletion src/mediaComp/models/Picture.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from . import File_Chooser as FileChooser
import os, tempfile, subprocess, sys, atexit, pickle
import os, tempfile, subprocess, sys, pickle
from subprocess import PIPE
import PIL.ImageDraw, PIL.Image
from .PixelColor import Pixel, Color
Expand Down
2 changes: 0 additions & 2 deletions src/mediaComp/models/Sound.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
from .SoundSample import SoundSample
import wave
import os
#import simpleaudio as sa
import pygame
import threading

import sounddevice as sd
import numpy as np

Expand Down
2 changes: 0 additions & 2 deletions src/mediaComp/models/SoundExplorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
from tkinter import ttk
from .Sound import Sound
import re
import sounddevice as sd
import numpy as np

class MouseMotionListener(ABC):
@abstractmethod
Expand Down