Skip to content

Commit

Permalink
pypi package trails stable
Browse files Browse the repository at this point in the history
Signed-off-by: Amith <amitharun3@gmail.com>
  • Loading branch information
amithm3 committed Oct 15, 2022
1 parent 290c1c0 commit f64a035
Show file tree
Hide file tree
Showing 8 changed files with 78 additions and 57 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# MANIFEST.in

include docs/*
include src/NPerlinNoise/*.toml
include src/NPerlinNoise/*
include snaps/*
include tests/*
include README_pypi.md
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -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<br>
> **All Packages**: [releases](https://github.com/Amith225/NPerlinNoise/releases)<br>
> **PyPI**: [v0.1.2a10](https://test.pypi.org/project/NPerlinNoise/0.1.2a10/)<br>
> [CHANGELOG](docs/CHANGELOG.md)<br>
**Screenshots**:
- raw
Expand Down Expand Up @@ -41,14 +43,15 @@
---

## Dependencies
- Python>=3.10.0
- `Python>=3.10.0`

for production dependencies see [Requirements](requirements.txt)<br>
for development dependencies see [Dev-Requirements](requirements_dev.txt)

## Installation
for detailed instruction on installation see [INSTALLATION](docs/INSTALL.md).

<a id="usage"></a>
## Usage
for detailed usage see [EXAMPLE](tests/main.py)

Expand Down Expand Up @@ -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

Expand Down
51 changes: 27 additions & 24 deletions READMEpypi.md → README_pypi.md
Original file line number Diff line number Diff line change
@@ -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<br>
> **All Packages**: [releases](https://github.com/Amith225/NPerlinNoise/releases)<br>
> **PyPI**: [](https://github.com/Amith225/NPerlinNoise/blob/master/)<br>
> [CHANGELOG](https://github.com/Amith225/NPerlinNoise/blob/master/docs/CHANGELOG.md)<br>
**Screenshots**:
- raw
Expand Down Expand Up @@ -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)<br>
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).

<a id="usage"></a>
## 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,
Expand All @@ -76,24 +79,24 @@ 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/)

----

## 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
11 changes: 9 additions & 2 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
41 changes: 24 additions & 17 deletions readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

from setuptools import setup

setup()
setup(include_package_data=True)

0 comments on commit f64a035

Please sign in to comment.