Skip to main content

CosApp Creator

cosapp_creator is a Django application providing a web interface to create CosApp systems.

Installation

You can install cosapp_creator using pip or conda

# Using pip
pip install cosapp_creator
# Using conda
conda install -c conda-forge cosapp_creator

Getting started

cosapp_creator provides the cosapp-creator command to interact with the web server.

  • Before starting the application for the first time, you need to create the database:
cosapp-creator migrate
  • To start the application in production mode, you need to have gunicorn installed:
# Start the web server at the default 8000 port
cosapp-creator start

cosapp-creator uses gunicorn to serve the Django application, any arguments after start will be passed to gunicorn. You can refer to gunicorn documentation for advanced configuration, for example, to start the application with 4 workers:

cosapp-creator start --workers 4

By default, the frontend will connect to the API server at http://127.0.0.1:8000, you can modify this URL by setting the variable COSAPP_CREATOR_BASE_URL before starting up the server:

# Start the web server at a custom port
COSAPP_CREATOR_BASE_URL=http://127.0.0.1:1234 cosapp-creator start -b 0.0.0.0:1234
  • To start the application in development mode:
cosapp-creator runserver
  • To show all available commands:
cosapp-creator -h

Using the application

alt text

Import package

The first step in creating an assembly is to import a package. To do so, the "Import Package/Assembly" button must be clicked, and the JSON file describing the Python module must be imported. This file can be generated by the parse_module function in CoSApp.

Use resulting code

Clicking on "Generate code" will display a frame containing the code to create the object class in the graph. To use it, this code needs to be executed in a Python environment in which the modules used by the assembly are installed. This code will create the class. To instantiate an object, systemName = ClassName('systemName') has to be added after the code for the class.

# Code generated by CoSApp Creator
from cosapp.base import System
import module

class Assembly(System):
    def setup(self):
        self.add_child(module.SystemClass('sys1'))
        self.add_child(module.SystemClass('sys2'))

    def compute(self):
        pass

# Instanciate object
assembly = Assembly('assembly')

Change assembly or child system names

In order to change the name of the assembly or the name of any child system, the old name must be double-clicked. An input field will appear, and it will be possible to write a new name. To confirm it, it is possible to click "Enter" or to just click outside of the field.

alt text

Get details on ports

A description of a port in a child system will be shown by hovering over it with the mouse. If more details are needed, it is possible to click on the port, and a more detailed description will be shown.

Port description before clicking :

alt text

Port description after click :

alt text

Kwargs

It is possible to change the value of each kwargs in a system by right-clicking this system. However, if the value of a kwarg changes the structure of a system, this change will ne be reflected in CoSApp Creator, and it may cause bugs.

alt text

Pullings

The assembly inputs and outputs are represented by these two nodes.

alt text

New pullings are created by linking any port from a child system to the white symbol.

It is also possible to link two children inputs to one parent input, by linking one parent port to two children.

alt text

Loops and mathematical problem

Each system's mathematical problem, if it exists, can be viewed by hovering over its sigma symbol.

Metadata

Release files for cosapp-creator 0.1.1

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

Source distribution (sdist)

Source distribution for cosapp-creator 0.1.1
File Size Uploaded Provenance
cosapp_creator-0.1.1.tar.gz 711.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for cosapp-creator 0.1.1
File Interpreter ABI Platform
cosapp_creator-0.1.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 1.2 MB

Release files / cosapp_creator-0.1.1.tar.gz

Download URL cosapp_creator-0.1.1.tar.gz
Size 711.9 kB
Tags Source
SHA-256 checksum
How to use checksums
05118d7cfe9b9677b11c3dec47154ed4590fcc288108a2897a0221d0993c4b97
BLAKE2b-256 checksum
How to use checksums
48d39e122c9a061507423bd1d2de729a153aca16926b19d93ad20583116643ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.9

Release files / cosapp_creator-0.1.1-py2.py3-none-any.whl

Download URL cosapp_creator-0.1.1-py2.py3-none-any.whl
Size 495.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
7973b35d233867800d2cdde2fefbd24945f699024c5cb24d4517f322915da149
BLAKE2b-256 checksum
How to use checksums
fbf70432f60c33878a997a8c79324fbff4a30dff74e843ff3204ce65a86a46b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.9

Security for cosapp-creator 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

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