Convert Arcane XML/AXL configs to JSON and import into Neo4j graph database
Project description
arcane2graph
Executer arcane en sequentiel avec les options suivantes
-A,export_format=xml,export_output_directory=[path],export_only=true
!!! export_only sert à tuer le processus avant le lancement de la simultation en provoquant une erreur, l'erreur est donc normale.
Convertir les configs .xml extraites via arcane en .json
python merge.py
Note: The merge.py script now handles both XML-to-JSON conversion and database import in a single command. The script automatically:
- Converts XML files from
./xmlto JSON in./arc_json - Merges the JSON data into Neo4j
- Imports AXL export files into Neo4j
Installation & Setup with pip
Quick Start (First Time Only)
- Create a local virtual environment:
python3 -m venv .venv
- Activate it (Linux/Ubuntu Bash):
source .venv/bin/activate
- Install the package:
pip install -e .
Running the Package
After activation (recommended):
source .venv/bin/activate
arcane2graph --help
arcane2graph --xml-path ./xml --json-path ./arc_json --neo4j-password password
Without activation (one-off commands):
./.venv/bin/arcane2graph --help
./.venv/bin/arcane2graph --xml-path ./xml
What This Does
- Creates an isolated
.venv/folder in your project - Installs the package locally without affecting other projects
- Makes the
arcane2graphcommand available - The
-eflag installs in development mode (changes to code take effect immediately)
convertir les .axl en .json via axlstar
axl2ccT4 -l json -o \[output_path\] \[path_to_axl\]/Mahyco.axl
Déploiement docker
docker run \
-d \
-p 7474:7474 -p 7687:7687 \
-v $PWD/data:/data -v $PWD/plugins:/plugins \
--name neo4j-apoc \
-e NEO4J_apoc_export_file_enabled=true \
-e NEO4J_apoc_import_file_enabled=true \
-e NEO4J_apoc_import_file_use__neo4j__config=true \
-e NEO4J_PLUGINS=\[\"apoc\",\"apoc-extended\"\] \
-e NEO4J_AUTH=neo4j/password \
neo4j:5.26
Remplir la BDD
Lancer merge.py qui exécute maintenant les trois étapes :
- Conversion des fichiers XML en JSON
- Fusion des données JSON dans Neo4j
- Import des fichiers AXL export dans Neo4j
Une seule exécution du script suffit.
Arguments de merge.py
python merge.py [OPTIONS]
Options:
--xml-path PATH Path to XML input directory (default: ./xml)
--json-path PATH Path to JSON directory - output of conversion and input for merge (default: ./arc_json)
--skip-convert Skip XML to JSON conversion step (default: false)
--neo4j-uri URI Neo4j connection URI (default: bolt://localhost:7687)
--neo4j-username USERNAME Neo4j username (default: neo4j)
--neo4j-password PASSWORD Neo4j password (default: password)
Exemples
python merge.py --xml-path ./config/xml --json-path ./config/json --neo4j-uri bolt://localhost:7687 --neo4j-username neo4j --neo4j-password password
Interface web
http://localhost:7474/browser/
couple specification instance pour l'option nommée ...
MATCH p=(o: Option {fullName: "Mahyco/boundary-condition"})-[r:SPECIFIES]->()
return p
Couverture de toutes les options
MATCH (o)-[:SPECIFIES]->(n)
WITH apoc.map.clean(properties(n), ['uid'], []) AS props, coalesce(o.fullName, o.name) AS name
UNWIND keys(props) AS key
RETURN name, key, props[key] AS value, count(*) AS count
ORDER BY name, count DESC;
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file arcane2graph-0.1.0.tar.gz.
File metadata
- Download URL: arcane2graph-0.1.0.tar.gz
- Upload date:
- Size: 17.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7de7e778b057f7dc1401d6b0c4be61bf58391386aafc072b53ff95048078ed1
|
|
| MD5 |
5698a82aaa3ff49b280b1530f57f34bf
|
|
| BLAKE2b-256 |
423dd84a82651ae9c45e3d9626d0ed9f463a9919c69e5672f44525605a677c21
|
Provenance
The following attestation bundles were made for arcane2graph-0.1.0.tar.gz:
Publisher:
python-publish.yml on ewenbrune/arcane2graph
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arcane2graph-0.1.0.tar.gz -
Subject digest:
a7de7e778b057f7dc1401d6b0c4be61bf58391386aafc072b53ff95048078ed1 - Sigstore transparency entry: 1008495683
- Sigstore integration time:
-
Permalink:
ewenbrune/arcane2graph@41f24f4d6e32edaf60c7b31540758534eeb7fdda -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/ewenbrune
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@41f24f4d6e32edaf60c7b31540758534eeb7fdda -
Trigger Event:
release
-
Statement type:
File details
Details for the file arcane2graph-0.1.0-py3-none-any.whl.
File metadata
- Download URL: arcane2graph-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b734bb183fc8321509798ebf4e4b11dc47caf918e7f2cb1d11fd114665f3cc5
|
|
| MD5 |
17a59e59ffce263f5c301fc9c12cf0e3
|
|
| BLAKE2b-256 |
4091153634a17d8e27834a8c5c02a16ad064a7a7989b19ce17fb430d2040c07c
|
Provenance
The following attestation bundles were made for arcane2graph-0.1.0-py3-none-any.whl:
Publisher:
python-publish.yml on ewenbrune/arcane2graph
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arcane2graph-0.1.0-py3-none-any.whl -
Subject digest:
9b734bb183fc8321509798ebf4e4b11dc47caf918e7f2cb1d11fd114665f3cc5 - Sigstore transparency entry: 1008495689
- Sigstore integration time:
-
Permalink:
ewenbrune/arcane2graph@41f24f4d6e32edaf60c7b31540758534eeb7fdda -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/ewenbrune
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@41f24f4d6e32edaf60c7b31540758534eeb7fdda -
Trigger Event:
release
-
Statement type: