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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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