summaryrefslogtreecommitdiff
path: root/Biz/Devalloc.hs
AgeCommit message (Collapse)Author
2021-11-26Rename Devalloc to DragonsBen Sima
2021-11-26Reimplement Que with ServantBen Sima
Still todo: add authentication. But that can wait. In re-implementing this, I was able to figure out how to get the Go.mult working properly as well. The problem is that a tap from a mult channel does not remove the message from the original channel. I'm not sure if that should be a core feature or not; for now I'm just draining the channel when it's received in the Que HTTP handler. (Also, this would be a good place to put persistence: have a background job read from the original channel, and write the msg to disk via acid-state; this would obviate the need for a flush to nowhere.) Also, streaming is working now. The problem was that Scotty closes the connection after it sees a newline in the body, or something, so streaming over Scotty doesn't actually work. It's fine, Servant is better anyway.
2021-11-26Automatically detect Haskell dependenciesBen Sima
This parses the files contents for imports, then uses ghc-pkg to lookup the package that provides the module. Now I can do that analysis in Haskell instead of nix, which is much easier to code with.
2021-11-26Factor Analysis into own moduleBen Sima
2021-11-26Factor out runAnalysis functionBen Sima
2021-11-26Factor OAuth code into Biz.AuthBen Sima
2021-11-26Upgrade to nixos-21.05Ben Sima
Getting me closer to the latest GHC. This release also includes my own packages that I submitted some time ago. GHCJS is not present in 21.05 for some reason, but I think it's back in master, so I might do another upgrade soon, but for now I just disabled my GHCJS support. I'm not really using it anyway. I also had to bring it string-quote, update nixos-mailserver, and a few other things.
2021-04-13Doc fix and factor for readibilityBen Sima
2021-03-30Move Analysis class instances near type definitionBen Sima
2021-03-25Add manual submission formBen Sima
2021-03-24Add a simple admin pageBen Sima
2021-03-22Remove dummy hotspots numberBen Sima
The right way to show number of hotspots would be to find files in which commit frequency is more than like 1 standard deviation from the norm. I could even show a histogram instead of a flame graph...
2021-03-22Deduplicate activeAuthor listBen Sima
This might not be very robust, but it works for now.
2021-03-22Add descriptions to report detailsBen Sima
2021-03-20Display hotspots graph and stacked line chartsBen Sima
I think I should change the colors a bit... to be done later I suppose.
2021-03-20Calculate hotspotMap in AnalysisBen Sima
2021-03-19Add ability to clone private reposBen Sima
The strategy is to clone over https with the OAuth token: git clone https://<user>:<oauth-token>@github.com/<user>/<repo>
2021-03-19Add label for private reposBen Sima
2021-03-17Change auth error message and reorg Analysis cssBen Sima
2021-03-17Add a HasCss classBen Sima
This way I can attach page-specific CSS to the type for the page. I could make this even tighter by combining HasCss with the HTML declaration, but that would basically just be Lucid.ToHtml, so I'm not sure it is worth it.
2021-03-17Restful analysis endpointBen Sima
2021-03-17Remove TODO about XSRF settingBen Sima
Since we don't use a JavaScript frontend, we don't actually need any XSRF protection. All of the requests will be coming from the browser, not from a computer running inside the browser (js).
2021-03-17Put an example analysis on the homepageBen Sima
The design kinda sucks, but I will refresh it later. I just want to get this shipped right now.
2021-02-23Add repoVisibilityBen Sima
2021-02-23Add Biz.Log middleware that works with systemdBen Sima
Perhaps this is not as performant as the wai-provided one, but it is *much* simpler and follows my output format, which I think is much easier to quickly read. Anyway I doubt logging will ever be a bottleneck, and if it is then I should be able to create some instrument to detect that.
2021-02-22Keep a checkpoint on shutdownBen Sima
2021-02-22Add quiet option for devalloc startupBen Sima
It would be good to have this as a general logging config, but I'm not sure how to do that. I probably need a logging monad or something.
2021-02-22Test for empty GitHub user emailBen Sima
2021-02-22Add note about persisted data typesBen Sima
2021-02-22Handle case when GitHub API provides no emailBen Sima
2021-02-19Fix typoBen Sima
2021-02-19Don't blow up when git mtime is emptyBen Sima
2021-02-19Remove dummy pricing link, put small pricing on signup buttonBen Sima
2021-02-19Factor out panicsBen Sima
2021-02-19Move 'developer hot spots' to pitch sectionBen Sima
2021-02-05Combine contributors and collaboratorsBen Sima
It's easier and cleaner this way - I don't have to do complex switching between the two. Instead just treat them as the same thing basically. Can adjust later if need be.
2021-02-05Prefer traverse over mapMBen Sima
2021-02-05Test analyzing a public repoBen Sima
2021-02-05Add Log.mark and convert some putTexts into Log.infosBen Sima
2021-02-05Add 'tidy' to PlanBen Sima
This is supposed to be how to cleanup the database and any other local files. Should only be used before/after test, so maybe I can find a way to enforce this constraint somehow in the code.
2021-02-03Set and guard GitHub API access scopeBen Sima
I need 'repo' scope in order to see private repos. I can't clone and analyze private repos yet, for that I need to handle ssh keys and such, but at least I can ensure that requests are being made with the correct scope. Another addition I should do: check the X-OAuth-Scopes header on every request to ensure the user does not downgrade my scope after registering the app. https://docs.github.com/en/developers/apps/scopes-for-oauth-apps#available-scopes
2021-01-29Add Invoice optionBen Sima
2021-01-29Slighly better form stylingBen Sima
2021-01-29Lint 'return' into 'pure', replace bind operatorBen Sima
2021-01-28Refactor handler functionsBen Sima
Created guardAuth and cleaned up the handlers to be as small and regular as possible. My custom operators make it really fun to write this kind of code, heh. And it looks cool.
2021-01-27Set subscription in user page, operator precedenceBen Sima
I'm still working on figuring out operator precedence with my custom operators. The normal precedences don't work well for writing code in a pipeline as I like, so I have to re-define the operators with my own fixity settings. This will take some fiddling to get right. The user subscription allows setting to "Free" only now. It's fine because I still need to do a design refresh on the pages I just made. One thing I noticed is that it's getting harder to make changes without breaking stuff, so I either need to make smaller incremental changes, or actually write some real tests. I'll probably write tests soon.
2021-01-26Add user subscription fieldBen Sima
Also improved the test situation, did some refactors, and now listing the user's past analyses on their account page.
2021-01-22Property tests for calculateScoreBen Sima
2021-01-22Persist Analysis runsBen Sima
Keep Analysis runs, with a unique id, and index them based on ID, which user asked for the analysis, and commit sha.
2021-01-22Add footer and adjust widthsBen Sima
The footer is just a copyright for now. The header is full width, main and footer max out at 900px. This seems like a reasonable default, so I put it in the base Biz/Look.hs.