Giter Site home page Giter Site logo

aviaviavi / toodles Goto Github PK

View Code? Open in Web Editor NEW
966.0 22.0 35.0 439 KB

Project management directly from the TODOs in your codebase

License: MIT License

Haskell 67.34% CSS 3.15% HTML 15.60% JavaScript 12.91% Python 1.00%
project-management management tracking todo

toodles's Introduction

Toodles

Hackage Gitter chat

Toodles scrapes your entire repository for TODO entries and organizes them so you can manage your project directly from the code. View, filter, sort, and edit your TODO's with an easy to use web application. When you make changes via toodles, the edits will be applied directly the TODO entries in your code. When you're done, commit and push your changes to share them with your team!

Toodles Screenshot

TODO details

Specify details about your TODO's so that you can filter and sort them with ease! Specify details within parenthesis and separate with the | delimeter.

# TODO(assignee|p=1|keys=vals|#tags)

Priority

The key p=<integer> will be interpreted as a priority number

KeyVals

Use arbitrary key value pairs <key>=<value>|<key2>=<value2>|... and design any organization scheme you wish! A good use for this is to enter dates of deadlines for TODO's that you can sort on in Toodles

Tags

A detail starting with #, eg #bug|#techdebt|#database|... will be interpreted as a tag, which can be used to label and group your TODO's.

Assign

Assign your TODO's to someone. Any plain word that will be interpreted as an assignee.

# TODO(bob) - something we need to do later

Per Project Configuration

You can configure toodles by putting a .toodles.yaml file in the root of your project. See this repo's .toodles.yaml for the full configuration spec.

Currently via config you can:

  • Set files to ignore via a list of regular expressions
  • Specify your own flags to scan for other than the built-ins (TODO, FIXME, XXX)

Ignoring Files

Ignore as many files as you can! Large autogenerated files will slow Toodles down quite a bit. Check the output of the server to see any files/folders that may be causing slowness for your repo and add them to the ignore section your .toodles.yaml If the performance of Toodles is not good enough for your use case, please open an issue.

Scanned Languages

These languages will be scanned for any TODO's:

  • C/C++
  • C#
  • CSS/SASS
  • Elixir
  • Erlang
  • Go
  • Haskell
  • HTML
  • Java
  • Javascript
  • Kotlin
  • Lua
  • Objective-C
  • PHP
  • Plaintext files (*.txt)
  • Protobuf
  • Python
  • React Javascript (JSX)
  • Ruby
  • Rust
  • Scala
  • Shell / Bash
  • Swift
  • Typescript
  • Vue (scripts only)
  • Yaml

Submit a PR if you'd like a language to be added. There will eventually be support for this to be user configurable

Installing with Docker

You can run a pre-built toodles for your current directory via docker:

# execute toodles for the directory you are currently in:
$ docker run -it -v $(pwd):/repo -p 9001:9001 docker.avi.press/aviaviavi/toodles

Just mount your project into the container's /repo and direct a port of your choice to the container's 9001.

Building Toodles

Toodles builds with stack. Just a stack build should do it. If you'd like to build toodles without cloning the source, you can have stack build toodles with stack install --resolver=lts-12.14 toodles!

Building with Docker

For convenience this repository also provides a Dockerfile to automatically build toodles.

# to build container run:
$ cd /path/to/toodles/repo
$ docker build -t toodles Dockerfile.dev .
# afterwards you can run the following command to execute toodles for the
# directory you are currently in:
$ docker run -it -v $(pwd):/repo -p 9001:9001 toodles

Running

Invoking toodles with no arguments will treat the current directory as the project root and will start a server on port 9001. You can set these with the -d and -p flags, respectively.

# $ toodles -d <root directory of your project> -p <port to run server>
# for more info run:
# $ toodles --help
$ toodles -d /path/to/your/project -p 9001
# or simply
$ toodles

Contributing

