Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Wittmann_R507_Evaluation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WITTMANN Gregory
Wittmann_R507_Evaluation
Commits
274b0845
Commit
274b0845
authored
1 year ago
by
WITTMANN Gregory
Browse files
Options
Downloads
Patches
Plain Diff
Add
parent
6f8c9bc7
No related branches found
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
.gitignore
+28
-0
28 additions, 0 deletions
.gitignore
.gitlab-ci.yml
+25
-0
25 additions, 0 deletions
.gitlab-ci.yml
calculVolumeSphere.py
+7
-4
7 additions, 4 deletions
calculVolumeSphere.py
index.php
+17
-0
17 additions, 0 deletions
index.php
volume.txt
+1
-1
1 addition, 1 deletion
volume.txt
with
78 additions
and
5 deletions
.gitignore
0 → 100644
+
28
−
0
View file @
274b0845
# Ignore les fichiers et répertoires générés par Python
__pycache__/
*.pyc
*.pyo
*.pyd
# ignore les fichier txt
*.txt
# Ignore les fichiers générés par l'IDE (par exemple, PyCharm)
.idea/
# Ignore les fichiers générés lors de l'exécution des tests
htmlcov/
.coverage
# Ignore les fichiers générés par le système d'exploitation
.DS_Store
Thumbs.db
# Ignore les fichiers générés lors de la construction
dist/
build/
*.egg-info/
# Ignore les fichiers générés par les outils de gestion de dépendances
venv/
env/
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
0 → 100644
+
25
−
0
View file @
274b0845
stages
:
-
lint
-
test
-
build
variables
:
PYTEST_FLAGS
:
"
-v"
lint
:
stage
:
lint
script
:
-
pip install flake8
-
flake8 sphère.py
test
:
stage
:
test
script
:
-
pip install -r requirements.txt
-
pip install pytest
-
pytest test_sphère.py
build
:
stage
:
build
script
:
-
docker build -t EvalSpherePython .
\ No newline at end of file
This diff is collapsed.
Click to expand it.
calculVolumeSphere.py
+
7
−
4
View file @
274b0845
# sphère.py
import
math
...
...
@@ -10,12 +11,14 @@ def calculer_volume_sphere(rayon):
def
enregistrer_resultat_fichier
(
volume
,
fichier
):
with
open
(
fichier
,
'
w
'
)
as
f
:
f
.
write
(
f
"
Volume de la sphère :
{
volume
}
"
)
f
.
write
(
f
"
{
volume
}
"
)
def
main
():
rayon
=
float
(
input
(
"
Rayon de la sph
e
re :
"
))
rayon
=
float
(
input
(
"
Rayon de la sph
è
re
en cm
:
"
))
volume
=
calculer_volume_sphere
(
rayon
)
enregistrer_resultat_fichier
(
volume
,
"
volume.txt
"
)
# Enregistrement du résultat dans un fichier texte
enregistrer_resultat_fichier
(
volume
,
"
volume.txt
"
)
if
__name__
==
'
__main__
'
:
main
()
\ No newline at end of file
This diff is collapsed.
Click to expand it.
index.php
0 → 100644
+
17
−
0
View file @
274b0845
<!DOCTYPE html>
<html
lang=
"fr"
>
<head>
<meta
charset=
"UTF-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<title>
Résultat du Calcul
</title>
</head>
<body>
<?php
// Lire le contenu du fichier texte
$contenu
=
file_get_contents
(
'volume.txt'
);
// Afficher le contenu du fichier texte
echo
'<p>Le volume du cône est de '
.
$contenu
.
' cm<sup>3</sup>.</p>'
;
?>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
volume.txt
+
1
−
1
View file @
274b0845
Volume de la sphère : 523.5987755982989
\ No newline at end of file
33.510321638291124
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment