Skip to content

Commit ceefe04

Browse files
committed
rpc changes
1 parent 1922ae3 commit ceefe04

19 files changed

+79
-24
lines changed

.github/workflows/CD.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: CD
2+
3+
on:
4+
push:
5+
branches: [master, next]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
15+
token: ${{ secrets.TOKEN }}
16+
- name: Python Semantic Release
17+
uses: python-semantic-release/python-semantic-release@master
18+
id: semantic-release
19+
with:
20+
github_token: ${{ secrets.TOKEN }}
21+
- name: Build
22+
run: |
23+
python3 -m pip install --upgrade build
24+
python3 -m build
25+
- name: Upload PYPI
26+
if: steps.semantic-release.outputs.released == 'true'
27+
run: |
28+
python3 -m pip install twine
29+
python3 -m twine upload --repository pypi dist/* -u __token__ -p ${{ secrets.PYPI_TOKEN }}
30+
- name: Setup NODE
31+
uses: actions/setup-node@v3
32+
with:
33+
registry-url: "https://registry.npmjs.org"
34+
node-version: "20.x"
35+
- name: Upload NPM
36+
if: steps.semantic-release.outputs.released == 'true'
37+
run: |
38+
pwd
39+
cd ${{ github.workspace }}
40+
npm i
41+
npm run json
42+
jq '.version="${{steps.semantic-release.outputs.version}}"' package.json > temp && mv temp package.json
43+
cat package.json
44+
npm publish
45+
env:
46+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
47+
- name: Merge master -> next
48+
if: github.ref == 'refs/heads/master'
49+
uses: devmasx/merge-branch@master
50+
with:
51+
type: now
52+
from_branch: master
53+
target_branch: next
54+
github_token: ${{ github.token }}

generate_schemas.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ const fs = require("fs");
22
const path = require("path");
33
const glob = require("glob");
44
const process = require("process");
5+
const { log } = require("console");
56

67
const findDirectoryPath = (targetDirectoryName) => {
78
const pathToCheck = path.join(process.cwd(), targetDirectoryName);
@@ -14,8 +15,8 @@ const findDirectoryPath = (targetDirectoryName) => {
1415
name: folder.name,
1516
path: path.join(pathToCheck, folder.name),
1617
}));
17-
const routesDirectory = path.join(folders[0].path, "routes");
18-
return [routesDirectory, folders[0].name];
18+
const rpcDirectory = path.join(folders[0].path, "rpc");
19+
return [rpcDirectory, folders[0].name];
1920
};
2021

2122
const [directoryPath, project_name] = findDirectoryPath("src/");
@@ -42,8 +43,8 @@ function return_json_schema(directoryPath, folder_path, project_name) {
4243
var filename = filePath
4344
.replace(/^.*[\\/]/, "")
4445
.replace(/\.[^/.]+$/, "");
45-
var route = jsonData["route"];
46-
jsonData["$id"] = project_name + folder_path + route;
46+
var rpc = jsonData["rpc"];
47+
jsonData["$id"] = project_name + folder_path + rpc;
4748
schemas[filename] = jsonData;
4849
} catch (error) {
4950
console.error(

pyproject.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
[build-system]
22
requires = ["setuptools"]
3-
build-backend = "setuptools.build_meta"
3+
build-Viewerend = "setuptools.build_meta"
44

55

66
[project]
7-
name = "OpenGeodeWeb-Back"
7+
name = "OpenGeodeWeb-Viewer"
88
version = "3.3.1"
99
dynamic = ["dependencies"]
1010
authors = [
1111
{ name="Geode-solutions", email="[email protected]" },
1212
]
13-
description = "OpenGeodeWeb-Back is an open source framework that proposes handy python functions and wrappers for the OpenGeode ecosystem"
13+
description = "OpenGeodeWeb-Viewer is an open source framework that proposes handy python functions and wrappers for the OpenGeode ecosystem"
1414
readme = "README.md"
1515
requires-python = ">=3.8"
1616
classifiers = [
@@ -20,8 +20,8 @@ classifiers = [
2020
]
2121

2222
[project.urls]
23-
"Homepage" = "https://github.com/Geode-solutions/OpenGeodeWeb-Back"
24-
"Bug Tracker" = "https://github.com/Geode-solutions/OpenGeodeWeb-Back/issues"
23+
"Homepage" = "https://github.com/Geode-solutions/OpenGeodeWeb-Viewer"
24+
"Bug Tracker" = "https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/issues"
2525

2626
[tool.setuptools.dynamic]
2727
dependencies = {file = ["requirements.txt"]}
@@ -30,7 +30,7 @@ dependencies = {file = ["requirements.txt"]}
3030
where = ["src"]
3131

3232
[tool.setuptools.package-data]
33-
"opengeodeweb_back.routes.schemas" = ["*.json"]
33+
"opengeodeweb_Viewer.rpc.schemas" = ["*.json"]
3434

3535
[tool.semantic_release]
3636
version_toml = [

src/opengeodeweb_viewer/routes/schemas/apply_textures.json renamed to src/opengeodeweb_viewer/rpc/schemas/apply_textures.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"rpc": "/toggle_object_visibility",
2+
"rpc": ".toggle_object_visibility",
33
"type": "object",
44
"properties": {
55
"id": {

src/opengeodeweb_viewer/routes/schemas/create_object_pipeline.json renamed to src/opengeodeweb_viewer/rpc/schemas/create_object_pipeline.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"rpc": "/create_object_pipeline",
2+
"rpc": ".create_object_pipeline",
33
"type": "object",
44
"properties": {
55
"id": {

src/opengeodeweb_viewer/routes/schemas/create_visualization.json renamed to src/opengeodeweb_viewer/rpc/schemas/create_visualization.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"rpc": "/create_visualization",
2+
"rpc": ".create_visualization",
33
"type": "object",
44
"properties": {},
55
"required": [],

src/opengeodeweb_viewer/routes/schemas/delete_object_pipeline.json renamed to src/opengeodeweb_viewer/rpc/schemas/delete_object_pipeline.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"rpc": "/delete_object_pipeline",
2+
"rpc": ".delete_object_pipeline",
33
"type": "object",
44
"properties": {
55
"id": {

src/opengeodeweb_viewer/routes/schemas/get_point_position.json renamed to src/opengeodeweb_viewer/rpc/schemas/get_point_position.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"rpc": "/get_point_position",
2+
"rpc": ".get_point_position",
33
"type": "object",
44
"properties": {
55
"x": {

src/opengeodeweb_viewer/routes/schemas/point_size.json renamed to src/opengeodeweb_viewer/rpc/schemas/point_size.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"rpc": "/point_size",
2+
"rpc": ".point_size",
33
"type": "object",
44
"properties": {
55
"id": {

src/opengeodeweb_viewer/routes/schemas/reset.json renamed to src/opengeodeweb_viewer/rpc/schemas/reset.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"rpc": "/reset",
2+
"rpc": ".reset",
33
"type": "object",
44
"properties": {},
55
"required": [],

src/opengeodeweb_viewer/routes/schemas/reset_camera.json renamed to src/opengeodeweb_viewer/rpc/schemas/reset_camera.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"rpc": "/reset_camera",
2+
"rpc": ".reset_camera",
33
"type": "object",
44
"properties": {},
55
"required": [],

src/opengeodeweb_viewer/routes/schemas/set_color.json renamed to src/opengeodeweb_viewer/rpc/schemas/set_color.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"rpc": "/set_color",
2+
"rpc": ".set_color",
33
"type": "object",
44
"properties": {
55
"id": {

src/opengeodeweb_viewer/routes/schemas/set_vertex_attribute.json renamed to src/opengeodeweb_viewer/rpc/schemas/set_vertex_attribute.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"rpc": "/set_vertex_attribute",
2+
"rpc": ".set_vertex_attribute",
33
"type": "object",
44
"properties": {
55
"id": {

src/opengeodeweb_viewer/routes/schemas/toggle_edge_visibility.json renamed to src/opengeodeweb_viewer/rpc/schemas/toggle_edge_visibility.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"rpc": "/toggle_edge_visibility",
2+
"rpc": ".toggle_edge_visibility",
33
"type": "object",
44
"properties": {
55
"id": {

src/opengeodeweb_viewer/routes/schemas/toggle_object_visibility.json renamed to src/opengeodeweb_viewer/rpc/schemas/toggle_object_visibility.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"rpc": "/toggle_object_visibility",
2+
"rpc": ".toggle_object_visibility",
33
"type": "object",
44
"properties": {
55
"id": {

src/opengeodeweb_viewer/routes/schemas/toggle_point_visibility.json renamed to src/opengeodeweb_viewer/rpc/schemas/toggle_point_visibility.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"rpc": "/toggle_point_visibility",
2+
"rpc": ".toggle_point_visibility",
33
"type": "object",
44
"properties": {
55
"id": {

src/opengeodeweb_viewer/routes/schemas/update_data.json renamed to src/opengeodeweb_viewer/rpc/schemas/update_data.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"rpc": "/update_data",
2+
"rpc": ".update_data",
33
"type": "object",
44
"properties": {
55
"id": {

0 commit comments

Comments
 (0)