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

Tmp branch merge into main #24

Open
wants to merge 76 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
4416d4a
no pnpmstore
stan-dot Jul 24, 2024
2b20790
delete i07-samples app
stan-dot Aug 5, 2024
6db3b3b
add test object
stan-dot Sep 16, 2024
f72fdc8
add example link
stan-dot Sep 23, 2024
26e27f7
todos outlined, having an architectural decision
stan-dot Nov 28, 2024
c904cf5
restructure
stan-dot Nov 29, 2024
d6a27d2
configure the devcontainer attempt 1
stan-dot Nov 29, 2024
a140b5d
fix the devcontainer config
stan-dot Nov 29, 2024
5b548a8
add b18 generator
stan-dot Nov 29, 2024
879e2e8
make bleugui work again
stan-dot Nov 29, 2024
ce1ac87
update json
stan-dot Nov 29, 2024
b4eed0a
create the gda scan definition project
stan-dot Nov 29, 2024
99e76c4
do some cleanup
stan-dot Nov 29, 2024
812d120
adjust the devcontainer
stan-dot Nov 29, 2024
cba3380
add trpc test
stan-dot Nov 29, 2024
11d3bef
add deprecated tutorial
stan-dot Nov 29, 2024
9b3d421
add test next safe action@
stan-dot Nov 29, 2024
9dddc5e
update the name
stan-dot Nov 29, 2024
8f32dc4
next safe action works
stan-dot Nov 29, 2024
0f67556
got a working example with circles
stan-dot Nov 29, 2024
28ce067
add crucial extensions
stan-dot Nov 29, 2024
134bde0
work towards the xml setp@
stan-dot Nov 29, 2024
fa788dd
exploring the fs setup
stan-dot Dec 2, 2024
6ffc0a9
make the experiment tree view read the fs correctly
stan-dot Dec 2, 2024
8d80e01
halfway through the tabs system making
stan-dot Dec 3, 2024
0cd7006
add crud actions
stan-dot Dec 3, 2024
4d6142a
add the react-context state management for the app
stan-dot Dec 3, 2024
ae0c6e7
add xmls
stan-dot Dec 3, 2024
0b41325
make it make sense
stan-dot Dec 3, 2024
1a15ea4
work on the form
stan-dot Dec 3, 2024
ee8a86b
got all the forms
stan-dot Dec 4, 2024
38f9bcd
load the data and soon to show it, just the reducers make it more com…
stan-dot Dec 4, 2024
6f6a838
make the UI work
stan-dot Dec 5, 2024
17fead3
add alternative editor
stan-dot Dec 5, 2024
b0b82d8
showcase only the needed functinos
stan-dot Dec 5, 2024
c0d6f79
start on the python editor
stan-dot Dec 6, 2024
2b77722
add the initial layout for the sqlite xraylib api
stan-dot Dec 6, 2024
380c03a
add doc links
stan-dot Dec 6, 2024
dac65ac
make tabs margin and buttons for editor changes
stan-dot Dec 9, 2024
cc9552b
adding nav and the sample prep page
stan-dot Dec 9, 2024
4d80265
updates to layout and sample prep@
stan-dot Dec 9, 2024
ec3a281
both xml builders work
stan-dot Dec 9, 2024
6bbb2df
got python editor to work with textarea
stan-dot Dec 9, 2024
bd4b2ca
got the wasm ruff to work
stan-dot Dec 9, 2024
0fd4f55
fix the layout
stan-dot Dec 9, 2024
b352df9
amend sample form
stan-dot Dec 9, 2024
715b1af
working on the xraylib@
stan-dot Dec 9, 2024
f5fb4aa
more on the scripting ui
stan-dot Dec 10, 2024
c3eb639
small updates
stan-dot Dec 10, 2024
8c3aefe
xraylib works now@
stan-dot Dec 10, 2024
74f1274
outline towards a simpler frontend-backend state strategy
stan-dot Dec 10, 2024
dbfd291
added a todo to make a simple form with a diff editor work@
stan-dot Dec 10, 2024
c226dfb
parsing fails with xmlbuilder string vs boolean
stan-dot Dec 11, 2024
a704b3b
make the read write work for detectparameters form
stan-dot Dec 11, 2024
0b969dc
remove or move todos
stan-dot Dec 12, 2024
42bf933
some UI improvements
stan-dot Dec 12, 2024
5197e21
add gda-scan-definition guideliens
stan-dot Jan 10, 2025
04aab19
readme update
stan-dot Jan 14, 2025
a109350
terminal experiments
stan-dot Jan 14, 2025
7609b55
plotting does not quite work
stan-dot Jan 20, 2025
aed7b73
added a layered heatmap app
stan-dot Jan 20, 2025
0f381b9
some layered heatmap exploration
stan-dot Jan 20, 2025
c5fc3b3
prep for periodic table resizing and the local running of xraylib
stan-dot Jan 21, 2025
bc32311
refreshed the memory and reviewed architectural choices
stan-dot Jan 22, 2025
90fd495
again a better layout file tree
stan-dot Jan 23, 2025
5c30c71
making the editor put together
stan-dot Jan 23, 2025
bf3785b
more work on the files
stan-dot Jan 23, 2025
a2b5ebd
work on xraydb fetching
stan-dot Jan 24, 2025
6787e1a
refactor the data fetching in xraylib@
stan-dot Jan 24, 2025
328ad4c
got tables showing the element data
stan-dot Jan 24, 2025
64acd65
make more compact
stan-dot Jan 24, 2025
786f719
finally grokked the forms
stan-dot Jan 24, 2025
c636210
fix partially compile issues
stan-dot Jan 27, 2025
7743f9c
got the terminal to work finally manually
stan-dot Jan 28, 2025
27e6df3
config context for qexafs scan
stan-dot Jan 29, 2025
f464eec
add xraylib app
stan-dot Jan 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
22 changes: 22 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM registry.hub.docker.com/library/node:22-bookworm as base

