Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: store writer framework IDE into project directory instead of ui.json - WF-43 #526

Merged

Conversation

FabienArcellier
Copy link
Collaborator

@FabienArcellier FabienArcellier commented Aug 19, 2024

implement FabienArcellier#67


The WF IDE data storage format is evolving to improve the developer experience when multiple people work in a team.

This new format limits the risk of conflict and facilitates conflict resolution operations by concentrating them on one line.

image

@FabienArcellier FabienArcellier self-assigned this Aug 19, 2024
@FabienArcellier FabienArcellier added the enhancement New feature or request label Aug 19, 2024
@FabienArcellier FabienArcellier force-pushed the 67-store-writer-framework-ide-files branch 2 times, most recently from a7064ce to d24b935 Compare August 19, 2024 15:02
@FabienArcellier FabienArcellier changed the title feat: store writer framework IDE into project directory instead of ui.json feat: store writer framework IDE into project directory instead of ui.json - WF-43 Aug 19, 2024
src/writer/core.py Outdated Show resolved Hide resolved
@FabienArcellier FabienArcellier force-pushed the 67-store-writer-framework-ide-files branch from d24b935 to dd2873c Compare August 20, 2024 06:39
src/writer/core.py Outdated Show resolved Hide resolved
src/writer/core.py Outdated Show resolved Hide resolved
@FabienArcellier FabienArcellier force-pushed the 67-store-writer-framework-ide-files branch 3 times, most recently from 7f0904b to ba7f395 Compare August 20, 2024 07:01
@FabienArcellier FabienArcellier marked this pull request as ready for review August 20, 2024 07:22
@FabienArcellier FabienArcellier force-pushed the 67-store-writer-framework-ide-files branch 2 times, most recently from 16a85be to 1ef2d53 Compare September 1, 2024 14:04
@ramedina86
Copy link
Collaborator

This looks good, couple of questions:

  • Can we avoid growing the core? I don't think there are any dependencies, happy to start a new module for this purpose
  • For Workflows, I've decided to start a new root, so we'll have two roots, "root" and "workflows_root". What's the impact of this?

@ramedina86
Copy link
Collaborator

Let's also update docs at https://dev.writer.com/framework/quickstart#create-an-app

@FabienArcellier FabienArcellier force-pushed the 67-store-writer-framework-ide-files branch 2 times, most recently from 59eb132 to 4f405d6 Compare September 14, 2024 05:31
@FabienArcellier
Copy link
Collaborator Author

This looks good, couple of questions:

  • Can we avoid growing the core? I don't think there are any dependencies, happy to start a new module for this purpose
  • For Workflows, I've decided to start a new root, so we'll have two roots, "root" and "workflows_root". What's the impact of this?

I moved the methods prefixed with wf_project_ into a new module, wf_project. I moved the lookup_page_for_component method into the core_ui module.

I would prefer that the workflows share the same root and are therefore found in workflows-*.jsonl files. At the time of implementation, it will be necessary to change the signature of wf_project.write_files and wf_project.read_files.

def write_files(app_path: str, metadata: MetadataDefinition, components: dict[str, ComponentDefinition], workflows: [str, WorkflowDefintion]) -> None: ...

def read_files(app_path: str) -> Tuple[MetadataDefinition, dict[str, ComponentDefinition], dict[str, WorkflowDefinition]]: ...

@FabienArcellier FabienArcellier force-pushed the 67-store-writer-framework-ide-files branch 3 times, most recently from 32ee941 to b3da56f Compare September 14, 2024 09:04
….json

* feat: save file into .wf directory
* feat: save components into one file per page and using json line format
….json

* feat: read file from .wf directory
* feat: create a command to migrate an application
* feat: migrate all the applications
* feat: implement migration process when ui.json is present
….json

* chore: remove reference to ui.json in documentation
….json

* chore: move wf_project methods into its own module
@FabienArcellier FabienArcellier force-pushed the 67-store-writer-framework-ide-files branch from b3da56f to 7d287be Compare September 20, 2024 07:15
@FabienArcellier FabienArcellier force-pushed the 67-store-writer-framework-ide-files branch 3 times, most recently from f0b93d2 to a1aa6c7 Compare September 22, 2024 07:03
@FabienArcellier FabienArcellier force-pushed the 67-store-writer-framework-ide-files branch from a1aa6c7 to 02137a2 Compare September 22, 2024 07:07
@@ -7,7 +7,7 @@ Framework uses Uvicorn and serves the app in the root path i.e. `/`. If you need
## Configure webserver

You can tune your server by adding a `server_setup.py` file to the root
of your application, next to the `main.py` and `ui.json` files.
of your application, next to the `main.py` files.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
of your application, next to the `main.py` files.
of your application, next to the `main.py` file.

@ramedina86 ramedina86 merged commit 6833960 into writer:dev Sep 23, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants