Skip to content

Latest commit

 

History

History
55 lines (44 loc) · 1.92 KB

13.upload-package.md

File metadata and controls

55 lines (44 loc) · 1.92 KB

Upload the tool package and the workflow package

  1. Delete the main.py used for the test in the ./lev-hub/username.tool directory or the ./lev-hub/username.asset. Then execute the uploading command, after approval [^10](#What content does Leviathan Platform review? Why is tool review required?). In your personal warehouse, you can see the uploaded tools and workflows:
pdm lev upload
  1. Update the tool and workflow version. If there is an update after uploading the tools and workflows for the first time, you need to modify the code in the corresponding directory of the local tools and workflows. Then execute the uploading command again. Please note that you need to modify the pyproject.toml file in the ./lev-hub/username.tool directory the next time you want to upload updated contents.
[project]
name = "lev.szczecin.xray"
version = "0.1.0"	# Old version number
description = ""
requires-python = ">=3.10"
dependencies = [
    "levrt>=1.0.4",
]
...

[project]
name = "lev.szczecin.xray"
version = "0.1.1"	# New version number
description = ""
requires-python = ">=3.10"
dependencies = [
    "levrt>=1.0.4",
]
...

$ pdm lev upload
  1. If the output result data has changed significantly after the tool and workflow are updated, the corresponding models version should also be updated. The version of models is for the display of output data, which can be inconsistent with tool version in the pyproject.toml file:
model: szczecin/checkdmarc.spf:1.0
---
model: szczecin/checkdmarc.spf:1.1
  1. When the tool package and workflow package are uploaded to Leviathan, users can set the package in the warehouse to "public" and publish it after the tool review. Then other users can use the command in the local workspace to obtain and invoke the published package:
# pdm add lev.username.tool
$ pdm add lev.szczecin.nmap_python

# pdm add lev.username.asset
$ pdm add lev.szczecin.checkdmarc