A simple version of the Sieve of Eratosthenes. Developed during "Python for Scientific Computing" course at CINECA
Project description
colanderpy
A simple version of the Sieve of Eratosthenes.
Developed during "Python for Scientific Computing" course at CINECA
Install from source
Clone repository
git clone https://gitlab.hpc.cineca.it/cineca-hpyc/colanderpy.git
cd colanderpy
Standard installation
Install in editable mode for development:
pip install -e .
Or install with development dependencies (pytest):
pip install -e ".[dev]"
Install directly from Git repository
pip install git+https://gitlab.hpc.cineca.it/cineca-hpyc/colanderpy.git
Install from Python Package Index (PyPI)
Once deployed to PyPI:
pip install colanderpy
Install from GitLab Package Registry
Once deployed to GitLab's private registry:
pip install colanderpy --index-url https://gitlab.hpc.cineca.it/api/v4/projects/471/packages/pypi/simple
Usage
Prime number generator
$ sieve -n 42
2 3 5 7 11 13 17 19 23 29 31 37 41
$ sieve -h
usage: sieve [-h] [-n LIMIT]
The Sieve of Eratosthenes.
Returns the list of prime numbers up to a maximum integer.
optional arguments:
-h, --help show this help message and exit
-n LIMIT, --limit LIMIT
maximum integer up to which the prime numbers are searched. (default 100)
Prime-counting function
$ prime-counting -n 42
13
$ prime-counting -h
usage: prime-counting [-h] [-n LIMIT]
Prime-counting function
Counts the number of prime numbers less than or equal to an integer number.
optional arguments:
-h, --help show this help message and exit
-n LIMIT, --limit LIMIT
maximum integer up to which the prime numbers are counted. (default 100)
Run tests
To run the test suite, use pytest:
pytest test/
With coverage:
pytest test/ --cov=colanderpy
CI/CD
This project uses GitLab CI/CD for continuous integration and deployment. The pipeline is defined in the .gitlab-ci.yml file located in the root directory of the repository.
For more information on how CI/CD is implemented at CINECA, please refer to the documentation: https://docs.hpc.cineca.it/general/access.html#continuous-integration-ci-cd-at-cineca
Authors
- Sergio Orlandini (s.orlandini@cineca.it)
- Michele Mastropietro (m.mastropietro@cineca.it)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file colanderpy-0.7.2.tar.gz.
File metadata
- Download URL: colanderpy-0.7.2.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd0f7f8b17d8a60c6180888e6e3672e1df52e87f0daf5e43415d853c5d7b1b58
|
|
| MD5 |
16fc1dbf4eaf303510fc21aecf2160e2
|
|
| BLAKE2b-256 |
de6ef999d74d02946a544f9d7d7b02e3f8fe1bb1d5e92df31772d6dfb2f5123a
|
File details
Details for the file colanderpy-0.7.2-py3-none-any.whl.
File metadata
- Download URL: colanderpy-0.7.2-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e60747817f95727c706066f35a17d1ea68494e75d732e5c538872110ec12c90
|
|
| MD5 |
796b4abe7f606d404a7a0929a4f37627
|
|
| BLAKE2b-256 |
965b4ad70e993f386f2c7c45110d8ad941cc1fc5f07b59771a9af1f955a6651d
|