michaelpb / michaelpb/omnic

Constant-based TypeString hierarchy system

Open
#8 0 comments 0 reactions 0 assignees View on GitHub
ConversionGrid enhancement
Dominant language
Python
Stars
16
Forks
1
PR merge metrics
No merged PRs in 30d

Description

It's becoming increasingly clear I need to build a constant-based TypeString hierarchy, such that a bundle.js or es5.js is a type of JS file, and thus gets proper mimetypes, etc, while remaining more specific.

This should somehow get hooked into the resolver ConversionGraph AND the Detection / sanity check system

Reqs:

- Modifications should be able to be made at LOW LEVELS while preserving HIGH LEVEL concepts. For example, `git-tree.json` is a form of json and thus can be converted to, say, yaml, HOWEVER, it will remain a `git-tree.yml` then. JSON -> YAML should not know about `git-tree`, and `git-tree` should not know about yaml

- Another example: thumb.png is a PNG, and can be convered into thumb.jpg while preserving its characteristiscs

- Also keep track of lossy vs nonlossy conversions

- Maybe "format" vs. "context"...?

```
builtin/converters/git.py

58 class InlineJsVariable(converter.Converter):
59 inputs = [
60 'git-tree.html',
61 # 'HTML',
62 # TODO: once there is a type hierarchy, then this should handle any
63 # sub-type of HTML
64 ]

```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading builtin/converters/git.py around InlineJsVariable and then trace the resolver ConversionGraph and Detection/sanity check system mentioned in the issue. Define how constant-based TypeString subtypes preserve higher-level concepts across conversions, including lossy versus nonlossy behavior. Done means subtype conversions such as git-tree.json to YAML and PNG to JPG retain their specific characteristics while generic conversions remain independent of those subtypes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.