Contributions in any form are welcome! A few bits of info:

  • Don't be shy, ask questions! Contributing to Toodles should be welcoming for people at any level of programming familiarity. Whether it's a new feature, bug fix, or docs, any contribution is very appreciated.
  • Open an issue or jump into the chat room on gitter
  • Before you start coding, please comment or mark a particular issue as "in progress", or even open your pull request as a work in progress (WIP). This is to help avoid having multiple people work on the same thing.
  • If github issues don't cut it, feel free to reach out on gitter or twitter @avi_press

toodles's People

Contributors

afraca avatar aviaviavi avatar damiencourousse avatar ederchrono avatar fbartels avatar fdeitylink avatar hqm42 avatar jahaynes avatar jmargeta avatar lifecoder45 avatar zyishai 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

toodles's Issues

stack install: MissingH dependency issue

I've never used stack or Haskell for that matter, so maybe I did something obviously wrong.

When I ran stack install toodles I got the following error:

$ stack install toodles
Writing implicit global project config file to: /home/mgalgs/.stack/global-project/stack.yaml
Note: You can change the snapshot via the resolver field there.
Using latest snapshot resolver: lts-12.14
Downloaded lts-12.14 build plan.
Preparing to install GHC (tinfo6) to an isolated location.
This will not interfere with any system-level installation.
Downloaded ghc-tinfo6-8.4.3.
Installed GHC.
Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/
Downloading root
Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/
Downloading timestamp
Downloading snapshot
Downloading mirrors
Cannot update index (no local copy)
Downloading index
Updated package index downloaded
Update complete
Populated index cache.

Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for toodles-0.1.0.11:
    MissingH-1.4.1.0 from stack configuration does not match ==1.4.0.1  (latest matching version is 1.4.0.1)
needed since toodles is a build target.

Some different approaches to resolving this:

  * Set 'allow-newer: true' in /home/mgalgs/.stack/config.yaml to ignore all version constraints and build anyway.

  * Consider trying 'stack solver', which uses the cabal-install solver to attempt to find some working build configuration. This can be convenient when dealing with many complicated constraint
    errors, but results may be unpredictable.

  * Recommended action: try adding the following to your extra-deps in /home/mgalgs/.stack/global-project/stack.yaml:

MissingH-1.4.0.1@sha256:0925ca46d3cad0dc6d35bdfb28c9bbd065ea7c8fd49aea8c572e846f49605e13

Plan construction failed.

I took the "Recommended action" and added that guy to my ~/.stack/global-project/stack.yaml:

packages: []
resolver: lts-12.14
extra-deps:
  - MissingH-1.4.0.1@sha256:0925ca46d3cad0dc6d35bdfb28c9bbd065ea7c8fd49aea8c572e846f49605e13

After doing that I was able to run stack install toodles again and it built successfully and I was able to run toodles just fine.

System info

I had just freshly installed stack via their recommended instructions. Full steps:

$ curl -sSL https://get.haskellstack.org/ | sh
$ stack install toodles

This is a Fedora 27 box.

metadata modifications disappear when refreshing the browser window

bug on commit ref cc1e6c2.

  • open UI
  • select a TODO item >>= edit
  • add an assignee >>= submit
  • the new assignee is shown in the UI.
  • refreshing the browser window (e.g. F5 on Firefox) clears the metadata modifications
  • however the modifications are correctly applied to the source file.
  • refresh the UI (button refresh in toodles). the metadata modifications are shown

Scarf install on OSX does not work

Hello again; #66 was fixed, but now there is a different error:

