diff --git a/LICENSE b/LICENSE index 1613da7..62293b2 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022 Amith M +Copyright (c) 2022 Amith225 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/MANIFEST.in b/MANIFEST.in index db5a746..fd1584b 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,6 +1,7 @@ # MANIFEST.in include docs/* -include src/NPerlinNoise/*.toml +include src/NPerlinNoise/* include snaps/* include tests/* +include README_pypi.md diff --git a/README.md b/README.md index 6b292a5..eb6c43b 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,20 @@ # N Perlin Noise ### A robust open source implementation of Perlin Noise Algorithm for N-Dimensions in Python. -- A powerful and fast API for n-dimensional noise. -- Easy hyper-parameters selection of octaves, lacunarity and persistence +- A _powerful_ and _fast_ API for _n-dimensional_ noise. +- Easy hyper-parameters selection of _octaves_, _lacunarity_ and _persistence_ as well as complex and customizable hyper-parameters for n-dimension - frequency, waveLength, warp(interpolation) and range. + _frequency_, _waveLength_, _warp_(interpolation) and _range_. - Includes various helpful tools for noise generation and for procedural generation tasks - such as customizable Gradient, Warp classes. -- Implements custom PRNG generator for n-dimension and can be easily tuned. + such as customizable _Gradient_, _Color Gradients_, _Warp_ classes. +- Implements custom _PRNG_ generator for n-dimension and can be easily tuned. **Details**: - **Technology stack**: - - **Status**: [v0.1.2-alpha](https://github.com/Amith225/NPerlinNoise/releases/tag/v0.1.2-alpha) - - [CHANGELOG](docs/CHANGELOG.md) + > **Status**: **`v0.1.2-alpha9`** Packaging Trails
+ > **All Packages**: [releases](https://github.com/Amith225/NPerlinNoise/releases)
+ > **PyPI**: [v0.1.2a10](https://test.pypi.org/project/NPerlinNoise/0.1.2a10/)
+ > [CHANGELOG](docs/CHANGELOG.md)
**Screenshots**: - raw @@ -41,7 +43,7 @@ --- ## Dependencies -- Python>=3.10.0 +- `Python>=3.10.0` for production dependencies see [Requirements](requirements.txt)
for development dependencies see [Dev-Requirements](requirements_dev.txt) @@ -49,6 +51,7 @@ for development dependencies see [Dev-Requirements](requirements_dev.txt) ## Installation for detailed instruction on installation see [INSTALLATION](docs/INSTALL.md). + ## Usage for detailed usage see [EXAMPLE](tests/main.py) @@ -76,7 +79,7 @@ open a [discussion](https://github.com/Amith225/NPerlinNoise/discussions/7) in t ## Getting involved -- Looking for Contributors for WebApps +- `Looking for Contributors for WebApps` - [Fork](https://github.com/Amith225/NPerlinNoise/fork) the repository and issue a [PR](https://github.com/Amith225/NPerlinNoise/pulls) to contribute diff --git a/READMEpypi.md b/README_pypi.md similarity index 57% rename from READMEpypi.md rename to README_pypi.md index a41a212..ba84102 100644 --- a/READMEpypi.md +++ b/README_pypi.md @@ -1,18 +1,20 @@ # N Perlin Noise ### A robust open source implementation of Perlin Noise Algorithm for N-Dimensions in Python. -- A powerful and fast API for n-dimensional noise. -- Easy hyper-parameters selection of octaves, lacunarity and persistence +- A _powerful_ and _fast_ API for _n-dimensional_ noise. +- Easy hyper-parameters selection of _octaves_, _lacunarity_ and _persistence_ as well as complex and customizable hyper-parameters for n-dimension - frequency, waveLength, warp(interpolation) and range. + _frequency_, _waveLength_, _warp_(interpolation) and _range_. - Includes various helpful tools for noise generation and for procedural generation tasks - such as customizable Gradient, Warp classes. -- Implements custom PRNG generator for n-dimension and can be easily tuned. + such as customizable _Gradient_, _Color Gradients_, _Warp_ classes. +- Implements custom _PRNG_ generator for n-dimension and can be easily tuned. **Details**: - **Technology stack**: - - **Status**: [v0.1.2-alpha](https://github.com/Amith225/NPerlinNoise/releases/tag/v0.1.2-alpha) - - [CHANGELOG](https://raw.github.com/Amith225/NPerlinNoise/master/docs/CHANGELOG.md) + > **Status**: **`v0.1.2-alpha9`** Packaging Trails
+ > **All Packages**: [releases](https://github.com/Amith225/NPerlinNoise/releases)
+ > **PyPI**: [](https://github.com/Amith225/NPerlinNoise/blob/master/)
+ > [CHANGELOG](https://github.com/Amith225/NPerlinNoise/blob/master/docs/CHANGELOG.md)
**Screenshots**: - raw @@ -41,33 +43,34 @@ --- ## Dependencies -- Python>=3.10.0 +- `Python>=3.10.0` for production dependencies see [Requirements](https://raw.github.com/Amith225/NPerlinNoise/master/requirements.txt)
for development dependencies see [Dev-Requirements](https://raw.github.com/Amith225/NPerlinNoise/master/requirements_dev.txt) ## Installation -for detailed instruction on installation see [INSTALLATION](https://raw.github.com/Amith225/NPerlinNoise/master/docs/INSTALL.md). +for detailed instruction on installation see [INSTALLATION](https://github.com/Amith225/NPerlinNoise/blob/master/docs/INSTALL.md). + ## Usage -for detailed usage see [EXAMPLE](https://raw.github.com/Amith225/NPerlinNoise/master/tests/main.py) +for detailed usage see [EXAMPLE](https://github.com/Amith225/NPerlinNoise/blob/master/tests/main.py) ## How to test the software -- To test overalls run [main](https://raw.github.com/Amith225/NPerlinNoise/master/tests/main.py) -- To test Logical consistency run [testLogic](https://raw.github.com/Amith225/NPerlinNoise/master/tests/testLogic.py) -- To test Profile Benchmarking run [testProfile](https://raw.github.com/Amith225/NPerlinNoise/master/tests/testProfile.py) -- To test Visuals run [testVisuals](https://raw.github.com/Amith225/NPerlinNoise/master/tests/testVisuals.py) -- To test Colors run [testCol](https://raw.github.com/Amith225/NPerlinNoise/master/tests/testCol.py) +- To test overalls run [main](https://github.com/Amith225/NPerlinNoise/blob/master/tests/main.py) +- To test Logical consistency run [testLogic](https://github.com/Amith225/NPerlinNoise/blob/master/tests/testLogic.py) +- To test Profile Benchmarking run [testProfile](https://github.com/Amith225/NPerlinNoise/blob/master/tests/testProfile.py) +- To test Visuals run [testVisuals](https://github.com/Amith225/NPerlinNoise/blob/master/tests/testVisuals.py) +- To test Colors run [testCol](https://github.com/Amith225/NPerlinNoise/blob/master/tests/testCol.py) -to see all tests see [Tests](https://raw.github.com/Amith225/NPerlinNoise/master/tests) +to see all tests see [Tests](https://github.com/Amith225/NPerlinNoise/blob/master/tests) ## Known issues - **_`No Known Bugs`_** - **_`NPerlin.findBounds is bottleneck`_** ## Getting help -- Check [main.py](https://raw.github.com/Amith225/NPerlinNoise/master/tests/main.py) for detailed usage -- Check [docs](https://raw.github.com/Amith225/NPerlinNoise/master/docs) for all documentations +- Check [main.py](https://github.com/Amith225/NPerlinNoise/blob/master/tests/main.py) for detailed usage +- Check [docs](https://github.com/Amith225/NPerlinNoise/blob/master/docs) for all documentations - Check [Usage](#usage) Section If you have questions, concerns, bug reports, etc, @@ -76,17 +79,17 @@ open a [discussion](https://github.com/Amith225/NPerlinNoise/discussions/7) in t ## Getting involved -- Looking for Contributors for WebApps +- `Looking for Contributors for WebApps` - [Fork](https://github.com/Amith225/NPerlinNoise/fork) the repository and issue a [PR](https://github.com/Amith225/NPerlinNoise/pulls) to contribute -General instructions on _how_ to contribute [CONTRIBUTING](https://raw.github.com/Amith225/NPerlinNoise/master/docs/CONTRIBUTING.md). +General instructions on _how_ to contribute [CONTRIBUTING](https://github.com/Amith225/NPerlinNoise/blob/master/docs/CONTRIBUTING.md). ---- ## Open source licensing info -1. [TERMS](https://raw.github.com/Amith225/NPerlinNoise/master/docs/TERMS.md) -2. [LICENSE](https://raw.github.com/Amith225/NPerlinNoise/master/LICENSE) +1. [TERMS](https://github.com/Amith225/NPerlinNoise/blob/master/docs/TERMS.md) +2. [LICENSE](https://github.com/Amith225/NPerlinNoise/blob/master/LICENSE) 3. [CFPB Source Code Policy](https://github.com/cfpb/source-code-policy/) ---- @@ -94,6 +97,6 @@ General instructions on _how_ to contribute [CONTRIBUTING](https://raw.github.c ## Credits and references 1. Inspired from [The Coding Train](https://www.youtube.com/channel/UCvjgXvBlbQiydffZU7m1_aw) -> [perlin noise](https://thecodingtrain.com/challenges/24-perlin-noise-flow-field) 2. hash function by [xxhash](https://github.com/Cyan4973/xxHash) - inspired the [rand3](https://raw.github.com/Amith225/NPerlinNoise/master/src/NPerlinNoise/tools.py) algo - and ultimately helped for O(1) time complexity n-dimensional random generator [NPrng](https://raw.github.com/Amith225/NPerlinNoise/master/src/NPerlinNoise/tools.py) + inspired the [rand3](https://github.com/Amith225/NPerlinNoise/blob/master/src/NPerlinNoise/tools.py) algo + and ultimately helped for O(1) time complexity n-dimensional random generator [NPrng](https://github.com/Amith225/NPerlinNoise/blob/master/src/NPerlinNoise/tools.py) 3. [StackOverflow](https://stackoverflow.com/) for helping on various occasions throughout the development diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 40f2f9f..052c0ad 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,3 +1,10 @@ -## v0.1.0@alpha: +## v0.1.0-alpha: - first public release -- docs pending + +## v0.1.[1,2]-alpha: +- bugs fixed +- docs implemented +- readability improved + +## v0.1.2-alpha[x]: +- packaging trails diff --git a/pyproject.toml b/pyproject.toml index c9ebc9c..a1d58d2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,9 +6,9 @@ build-backend = "setuptools.build_meta" [project] name = "NPerlinNoise" -version = "0.1.2-alpha4" +version = "0.1.2-alpha10" description = "A robust open source implementation of Perlin Noise Algorithm for N-Dimensions" -readme = "READMEpypi.md" +readme = "README_pypi.md" authors = [{ name = "Amith225", email = "amitharun3@gmail.com" }] license = { file = "LICENSE" } classifiers = [ diff --git a/readme.py b/readme.py index 1556873..d507656 100644 --- a/readme.py +++ b/readme.py @@ -10,22 +10,29 @@ def find_all(a_str, sub, overlap=False): start_ += len(sub) -with open('README.md', 'r') as file: - content = file.read() +def get_embed_readme(): + with open('README.md', 'r') as _file: + content = _file.read() -_content = "" -_end = -1 -ignore = ["#usage"] -base = 'https://raw.github.com/Amith225/NPerlinNoise/master/' -for start, end in zip(find_all(content, '['), find_all(content, ']')): - _content += content[_end + 1:start] - end += 1 - alt_text = content[start:end] - _start, _end = end + 1, content.find(')', end) - link = content[_start:_end] - if not link.startswith('http') and link not in ignore: link = base + link - _content += alt_text + f"({link})" -_content += content[_end + 1:] + _content = "" + _end = -1 + ignore = ["#usage"] + raw = ['.png', '.txt'] + base_raw = 'https://raw.github.com/Amith225/NPerlinNoise/master/' + base = 'https://github.com/Amith225/NPerlinNoise/blob/master/' + for start, end in zip(find_all(content, '['), find_all(content, ']')): + _content += content[_end + 1:start] + end += 1 + alt_text = content[start:end] + _start, _end = end + 1, content.find(')', end) + link = content[_start:_end] + if not link.startswith('http') and link not in ignore: + link = (base_raw if any(link.endswith(r) for r in raw) else base) + link + _content += alt_text + f"({link})" + _content += content[_end + 1:] -with open('READMEpypi.md', 'w+') as file: - file.write(_content) + return _content + + +with open('README_pypi.md', 'w+') as file: + file.write(get_embed_readme()) diff --git a/setup.py b/setup.py index ad1ad5d..ec52baf 100644 --- a/setup.py +++ b/setup.py @@ -2,4 +2,4 @@ from setuptools import setup -setup() +setup(include_package_data=True)