ENV APP_DIR /app


# install pre-requisites
RUN apt-get update && \
apt-get install -y curl && \
apt-get clean

RUN apt-get -y install podman

RUN npm i -g pnpm

# COPY . ${APP_DIR}
WORKDIR ${APP_DIR}

# RUN npm install --legacy-peer-deps .
# RUN cd dls && pnpm i

# CMD ["npm", "run", "preview"]
CMD bash
60 changes: 60 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"name": "Squid - User Interfaces",
"build": {
// Sets the run context to one level up instead of the .devcontainer folder.
"context": "..",
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
"dockerfile": "./Dockerfile"
},
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [3000],
// // Uncomment the next line to run commands after the container is created.
// // "postCreateCommand": "cat /etc/os-release",
"features": {
// Some default things like git config, zsh and ssh keys
"ghcr.io/devcontainers/features/common-utils:2": {
"upgradePackages": false
}
},
// "initializeCommand": "bash -c 'for i in $HOME/.inputrc; do [ -f $i ] || touch $i; done'",
"runArgs": [
// "--net=host",
"--security-opt=label=disable",
// Mount the user sockets folder
"-v${localEnv:XDG_RUNTIME_DIR}:${localEnv:XDG_RUNTIME_DIR}",
// add the docker socket environment variable to the container
"-e=DOCKER_HOST=${localEnv:DOCKER_HOST}"
],
"mounts": [
"source=${localEnv:HOME}/.ssh,target=/root/.ssh,type=bind",
"source=${localEnv:HOME}/.inputrc,target=/root/.inputrc,type=bind"
],
"customizations": {
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"bierner.markdown-mermaid",
"christian-kohler.path-intellisense",
"eamodio.gitlens",
"espenp.prettier-vscode",
"foxundermoon.shell-format",
"hediet.vscode-drawio",
"rvest.vs-code-prettier-eslint",
"rodrigovallades.es7-react-js",
"Vercel.turbo-vsc",
"kamikillerto.vscode-colorize",
"vitest.explorer"
]
}
},
// make the workspace folder the same inside and outside of the container
"workspaceMount": "source=${localWorkspaceFolder},target=${localWorkspaceFolder},type=bind",
"workspaceFolder": "${localWorkspaceFolder}",
// for rootless we must not to mess with user ids inside the container
"updateRemoteUserUID": false,
// for rootless we are root inside the container
"remoteUser": "root",
"postStartCommand": "pnpm i"
}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.pnpm-store
.turbo
node_modules
**/.next
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Contributing to Squid

Please look into vscode guidelines
https://github.com/microsoft/vscode/blob/main/CONTRIBUTING.md

