removed uneeded print and removed packages from project
This commit is contained in:
@@ -40,7 +40,6 @@ def build_mineral(args):
|
|||||||
with console.status("Compiling", spinner="bouncingBall", spinner_style="green") as status:
|
with console.status("Compiling", spinner="bouncingBall", spinner_style="green") as status:
|
||||||
c_files = find_c_files(args.folder_path)
|
c_files = find_c_files(args.folder_path)
|
||||||
|
|
||||||
print(len(c_files))
|
|
||||||
if len(c_files) == 0:
|
if len(c_files) == 0:
|
||||||
console.print("[b red]digpkg: failed to build mineral: no .c files found in the specified folder, are you sure you're compiling a mineral?[/]")
|
console.print("[b red]digpkg: failed to build mineral: no .c files found in the specified folder, are you sure you're compiling a mineral?[/]")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
# fileio
|
|
||||||
Perform file system operations.
|
|
||||||
|
|
||||||
## Files
|
|
||||||
- [file_Read](docs/read.md)
|
|
||||||
- [file_Write](docs/write.md)
|
|
||||||
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
# file_Read
|
|
||||||
Open a file and return the contents in `r` mode.
|
|
||||||
|
|
||||||
## Arguments
|
|
||||||
- path (string): Path to the file you want to read
|
|
||||||
|
|
||||||
## Returns
|
|
||||||
- content (string): Contents of the file
|
|
||||||
|
|
||||||
## Raises
|
|
||||||
- `FileError`: Raised if the file doesn't exist or there was an error allocating memory for the file
|
|
||||||
|
|
||||||
## Example
|
|
||||||
```python
|
|
||||||
call !file_Read "my_file.txt" &contents
|
|
||||||
println $contents
|
|
||||||
```
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
# file_Write
|
|
||||||
Open a file and overwrite its contents with the provided string in `w` mode.
|
|
||||||
|
|
||||||
## Arguments
|
|
||||||
- path (string): Path to the file you want to write to
|
|
||||||
|
|
||||||
## Returns
|
|
||||||
- success (boolean): Whether writing to the file succeeded or not
|
|
||||||
|
|
||||||
## Raises
|
|
||||||
- `FileError`: Raised if the file doesn't exist
|
|
||||||
|
|
||||||
## Example
|
|
||||||
```python
|
|
||||||
call !file_Read "my_file.txt" &contents
|
|
||||||
println $contents
|
|
||||||
```
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
[package]
|
|
||||||
description=Provides file I/O support for Ground
|
|
||||||
version=1.2.0
|
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
# math
|
|
||||||
Library that contains math utilities.
|
|
||||||
|
|
||||||
## General
|
|
||||||
- [math_Modulus](docs/modulus.md)
|
|
||||||
- [math_Min](docs/min.md)
|
|
||||||
- [math_Max](docs/max.md)
|
|
||||||
- [math_Clamp](docs/clamp.md)
|
|
||||||
- [math_Sqrt](docs/sqrt.md)
|
|
||||||
- [math_Pow](docs/pow.md)
|
|
||||||
|
|
||||||
## Trig Functions
|
|
||||||
- [math_Sin](docs/trig/sin.md)
|
|
||||||
- [math_Cos](docs/trig/cos.md)
|
|
||||||
- [math_Tan](docs/trig/tan.md)
|
|
||||||
- [math_RadiansToDegrees](docs/trig/rad_to_deg.md)
|
|
||||||
- [math_DegreesToRadians](docs/trig/deg_to_rad.md)
|
|
||||||
|
|
||||||
## Random
|
|
||||||
- [math_Random](docs/random/random.md)
|
|
||||||
- [math_RandomDouble](docs/random/random_double.md)
|
|
||||||
- [math_RandomSetSeed](docs/random/random_set_seed.md)
|
|
||||||
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
# math_Clamp
|
|
||||||
Clamps a number between a minimum and maximum value.
|
|
||||||
|
|
||||||
## Arguments
|
|
||||||
- number (double): The number to be clamped
|
|
||||||
- min (double): Minimum value
|
|
||||||
- max (double): Maximum value
|
|
||||||
|
|
||||||
## Returns
|
|
||||||
result (double): The number after being clamped
|
|
||||||
|
|
||||||
## Example
|
|
||||||
```python
|
|
||||||
call !math_Clamp 1.5 0.0 1.0 &result
|
|
||||||
println $result # 1.0
|
|
||||||
```
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
# math_Max
|
|
||||||
Choose the largest number out of the two arguments.
|
|
||||||
|
|
||||||
## Arguments
|
|
||||||
- number1 (double): First number
|
|
||||||
- number2 (double): Second number
|
|
||||||
|
|
||||||
## Returns
|
|
||||||
result (double): The largest number out of the two provided
|
|
||||||
|
|
||||||
## Example
|
|
||||||
```python
|
|
||||||
call !math_Max 1.2 0.7 &result
|
|
||||||
println $result # 1.2
|
|
||||||
```
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
# math_Min
|
|
||||||
Choose the smallest number out of the two arguments.
|
|
||||||
|
|
||||||
## Arguments
|
|
||||||
- number1 (double): First number
|
|
||||||
- number2 (double): Second number
|
|
||||||
|
|
||||||
## Returns
|
|
||||||
result (double): The smallest number out of the two provided
|
|
||||||
|
|
||||||
## Example
|
|
||||||
```python
|
|
||||||
call !math_Min 0.5 1.5 &result
|
|
||||||
println $result # 0.5
|
|
||||||
```
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
# math_Modulus
|
|
||||||
Gets the remainder of dividing the two numbers.
|
|
||||||
|
|
||||||
## Arguments
|
|
||||||
- number1 (double): First number
|
|
||||||
- number2 (double): Second number
|
|
||||||
|
|
||||||
## Returns
|
|
||||||
remainder (double): The remainder.
|
|
||||||
|
|
||||||
## Example
|
|
||||||
```python
|
|
||||||
call !math_Modulus 4 3 &remainder
|
|
||||||
println $remainder # 1
|
|
||||||
```
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
# math_Pow
|
|
||||||
Gets the
|
|
||||||
|
|
||||||
## Arguments
|
|
||||||
- number (double): The number to get the square root of
|
|
||||||
|
|
||||||
## Returns
|
|
||||||
result (double): The square root of the number
|
|
||||||
|
|
||||||
## Example
|
|
||||||
```python
|
|
||||||
call !math_Sqrt 16 &result
|
|
||||||
println $result # 4
|
|
||||||
```
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
# math_Random
|
|
||||||
Generate a random integer in the range provided.
|
|
||||||
**IMPORTANT:** math_Random is **NOT** cryptographically secure! Use the `cryptography` library instead!
|
|
||||||
If you want to generate a random double, use `math_RandomDouble`.
|
|
||||||
|
|
||||||
## Arguments
|
|
||||||
- min (int): Smallest possible number
|
|
||||||
- max (int): Largest possible number
|
|
||||||
|
|
||||||
## Returns
|
|
||||||
randomNumber (int): A random number in the range provided
|
|
||||||
|
|
||||||
## Example
|
|
||||||
```python
|
|
||||||
call !math_Random 1 6 &dice
|
|
||||||
println $dice # 3
|
|
||||||
call !math_Random 1 6 &dice
|
|
||||||
println $dice # 2
|
|
||||||
call !math_Random 1 6 &dice
|
|
||||||
println $dice # 6
|
|
||||||
...
|
|
||||||
```
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
# math_RandomDouble
|
|
||||||
Generate a random double in the range provided.
|
|
||||||
**IMPORTANT:** math_RandomDouble is **NOT** cryptographically secure! Use the `cryptography` library instead!
|
|
||||||
If you want to generate a random integer, use `math_Random`.
|
|
||||||
|
|
||||||
## Arguments
|
|
||||||
- min (double): Smallest possible number
|
|
||||||
- max (double): Largest possible number
|
|
||||||
|
|
||||||
## Returns
|
|
||||||
randomNumber (double): A random number in the range provided
|
|
||||||
|
|
||||||
## Example
|
|
||||||
```python
|
|
||||||
call !math_RandomDouble 0.0 10.0 &randomNumber
|
|
||||||
println $randomNumber # 5.24...
|
|
||||||
call !math_RandomDouble 0.0 10.0 &randomNumber
|
|
||||||
println $randomNumber # 6.58...
|
|
||||||
call !math_RandomDouble 0.0 10.0 &randomNumber
|
|
||||||
println $randomNumber # 9.22...
|
|
||||||
...
|
|
||||||
```
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
# math_RandomSetSeed
|
|
||||||
Seed the pseudo random number generator.
|
|
||||||
Seeding the random number generator the same number will always yield the same random number.
|
|
||||||
|
|
||||||
## Arguments
|
|
||||||
- seed (int): Seed
|
|
||||||
|
|
||||||
## Returns
|
|
||||||
math_RandomSetSeed does not return anything.
|
|
||||||
|
|
||||||
## Example
|
|
||||||
```python
|
|
||||||
call !math_RandomSetSeed 123 &
|
|
||||||
call !math_Random 1 6 &dice
|
|
||||||
println $dice # some number
|
|
||||||
call !math_RandomSetSeed 123 &
|
|
||||||
call !math_Random 1 6 &dice
|
|
||||||
println $dice # the same number
|
|
||||||
# (i cant test this cause libraries are broken as am i writing docs lmao)
|
|
||||||
```
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
# math_Sqrt
|
|
||||||
Gets the square root of a number.
|
|
||||||
|
|
||||||
## Arguments
|
|
||||||
- number (double): The number to get the square root of
|
|
||||||
|
|
||||||
## Returns
|
|
||||||
result (double): The square root of the number
|
|
||||||
|
|
||||||
## Example
|
|
||||||
```python
|
|
||||||
call !math_Sqrt 16 &result
|
|
||||||
println $result # 4
|
|
||||||
```
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
# math_Cos
|
|
||||||
Get the cosine of a certain amount of radians.
|
|
||||||
|
|
||||||
## Arguments
|
|
||||||
- x (double): Number (in radians)
|
|
||||||
|
|
||||||
## Returns
|
|
||||||
result (double): The cosine of the number in radians
|
|
||||||
|
|
||||||
## Example
|
|
||||||
```python
|
|
||||||
call !math_Cos 3.14159 &result
|
|
||||||
println $result # -1
|
|
||||||
```
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
# math_DegreesToRadians
|
|
||||||
Convert degrees to radians.
|
|
||||||
|
|
||||||
## Arguments
|
|
||||||
- x (double): Number of degrees
|
|
||||||
|
|
||||||
## Returns
|
|
||||||
result (double): x degrees in radians
|
|
||||||
|
|
||||||
## Example
|
|
||||||
```python
|
|
||||||
call !math_DegreesToRadians 180.0 &result
|
|
||||||
println $result # 3.14159
|
|
||||||
```
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
# math_RadiansToDegrees
|
|
||||||
Convert radians to degrees.
|
|
||||||
|
|
||||||
## Arguments
|
|
||||||
- x (double): Number of radians
|
|
||||||
|
|
||||||
## Returns
|
|
||||||
result (double): x radians in degrees
|
|
||||||
|
|
||||||
## Example
|
|
||||||
```python
|
|
||||||
call !math_RadiansToDegrees 3.14159 &result
|
|
||||||
println $result # 180.0
|
|
||||||
```
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
# math_Sin
|
|
||||||
Get the sine of a certain amount of radians.
|
|
||||||
|
|
||||||
## Arguments
|
|
||||||
- x (double): Number (in radians)
|
|
||||||
|
|
||||||
## Returns
|
|
||||||
result (double): The sine of the number in radians
|
|
||||||
|
|
||||||
## Example
|
|
||||||
```python
|
|
||||||
call !math_Sin 3.14159 &result
|
|
||||||
println $result # 0
|
|
||||||
```
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
# math_Tan
|
|
||||||
Get the tangent of a certain amount of radians.
|
|
||||||
|
|
||||||
## Arguments
|
|
||||||
- x (double): Number (in radians)
|
|
||||||
|
|
||||||
## Returns
|
|
||||||
result (double): The tangent of the number in radians
|
|
||||||
|
|
||||||
## Example
|
|
||||||
```python
|
|
||||||
call !math_Tan 3.14159 &result
|
|
||||||
println $result # 0
|
|
||||||
```
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
[package]
|
|
||||||
description = Library that contains math utilities.
|
|
||||||
version = 1.2.5
|
|
||||||
config_version = 1
|
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
# stdlib
|
|
||||||
The standard library for Ground.
|
|
||||||
|
|
||||||
This mineral has no functions because it is intended to just be a collection of minerals needed to do anything useful in Ground.
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
[package]
|
|
||||||
description = Standard library for Ground.
|
|
||||||
version = 1.2.5
|
|
||||||
config_version = 1
|
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
math=1.2.5
|
|
||||||
request=1.2.5
|
|
||||||
fileio=1.2.5
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user