Skip to content

Commit 833eaca

Browse files
committed
Separate upload script in script folder.
1 parent 9c6c1ed commit 833eaca

File tree

4 files changed

+6
-198
lines changed

4 files changed

+6
-198
lines changed

src/pynxtools_spm/nomad_uploader/example_upload_script.py renamed to scripts/example_upload_script.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
from pathlib import Path
77

88
current_dir = Path(__file__).resolve().parent
9-
project_dir = current_dir.parent.parent.parent
9+
project_dir = current_dir.parent
1010

1111
nomad_settings = NOMADSettings(
1212
url_protocol="https",
1313
url_domain="nomad-lab.eu",
1414
url_version="prod/v1/develop/api/v1/",
1515
url="https://nomad-lab.eu/prod/v1/develop/api/v1/",
16-
username="Mozumder",
16+
username="",
1717
password="",
1818
token="",
1919
modify_upload_metadata=True,

run_uploader.sh renamed to scripts/run_uploader.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
# Stop on error
44
set -e
55

6-
current_dir=$(pwd)
7-
uploader_script="/home/rubel/NOMAD-FAIRmat/GH/pynxtools-spm/src/pynxtools_spm/nomad_uploader/example_upload_script.py"
6+
current_dir=$(dirname $(realpath $0))
7+
echo "Current directory: $current_dir"
8+
uploader_script="$current_dir/example_upload_script.py"
89
venv="/home/rubel/NOMAD-FAIRmat/GH/pynxtools-spm/.venv"
910
python_3="$venv/bin/python3"
1011
echo "Running uploader script..."

src/pynxtools_spm/nomad_uploader/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ nomad_uploader/
2121
├── uploader.py # Main uploader orchestration
2222
├── nomad_upload_api.py # NOMAD API client
2323
├── reader_config_setup.py # SPM conversion configuration
24-
├── example_upload_script.py # Example usage script
2524
├── helper.py # Utility functions
2625
└── files_movers.py # File management utilities
2726
```
@@ -388,7 +387,7 @@ For complete NOMAD API documentation, visit: https://nomad-lab.eu/docs
388387

389388
## Examples
390389

391-
See `example_upload_script.py` for a complete working example with real configuration.
390+
See an example Python script `example_upload_script.py` in [script folder](https://github.com/FAIRmat-NFDI/pynxtools-spm/tree/main/scripts) for a complete working example with real configuration.
392391

393392
## Contributing
394393

src/pynxtools_spm/nomad_uploader/upload_srcript.py

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

0 commit comments

Comments
 (0)