For issue requests to judge if it's out of scope we're using this

https://github.com/Microsoft/vscode/wiki/Issue-Grooming#out-of-scope-feature-requests
57 changes: 57 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Turborepo Docker starter

This is from an official Docker starter Turborepo.

To start a particular application go to its readme in `/apps/[app of interest]`.

## Apps and Packages

- `web`: a [Next.js](https://nextjs.org/) app
- `api`: an [Express](https://expressjs.com/) server
- `b18-csv-generator`: a config generator for a beamline
- `bluegui`: a test client for blueapi
- `TEMPLATE-nextjs-app`: a template for making NEXTjs apps
- `TEMPLATE-vite-app`: a template for making vite apps
- `test-next-safe-action`: a test of the next safe action setup
- `trpc-test`: a test of trpc (next safe action won)
- `@repo/ui`: a React component library
- `@repo/logger`: Isomorphic logger (a small wrapper around console.log)
- `@repo/eslint-config`: ESLint presets
- `@repo/typescript-config`: tsconfig.json's used throughout the monorepo
- `@repo/jest-presets`: Jest configurations

Each package/app is 100% [TypeScript](https://www.typescriptlang.org/).

### Docker

This repo is configured to be built with Docker, and Docker compose. To build all apps in this repo:

```
# Create a network, which allows containers to communicate
# with each other, by using their container name as a hostname
docker network create app_network

# Build prod using new BuildKit engine
COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker-compose -f docker-compose.yml build

# Start prod in detached mode
docker-compose -f docker-compose.yml up -d
```

Open http://localhost:3000.

To shutdown all running containers:

```
# Stop all running containers
docker kill $(docker ps -q) && docker rm $(docker ps -a -q)
```

### Utilities

This Turborepo has some additional tools already setup for you:

- [TypeScript](https://www.typescriptlang.org/) for static type checking
- [ESLint](https://eslint.org/) for code linting
- [Jest](https://jestjs.io) test runner for all things JavaScript
- [Prettier](https://prettier.io) for code formatting
5 changes: 5 additions & 0 deletions adrs/12-preact-integration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
didn't work
https://github.com/XantreDev/preact-signals/tree/main/packages/react#nextjs-integration

https://github.com/preactjs/signals/discussions/539
https://www.npmjs.com/package/@preact/signals-react
21 changes: 21 additions & 0 deletions adrs/13-autoform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
tested, ran into issues
https://github.com/vantezzen/autoform/issues/138


23.01.2025
testing on the forms page
the form is generic and we use json forms to get the correct json
all the rest is just transformations, not to write the forms manually

to add a new form we need:
- filesystem URL
- schema in ZOD


adna a separate filetree component with a file context and the backend is stateless and agnostic on the file location

okay actually using the ui schema makes this less useful to do fast

okay maybe just make the schema automatic by default only customize if something is wrong.

also add the custom formatter to work things on the edited file, just like with the scripting editor
18 changes: 18 additions & 0 deletions adrs/14-file-state-management.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# file state management

``` mermaid
sequenceDiagram
participant User
participant ReactContext as React Context
participant Frontend as Frontend Diff Editor
participant Backend as Backend (Next.js)
participant Storage as XML Storage

User->>ReactContext: Interact with data (CRUD)
ReactContext->>Frontend: Provide current object
ReactContext->>Backend: Sync data via next-safe-action
Backend->>Storage: Save data to XML format
Storage->>Backend: Retrieve last version XML
Backend->>Frontend: Send last version for diff
Frontend->>User: Show diff between buffer and last version
```
6 changes: 6 additions & 0 deletions adrs/15-file-name-edition.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@


# 12.12.2024
this is deemed not important as the names don't change often. directories are managed elsewhere, such as with numtracker-rs.


4 changes: 4 additions & 0 deletions adrs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

what is an ADR?
adr
<https://adr.github.io/madr/>
5 changes: 5 additions & 0 deletions adrs/Tanstack-router.adr
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

https://tanstack.com/router/latest/docs/framework/react/guide/file-based-routing

not that great,vite plugin did not generate a correct `sourcetree.gen` file for me

19 changes: 19 additions & 0 deletions adrs/adobe-spectrum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

# all notes

could do our own library from those components
<https://news.ycombinator.com/item?id=23919509>

## from 2020

<https://news.ycombinator.com/item?id=23920194>
not data intensive

combobox a useful component
<https://react-spectrum.adobe.com/react-spectrum/ComboBox.html#combobox>

## here someone made an easy example

<https://codesandbox.io/p/sandbox/tailwind-react-aria-3ngmw>?

<https://news.ycombinator.com/item?id=23921320>
16 changes: 16 additions & 0 deletions adrs/bun.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

https://bun.sh/docs/bundler/executables#deploying-to-production

https://bun.sh/blog/bun-v1.0

https://github.com/oven-sh/awesome-bun?tab=readme-ov-file

cra - not that good
https://dev.to/ashirbadgudu/create-a-react-app-with-bun-125o


https://www.lunasec.io/docs/blog/bun-first-look/#bun-has-way-more-potential-to-take-off

https://github.com/FarazPatankar/bun-on-railway


19 changes: 19 additions & 0 deletions adrs/dagger.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

# dagger.io - local CI tool

didn't figure out a way to use with podman'
https://brianlovin.com/hn/30857012

> $ dagger -m github.com/shykes/daggerverse/[email protected] call hello
> ✘ connect 0.7s

> WARNING: failed to list containers error="exec: \"d
> ocker\": executable file not found in $PATH"

> Error: new client: failed to pull image: exec: "docker": executable file not found in $PATH


same complaint here
https://scottbanwart.com/blog/2024/02/weekly-journal-157-dagger-io/


6 changes: 6 additions & 0 deletions adrs/image-inspect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@


that is useful just for running one layer
https://stackoverflow.com/questions/26220957/how-can-i-inspect-the-file-system-of-a-failed-docker-build


12 changes: 12 additions & 0 deletions adrs/microfrontends.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

## micro frontends - make an ADR

<https://microfrontend.dev/architecture/micro-frontends-pros-and-cons/>

<https://ruslan.rocks/posts/micro-frontend-pros-and-cons>

<https://fabrity.com/blog/micro-frontends-pros-and-cons/>

<https://www.linkedin.com/pulse/micro-frontends-deep-dive-pros-cons-boudy-de-geer>

<https://www.adservio.fr/post/the-dark-side-of-micro-frontends>
71 changes: 71 additions & 0 deletions adrs/monorepos.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@

## error with

## some NX errors

runnign nx report return

do (NOT) this
<https://www.youtube.com/watch?v=zvYb7XCLQzU>

some setup, intesresting

<https://alanmasciangelo.github.io/posts/seeking-ci-with-gitlab-helm-and-monorepos>

# my thoughts

lage failed to download
pants not matching sha signature

pants does not support js that well really
all the examples are in other languages
<https://www.pantsbuild.org/2.18/docs/getting-started/example-projects-and-repositories>

nx is a pain, and Guilherme didn't get it right too

turbo is nice, workable batteries included and UI and science logic t separation

bit

- excellent pnpm integration
- good clit with download ETA, feature rich
- can be used alongside turborepo
a full system of stuffs , quite complex, not sure how well it is to use
one more abstraction layer tbh

bit sounds like too much for now. going with turborepo for now

## discussion

<https://www.reddit.com/r/reactjs/comments/yhzf3f/nx_vs_turborepo_concerned_about_betting_on_either/>

- [ ] turborepo <https://turbo.build/> <https://github.com/vercel/turbo> 24k from vercel - not our use case quite
- [ ] vs nx <https://github.com/nrwl/nx>
- [ ] rushstack - less known microsoft product <https://github.com/microsoft/rushstack>

turborepo reviewed
<https://news.ycombinator.com/item?id=30958653>

## for python programs

DEMETER not really suported - and in Perl
<https://bruceravel.github.io/demeter/>
<https://github.com/bruceravel/demeter>

spectromicroscopy - all pytohn, not the best maintained one
<https://spectromicroscopy.com/>
<https://github.com/mlerotic/spectromicroscopy>

<https://www.silx.org/doc/PyMca/dev/index.html>

connector running some scripts
<https://gitlab.diamond.ac.uk/scisoft/beamlines/i20/gda-zocalo-connectorGo>

## event model

<https://blueskyproject.io/event-model/main/user/explanations/data-model.html>

<https://blueskyproject.io/bluesky/documents.html>

tooling to support a shift left
<https://news.ycombinator.com/item?id=42187079>
Loading
Loading