Skip to content

Commit

Permalink
Update 0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
VForiel committed Feb 3, 2023
1 parent f458e1c commit e9e5f24
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 20 deletions.
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"path_to_docs": "docs",
"use_repository_button": True,
"use_edit_page_button": True,
"announcement": "⚠️ 0.1.0 version is in active development and might be unstable, use it at your own risks ⚠️"
}

html_logo = "logo.png"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "LRFutils"
version = "0.0.15"
version = "0.1.0"
authors = [
{ name="Leirof", email="[email protected]" },
]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name="LRFutils",
version = "0.0.10",
version = "0.1.0",
description = 'Just a custom library to share with some colleagues. Use it at your own risks.',
author = 'Leirof',
author_email = '[email protected]',
Expand Down
39 changes: 22 additions & 17 deletions src/examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,15 @@
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Archive created at ./archives/2023-02-03_875a360/4_Simu-L=2,z=3.14,state=solid\n"
]
}
],
"source": [
"from LRFutils import archive\n",
"\n",
Expand All @@ -36,7 +44,7 @@
"source": [
"---\n",
"\n",
"# Color"
"# 🎨 Color"
]
},
{
Expand Down Expand Up @@ -69,7 +77,7 @@
"source": [
"---\n",
"\n",
"# Logs"
"# 📜 Logs"
]
},
{
Expand All @@ -81,10 +89,10 @@
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[34m03/02/2023\u001b[0m at \u001b[35m09:56:39\u001b[0m | \u001b[32m[INFO] \u001b[0mHello world!\n",
"\u001b[34m03/02/2023\u001b[0m at \u001b[35m09:56:39\u001b[0m | \u001b[93m[WARNING] Hello world!\u001b[0m\n",
"\u001b[34m03/02/2023\u001b[0m at \u001b[35m09:56:39\u001b[0m | \u001b[41m[ERROR]\u001b[0m\u001b[31m Hello world!\u001b[0m\n",
" -> Look at \u001b[32mlogs/2023-02-03_09.56.39.797538.log\u001b[0m for more information.\n",
"\u001b[34m03/02/2023\u001b[0m at \u001b[35m10:00:47\u001b[0m | \u001b[32m[INFO] \u001b[0mHello world!\n",
"\u001b[34m03/02/2023\u001b[0m at \u001b[35m10:00:47\u001b[0m | \u001b[93m[WARNING] Hello world!\u001b[0m\n",
"\u001b[34m03/02/2023\u001b[0m at \u001b[35m10:00:47\u001b[0m | \u001b[41m[ERROR]\u001b[0m\u001b[31m Hello world!\u001b[0m\n",
" -> Look at \u001b[32mlogs/2023-02-03_10.00.47.123940.log\u001b[0m for more information.\n",
"\n"
]
}
Expand All @@ -104,7 +112,7 @@
"source": [
"---\n",
"\n",
"# Progress"
"# Progress"
]
},
{
Expand All @@ -113,15 +121,12 @@
"metadata": {},
"outputs": [
{
"ename": "AttributeError",
"evalue": "module 'LRFutils.color' has no attribute 'LightGreen'",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mAttributeError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[1;32mIn[4], line 9\u001b[0m\n\u001b[0;32m 6\u001b[0m a \u001b[39m=\u001b[39m progress\u001b[39m.\u001b[39mBar(\u001b[39mmax\u001b[39m \u001b[39m=\u001b[39m N)\n\u001b[0;32m 8\u001b[0m \u001b[39mfor\u001b[39;00m i \u001b[39min\u001b[39;00m \u001b[39mrange\u001b[39m(N):\n\u001b[1;32m----> 9\u001b[0m a(i\u001b[39m+\u001b[39;49m\u001b[39m1\u001b[39;49m)\n\u001b[0;32m 10\u001b[0m time\u001b[39m.\u001b[39msleep(\u001b[39m0.01\u001b[39m)\n\u001b[0;32m 12\u001b[0m a \u001b[39m=\u001b[39m progress\u001b[39m.\u001b[39mBar(prefix \u001b[39m=\u001b[39m \u001b[39m\"\u001b[39m\u001b[39mThe best bar\u001b[39m\u001b[39m\"\u001b[39m, \u001b[39mmax\u001b[39m \u001b[39m=\u001b[39m N)\n",
"File \u001b[1;32mc:\\Users\\vince\\Documents\\Dev\\Perso\\LRFutils\\src\\LRFutils\\progress.py:83\u001b[0m, in \u001b[0;36mBar.__call__\u001b[1;34m(self, progress, prefix, stop)\u001b[0m\n\u001b[0;32m 81\u001b[0m progress_normed \u001b[39m=\u001b[39m progress \u001b[39m/\u001b[39m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39mmax\n\u001b[0;32m 82\u001b[0m \u001b[39mif\u001b[39;00m progress \u001b[39m==\u001b[39m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39mmax : stop \u001b[39m=\u001b[39m \u001b[39mTrue\u001b[39;00m\n\u001b[1;32m---> 83\u001b[0m color_bar \u001b[39m=\u001b[39m color\u001b[39m.\u001b[39mYellow \u001b[39mif\u001b[39;00m stop \u001b[39mand\u001b[39;00m progress_normed \u001b[39m!=\u001b[39m \u001b[39m1\u001b[39m \u001b[39melse\u001b[39;00m color\u001b[39m.\u001b[39;49mLightGreen \n\u001b[0;32m 85\u001b[0m \u001b[39mif\u001b[39;00m stop: end \u001b[39m=\u001b[39m \u001b[39m\"\u001b[39m\u001b[39m\\n\u001b[39;00m\u001b[39m\"\u001b[39m\n\u001b[0;32m 86\u001b[0m \u001b[39melse\u001b[39;00m: end \u001b[39m=\u001b[39m \u001b[39m\"\u001b[39m\u001b[39m\\r\u001b[39;00m\u001b[39m\"\u001b[39m\n",
"\u001b[1;31mAttributeError\u001b[0m: module 'LRFutils.color' has no attribute 'LightGreen'"
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[92m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ \u001b[92m100% \u001b[91m1000/1000 \u001b[35m0:00:15\u001b[0mta \u001b[34m0:00:00\u001b[0m\n",
"\u001b[0mThe best bar \u001b[93m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[93m╸\u001b[37m━━━━━━━━━━━━━━━━ \u001b[93m64% \u001b[91m642/1000 \u001b[35m0:00:11\u001b[0m00:05\u001b[0m\n",
"\u001b[0mWaw, another incredible bar \u001b[92m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ \u001b[92m100% \u001b[91m1000/1000 \u001b[35m0:00:15\u001b[0mta \u001b[34m0:00:00\u001b[0m\n"
]
}
],
Expand Down
3 changes: 2 additions & 1 deletion upload_on_pypi.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
from LRFutils import color

# Remove old versions
if os.path.isdir("dist"):
Expand All @@ -17,7 +18,7 @@
accept = ["", "yes", "y", "ye", "yeah", "yep", "oui", "ouai", "ouaip"]

for command in script:
select = input(f"Do you want to execute the following command? [Y/n]\n{command}\n")
select = input(color.blue("\nDo you want to execute the following command? [Y/n]\n ") + color.yellow(command) + "\n")
if select.lower() in accept:
os.system(command)
else:
Expand Down

0 comments on commit e9e5f24

Please sign in to comment.