Skip to content

Commit 0e6316d

Browse files
full from next
2 parents c244ca4 + ea4cf8b commit 0e6316d

37 files changed

+1030
-80
lines changed

.dockerignore

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

.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, json_import_viewer]
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 }}

.github/workflows/docker-images.yml

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

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ venv/
55
.vscode/
66
__pycache__/
77
.env
8+
data/
9+
/node_modules
10+
schemas.json

.pypirc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[distutils]
2+
index-servers = pypi
3+
4+
[pypi]
5+
username = __token__
6+
password = <PyPI token>

CHANGELOG.md

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# CHANGELOG
2+
3+
4+
5+
## v0.1.0-rc.1 (2024-03-05)
6+
7+
### Chore
8+
9+
* chore(licence): happy new year 2024 ([`a69cefe`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/a69cefe053e43a170db48ea31bbc3619feb49bc6))
10+
11+
### Feature
12+
13+
* feat(schemas): remove dockerfile + a few changes ([`e81296a`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/e81296af2510c975c1d98034f269a5c94e4b89f5))
14+
15+
* feat(schemas): test2 ([`53dfa45`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/53dfa45953b098f8ecda5d8773e37fe064b4e7e3))
16+
17+
* feat(schemas): test ([`6088534`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/6088534e990f44559575f2d4631bc731210e2243))
18+
19+
* feat(delete_object_pipeline): add rpc
20+
21+
Enables an object to be deleted from the viewer ([`5a4df6a`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/5a4df6a5d20451491fe27d89886459d9a38f78cd))
22+
23+
### Fix
24+
25+
* fix(schemas): delete image docker ([`ebd416b`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/ebd416b5eceaecfce61d3c5e136cc3d6ed36184b))
26+
27+
* fix(license): add copyleft file ([`a0cfd33`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/a0cfd3335e0b12913947917b631b5e13889a9107))
28+
29+
### Unknown
30+
31+
* Merge pull request #12 from Geode-solutions/json_import_viewer
32+
33+
Json import viewer ([`cd3b4a0`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/cd3b4a0b8e564b81d15dafac82469c9b4ac974d3))
34+
35+
* remove dockerignore ([`ea38690`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/ea386903ac824235764b36e5b38fcb299557ccc1))
36+
37+
* edit generate_schemas ([`8a9ddc2`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/8a9ddc2bca30d8ec58af76fa99c1823cb765c99d))
38+
39+
* test ([`1c878be`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/1c878be022ab96cffb7d146f38ffbd5241d264d2))
40+
41+
* shemas rpc&#39;s ([`e45df6a`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/e45df6a560a5a8d087f72ad6d1070ba003b8f665))
42+
43+
* added new path into the dockerfile ([`9ce3c0c`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/9ce3c0cf5f3d143ed6fd10cf4815b80c834d2cfe))
44+
45+
* updates json files ([`415f263`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/415f2630ad2053b51e688b46c133c0e714b16698))
46+
47+
* updates json files ([`da04546`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/da0454656e505f52d3b3570fbb5eb3655baee3c7))
48+
49+
* rpc changes ([`ceefe04`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/ceefe04853f4ce96ea7465065a27e0ea3b501758))
50+
51+
* import json ([`1922ae3`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/1922ae3887db7a2a4e8c52b7c6b3282c5932bfb2))
52+
53+
* Merge pull request #9 from Geode-solutions/chore/update_licence
54+
55+
Chore/update licence ([`6ab1ce7`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/6ab1ce7eb6c6234bb7a6f74567e90b4cb5190b9b))
56+
57+
* Merge pull request #7 from Geode-solutions/next
58+
59+
Next ([`708f7b0`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/708f7b092c8cac96893b38046ad20a26155c2ff9))
60+
61+
* Merge pull request #6 from Geode-solutions/feat_delete_object_pipeline
62+
63+
Feat delete object pipeline ([`364da90`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/364da90a845d1d7549ba748e521cc43f7c3a321d))
64+
65+
* revert .dockerignore ([`a4d4454`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/a4d4454d8cd4ffdabfd6d3fce4e48ae33772f5de))
66+
67+
* image_name: &#39;opengeodeweb-viewer&#39; ([`129f762`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/129f762db2bab2eabbf1c089835039208916a647))
68+
69+
* Merge pull request #5 from Geode-solutions/next
70+
71+
Next ([`5ee9742`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/5ee97423d576dd2c393fafe5b35726dce2568503))
72+
73+
* Merge pull request #4 from Geode-solutions/add_copyleft
74+
75+
fix(license): add copyleft file ([`8185c9d`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/8185c9d8ac096f2db6b44945b3b79ce6615a9c0b))
76+
77+
* Merge pull request #3 from Geode-solutions/next
78+
79+
Next ([`6f6d6c6`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/6f6d6c63ee268adb731291daa2eab434368d94c6))
80+
81+
* update data and attributes ([`dc1c26d`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/dc1c26d0d0b0990242ae7cc77a8e0484dc276860))
82+
83+
* no marker interaction ([`d1863ba`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/d1863ba610d29f0617c94ebce38419903ce46889))
84+
85+
* add marker ([`4bf740c`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/4bf740ced3679b92e9299b3458d8d4befde0a9a2))
86+
87+
* add vertex attribute ([`11f0774`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/11f077451b7b6b7a42f95ca15b8d3d028d45de9e))
88+
89+
* Merge pull request #2 from Geode-solutions/fix/pipeline
90+
91+
composite mapper ([`30c3004`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/30c3004efadb48cb87e1990d34a11c91a6437613))
92+
93+
* composite mapper ([`7e7d79c`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/7e7d79c1d8fd5b418f92fd641036ecbb65018426))
94+
95+
* update visibility ([`bf1652a`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/bf1652a885dc6c0e605c3da11a84d28afef5cb36))
96+
97+
* removed CD ([`4877be8`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/4877be897a022889b4ba15d181a3b8090d70e9a4))
98+
99+
* Initialisation ([`eeb263c`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/eeb263c85bbdd99bb711557e017cdcde53371db0))
100+
101+
* Merge pull request #1 from Geode-solutions/Clemamolette-patch-1
102+
103+
Update Branch-protection.yml ([`fb00bc3`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/fb00bc33bfa7815f4e6ce40a7f152648c8ec4ac1))
104+
105+
* Update Branch-protection.yml ([`5225e0a`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/5225e0abb283c9216ab8504822eacb2692e5e6a5))
106+
107+
* add vtk_protocols ([`7dc827f`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/7dc827f186033a348e66da463b33dd41e54e48df))
108+
109+
* Add all ([`1cb965b`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/1cb965bf9ff1f7b99298f96ac189b4835ae11f64))
110+
111+
* add branch protection ([`8ef784e`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/8ef784eb4174bb449b084df2ae2a4b5e33ccacb2))
112+
113+
* Initial commit ([`8293eb6`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/8293eb6973493de95e9f718554b42728d8271a06))

