IGN GPAO Project Builder
IGN GPAO Project Builder est une bibliothèque python de création de projet au format JSON pour la GPAO.
Prérequis
- Python 3 ou plus
Installation
Vous pouvez la télécharger depuis les dépôts officiels de PyPI:
pip install ign-gpao-project-builder
Exemple d'utilisation
from gpao.builder import Builder
from gpao.project import Project
from gpao.job import Job
job1 = Job("job1", "touch file", tags=["tag1", "tag2"])
job2 = Job("job2", "touch file")
job3 = Job("job3", "touch file", job1, tags=["tag1", "tag2"])
job3.add_dependency(job2)
# print(job1.to_json())
# print(job2.to_json())
# print(job3.to_json())
project1 = Project("project1", [job1, job2, job3])
# print(project1.to_json())
job4 = Job("job4", "touch file")
job5 = Job("job5", "touch file")
job5.add_dependency(job4)
project2 = Project("project2", [job4, job5])
# print(project2.to_json())
job6 = Job("job6", "touch file")
job7 = Job("job7", "touch file", job6)
project3 = Project("project3", [job6, job7], [project1, project2])
# print(project3.to_json())
builder = Builder([project1, project2])
builder.add_project(project3)
builder.save_as_json("project.json")
job8 = Job("job8", "touch file")
job8bis = Job("job8bis", "touch file", job8)
project4 = Project("project4", [job8, job8bis])
job9 = Job("job9", "touch file")
project5 = Project("project5", [job9], [project4])
builder = Builder([project4, project5])
builder.send_project_to_api("http://localhost:8080")
Cet exemple sauvegarde un fichier project.json avec le contenu suivant :
{
"projects": [
{
"name": "project1",
"jobs": [
{
"name": "job1",
"command": "touch file",
"tags": [
"tag1",
"tag2"
]
},
{
"name": "job2",
"command": "touch file"
},
{
"name": "job3",
"command": "touch file",
"deps": [
{
"id": 0
},
{
"id": 1
}
],
"tags": [
"tag1",
"tag2"
]
}
]
},
{
"name": "project2",
"jobs": [
{
"name": "job4",
"command": "touch file"
},
{
"name": "job5",
"command": "touch file",
"deps": [
{
"id": 0
}
]
}
]
},
{
"name": "project3",
"jobs": [
{
"name": "job6",
"command": "touch file"
},
{
"name": "job7",
"command": "touch file",
"deps": [
{
"id": 0
}
]
}
],
"deps": [
{
"id": 0
},
{
"id": 1
}
]
}
]
}
Licence
Ce projet est sous licence CECILL-B (voir LICENSE.md).
Metadata
Release files for ign-gpao-project-builder 0.12.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ign-gpao-project-builder-0.12.0.tar.gz | 4.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ign_gpao_project_builder-0.12.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.6 kB
Release files / ign-gpao-project-builder-0.12.0.tar.gz
| Download URL | ign-gpao-project-builder-0.12.0.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c78c963ec91a03a342e342a8a858256c8e10c1a94587901d3579b4583da524bf
|
|
BLAKE2b-256 checksum How to use checksums |
371dd3211cc0c2102a303195e76f63016a424e4932c7df5159d090e8f0baccc7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / ign_gpao_project_builder-0.12.0-py3-none-any.whl
| Download URL | ign_gpao_project_builder-0.12.0-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a993bd93eb525d240158cbb51506a2c0474c6b688583902eb010e23384cc0240
|
|
BLAKE2b-256 checksum How to use checksums |
636239da0786fc510c638e735ec11bf7770f57b8444486533e58e19a8e2d8293
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Security for ign-gpao-project-builder 0.12.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.