Skip to main content

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

Release files for colanderpy 0.7.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for colanderpy 0.7.2
File Size Uploaded
colanderpy-0.7.2.tar.gz 4.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for colanderpy 0.7.2
File Interpreter ABI Platform
colanderpy-0.7.2-py3-none-any.whl Python 3 none any Details

Total release size: 8.3 kB

Release files / colanderpy-0.7.2.tar.gz

Download URL colanderpy-0.7.2.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
fd0f7f8b17d8a60c6180888e6e3672e1df52e87f0daf5e43415d853c5d7b1b58
BLAKE2b-256 checksum
How to use checksums
de6ef999d74d02946a544f9d7d7b02e3f8fe1bb1d5e92df31772d6dfb2f5123a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / colanderpy-0.7.2-py3-none-any.whl

Download URL colanderpy-0.7.2-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8e60747817f95727c706066f35a17d1ea68494e75d732e5c538872110ec12c90
BLAKE2b-256 checksum
How to use checksums
965b4ad70e993f386f2c7c45110d8ad941cc1fc5f07b59771a9af1f955a6651d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release history Release notifications | RSS feed

This release

0.7.2 This release

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.2

1 release file

0.6.1

1 release file

0.6.0

1 release file

0.5.2

1 release file

0.5.1

2 release files

0.5.0

1 release file

0.4.1

1 release file

0.4.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page