Skip to main content

No project description provided

Project description

omnipy-examples

Example projects that that makes use of the omnipy package for type-driven, scalable and interoperable data wrangling!

Main installation instructions

  • Install:
    • pip install omnipy-examples
  • Run example scripts:
    • Example: omnipy-examples isajson
    • For help on the command line interface: omnipy-examples --help
    • For help on a particular example: omnipy-examples isajson --help

Output of flow runs

The output will by default appear in the data directory, with a timestamp.

  • It is recommended to install a file viewer that are capable of browsing tar.gz files. For instance, the "File Expander" plugin in PyCharm is excellent for this.
  • To unpack the compressed files of a run on the command line (just make sure to replace the datetime string from this example):
for f in $(ls data/2023_02_03-12_51_51/*.tar.gz); do mkdir ${f%.tar.gz}; tar xfzv $f -C ${f%.tar.gz}; done

Run with the Prefect engine

Omnipy is integrated with the powerful Prefect data flow orchestration library.

  • To run an local example using the prefect engine, e.g.:
    • omnipy-examples --engine prefect isajson
  • After completion of some runs, you can check the flow logs and orchestration options in the Prefect UI:
    • prefect server start

To set up a kubernetes-based deployment on our NIRD test setup, run e.g.:

  • prefect config set PREFECT_API_URL=https://prefect.fairtracks.sigma2.no/api
  • prefect deploy -n isajson

The configuration of this job is found in the file prefect.yaml.

More info on Prefect configuration will come soon...

Development setup

  • Install Poetry:

    • curl -sSL https://install.python-poetry.org | python3 -
  • Install dependencies:

    • poetry install --with dev
  • Update all dependencies:

    • poetry update
  • Update single dependency, e.g.:

    • poetry update omnipy
  • If a dependency is not updated to the latest version available on Pypi, you might need to clear the pip cache of poetry:

    • poetry cache clear pypi --all

For mypy support in PyCharm

  • In PyCharm, install "Mypy" plugin (not "Mypy (Official)")
    • which mypy to get path to mypy binary
    • In the PyCharm settings for the mypy plugin:
      • Select the mypy binary
      • Select pyproject.toml as the mypy config file

For automatic formatting and linting

I have added my typical setup for automatic formatting and linting. The main alternative is to use black, which is easier to set up, but it does not have as many options. I am not fully happy with my config, but I at least like it better than black.

  • In PyCharm -> File Watchers:
    • Click arrow down icon
    • Select watchers.xml

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

omnipy_examples-0.6.6.tar.gz (24.5 kB view details)

Uploaded Source

Built Distribution

omnipy_examples-0.6.6-py3-none-any.whl (50.9 kB view details)

Uploaded Python 3

File details

Details for the file omnipy_examples-0.6.6.tar.gz.

File metadata

  • Download URL: omnipy_examples-0.6.6.tar.gz
  • Upload date:
  • Size: 24.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.8 Darwin/21.6.0

File hashes

Hashes for omnipy_examples-0.6.6.tar.gz
Algorithm Hash digest
SHA256 852d26229f3175b7d974c39414be826fb69d00c314ca4cd935ea487176dc4983
MD5 042c1f45e32bb4e8099e220a4b5de604
BLAKE2b-256 57837d0764e2ae2015b1868b9bdce964da34cdd094665b5486cc1e243413c253

See more details on using hashes here.

File details

Details for the file omnipy_examples-0.6.6-py3-none-any.whl.

File metadata

  • Download URL: omnipy_examples-0.6.6-py3-none-any.whl
  • Upload date:
  • Size: 50.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.8 Darwin/21.6.0

File hashes

Hashes for omnipy_examples-0.6.6-py3-none-any.whl
Algorithm Hash digest
SHA256 322966ebf37dc57d8eb4d05ee87122eee923529f777b4984c851cf7bf8d77e43
MD5 428e9edc879a5d1b9b695f85108c2c14
BLAKE2b-256 c1e16b5eca22ed40fc5d86c4e5e2530219714f9e18fdc40314bdc7d116f06f8f

See more details on using hashes here.

Supported by

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