Giter Club home page Giter Club logo

spyrograph's Introduction

Hello! My name is Chris Greening and I am a software engineer based out of the New York metro area.

LinkedIn Twitter DEV

"Buy Me A Coffee"

spyrograph's People

Contributors

alylaxy avatar astr0clad avatar chris-greening avatar jbxamora avatar jlonge4 avatar kempeter avatar manasi-jain avatar navinkhandeparkar avatar nishanthmuruganantham avatar priyangshu-hzy avatar sahildave04 avatar sjorza avatar subhrodeepg avatar ujwalkumar1995 avatar valzes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

spyrograph's Issues

Add repeating animation

Is your feature request related to a problem? Please describe.
Add a possible configuration to the tracing that repeats indefinitely

Add Tusi couple object

Is your feature request related to a problem? Please describe.
Add Tusi couple as an available oject

Add a descriptive __str__ or __repr__ to the classes

Is your feature request related to a problem? Please describe.
Define a useful human readable str and/or repr in _Trochoid that indicates what the shape is (i.e. the name of the class Hypocycloid, Epitrochoid, etc.) and the input parameters R, r, d, etc.

Example say we have a Hypotrochoid instance set as variable hypotrochoid_obj with parameters R=5, r=3, d=1, thetas=[1.1 1.2, 1.3, 1.4, ... 5]. When a user types hypotrochoid_obj in console or print(hypotrochoid_obj) they should get some sort of useful output like Hypotrochoid(R=5, r=3, d=1, thetas = [1, 1.1 ... 5]) as opposed to just the default memory address

NOTE: thetas can be many, many values so perhaps just the first two values and the last to show start, stop, and the step between values

Add optional matplotlib support

Is your feature request related to a problem? Please describe.
Add optional matplotlib support to output the parametric equation behind each object as a chart

Rename _Roulette ABC to _Trochoid

Is your feature request related to a problem? Please describe.
Right now the ABC for Hypotrochoid and Epitrochoid is called _Roulette as the "general" case but I find this name misleading - will rename to _Trochoid which is more accurate as this library is only concerned with trochoid's and not more general roulette's

Add examples gallery to the GitHub Pages site

Is your feature request related to a problem? Please describe.
Add an examples gallery to the GitHub Pages site that showcases all the different objects and their properties so users can get an idea of what's possiboe with the package

Add pylint GitHub Action

Is your feature request related to a problem? Please describe.
Add GitHub Action on pull request for pylinting on PR

Add pulsing color animation

Is your feature request related to a problem? Please describe.
If we draw a shape in place and iterate the color we can create a pulsing color effect on the screen

Add trace output to file

Is your feature request related to a problem? Please describe.
Output a given shape to file

Ideally the trace can output as an individual image or a GIF showing everything drawn by calling trace instance method but saved to file

Refactor objects into submodules

Is your feature request related to a problem? Please describe.
Currently everything is available as a toplevel import which is more or less okay but I think we can effectively group the hypotrochoid and its subclasses in a hypotrochoid submodule and the epitrochoid classes in a separate submodule

This would help mentally separate the different objects and know "okay these are organized with these"

Improve the `Hypotrochoid` class docstring

Is your feature request related to a problem? Please describe.
Improve the class docstring for Hypotrochoid with more information about what a hypotrochoid is, what this class is doing, etc. for the official documentation

See here to know what line to expand upon

Nothing too dramatic just a paragraph or two with a brief description should suffice

Improve the `Epitrochoid` class docstring

Is your feature request related to a problem? Please describe.
Improve the class docstring for Epitrochoid with more information about what an epitrochoid is, what this class is doing, etc. for the official documentation

See here to know what line to expand upon

Nothing too dramatic just a paragraph or two with a brief description should suffice

Update the `_init_turtles` docstring

Is your feature request related to a problem? Please describe.
The implementation details of _init_turtles have changed since the last time the docstring was updated - please just add a quick description of the arguments that are getting passed in and the return values.

