Skip to main content

A very simple Hello world app to submit a job using pycalrissian

Project description

simple-app-with-pycalrissian

A very simple Hello world app to submit a job using pycalrissian

To create mamba environment please execute this command:

mamba create -n hello_world_pycalrissian -c conda-forge python=3.8 tomli unidep twine
mamba activate hello_world_pycalrissian

To create a module using pyproject.toml with conda dependencies in a particular channel please execute the code below:

unidep install .    # this will create build folder

To create a module using pyproject.toml with PIP dependencies please execute the code below:

pip install .    # this will create build folder

Create a simple python app to submit a job using pycalrissian. The app will only print a very basic hello world.

How to create PYPI package:

You need to install some packages to create dist/* directory including .whl and .tar.gz files:

  • Check the python and pip version by environment
## 
which python
which pip
  • Update pip and install dist folder using the python specific version and build library: EX:
/home/t2/micromamba/envs/hello_world_pycalrissian/bin/python -m pip install --upgrade pip
/home/t2/micromamba/envs/hello_world_pycalrissian/bin/pip install twine build
  • Create API token on PYPI account and configure it under $HOME/.pypirc file as below:
[pypi]
  username = __token__
  password = pypi-...

  • Create dist folder:
/home/t2/micromamba/envs/hello_world_pycalrissian/bin/python -m build

Now you need to publish your application packages on PYPI:

twine upload dist/*

How to use the package in an isolated environment:

  • Create an environment.yaml containing this contex:
name: hello_world_pycalrissian_env
channels:
  - conda-forge
  - terradue
dependencies:
  - python=3.8
  - click2cwl
  - pycalrissian
  - pip
  - pip:
    - hello-world-pycalrissian

Then you can easily import the moduleto your app.

How to use pycalrissian to submit a job:

sudo snap install microk8s --classic sudo usermod -a -G microk8s t2 sudo chown -R t2 ~/.kube newgrp microk8s microk8s status --wait-ready

microk8s enable dashboard microk8s enable dns microk8s enable registry microk8s enable istio

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

hello_world_pycalrissian-0.0.6.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

hello_world_pycalrissian-0.0.6-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file hello_world_pycalrissian-0.0.6.tar.gz.

File metadata

File hashes

Hashes for hello_world_pycalrissian-0.0.6.tar.gz
Algorithm Hash digest
SHA256 a82bf9cfea1d646b52090b01d799f5e32bdee632765987c3ed80ab47bb0e7c2a
MD5 61f4325fb8add274cacd7473788cbe83
BLAKE2b-256 1f0112457521270a542bc121fc6582ec8391a7a6d80d305528bd67f8d531ccc0

See more details on using hashes here.

File details

Details for the file hello_world_pycalrissian-0.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for hello_world_pycalrissian-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 864d9a5661b56305b12969d2e48c0b263f64246bf6f92bbaa3ca4552b0ba74c4
MD5 00d6bd9779e14fddf79102f4ccad6fe3
BLAKE2b-256 1f1e155552cb617079b31b39b0b053be5d551d30bb9920c3afa59249dcd2efe3

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