Giter Site home page Giter Site logo

handy's Introduction

Patrick Keenan

Who

Father. Nerd. Tech lead. Full stack web developer. Aspiring game maker.

What

Present Obsessions: Deno ⟡ TypeScript

Past: Vue ⟡ Storybook ⟡ Tailwind ⟡ JSON Schema ⟡ Python ⟡ Django ⟡ SQL

Forever: Information Science ⟡ DX & XD ⟡ Philosophy ⟡ Language ⟡ Folklore

Where

Lifelong Northern Californian. Check out this map.
{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "coordinates": [
          [
            [-120.98024892262558,39.12926538555507],
            [-121.62398108275471,38.540836803942426],
            [-121.4502048201827,38.36851724860142],
            [-121.30521989105449,38.37093578707177],
            [-121.19519678245007,38.61848711642429],
            [-120.93196173382023,38.64097880824562],
            [-120.75300304080042,38.7100590776478],
            [-120.9144401604679,39.12926538555507],
            [-120.98024892262558,39.12926538555507]
          ]
        ],
        "type": "Polygon"
      },
      "id": 0
    },
    {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "coordinates": [
          [
            [-122.33154165872072,38.16473919891976],
            [-122.44358745791169,37.963952378101425],
            [-122.38954837810272,37.84280319407043],
            [-122.52381538698882,37.80158141057761],
            [-122.50883743989286,37.63379093668679],
            [-122.03874975897133,37.24687517000284],
            [-121.82221640840496,37.19285628042681],
            [-121.73604304664005,37.26039781397411],
            [-121.86247880388902,37.45019536920209],
            [-122.0804518406326,37.460248480252716],
            [-122.32983980829647,37.73336365786372],
            [-122.19845946789789,37.856001475012434],
            [-122.27400897375998,37.942120269087],
            [-122.0524160974957,38.08498799279033],
            [-122.33154165872072,38.16473919891976]
          ]
        ],
        "type": "Polygon"
      }
    }
  ]
}

When

Born in '89, coding since '09.

Why

Memento Mori.

handy's People

Contributors

austinarey avatar pskfyi avatar

Watchers

 avatar

handy's Issues

Version branches should be protected

main is already protected, preventing maintainers from accidental pushes.

Now that 0.3.0 is being handled as a feature branch, we want the same protections for it. We also want the same rules for other semver-like branch names. GitHub's branch protection rules supports a name pattern for this, powered by Ruby's fnmatch.

Update `cli/cmd` to not throw when using `fullResult` option

See also #20.

Currently cli/cmd always throws a CmdError when the command was unsuccessful, but CmdResult["success"] is boolean rather than true incorrectly indicating that it might occasionally be false. One goal of the present API's fullResult option was that the shape of the successful and unsuccessful results would be the same. It would be fitting to only throw CmdError when fullResult is not true.

`DirectedGraph.Edge` should support arbitrary metadata

If we define Edge as an object instead of an array like {from: "a", to: "b", text: "connecting text"}

  • it allows a feature in mermaid to add connecting text like here
  • This breaks the ability to define a graph via a simple Path array - Path could be redefined as an ordered array of Edges

Add utilities for codegen in markdown files

See: Markdown Magic

Basically, we want some utility function that finds special pairs of HTML comments in MD files then provides a standard way to run corresponding code and replace the contents between the comment pairs with the code output.

We could use this, for example, to keep the script help text or examples in sync between script files and readmes.

Implement simple test coverage assertion script

deno test can generate coverage reports, which can be surfaced with deno coverage. Here are the official docs, and here is an example:

deno test --coverage=some-directory
deno coverage some-directory

Screen Shot 2023-04-25 at 6 50 03 PM

This shows the % of lines covered by unit tests, and which specific lines aren't covered, guiding us to places where we can add new unit tests.

Note: unfortunately there are no ignore comments at this time, so we won't be able to correct issues in the coverage report.

See: denoland/deno#16626

The coverage output also supports a common format lcov which various external services like codecov can hook into. However I am also familiar with a great API in Jest, the popular Node.js unit testing framework, which allows the CLI to error if the coverage doesn't meet certain configurable criteria such as total % coverage. We should look into writing a script which allows us to make the similar assertions from Deno's standard coverage outputs. Example:

deno run -A https://deno.land/x/handy/deno/script/assertCoverage.ts \
  coverage-dir --lines=80 # 80% of lines must be covered or this will error

This would be awesome for a CI check without integrating with a 3rd party service and would be an excellent addition to the toolkit.

Add JSDoc comments to all exports

At least include an @example. Things should ideally be named such that their purposes are clear, so we shouldn't mandate that each function and argument has an explanation. But everything can benefit from a copy-pastable example.

Add option for `evalCodeBlocks` to evaluate imports only

  • Function evalCodeBlocks() should expose importsOnly boolean option which defaults to false

    evalCodeBlocks(markdown, { importsOnly: true })
    
  • CLI script evalCodeBlocks should expose --imports-only boolean flag.

    deno run handy/md/script/evalCodeBlocks ./readme.md --imports-only
    
  • Code block info string should support eval-imports-only option after the language code.

    ```ts eval-imports-only
    import { ThisBetterExist } from "some/where.ts"
    
    // someExpensiveOperation I want to skip...
    ```
    

Script to surface TODO comments

todo/script/someScriptName.ts <glob> <flags>

# example
todo/script/someScriptName.ts **/*.ts # list them in stdout
todo/script/someScriptName.ts **/*.ts -t # throw if any are found

Add `file/handler`

Both some of the glob utilities and the markdown code block eval utilities would benefit from a standard interface for reading, writing, and evaluating files by file type.

extract `offset()` helper from `location()`

This functionality is independently useful, has helpful error messages, and conveys a common concept succinctly. Further exploration revealed this has uses beyond strings - arrays and typed arrays can also benefit, so the function should be placed in the collections module which exists for such generic purposes.

TODO comment parser

Useful for identifying if a file has such comments, and for extracting the contents of those comments where they could then be aggregated into a checklist or unordered list.

Probably deserves a top-level todo module.

`evalCodeBlocks` should accept configuration from an HTML comment within the input markdown

This would allow individual markdown files to contain their own find/replace strings, register language handlers, and other configurations. Here is a concept for discussion purposes:

<!--config:evalCodeBlocks:yaml

  fileHandler:
    py: "./python/evaulate.ts"
  replace:
  - ["hello", "goodbye"]
  - ["world", "mars"]
-->
  
```py
print("hello world!")
```
import { evalCodeBlocks } from "./handy/md/script/evalCodeBlocks.ts"

const markdown = Deno.readTextFileSync("./myFile.md") // the file above with the HTML comment

const results = evalCodeBlocks(markdown)

assert(results[0] === "goodbye mars")

Preview release notes for commits in a PR

Investigate leveraging git/script/makeReleaseNotes.ts to create or update a comment in the PR which contains the generated release notes for all commits in the PR, surrounded by a <details> element. All commits should be shown, even commits which typically would not be included in Handy's release notes such as refactor commits.

This would be useful to ensure that Markdown in conventional commit bodies are as desired before being merged.

Blocked by

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.