Skip to main content

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

colanderpy-0.7.1.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

colanderpy-0.7.1-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file colanderpy-0.7.1.tar.gz.

File metadata

  • Download URL: colanderpy-0.7.1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for colanderpy-0.7.1.tar.gz
Algorithm Hash digest
SHA256 68ce2f69ce87290faa478d4027a621299180897d07dac78bd6e47cf08207e445
MD5 6a6adbc7144eff73a9db2f291424da24
BLAKE2b-256 7deec86be2b59e325d27833b432efdf69932347a591096dda87ef3c86675afac

See more details on using hashes here.

File details

Details for the file colanderpy-0.7.1-py3-none-any.whl.

File metadata

  • Download URL: colanderpy-0.7.1-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for colanderpy-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4df5aeda0e14e200f2e3ef915880052e30d46bf1812fb8e99fe2de9bc1f50fcd
MD5 a644d6139d2b513d6bcdd5687d421d9a
BLAKE2b-256 1ab3d43dcaea57d03ae1839cd2b1e843ce5051b74865863b73eb9f0f0f78f4eb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page