Skip to content

Commit 1d3dfb0

Browse files
authored
Merge pull request #37 from krish-adi/migrate-to-react-flow
migrate to version 1.0.0
2 parents 04ddebb + 2078502 commit 1d3dfb0

File tree

155 files changed

+12337
-1567
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

155 files changed

+12337
-1567
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Barfi Project
2+
.ruff_cache
3+
14
# General
25
.DS_Store
36
.AppleDouble
@@ -115,7 +118,7 @@ ipython_config.py
115118
# pyenv
116119
# For a library or package, you might want to ignore these files since the code is
117120
# intended to run in multiple environments; otherwise, check them in:
118-
# .python-version
121+
.python-version
119122

120123
# pipenv
121124
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.

.python-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

.readthedocs.yaml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"makefile.configureOnOpen": false
3+
}

CHANGELOG

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
Release dates are in YYYY-MM-DD
9+
10+
## [1.0.0] - 2025-01-05
11+
12+
Following are major changes from v0. For using >= v1.0.0 your codebase needs to be adopted. Check for the latest documentation [here](https://barfi.ai/docs)
13+
14+
- `st_flow` is the new streamlit ui which replaces `st_barfi`. Refer to the new API to add interfaces and options [here](https://barfi.ai/docs/st_flow)
15+
- All objects are typed as dataclasses and not as `dict`. This applies to `Block`, `FlowSchema`, `SchemaManager`, `ComputeEngine` and the return from `st_flow` which is `StreamlitFlowResponse`.
16+
- `FlowSchema` is the object that now contains all the information about the schemasm the connections and blocks referred.
17+
- `barfi.flow.block` now contains all the `Block` module scripts. Refer to the new API to add interfaces and options [here](https://barfi.ai/docs/block)
18+
- `barfi.flow.schema` contains the `SchemaManager` which will be used to save, load, update, delete schemas.Refer to the new API to add interfaces and options [here](https://barfi.ai/docs/schema_manager)
19+
- `barfi.flow.compute` contains the `ComputeEngine` which will be used to execute the `FlowSchema`. Refer to the new API to add interfaces and options [here](https://barfi.ai/docs/compute_engine)
20+
- This version also introduces some types, and will henceforth the library will be typed. Refer to the types [here](https://barfi.ai/docs/types)
21+
- The UI Flow Editor has now been migrated to use React instead of Vue. And, makes use of ReactFlow as the rendering component for the flows.
22+
23+
## [0.7.0] - 2022-08-30
24+
25+
- Add Block state to store data private to the block. Using block.get_state('key'), block.set_state('key').
26+
- Block state also stores execution status and errors. Using block.get_state('info'), block.set_state('info'). Note: 'info' is a reserved key.
27+
- When a block fails on its compute function, its descendants are skipped and the rest of the blocks are computed.
28+
- Add delete schema function. (@zabrewer)
29+
30+
## [0.6.1] - 2022-07-25
31+
32+
- Fix base_blocks_list passed to the compute engine.
33+
34+
## [0.6.0] - 2022-07-19
35+
36+
- Add option to categories the Blocks with a category in a sub-menu in the context menu on right-click>add-node.
37+
38+
## [0.5.0] - 2022-03-19
39+
40+
- Add Block option.
41+
- Add tests for Block option and update tests for interfaces.
42+
- Add get, set for option to be used inside compute_engine and update compute_engine to handle option value from frontend
43+
44+
## [0.4.4] - 2022-03-16
45+
46+
- Change barfo.Block method references from `calculate` to `compute`
47+
48+
## [0.4.3] - 2022-03-15
49+
50+
- Change the frontend BlockEditor.vue to make use of listeners to make the unique names of the Blocks.
51+
52+
## [0.4.2] - 2022-02-27
53+
54+
- Change add_input and add_output for the Block. TO provide ease of linting and checks.
55+
- Change the structure of the compute engine.
56+
- Add unittest
57+
- Add documentation and structure to the docs to be deployed to readthedocs.org
58+
59+
## [0.4.2] - 2022-02-27
60+
61+
- Change add_input and add_output for the Block. TO provide ease of linting and checks.
62+
- Change the structure of the compute engine.
63+
- Add unittest
64+
- Add documentation and structure to the docs to be deployed to readthedocs.org
65+
66+
## [0.4.0] - 2022-02-27
67+
68+
- Implement compute engine checks
69+
- Change menu for computation, load, save of schema
70+
71+
## [0.2.0] - 2022-02-13
72+
73+
- ComputeEnginge class, with execute method
74+
- Client has Menu to Save and List schemas into a db.
75+
- Functions for managing save/load schemas
76+
77+
## [0.1.0] - 2022-02-12
78+
79+
- Initial release.
80+
- Contains Block-Builder class
81+
- Contains the Compute engine function
82+
- Contains the frontend-client to use as Streamlit component - st_barfi()

CHANGELOG.md

Lines changed: 0 additions & 68 deletions
This file was deleted.

DEVELOPER

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Developer Notes
2+
3+
Following are the developer notes on getting started to contributing to the development of Barfi.
4+
5+
## Requirements
6+
7+
### Development Environment
8+
9+
- Clone this repo to a local folder.
10+
- Python version is managed by [Pyenv](https://github.com/pyenv/pyenv): Base Python version currently is: `3.8.19`
11+
- Python dependencies and packaging is done using [Poetry](https://python-poetry.org/).
12+
- Frontend GUI environement is managed using [NVM](https://github.com/nvm-sh/nvm). Base Node version currently is: `v18.18.2`
13+
- If you are using a Mac, get started by installing dependencies using [Homebrew](https://brew.sh/), and continue to the following:
14+
15+
- Install Pyenv and Python using: `brew install pyenv` -> `pyenv install 3.8.19`
16+
- Find the location where `Python 3.8.19` install using -> `pyenv which python`
17+
- Install Poetry and activate environement: `brew install poetry` -> `cd <barfi-git-repo>` -> `poetry env use <python-3.8.19-location>` -> `poetry install`
18+
- Install NVM using [these instructions](https://github.com/nvm-sh/nvm?tab=readme-ov-file#installing-and-updating) and then Node using `nvm install 18.18.2` -> `nvm use 18.18.2`.
19+
- Install ui depdendencies by: `cd ui-flow` -> `npm install`
20+
21+
## Quickstart for development
22+
23+
- To run the ui-flow in local development mode set `RELEASE = True` in `src/barfi/config.py`
24+
- Open 2 terminals, one for starting the Python env and the other for the UI env.
25+
- In terminal 1: `make serve-ui`
26+
- In terminal 2: `make serve-barfi`
27+
28+
## Checklist for building and uploading new package
29+
30+
- [ ] Update Dcoumentation if required.
31+
- [ ] Run tests using `make tests`
32+
- [ ] Build the ui-flow: `cd build-ui`
33+
- [ ] Check `RELEASE = True` is set in `src/barfi/config.py`
34+
- [ ] Check linting and formatting: `make ruff`
35+
- [ ] Bump version number as required in `pyproject.toml`
36+
- [ ] Update CHANGELOG
37+
- [ ] Build and upload package using `make build-upload`
38+
- [ ] Commit the repository with the version number example: `v 1.0.0`

Developer.md

Lines changed: 0 additions & 76 deletions
This file was deleted.

0 commit comments

Comments
 (0)