Dockerfile

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

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# OpenGeodeWeb-Viewer
2+
23
OpenSource Python framework for remote visualisation

__init__.py

Whitespace-only changes.

generate_schemas.js

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
const fs = require("fs");
2+
const path = require("path");
3+
const glob = require("glob");
4+
const process = require("process");
5+
const { log } = require("console");
6+
7+
const findDirectoryPath = (targetDirectoryName) => {
8+
const pathToCheck = path.join(process.cwd(), targetDirectoryName);
9+
const folders = fs
10+
.readdirSync(pathToCheck, { withFileTypes: true })
11+
.filter(
12+
(folder) => folder.isDirectory() && !folder.name.endsWith(".egg-info")
13+
)
14+
.map((folder) => ({
15+
name: folder.name,
16+
path: path.join(pathToCheck, folder.name),
17+
}));
18+
const rpcDirectory = path.join(folders[0].path, "rpc");
19+
return [rpcDirectory, folders[0].name];
20+
};
21+
22+
const [directoryPath, project_name] = findDirectoryPath("src/");
23+
24+
const outputFile = path.join(process.cwd(), "schemas.json");
25+
26+
function return_json_schema(directoryPath, folder_path, project_name) {
27+
const folders = fs
28+
.readdirSync(path.normalize(directoryPath), { withFileTypes: true })
29+
.filter((folder) => folder.isDirectory())
30+
.map((folder) => ({
31+
name: folder.name,
32+
path: path.join(directoryPath, folder.name),
33+
}));
34+
var folders_schemas = {};
35+
folders.forEach((folder) => {
36+
if (folder.name == "schemas") {
37+
const jsonFiles = glob.sync(path.join(folder.path, "**/*.json"));
38+
var schemas = {};
39+
jsonFiles.forEach((filePath) => {
40+
try {
41+
const fileContent = fs.readFileSync(filePath, "utf8");
42+
var jsonData = JSON.parse(fileContent);
43+
var filename = filePath
44+
.replace(/^.*[\\/]/, "")
45+
.replace(/\.[^/.]+$/, "");
46+
var rpc = jsonData["rpc"];
47+
jsonData["$id"] = project_name + folder_path + "." + rpc;
48+
schemas[filename] = jsonData;
49+
} catch (error) {
50+
console.error(
51+
`Erreur lors de la lecture du fichier ${filePath}:`,
52+
error
53+
);
54+
}
55+
});
56+
folders_schemas = Object.keys(schemas).reduce((acc, key) => {
57+
const currentSchema = schemas[key];
58+
const modifiedSchema = {
59+
$id: path.join(folder_path, currentSchema["$id"]),
60+
...currentSchema,
61+
};
62+
acc[key] = modifiedSchema;
63+
return acc;
64+
}, folders_schemas);
65+
} else {
66+
var new_folder_path = folder_path + "/" + folder.name;
67+
var test = return_json_schema(folder.path, new_folder_path, project_name);
68+
folders_schemas[folder.name] = test;
69+
}
70+
});
71+
return folders_schemas;
72+
}
73+
74+
if (fs.existsSync(outputFile)) {
75+
fs.unlinkSync(outputFile);
76+
}
77+
78+
const finalJson = {};
79+
finalJson[project_name] = return_json_schema(directoryPath, "", project_name);
80+
81+
fs.writeFileSync(outputFile, JSON.stringify(finalJson, null, 2));

0 commit comments

Comments
 (0)