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.0.tar.gz (4.4 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.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: colanderpy-0.7.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for colanderpy-0.7.0.tar.gz
Algorithm Hash digest
SHA256 e1cc881ccf2fc940a7350e6e5c76e5d66edcb48f4794625496224a6563dce78f
MD5 7ac15b993bab99eaac5ee2e41800fcd2
BLAKE2b-256 23e6ea4e3d3ed4dbcaabf8acebc3b456de844f910d0fe8ad58c8db3cf1b6aa67

See more details on using hashes here.

File details

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

File metadata

  • Download URL: colanderpy-0.7.0-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.14.0

File hashes

Hashes for colanderpy-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 88d712a5266cb0ffe38f7e2be9f811c9d4976467e65a12b424a587ebb62d3446
MD5 deea3b6d3b7106aef68b5b59f2848827
BLAKE2b-256 ab1ff33ba63356b0ac8a8d8b5fc523c636ae689ed16b315a472d76e33477d594

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