-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[0003-crash-development2-major-1] (PR #15)
Merge pull request #15 from syedalimohsinbukhari/0003-crash-development2
- Loading branch information
Showing
40 changed files
with
659 additions
and
483 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,4 +128,7 @@ dmypy.json | |
# Pyre type checker | ||
.pyre/ | ||
.idea/ | ||
.vscode/ | ||
.vscode/ | ||
main.py | ||
/**/*.sh | ||
/**/*.csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[build-system] | ||
requires = ["setuptools==70.0.0", "numpy==1.26.4", "matplotlib==3.9.1"] | ||
requires = ["setuptools", "numpy==1.26.4", "matplotlib"] | ||
|
||
build-backend = "setuptools.build_meta:__legacy__" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
setuptools==70.0.0 | ||
numpy==1.26.4 | ||
|
||
matplotlib==3.9.1 | ||
matplotlib | ||
setuptools |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[metadata] | ||
name = mpyez | ||
version = 0.0.5 | ||
version = 0.0.6 | ||
url = https://github.com/syedalimohsinbukhari/mypyez | ||
author = Syed Ali Mohsin Bukhari, Astrophysics and Python | ||
author_email = [email protected], [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,22 +7,20 @@ | |
|
||
setup( | ||
name='mpyez', | ||
version='0.0.5', | ||
version='0.0.6', | ||
packages=find_packages(where="src", exclude=['*tests*']), | ||
url='https://github.com/syedalimohsinbukhari/mpyez', | ||
license='MIT', | ||
author='Syed Ali Mohsin Bukhari, Astrophysics and Python', | ||
author_email='[email protected], [email protected]', | ||
description='Common use utilities for python done easy.', | ||
author='Syed Ali Mohsin Bukhari', | ||
author_email='[email protected]', | ||
description='Common use backend for python done easy.', | ||
long_description=readme, | ||
long_description_content_type="text/markdown", | ||
python_requires=">=3.9, <3.12", | ||
install_requires=["setuptools==70.0.0", "numpy==1.26.4", "matplotlib==3.9.1"], | ||
install_requires=["numpy==1.26.4", "matplotlib", "setuptools"], | ||
include_package_data=True, | ||
classifiers=[ | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11" | ||
], | ||
classifiers=["License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11"], | ||
) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
"""Created on Jul 18 23:26:06 2022.""" | ||
|
||
from . import dict_, list_, misc, os_, read_files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
"""Created on Jul 20 00:17:08 2022.""" | ||
|
||
from . import uDict as d_utils, uList as l_utils |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
"""Created on Jul 23 18:38:52 2022.""" | ||
|
||
from .eIO import LineNumberOutOfBounds | ||
|
||
|
||
def check_for_errors(open_file: list, lines_to_read: list): | ||
""" | ||
Checks if the requested lines to read are within the valid range for the file. | ||
Parameters | ||
---------- | ||
open_file : list | ||
A list of file content lines. | ||
lines_to_read : list | ||
A list of line numbers requested to be read. | ||
Raises | ||
------ | ||
LineNumberOutOfBounds | ||
If any line number is out of the bounds of the file. | ||
""" | ||
|
||
file_length = len(open_file) | ||
err = False | ||
|
||
# Check if all line numbers are non-negative | ||
if all(line >= 0 for line in lines_to_read): | ||
if max(lines_to_read) >= file_length: | ||
err = True | ||
|
||
# Check if any negative line numbers are present | ||
elif any(line < 0 for line in lines_to_read): | ||
if abs(min(lines_to_read)) > file_length: | ||
err = True | ||
else: | ||
# Adjust negative indices to correspond to positive ones (from the end) | ||
for idx, line in enumerate(lines_to_read): | ||
if line < 0: | ||
lines_to_read[idx] += file_length | ||
|
||
if err: | ||
raise LineNumberOutOfBounds("The line number specified is outside the line numbers of the file.") |
Oops, something went wrong.