Since this is a private method we don't have to do a full Return and Parameters section, just a "Returns turtle that does foo, turtle that does bar set with color value, etc."

Add custom origin offset

Is your feature request related to a problem? Please describe.
Add a custom origin to vertically and horizontally shift the shape to build around the custom offset

Refactor `_init_turtles` to use a `namedtuple` for storing turtles

Is your feature request related to a problem? Please describe.
The trace method and more specifically the _init_turtles method have slowly grown in complexity over the last few feature development cycles and we're starting to pass around too many definitions of different turtle's

Ideally a quick improvement to consolidate some of these extraneous variables in _init_turtles will be to instantiate a namedtuple and store the turtle's in that instead so we're only passing around one namedtuple that stores all the different turtles

Only update frame once at the end of the loop unless frame_pause is specified

Is your feature request related to a problem? Please describe.
Currently the trace function is handled by a for loop that updates turtle once on each iteration. This works well when we want to see the trace as its drawing by specifying a nonzero frame_pause but if we want an instantaneous trace I think this is bottlenecking the output

If we check frame_pause for == 0 I suspect we can get efficiency gains by only updating once at the very end

Increase unit testing coverage

Is your feature request related to a problem? Please describe.
Increase relevant unit test coverage using pytest. Existing tests can be found in tests/. Whether you write one test or a hundred tests every bit helps! Please feel free to comment below if you're interested

Some relevant notes that can point you in the right direction:
Currently the library has two "general" shapes Hypotrochoid and Epitrochoid and two "special" shapes Hypocycloid and Epicycloid (which inherit from the general shapes and define some special behavior).

Because of how the special behavior is handled we temporarily have a semi-awkward set of tests defined as methods in classes _TestGeneral and _TestSpecial where _TestGeneral is intended for testing Hypotrochoid and Epitrochoid and _TestSpecial is for testing Hypocycloid and Epicycloid

Improve the `_draw_circle` docstring

Is your feature request related to a problem? Please describe.
We have a docstring for _draw_circle but it isn't very descriptive and doesn't provide much context. Please improve on it and emphasize where the input parameters are from and what exactly the method is doing

This is a private implementation function so we don't need public facing docs just something that improves maintainability

Add a `scale` method for scaling the input parameters by a given input

Is your feature request related to a problem? Please describe.
Add a scale method that allows users to specify a scale factor to change the input parameters by

Example (with symbols instead of real numbers):

hypotrochoid = Hypotrochoid(R=R, r=r, d=d, thetas=thetas)
hypotrochoid = hypotrochoid.scale(scale=.5)
print(hypotrochoid.R)
>>> R/2

Improve the `Hypocycloid` class docstring

Is your feature request related to a problem? Please describe.
Improve the class docstring for Hypocycloid with more information about what a hypocycloid is, how it relates to hypotrochoids, what this class is doing, etc. for the official documentation

See here to know what line to expand upon

Nothing too dramatic just a paragraph or two with a brief description should suffice

Add transform method

Is your feature request related to a problem? Please describe.
Add method that transforms object's origin left or right based on given user input

Generalize Sphinx documentation further to remove need for hardcoding

Is your feature request related to a problem? Please describe.
I'm not fully familiar with Sphinx - I have api-doc setup and more or less "automated" but I have to manually add objects to the index.rst and specify :inherited-members: for each individual class. Ideally there's a way to automate this so index.rst automatically docs all available public objects and I can specify :inherited-members: as a default config that gets inherited (pun intended) across all "child" rst files

Not sure what the possibility of this is but will investigate when I have some free time as this is noncritical and I can handle manually for now. Ideally I want doc generation to be completely automated as a part of the PyPI helper bash script I have so documentation is regenerated with each release

Raise an error if negative value passed as input parameter

Is your feature request related to a problem? Please describe.
If a negative value is passed as an argument for one or more of the input parameters raise an error warning the user to pass an argument > 0

i.e.

import numpy as np
from spyrograph import Hypotrochoid