~/p/tremulous-game-logic § scarf install toodles
Installing toodles
Generating dependency list
Installing 1 package(s): [toodles]
Downloading
Extracting...
Copying...
Done
~/p/tremulous-game-logic § toodles -h
b7b8b342-d117-45d1-b46b-ba949d4191e4: user error (Couldn't initialize toodles, no valid data directory found. Please file a bug on Github.)
~/p/tremulous-game-logic §

Custom Attributes example

Hi, just testing this nice app, but can't figure what format should be used for Custom Attributes in web interface. Always getting Parse error, check your formatting and try again.
Tried x, #x, #x=y, but nothing works

Precompiled Windows Distribution

For those of us who are using work machines that are heavily crippled by anti-virus software, it would be very useful to have a Windows distribution of toodles available.

delete >>= edit -> wrong entry duplicate

hello,

deleting an entry, and then editing another entry farther in the same source file leads to creating a duplicate of the edited entry.

steps to reproduce:

$ echo "-- TODO issue 1" >> test.hs
$ echo "" >> test.hs
$ echo "-- TODO issue 2" >> test.hs
  • open toodles UI
  • delete issue 1
  • edit and modify issue 2
  • issue 2 is now duplicated in file test.hs:
$ cat test.hs

-- TODO issue 2
-- TODO (|#test) - issue 2

thanks,

Scarf OSX build has build-specific path

Hi, I've installed toodles using scarf on two platforms now; Ubuntu and OSX, and run in to the same issue:

§ toodles
serving on 9001
/Users/avipress/side/toodles/.stack-work/install/x86_64-osx/lts-12.14/8.4.3/share/x86_64-osx-ghc-8.4.3/toodles-1.2.1/web/html/index.html: openFile: does not exist (No such file or directory)
^Cuser interrupt

It looks like toodles is expecting to find something at a path that existed on the system used to build the application.

How does your develop-test cycle work?

I installed toodles globally, via cabal. Then I filed a bunch of issues, and felt like I ought to try contributing, so I cloned the source and made a tiny change (started to subdivide the code into modules, beginning by moving the types and instances to a separate file), and realized I don't know how to try out my changes.

I tried using "stack run toodles", and it works, but it scans the toodles folder. I'd like it to scan a different folder, but I can't figure out how to pass in the --directory= argument.

Should I remove that global installation, and run "stack install toodles" every time I want to try a changed version?

High memory usage, suspected memory leak

When running toodles in a project with lots of files, memory usage is very high. I observed values of >2GiB in projects with large node_modules directories when not ignoring them with .toodles.yaml. After ignoring node_modules, memory usage was still ~200MiB.

I created an empty directory with only one file containing

#include <stdio.h>

int main(void) {
  printf("Hi.\n"); // TODO(foo|p=2) Print a more interesting message
  return 0;
}

I then started toodles in that directory and observed it's memory usage.

When loading http://localhost:9001/ for the first time it goes from ~14MiB to ~18MiB, and as I keep refreshing the page, memory usage slowly creeps up, while "cached read" is being printed to the console each time.

docker build issues since 1.0.0

it appears docker stopped working with the latest release

Step 9/16 : RUN stack install --ghc-options '-optl-static -fPIC -optc-Os'
 ---> Running in c175bcc07af7

Warning: /app/toodles.cabal was modified manually. Ignoring /app/package.yaml in favor of the cabal
         file. If you want to use the package.yaml file instead of the cabal file, then please
         delete the cabal file.
Building all executables for `toodles' once. After a successful build of all of them, only specified executables will be rebuilt.
toodles-1.0.0: configure (lib + exe)
Configuring toodles-1.0.0...
toodles-1.0.0: build (lib + exe)
Preprocessing library for toodles-1.0.0..
Building library for toodles-1.0.0..
[1 of 6] Compiling Paths_toodles    ( .stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build/autogen/Paths_toodles.hs, .stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build/Paths_toodles.o )
[2 of 6] Compiling Types            ( src/Types.hs, .stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build/Types.o )
[3 of 6] Compiling ToodlesApi       ( src/ToodlesApi.hs, .stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build/ToodlesApi.o )
[4 of 6] Compiling Parse            ( src/Parse.hs, .stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build/Parse.o )
[5 of 6] Compiling Config           ( src/Config.hs, .stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build/Config.o )
[6 of 6] Compiling Server           ( src/Server.hs, .stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build/Server.o )
/usr/bin/ld.gold: error: /usr/lib/gcc/x86_64-linux-gnu/6/crtbeginT.o: requires dynamic R_X86_64_32 reloc against '__TMC_END__' which may overflow at runtime; recompile with -fPIC
collect2: error: ld returned 1 exit status
`gcc' failed in phase `Linker'. (Exit code: 1)

--  While building custom Setup.hs for package toodles-1.0.0 using:
      /root/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-linux/Cabal-2.2.0.1 build lib:toodles exe:toodles --ghc-options " -ddump-hi -ddump-to-file"
    Process exited with code: ExitFailure 1
The command '/bin/sh -c stack install --ghc-options '-optl-static -fPIC -optc-Os'' returned a non-zero code: 1

[Feature] - Project selection dropbox

Hi, I think it would be nice to have a dropbox with different projects so you can browse them directly from the web.
Create .toodles.yaml in user $HOME and specify all local projects you'd like to browse. Then just start toodles from whatever directory (or even on startup) and you can always check more projects for TODOs.

In that user-global .toodles.yaml the user could even specify other TODO keywords to handle, like fixme?

EDIT: Just fixed backtick

stack install: "Unknown package: toodles"

I thought this was in a snapshot, so I kept trying to run "stack install toodles" without downloading the repo. Perhaps a rookie mistake, but it might save some other people some time if the readme mentioned that you should first downlload the repo, and run that from inside it.

After doing that, I got it to work, and I'm excited to use it! Thank you!

(I gave this issue the title it's got so that it can be easily found by others running into the same proble.)

Installing with Stack base dependency issue

Hi,
I just tried to install toodles using the latest version of Stack (windows), which failed with the following message:

In the dependencies for directory-1.3.1.5: base-4.12.0.0 from stack configuration does not match >=4.5 && <4.12 (latest matching version is 4.11.1.0) needed due to toodles-1.0.2 -> directory-1.3.1.5

Build requires unattainable version of base. Since base is a part of GHC, you most likely need to use a different GHC version with the matching base.
It looks like toodles does not support the latest version of Stack (yet). Any suggestions on how to fix this? Or should the README specify a specific version of Stack/GHC to be used?

deleting a TODO item also deletes the line following

Let's consider the test file below. Deleting issue 2 also deletes the comment line -- another comment 2.

-- file: test.hs

-- another comment 0
-- TODO (assig|#test) - issue 1
-- another comment 1
-- TODO (assig|#test) - issue 2
-- another comment 2
-- TODO (assig|#test) - issue 3
-- another comment 3

The issue does not appear with this test file, where issue 2 is not followed by a comment line.


-- another comment 0
-- TODO (assig|#test) - issue 1
-- another comment 1
-- TODO (assig|#test) - issue 2

-- TODO (assig|#test) - issue 3
-- another comment 3

vscode

have you ever thought about integrating this into a vscode plugin? for us to use toodles, this would be a huge blocker, because we don't want yet another management tool everyone has to keep an eye on

Parser is too slow

Since adding multiline todo parsing, toodles now takes far too long to return results on large code-bases

[feature][wishlish] update or modify tags

hello,

I would like the possibility to edit tags using the GUI, i.e. not only to add new ones.

How to reproduce:

$ mkdir test && cd test
$ echo "-- TODO(|#incomplete) - this is a test" >> file.hs
$ toodles .

Now in the GUI, select the TODO, click edit. In the tag field, replace incomplete by newcomer.

thank you,

May I subdivide it into modules?

Would you be open to my dividing the code into modules? It would make it easier for newcomers to understand ... and easier for me to navigate ....

Allow user to use symbols other than TODO?

I believe the TODO idiom came from the fact that programmers wanted tasks to jump out at them. Toodles allows me to find all those tasks more easily, which means I can preserve that precious capital-letter bandwidth for something else. In my case it's the label "PITFALL", which I still need to jump out at me from within the code, because otherwise I usually won't read those comments, which can lead me to make mistakes.

So I wish I could indicate, somewhere in the yaml file, that "todo" is also something worth reporting.

(In fact, sometimes PITFALL is worth reporting too; I suppose it would be nice to be able to choose from the webpage which labels to draw on. But this is a minor point relative to the first.)

permit|assume a default priority level

My code has a number of tasks that are currently extremely low priority, but I've kept them around in case that eventually changes, which is conceivable. To try to get them out of the way, I've marked them with a (-10) value for priority. But because they have a priority value, they now appear above all the things without one. I'd like to be able to specify in the .yaml file (or, if everyone works like this, just have it hard-coded) that if it is unspecified, a task's priority is zero.

Ignoring paths doesn't work when invoked with directory (-d) argument

When I try to ignore a path it doesn't seem to work if I invoke toodles from outside the project path using the -d argument.

I have a project at ~/sites/str-prod where I'd like to run toodles. I invoked toodles with:

$ toodles -d ~/sites/str-prod

Here's what I'm trying to ignore:

ignore:
  - static/piu/avenxo

but I'm still seeing files under this avenxo path in my TODO list:

image

However, when I invoke toodles from within the project directory it seems to work (i.e. I don't see any TODOs under avenxo):

$ cd ~/sites/str-prod
$ toodles

Add support for multiline / close tagged comments

C++ style multiline, close tagged comments /* .. */ are currently not supported by Toodles, but should be.

This could be implemented a number of ways, but what I figure it will be something along the lines of changing our current filetype <> comment tuples:

...
  , (".c++", "//")
  , (".cs", "//")  
...

to a data type with more information. It could contain a list of starting delimiters for comments and a list of opening and closing tags.

Something like

CommentDetails {
extension = "c++"
singeLineDelimeters = ["//"]
multilineDelimeters = [ ("/*", "*/") ]
}

And then update the parser accordingly. This would also make #17 doable.

Dependency tracking

I've been thinking toodles could have some UI aid to show dependencies between TODO's. This could be encoded via key value pairs.

stack install: AesonException ... Invalid flag name: \"bytestring--lt-0_10_4\""

Attempting to "stack install" as per the readme gets me:

$ stack install toodles
Downloaded lts-12.16 build plan.    
AesonException "Error in $.packages.cassava.constraints.flags['bytestring--lt-0_10_4']: Invalid flag name: \"bytestring--lt-0_10_4\""

I've only just installed stack (apt install haskell-stack), so doubt it's anything unique in my environment, but could easily be user error.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.1 LTS
Release:        18.04
Codename:       bionic

exclude tags

The filter function in toodles blows my mind. I love being able to do that.

But it would be nice to be able specify "show me everything except bla".

More generally, a boolean logic would be awesome -- something like Apache Lucene, which lets you ask for "bob AND NOT (speed OR search)". Or, perhaps more natural, it could read like Haskell: "bob && not (speed || search)".

'stack install toodles' downloads 3,5GB of stuff

This is not an issue with your software, just a question.
I previously didn't have stack so I installed it. Running stack install toodles downloaded a full 3,5GB of stuff to ~/.stack. Toodles seems to be rather lightweight so I was not suspecting that. What's that for? Can I safely remove this without breaking your application?

Various issues with `toodles` package

I couldn't help but notice that toodles on Hackage is having some issues.

As can be seen on https://hackage.haskell.org/package/toodles-0.1.0.7/dependencies this package is missing version bounds which are essential for cabal to operate properly, and as can be seen on

https://matrix.hackage.haskell.org/#/package/toodles

toodles

the lack of version bounds results in cabal install toodles failing to find good install-plans for GHC 7.8.4 through GHC 8.6.1 for different reasons.

Also, the description ("See the README on...") is not a proper description for your package (and Hackage will show a link to the README at the end of the description if the README exists; therefore that phrase is redundant), and hence this will cause poor experience for users (NB: your package won't be properly indexed by Hackage's package search feature and thus hurt its discoverability). See also this posting for more details.

Please let me know if you have any questions.

Running Toodles on a static file server

Hey there! Asking here as I couldn't answer this from the docs: is there a way we can run Toodles on a project (Node.js in this case), and generate a bunch of HTML/CSS/JS files that we can host along with other static reports we generate on every PR?

Report all tags

Sometimes I'd like to see a simple list of all the tags I've used. It seems like it could be an unobtrusive thing to have at the bottom of the screen.

Show more context, like the -C option to grep

grep todo normally shows you only those lines where it discovered the word "todo", but grep todo -C n will show you the n preceding lines and the n subsequent lines as well. (If you want more granularity you can use -A n_preceding -B n_subsequent.) Controls on the web page to do this would let a user get a better view of an issue they don't remember clearly without having to open any file.

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.