kopia lustrzana https://github.com/sepandhaghighi/samila
Random mode modification (#168)
* fix : RANDOM_EQUATION_GEN_COMPLEXITY added * fix : ELEMENTS_LIST updated * doc : CHANGELOG updated * doc : dependencies section in README.md removed * fix : ubuntu version fixed to 20.04pull/169/head
rodzic
9fb12259e0
commit
b38deb26c3
|
@ -11,7 +11,7 @@ jobs:
|
|||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
os: [ubuntu-20.04, windows-latest]
|
||||
python-version: [3.5, 3.6, 3.7, 3.8, 3.9, 3.10.0, 3.11.0]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -40,7 +40,7 @@ jobs:
|
|||
python -m pytest test --cov=samila --cov-report=term
|
||||
env:
|
||||
NFT_STORAGE_API_KEY: ${{ secrets.NFT_STORAGE_API_KEY }}
|
||||
if: matrix.python-version == 3.8 && matrix.os == 'ubuntu-latest'
|
||||
if: matrix.python-version == 3.8 && matrix.os == 'ubuntu-20.04'
|
||||
- name: Version check
|
||||
run: |
|
||||
python otherfiles/version_check.py
|
||||
|
@ -55,11 +55,11 @@ jobs:
|
|||
run: |
|
||||
pip install notebook>=5.2.2
|
||||
python otherfiles/notebook_check.py
|
||||
if: matrix.python-version == 3.8 && matrix.os == 'ubuntu-latest'
|
||||
if: matrix.python-version == 3.8 && matrix.os == 'ubuntu-20.04'
|
||||
- name: Codecov
|
||||
run: |
|
||||
codecov
|
||||
if: matrix.python-version == 3.8 && matrix.os == 'ubuntu-latest'
|
||||
if: matrix.python-version == 3.8 && matrix.os == 'ubuntu-20.04'
|
||||
- name: cProfile
|
||||
run: |
|
||||
python -m cProfile -s cumtime otherfiles/samila_profile.py
|
||||
|
|
|
@ -15,8 +15,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|||
- `upload_config` parameter added to `nft_storage` method
|
||||
- `generate` method optimized
|
||||
- Test system modified
|
||||
- `README.md` updated
|
||||
- `Python 3.11` added to `test.yml`
|
||||
- `plot` method warning bug fixed
|
||||
- Random mode modified
|
||||
### Removed
|
||||
- `fill_data` function
|
||||
## [0.9] - 2022-09-28
|
||||
|
|
14
README.md
14
README.md
|
@ -25,7 +25,6 @@
|
|||
* [Mathematical Details](https://github.com/sepandhaghighi/samila#mathematical-details)
|
||||
* [Try Samila in Your Browser](https://github.com/sepandhaghighi/samila#try-samila-in-your-browser)
|
||||
* [Issues & Bug Reports](https://github.com/sepandhaghighi/samila#issues--bug-reports)
|
||||
* [Dependencies](https://github.com/sepandhaghighi/samila#dependencies)
|
||||
* [Social Media](https://github.com/sepandhaghighi/samila#social-media)
|
||||
* [Contribution](https://github.com/sepandhaghighi/samila/blob/master/.github/CONTRIBUTING.md)
|
||||
* [References](https://github.com/sepandhaghighi/samila#references)
|
||||
|
@ -401,19 +400,6 @@ You can also join our discord server
|
|||
</a>
|
||||
|
||||
|
||||
## Dependencies
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td align="center">master</td>
|
||||
<td align="center">dev</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="https://requires.io/github/sepandhaghighi/samila/requirements/?branch=master"><img src="https://requires.io/github/sepandhaghighi/samila/requirements.svg?branch=master" alt="Requirements Status" /></a></td>
|
||||
<td align="center"><a href="https://requires.io/github/sepandhaghighi/samila/requirements/?branch=dev"><img src="https://requires.io/github/sepandhaghighi/samila/requirements.svg?branch=dev" alt="Requirements Status" /></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
## Social media
|
||||
|
||||
1. [Instagram](https://www.instagram.com/samila_arts)
|
||||
|
|
|
@ -19,7 +19,7 @@ from .params import NO_FIG_ERROR_MESSAGE, FIG_SAVE_SUCCESS_MESSAGE, NFT_STORAGE_
|
|||
from .params import INVALID_COLOR_TYPE_ERROR, COLOR_SIZE_ERROR
|
||||
from .params import BOTH_COLOR_COMPLEMENT_WARNING, COLOR_NOT_FOUND_WARNING
|
||||
from .params import DATA_SAVE_SUCCESS_MESSAGE, SEED_LOWER_BOUND, SEED_UPPER_BOUND
|
||||
from .params import ELEMENTS_LIST, ARGUMENTS_LIST, OPERATORS_LIST, RANDOM_COEF_LIST
|
||||
from .params import ELEMENTS_LIST, ARGUMENTS_LIST, OPERATORS_LIST, RANDOM_COEF_LIST, RANDOM_EQUATION_GEN_COMPLEXITY
|
||||
from .errors import samilaDataError, samilaPlotError, samilaConfigError
|
||||
from warnings import warn
|
||||
|
||||
|
@ -30,7 +30,7 @@ def random_equation_gen():
|
|||
|
||||
:return: equation as str
|
||||
"""
|
||||
num_elements = random.randint(1, len(ELEMENTS_LIST))
|
||||
num_elements = random.randint(1, RANDOM_EQUATION_GEN_COMPLEXITY)
|
||||
result = ""
|
||||
index = 1
|
||||
random_coef = random.choice(RANDOM_COEF_LIST)
|
||||
|
|
|
@ -123,6 +123,7 @@ ELEMENTS_LIST = [
|
|||
"{0}*math.tanh({1})",
|
||||
"{0}*math.cos({1})",
|
||||
"{0}*math.sin({1})",
|
||||
"{0}*math.tan({1})",
|
||||
"{0}*{1}",
|
||||
"{0}*abs({1})",
|
||||
"{0}*math.ceil({1})",
|
||||
|
@ -149,3 +150,5 @@ ARGUMENTS_LIST = [
|
|||
"y*(x**3)"]
|
||||
|
||||
OPERATORS_LIST = ["+", "-", "*", "/"]
|
||||
|
||||
RANDOM_EQUATION_GEN_COMPLEXITY = len(ELEMENTS_LIST) + 1
|
||||
|
|
Ładowanie…
Reference in New Issue