hypotrochoid = Hypotrochoid(R=100, r=-20, d=25, thetas=np.arange(0,2*np.pi, .1))

would raise an error like

"ValueError: Negative value is an invalid input parameter. Please pass values greater than zero"

Raise an error if zero is passed as an input argument

Is your feature request related to a problem? Please describe.
If zero is passed as an argument for one of the input parameters raise an error warning the user to pass an argument > 0

i.e.

import numpy as np
from spyrograph import Hypotrochoid

hypotrochoid = Hypotrochoid(R=100, r=0, d=25, thetas=np.arange(0,2*np.pi, .1))

would raise an error like

"ValueError: Zero is an invalid input parameter. Please pass values greater than zero"

Add pytest framework in place

Is your feature request related to a problem? Please describe.
Add pytest automated testing framework in place for proper unit testing moving forward

Improve the `_init_screen` docstring

Is your feature request related to a problem? Please describe.
We currently have a docstring for _init_screen but its fairly ambiguous and doesn't really contextualize any of the inputs. Please improve upon this docstring and explain what's getting passed in as arguments and what's getting returned back

This is a private function so no need for a Return or Parameters section for the public docs, just something quick for maintainability purposes

Add Quickstart section to homepage

Is your feature request related to a problem? Please describe.
Add installation and sample boilerplate for copying/pasting some of the core features of the project i.e. instantiating a hypotrochoid and tracing it

Add requirements.txt

Is your feature request related to a problem? Please describe.
Add a requirements.txt file that defines what libraries are needed for the development environment i.e. pytest, pylint, matplotlib, pandas, etc.

Write unit test for the zero or negative ValueError raise

Is your feature request related to a problem? Please describe.
Write unit tests that ensure a ValueError is raised when Hypotrochoid, Epitrochoid, Hypocycloid, or Epicycloid are instantiated with a negative or zero value for R, r or d

Add ability to draw animations of complete roulettes

Is your feature request related to a problem? Please describe.
Add ability to draw animations of spirographs changing as a function of input lengths i.e. we draw the full spirograph from 0 to 2pi but each frame of the animation would increment radius of the fixed circle, etc.

Improve docstring for the `plot` method

Is your feature request related to a problem? Please describe.
Currently the plot method defined in _Trochoid has fairly light documentation.

It is essentially a wrapper around matplotlib.pyplot.plot as it just passes the kwargs from plot down into matplotlib but I feel the current docstring could be improved to provide more context

Improve the `Epicycloid` class docstring

Is your feature request related to a problem? Please describe.
Improve the class docstring for Epicycloid with more information about what an epicycloid is, how it relates to epitrochoids, what this class is doing, etc. for the official documentation

See here to know what line to expand upon

Nothing too dramatic just a paragraph or two with a brief description should suffice

Raise a `ValueError` if empty list of `thetas` is passed to `__init__`

Is your feature request related to a problem? Please describe.
Currently a user can pass an empty list of thetas in to Hypotrochoid, Epitrochoid, Epicycloid, or Hypocycloid. This doesn't make contextual sense so we should raise a ValueError if an empty list is passed to _Trochoid.init (_Trochoid is an ABC that defines most of the behavior for the user-facing objects)

There is a _Trochoid._validate_thetas private func that is called internally, it would be appropriate to place this in here.

NOTE: users can also pass theta_start, theta_end, and theta_stop that will build a list of thetas similar to np.arange - if a user passes theta_start == theta_end this should raise the same error. Because of this perhaps the "if thetas is empty" check should be at the end of _validate_thetas

Add docstring to `_validate_theta`

Is your feature request related to a problem? Please describe.
Add a simple docstring to _validate_theta that describes its inputs and outputs. This is a private method so we don't need a full documented method, just something quick that explains the inputs and outputs of the function and what it is doing

The purpose of the function is to standardize any potential theta inputs (i.e. a list of thetas or the theta start, stop, step) and A. raise an error if multiple theta definitions are passed and B. return a list of thetas

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.