Skip to content

Commit

Permalink
Merge pull request #104 from wesen/bug/fix-ag-version
Browse files Browse the repository at this point in the history
Fix ag-grid version and clean up documentation
  • Loading branch information
wesen authored Jan 19, 2025
2 parents c2b4d74 + ec2ed63 commit c454763
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 108 deletions.
69 changes: 0 additions & 69 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,72 +12,3 @@ as well as exposing a set of helpers for manipulating object and tabular data.
The long term goal of parka is to create not just API services (HTTP with REST, grpc, websockets, etc...),
but also provide graphical web user interfaces to interact with them (for example
by exposing the different flags and arguments as HTML forms).


## Steps

- [x] Serve templated file (test data)
- [x] Serve tailwind CSS
- [-] Integrate glazed.Command and expose as web form / API
- [ ] Integrate with htmx for dynamic webforms and dynamic apps]

### 2023-02-25 - Working on exposing glazed commands

Now that we have a proper generic framework for commands in glazed,
we can start wrapping and exposing individual commands as APIs.

We don't want to expose all arguments to a web api however, so the question is how to
restrict parameters and arguments:

- add a new layer that specifies which arguments are exposed, how they get filtered
- annotate the original command with a `web` tag, which specifies how an argument should be handled?
- add additional section to command definition that can be loaded by parka (basically, the first option, but somehow
maybe added as an extension layer to glazed commands themselves, instead of being directly parka specific)

In fact, we may want to add parka specific attributes to wrap the command,
so an additional layer makes sense. For example, a template argument might be used generically
to specify that different templates could be used. I don't know if this all makes sense declaratively,
so I will first focus on a code only API.

What I want to achieve today:

- [x] Reload HTML/JS from disk, not embed, to avoid having to recompile every 2 seconds
- it seems like that's already how it works? odd
- this might mean I have to add back the option to serve from embed
- [ ] Wrap a simple command as both REST+JSON and web form + htmx
- does this mean we want to create a webform and go over every parameter?
- this could be a template provided by parka already (just pass it a list of parameter definitions and it creates a form)
- [ ] Wrap a geppetto command to build the rewrite prompting
- [ ] Build and package the web application for easy deployment on DO, using parka as a library

#### Exposing commands as APIs

There is already a whole function for exposing commands as APIs, so I'm going to build upon that.
What I want to do is be able to specify a HTML template to render out HTML, when called in a certain
form. In fact, because of htmx, it might make sense to call a single wrapped command
with different endpoints / additional parameters.

#### How much CSS / MD / HTML to bundle with the parka package itself

To make it easy to just bang out UIs, a fair amount of CSS and base HTML should already
be bundled with the package itself. It should be possible to just import parka, register
a command, and get going.

But, we should make all these things overridable too. But let's start with a single simple override.

### 2023-01-30 - Brainstorm parka structure

So now I want to make this a bit more useful.
I want to be able to serve markdown from multiple sources, so there should be
a mechanism to register sources of markdown to prefixes, the same way the fin router can do the
`r.Use()` stuff.

`r.Use()` takes a middleware handler function, so probably that's how things should be done,
along with helper methods (?).

The handlerFunc takes a `gin.Context`.

But also, it could all be much simpler, and we can just have the application register
a set of lookup functions that return markdown content for a certain prefix.

The server can then go through and take the first matching one.
28 changes: 15 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
module github.com/go-go-golems/parka

go 1.19
go 1.21

toolchain go1.23.3

require (
github.com/alecthomas/chroma/v2 v2.14.0
github.com/aws/aws-sdk-go-v2 v1.26.1
github.com/aws/aws-sdk-go-v2 v1.32.5
github.com/aws/aws-sdk-go-v2/config v1.27.12
github.com/aws/aws-sdk-go-v2/service/ssm v1.37.5
github.com/go-go-golems/clay v0.1.15
Expand All @@ -16,10 +18,10 @@ require (
github.com/spf13/cobra v1.8.1
github.com/spf13/viper v1.19.0
github.com/stretchr/testify v1.9.0
github.com/yuin/goldmark v1.7.4
github.com/yuin/goldmark v1.7.8
github.com/yuin/goldmark-highlighting/v2 v2.0.0-20220924101305-151362477c87
github.com/ziflex/lecho/v3 v3.6.0
golang.org/x/sync v0.8.0
golang.org/x/sync v0.9.0
gopkg.in/yaml.v3 v3.0.1
)

Expand All @@ -33,15 +35,15 @@ require (
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.12 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.24 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.24 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.5 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.20.6 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.5 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.28.7 // indirect
github.com/aws/smithy-go v1.20.2 // indirect
github.com/aws/smithy-go v1.22.1 // indirect
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/aymerick/douceur v0.2.0 // indirect
github.com/bahlo/generic-list-go v0.2.0 // indirect
Expand Down Expand Up @@ -104,11 +106,11 @@ require (
github.com/yuin/goldmark-emoji v1.0.3 // indirect
go.mongodb.org/mongo-driver v1.14.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.27.0 // indirect
golang.org/x/crypto v0.29.0 // indirect
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
golang.org/x/net v0.29.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/text v0.18.0 // indirect
golang.org/x/net v0.31.0 // indirect
golang.org/x/sys v0.27.0 // indirect
golang.org/x/text v0.20.0 // indirect
golang.org/x/time v0.5.0 // indirect
gopkg.in/errgo.v2 v2.1.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
Expand Down
Loading

0 comments on commit c454763

Please sign in to comment.