# packages

pkgId: dbc7984ccaa5e97f73105cf0531aa16f16a45aedf3a8322a4871a75efda32caf
name: python-core-ct
arch: src
version: 2.0.0
epoch: 0
release: 1
summary: A Python library to assist geologists with the analysis of rock core CT scans
url: https://pypi.org/project/core-ct/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-core-ct-2.0.0-1.src.rpm
checksum_type: sha256
description:
  The `core-ct` scan library was built to assist geologists with the visualization and analysis of the CT scans of rock cores.


  https://core-ct.readthedocs.io/en/latest/


  1. Install `poetry` using the instructions at https://python-poetry.org/docs/#installation
  2. Navigate to inside the repository
  3. Run `poetry install` to install the required dependencies
  4. Use `poetry shell` to activate the newly created virtual environment


  To help maintain a clean codebase, this project makes use of the `ruff` linter. Due to settings in the GitHub repository, branches cannot be merged into `main` unless they pass linting checks.


  As such, this repository also supports the Python `pre-commit` library, which can be used to install a git pre-commit hook that requires the code to pass a linting check before it can be committed. These pre-commit hooks are defined in the `.pre-commit-config.yaml`.

  To set up this linting hook perform the following actions:
  1. Run `poetry install` to install `pre-commit` and `ruff`
  2. Run `poetry run pre-commit install` to install the commit hooks


  If you would prefer to manually run a linting check, simply use the following command.
  ```
  poetry run ruff .
  ```


  Additionally, the Python library `black` has been specified as a development dependency for this project and it can be used to automatically format code to match the linting rules.


  Finally, if Visual Studio Code is being used as a development IDE, it has support for both `ruff` and `black` extensions to help with catching linting errors and autoformatting code.
  - https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff
  - https://marketplace.visualstudio.com/items?itemName=ms-python.black-formatter
  - https://code.visualstudio.com/docs/python/formatting


  Just as with linting, due to settings in the GitHub repository, branches cannot be merged into `main` unless they pass all tests as specified in the `tests` repository.

  To run these tests simply use the following command:
  ```
  poetry run pytest
  ```


  - https://github.com/mrsiegfried/SiegVent2023-Geology
  - https://osu-mgr.org/sedct


  This software was built by the Golden Rocks team as a part of the Fall 2023 session of the Colorado School of Mines' [CSCI-370](https://cs-courses.mines.edu/csci370/index.html) course.


  Carla Ellefsen, Kira Hanson, Connor Sparks, Asa Sprow


  Zane Jobe, Ryan Venturelli


pkgId: ee0ac41eb6bc5c48be289bf07a30f3ce0660866f37649c239b10e1c17bed7c14
name: python-core-data-structures
arch: src
version: 1.1.0
epoch: 0
release: 1
summary: This project/library contains commons data structures...
url: https://gitlab.com/bytecode-solutions/core/core-data-structures
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-core-data-structures-1.1.0-1.src.rpm
checksum_type: sha256
description:
  _______________________________________________________________________________

  This project/library contains commons data structures...




  ```commandline
  pip install --upgrade pip
  pip install virtualenv
  ```


  ```commandline
  virtualenv --python=python3.11 .venv
  ```


  ```commandline
  source .venv/bin/activate
  ```


  ```commandline
  pip install .
  ```


  ```commandline
  python manager.py run-test
  python manager.py run-coverage
  ```


pkgId: dcc1ca09b88ed44a1e3606545f5326f2dbf61bae7b63340b7a35ee4812513e31
name: python-core-datetime
arch: src
version: 1.1.0
epoch: 0
release: 1
summary: This project/library contains common elements related to date & time...
url: https://gitlab.com/bytecode-solutions/core/core-datetime
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-core-datetime-1.1.0-1.src.rpm
checksum_type: sha256
description:
  _______________________________________________________________________________

  This project/library contains common elements related to date & time...




  ```commandline
  pip install --upgrade pip
  pip install virtualenv
  ```


  ```commandline
  virtualenv --python=python3.11 .venv
  ```


  ```commandline
  source .venv/bin/activate
  ```


  ```commandline
  pip install .
  ```


  ```commandline
  python manager.py run-test
  python manager.py run-coverage
  ```


pkgId: fe25f6a792fa2150d19efc0341fa058022a52d2733920566617b1d064a12eeea
name: python-core-db
arch: src
version: 2.0.4
epoch: 0
release: 1
summary: This project/library contains common elements and clients related to database engines...
url: https://gitlab.com/bytecode-solutions/core/core-db
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-core-db-2.0.4-1.src.rpm
checksum_type: sha256
description:
  _______________________________________________________________________________

  This project/library contains common elements related to database engines and
  provides clients to simplify the connections...




  ```shell
  pip install --upgrade pip
  pip install virtualenv
  ```


  ```shell
  virtualenv --python=python3.11 .venv
  ```


  ```shell
  source .venv/bin/activate
  ```


  ```shell
  pip install .
  ```


  ```shell
  pip install '.[all]'  # For all...
  pip install '.[mysql]'
  pip install '.[postgre]'
  pip install '.[oracle]'
  pip install '.[mongo]'
  pip install '.[mssql]'
  pip install '.[snowflake]'
  pip install '.[db2]'
  ```


  ```shell
  python manager.py run-tests
  python manager.py run-coverage
  ```




  ```python
  from core_db.engines.postgres import PostgresClient

  with PostgresClient(conninfo=f"postgresql://postgres:postgres@localhost:5432/test") as client:
      client.execute("SELECT version() AS version;")
      print(client.fetch_one()[0])
  ```


  ```python
  from core_db.engines.mongo import MongoClient

  client = MongoClient(**{"host": "host", "database": "db"})
  client.connect()
  print(client.test_connection())
  ```


  ```python
  from core_db.engines.mssql import MsSqlClient

  with MsSqlClient(
          dsn="DRIVER={ODBC Driver 18 for SQL Server};SERVER=localhost;DATABASE=master;UID=SA;PWD=sOm3str0ngP@33w0rd;Encrypt=no",
          autocommit=True, timeout=5) as client:

      client.execute("SELECT @@VERSION AS 'version';")
      print(list(client.fetch_records()))
  ```


  ```python
  from core_db.engines.oracle import OracleClient

  with OracleClient(user="...", password="...", dsn=f"{host}:{port}/{service_name}") as client:
      res = client.execute("SELECT * FROM ...")
      for x in client.fetch_all():
          print(x)
  ```


  ```python
  from core_db.engines.mysql import MySQLClient

  with MySQLClient(host="localhost", user="root", password="SomePassword") as client:
      client.execute("SELECT * FROM ...;")
      for x in client.fetch_all():
          print(x)
  ```


  ```python
  ...
  ```


  We can test the clients by executing the below command. It will perform a series of
  query execution in the database engine to ensure it's working as expected. We
  must have the database engine up and running...

  Example PostgreSQL:
  ```shell
  docker run --env=POSTGRES_PASSWORD=postgres --env=PGDATA=/var/lib/postgresql/data --volume=/var/lib/postgresql/data -p 5432:5432 -d postgres:12.18-bullseye
  python manager.py run-database-test -db PostgresClient -params '{"conninfo":"postgresql://postgres:postgres@localhost:5432/postgres"}'
  ```

  Example MySQL:
  ```shell
  docker run --env=MYSQL_ROOT_PASSWORD=mysql_password --volume=/var/lib/mysql -p 3306:3306 --restart=no --runtime=runc -d mysql:latest
  python manager.py run-database-test -db MySQLClient -params '{"host": "localhost", "database": "sys", "user": "root", "password": "mysql_password"}'
  ```

  Example Oracle:
  ```shell
  docker pull container-registry.oracle.com/database/express:latest
  docker container create -it --name OracleSQL -p 1521:1521 -e ORACLE_PWD=oracle_password container-registry.oracle.com/database/express:latest
  docker start OracleSQL
  python manager.py run-database-test -db OracleClient -params '{"user": "SYSTEM", "password": "oracle_password", "dsn": "localhost:1521/xe"}'
  ```
  ![How to connect](./assets/OracleCxn.png)

  Example MsSQL:
  ```shell
  docker pull mcr.microsoft.com/mssql/server:2022-latest

  docker run\
    -e "ACCEPT_EULA=Y" \
    -e "MSSQL_SA_PASSWORD=sOm3str0ngP@33w0rd" \
    -p 1433:1433 --name MsSQL --hostname MsSQL \
    -d \
    mcr.microsoft.com/mssql/server:2022-latest

  docker start MsSQL

  sudo /bin/bash ./scripts/install_mssql_driver.sh
  python manager.py run-database-test -db MsSqlClient -params '{"dsn": "DRIVER={ODBC Driver 18 for SQL Server};SERVER=localhost;DATABASE=master;UID=SA;PWD=sOm3str0ngP@33w0rd;Encrypt=no"}'
  ```

  Example DB2:
  ```shell
  curl https://public.dhe.ibm.com/software/ibmi/products/odbc/debs/dists/1.1.0/ibmi-acs-1.1.0.list | sudo tee /etc/apt/sources.list.d/ibmi-acs-1.1.0.list
  sudo apt update
  sudo apt install ibm-iaccess
  ```


pkgId: ee73665f4f83831a3e7e89178423c70c8dba16173c92732c05ce0a17fa966b30
name: python-core-etl
arch: src
version: 1.0.4
epoch: 0
release: 1
summary: This project/library contains common elements related to ETL processes...
url: https://gitlab.com/bytecode-solutions/core/core-etl
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-core-etl-1.0.4-1.src.rpm
checksum_type: sha256
description:
  _______________________________________________________________________________

  This project/library contains common elements related to ETL processes...




  ```commandline
  pip install --upgrade pip
  pip install virtualenv
  ```


  ```commandline
  virtualenv --python=python3.11 .venv
  ```


  ```commandline
  source .venv/bin/activate
  ```


  ```commandline
  pip install .
  ```


  ```commandline
  python manager.py run-test
  python manager.py run-coverage
  ```


pkgId: 902dd348dc7ae53d08667b66942536a46278730afaf18b6f0260c634470f7de9
name: python-core-ftp
arch: src
version: 1.0.2
epoch: 0
release: 1
summary: This project/library contains common elements related to FTP connections...
url: https://gitlab.com/bytecode-solutions/core/core-ftp
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-core-ftp-1.0.2-1.src.rpm
checksum_type: sha256
description:
  _______________________________________________________________________________

  This project/library contains common elements related to FTP connections...




  ```commandline
  pip install --upgrade pip
  pip install virtualenv
  ```


  ```commandline
  virtualenv --python=python3.11 .venv
  ```


  ```commandline
  source .venv/bin/activate
  ```


  ```commandline
  pip install .
  ```


  ```commandline
  python manager.py run-test
  python manager.py run-coverage
  ```


pkgId: e0ae971524812b7103a86a4105c2fd367397bfef97d8b80ea40d42bbffc7d4f6
name: python-core-ftp
arch: src
version: 1.1.0
epoch: 0
release: 1
summary: This project/library contains common elements related to FTP connections...
url: https://gitlab.com/bytecode-solutions/core/core-ftp
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-core-ftp-1.1.0-1.src.rpm
checksum_type: sha256
description:
  _______________________________________________________________________________

  This project/library contains common elements related to FTP connections...




  ```commandline
  pip install --upgrade pip
  pip install virtualenv
  ```


  ```commandline
  virtualenv --python=python3.11 .venv
  ```


  ```commandline
  source .venv/bin/activate
  ```


  ```commandline
  pip install .
  ```


  ```commandline
  python manager.py run-tests
  python manager.py run-tests --test-type functional --pattern "*.py"
  python manager.py run-coverage
  ```




  ```shell
  pip install core-ftp
  ```


  ```python
  from core_ftp.clients.sftp import SftpClient

  with SftpClient("test.rebex.net", 22, "demo", "password") as client:
      for x in client.list_files("/"):
          print(x)
  ```

  ```python
  from core_ftp.clients.sftp import SftpClient

  with SftpClient(
          host="localhost", port=23,
          user="foo", private_key_path="key_path") as client:

      for x in client.list_files("/"):
          print(x)
  ```


  You can use docker to create an SFTP server to test the client using the functional
  tests via command `python manager.py run-tests --test-type functional --pattern "*.py"` and the following docker
  image: <atmoz/sftp> (https://hub.docker.com/r/atmoz/sftp/).


  ```shell
  docker run \
    -v ./tests/resources/upload:/home/foo/upload:rw \
    -p 22:22 -d atmoz/sftp foo:pass:::upload
  ```


  ```shell
  docker run \
    -v ./tests/resources/ssh_keys/id_rsa.pub:/home/foo/.ssh/keys/id_rsa.pub:ro \
    -v ./tests/resources/upload:/home/foo/upload:rw \
    -p 23:22 -d atmoz/sftp foo::1001
  ```


pkgId: c8f35380b1243dfb27f6c3202b8bf21aac2f4e2011132ff3fb0d378198c8bf4e
name: python-core-https
arch: src
version: 1.0.3
epoch: 0
release: 1
summary: This project/library contains common elements related to HTTP & API services...
url: https://gitlab.com/bytecode-solutions/core/core-https
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-core-https-1.0.3-1.src.rpm
checksum_type: sha256
description:
  _______________________________________________________________________________

  This project/library contains common elements related to HTTP & API services...




  ```commandline
  pip install --upgrade pip
  pip install virtualenv
  ```


  ```commandline
  virtualenv --python=python3.11 .venv
  ```


  ```commandline
  source .venv/bin/activate
  ```


  ```commandline
  pip install .
  ```


  ```commandline
  python manager.py run-test
  python manager.py run-coverage
  ```


pkgId: 6369e642e4ac80f591cb2c0b848f92ffebffeafa62c1b9f78b99d1b5c76b37b5
name: python-core-mixins
arch: src
version: 1.0.5
epoch: 0
release: 1
summary: This project contains common functions, decorators, and mixin classes as the
url: https://gitlab.com/bytecode-solutions/core/core-mixins
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-core-mixins-1.0.5-1.src.rpm
checksum_type: sha256
description:
  _______________________________________________________________________________

  This project contains common functions, decorators, and mixin classes
  as the base for other projects or libraries...




  ```commandline
  pip install --upgrade pip
  pip install virtualenv
  ```


  ```commandline
  virtualenv --python=python3.11 .venv
  ```


  ```commandline
  source .venv/bin/activate
  ```


  ```commandline
  pip install .
  ```


  ```commandline
  python manager.py run-tests
  python manager.py run-coverage
  ```


pkgId: 489d4e1165f136634f86e3e90214a47ddecbdc8fd9e532231ebeac530413349a
name: python-core-mixins
arch: src
version: 1.1.1
epoch: 0
release: 1
summary: This project contains common and generic functions, decorators, interfaces and classes...
url: https://gitlab.com/bytecode-solutions/core/core-mixins
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-core-mixins-1.1.1-1.src.rpm
checksum_type: sha256
description:
  _______________________________________________________________________________

  This project contains common functions, decorators, and mixin classes
  as the base for other projects or libraries...




  ```shell
  pip install --upgrade pip
  pip install virtualenv
  ```


  ```shell
  virtualenv --python={{python-version}} .venv
  virtualenv --python=python3.11 .venv
  ```


  ```shell
  source .venv/bin/activate
  ```


  ```shell
  pip install .
  ```


  ```shell
  python manager.py run-tests
  python manager.py run-coverage
  ```


pkgId: 1ad051510d7bc2ff8fb94d9a714c114bbdc7bc1cb8c8013d3329a92b6782e42b
name: python-core-tests
arch: src
version: 1.0.4
epoch: 0
release: 1
summary: This project contains basic elements for testing purposes and the ability
url: https://gitlab.com/bytecode-solutions/core/core-tests
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-core-tests-1.0.4-1.src.rpm
checksum_type: sha256
description:
  _______________________________________________________________________________

  This project contains basic elements for testing purposes and the ability
  to run (via console commands) tests and code coverage (unittest-based). This way, we can
  stick to the `DRY -- Don't Repeat Yourself` principle...


  ```shell
  pip install core-tests
  ```

  ```python


  from click.core import CommandCollection
  from core_tests.tests.runner import cli_tests

  if __name__ == "__main__":
      cli = CommandCollection(sources=[cli_tests()])
      cli()
  ```

  ```shell
  python manager.py run-tests
  python manager.py run-coverage
  ```




  ```commandline
  pip install --upgrade pip
  pip install virtualenv
  ```


  ```commandline
  virtualenv --python=python3.11 .venv
  ```


  ```commandline
  source .venv/bin/activate
  ```


  ```commandline
  pip install .
  ```


  ```commandline
  python manager.py run-tests
  python manager.py run-coverage
  ```


pkgId: e6666fa3e04355ae3888be0e1168637c240662cdf79da5dcc47b44f5c7a8c371
name: python-core-tests
arch: src
version: 1.1.1
epoch: 0
release: 1
summary: This project contains basic elements for testing purposes and the ability
url: https://gitlab.com/bytecode-solutions/core/core-tests
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-core-tests-1.1.1-1.src.rpm
checksum_type: sha256
description:
  _______________________________________________________________________________

  This project contains basic elements for testing purposes and the ability
  to run (via console commands) tests and code coverage (unittest-based). This way, we can
  stick to the `DRY -- Don't Repeat Yourself` principle...


  ```shell
  pip install core-tests
  ```

  ```python


  from click.core import CommandCollection
  from core_tests.tests.runner import cli_tests

  if __name__ == "__main__":
      cli = CommandCollection(sources=[cli_tests()])
      cli()
  ```

  ```shell
  python manager.py run-tests --test-type unit
  python manager.py run-tests --test-type integration
  python manager.py run-tests --test-type "another folder that contains test cases under ./tests"
  python manager.py run-coverage
  ```




  ```commandline
  pip install --upgrade pip
  pip install virtualenv
  ```


  ```commandline
  virtualenv --python=python3.11 .venv
  ```


  ```commandline
  source .venv/bin/activate
  ```


  ```commandline
  pip install .
  ```


  ```commandline
  python manager.py run-tests
  python manager.py run-coverage
  ```


pkgId: 960595a00a6123f6988828f802008b52b87d4206f53acc8572503508fc7288f7
name: python-core-universal
arch: src
version: 4.16.5
epoch: 0
release: 1
summary: Applitools Eyes Core SDK Server
url: http://www.applitools.com
rpm_license: Applitools SDK License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-core-universal-4.16.5-1.src.rpm
checksum_type: sha256
description:
  |pypi version| |pypi downloads| |Black Formatter|
  This package contains Applitools Eyes Core SDK Server binary.
  Check `project repository`_ and `Core Changelog`_ for more information.


pkgId: 3339fd19bfc6ba60742cdef9f34afe09186c3e79ba32ca83350cfcc0d80a372a
name: python-corebridge
arch: src
version: 0.3.4
epoch: 0
release: 1
summary: Bridge for Stactics AICore
url: https://github.com/fenke/corebridge
rpm_license: Apache Software License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-corebridge-0.3.4-1.src.rpm
checksum_type: sha256
description:
  <!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

  This package provides functions and classes to run wodan style
  processing functions in the Stactics AICore environment.



  Use

  ``` sh
  pip install corebridge
  ```

  to install corebrdige.





  Wodan is a proprietary backend service that applies high performance,
  custom analytical processing to timeseries data in the Whysor data and
  dashboarding environment.

  Each wodan module defines one function that operates as the entry point.
  The parameter annotations in this function definition are used to format
  data and retrieve parameters from the originating call to the wodan api.
  This function is called with data retrieved according to a specification
  and with additional parameters as annotated.

  A simple function might look like:

  ``` {python}
  import numpy as np

  def multiply(data:np.ndarray, multiplier:float=1.0):
      return data * multiplier

  ```

  Wodan binds this function to a service endpoint and takes care of
  fetching data and parameters and converting the result for the caller.



  For AICore users define a class, always named `CustomModule` with a
  constructor `__init__` and a method `infer`.

  This package defines a baseclass to quickly construct a `CustomModule`
  class that is able to use a wodan processor function inside the AICore
  system:

  ``` {python}
  import numpy as np
  import corebridge

  def multiply(data:np.ndarray, multiplier:float=1.0):
      return data * multiplier

  class CustomModule(corebridge.aicorebridge.AICoreModule):
      def __init__(self, save_dir, assets_dir, *args, **kwargs):
          super().__init__(multiply, save_dir, assets_dir, *args, **kwargs)

  ```

  That’s it. Well, you can add parameters to `__init__` that can be used
  as hyperparameters in the web-interface and you could override `infer`
  for the same reason. The baseclass takes care of converting call
  parameters and data to the function specification and, calls the
  function and converts the result for the caller, similar to the original
  Wodan service.





  This library is developed with [NBDev](https://nbdev.fast.ai/) - a
  literate programming toolkit that supports developing code using jupyter
  notebooks and mix code with documentation.

  Literate programming is a methodology - introduced in 1984 by Donald
  Knuth - that combines a programming language with a documentation
  language. In this approach, a program is explained in a human language
  (such as English) alongside code snippets. The literate source file is
  then processed by a preprocessor to produce both source code and
  formatted documentation.

  This paradigm enhances program robustness, portability, and
  maintainability, making it a valuable tool in scientific computing and
  data science[^1]



  Documentation is prepared from the notebook with
  [Quarto](https://quarto.org/). Quarto too combines code with
  documentation but it does not extract source code into modules like
  nbdev.





  Quarto uses Pandoc and, for pdf format, LaTeX. These must be available
  on your system.

  Install [Quarto](https://quarto.org/docs/get-started/) as you see fit,
  there is a [VSCode
  extension](https://marketplace.visualstudio.com/items?itemName=quarto.quarto)
  which handles this.



  NBDev is available as PyPi package and is installed with

      pip install nbdev

  or if you are using conda

      conda install -c fastai -y nbdev

  If so desired you can let NBDev install Quarto with

      nbdev_install_quarto

  But this ask for the system admin password.



  Setup a virtual environment, activate it and install the development
  package and dependencies with, on linux

          pip install -e ‘.[dev]’

  or on Windows

          pip install -e .[dev]



  The above pip install should also install jupyter but to use it the
  kernel needs to be installed with:

          python -m ipykernel install --user --name=corebridge.venv



  - edit
  - nbdev_prepare

  The latter performs - nbdev_export - nbdev_test - nbdev_clean -
  nbdev_readme

  Then commit and to upload to Pypi with `nbdev_pypi`

  [^1]: [Wikipedia on ‘Literate
      Programming’](https://en.wikipedia.org/wiki/Literate_programming)


pkgId: 1502a79734f5687c6e103f383494a220ede9ea00f06087da68c72df5b8663bae
name: python-coreferee
arch: src
version: 1.4.1
epoch: 0
release: 1
url: https://github.com/richardpaulhudson/coreferee
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-coreferee-1.4.1-1.src.rpm
checksum_type: sha256
summary:
  Coreference resolution for English, French, German and Polish, optimised for limited training data and easily extensible for further languages

description:
  Coreferences are situations where two or more words within a text refer to the same entity, e.g. _**John** went home because **he** was tired_. Resolving coreferences is an important general task within the natural language processing field.

  Coreferee is a Python 3 library (tested with versions 3.6—3.11) that is used together with [spaCy](https://spacy.io/) (tested with versions 3.0.0—3.5.0) to resolve coreferences within English, French, German and Polish texts. It is designed so that it is easy to add support for new languages. It uses a mixture of neural networks and programmed rules.

  The library was originally developed at [msg systems](https://www.msg.group/en) and was also maintained for a while at [Explosion AI](https://explosion.ai).

  For more information, please see the [main documentation on GitHub](https://github.com/richardpaulhudson/coreferee).


pkgId: 13f29a2050ed0f026f9099fac54c46c3980a1feed92f65b70a663d1241677d37
name: python-coregio
arch: src
version: 0.7.1
epoch: 0
release: 1
summary: Python container registry API library.
url: https://github.com/Allda/coregio
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-coregio-0.7.1-1.src.rpm
checksum_type: sha256
description:
  ![PyPI version](https://badge.fury.io/py/coregio.svg)

  The CoregIO Python Library empowers you to seamlessly fetch objects from the Container Registry API. This capability enables you to retrieve container images, manifests and other objects stored in a Container registry with ease. With a simple and intuitive interface, you can specify the object you want to fetch, such as an image by its name and tag, and the library takes care of the underlying API calls and data retrieval. Whether you need to pull a specific image or access various objects within the registry, this library streamlines the process, allowing you to interact with the Docker Registry API effortlessly.


  In order to connect to a remote registry using standard docker registry API the library supports several authentication methods.
   - Bearer
   - OAuth2
   - Basic


  The library is available on PyPi and can be downloaded using `pip`.
  ```bash
  $ pip install coregio
  ```


  The Coregio Python Library empowers you to seamlessly fetch objects from the Container Registry API. This capability enables you to retrieve container images, manifests and other objects stored in a Container registry with ease. With a simple and intuitive interface, you can specify the object you want to fetch, such as an image by its name and tag, and the library takes care of the underlying API calls and data retrieval. Whether you need to pull a specific image or access various objects within the registry, this library streamlines the process, allowing you to interact with the Docker Registry API effortlessly.


  ```python
  from coregio.registry_api import ContainerRegistry


  registry = ContainerRegistry("quay.io")
  tags = registry.get_tags("prometheus/node-exporter")
  print(tags)
  ['v0.17.0', 'v0.15.1', 'v0.15.2', 'latest', 'master']
  ```

  ```python
  manifest = registry.get_manifest(
      "prometheus/node-exporter",
      "latest",
  )
  print(manifest)
  {'schemaVersion': 2, 'mediaType': 'application/vnd.docker.distribution.manifest.v2+json', 'config': {'mediaType': 'application/vnd.docker.container.image.v1+json', 'size': 3361, 'digest': 'sha256:173d3570a5af2b2ef8816b40af3ca985280549520e8d328a7f20333d9f354d1b'}, 'layers': [{'mediaType': 'application/vnd.docker.image.rootfs.diff.tar.gzip', 'size': 777654, 'digest': 'sha256:e6b9e25f5d0157c1c76c9d3680c4645368c9ac87cb008b5eddf9d856b8551373'}, {'mediaType': 'application/vnd.docker.image.rootfs.diff.tar.gzip', 'size': 486261, 'digest': 'sha256:0c6a06713be86bfb61b5f1ce1217f7b509c7ea7b894af65149cafac5004ee28f'}, {'mediaType': 'application/vnd.docker.image.rootfs.diff.tar.gzip', 'size': 10458504, 'digest': 'sha256:15ef7072c2ab4f35955068b02a09e669a5613d5bfca4f5c442c45b958036f17a'}]}



  manifest = registry.get_manifest(
      "prometheus/node-exporter",
      "latest",
      manifest_types=["oci_index"]
  )
  print(manifest)
  {'schemaVersion': 2, 'mediaType': 'application/vnd.docker.distribution.manifest.list.v2+json', 'manifests': [{'mediaType': 'application/vnd.docker.distribution.manifest.v2+json', 'size': 595, 'digest': 'sha256:1b2da31e89c8efe8d67f726f9872ca2fce95ddb1d5d97fd71468d5c48de85ddf', 'platform': {'architecture': 'amd64', 'os': 'linux'}}, {'mediaType': 'application/vnd.docker.distribution.manifest.v2+json', 'size': 595, 'digest': 'sha256:18ef5a4eb0a00e0513c8d4fb87bc31728e4c7ed6caea83c608c5048418b00185', 'platform': {'architecture': 'ppc64le', 'os': 'linux'}}, {'mediaType': 'application/vnd.docker.distribution.manifest.v2+json', 'size': 595, 'digest': 'sha256:c3e79af3edaf3b05282565c0b3e08e5b189e4200153114475256d00367da09da', 'platform': {'architecture': 's390x', 'os': 'linux'}}, {'mediaType': 'application/vnd.docker.distribution.manifest.v2+json', 'size': 595, 'digest': 'sha256:7da24517de68a4af11f098841d10c2e02f12619c662e5b812bff7959e2a477a6', 'platform': {'architecture': 'arm64', 'os': 'linux'}}]}

  ```


  ```python

  registry = ContainerRegistry(
      "quay.io",
      proxy="http://proxy.example.com"
  )

  manifest = registry.get_manifest(
      "redhat-isv-containers/5e61e93ffe2231a0c286037e",
      "latest",
  )

  ```


  Contributions are welcome! If you find any issues or have suggestions for improvement, please open an issue or submit a pull request. Please follow our [CONTRIBUTING.md](./CONTRIBUTING.md)

rpm_license:
  Copyright (c) 2023 Ales Raszka  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


pkgId: 60c437b5800bd7297334babe6dadceb5c81d5cf928a91d999963720e70a4fe04
name: python-corehttp
arch: src
version: 1.0.0b5
epoch: 0
release: 1
summary: CoreHTTP Library for Python
url: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/core/corehttp
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-corehttp-1.0.0b5-1.src.rpm
checksum_type: sha256
description:
  `corehttp` provides shared exceptions and modules for Python SDK client libraries.



  Typically, you will not need to install `corehttp`, as it will be installed when you install one of the client libraries using it.



  To use `corehttp`, you will need to choose a transport implementation. `corehttp` provides the following transports:

  Synchronous transports:
  - `RequestsTransport` - A synchronous transport based on the [Requests](https://requests.readthedocs.io/en/master/) library.
  - `HttpXTransport` - An synchronous transport based on the [HTTPX](https://www.python-httpx.org/) library.

  Asynchronous transports:
  - `AioHttpTransport` - An asynchronous transport based on the [aiohttp](https://docs.aiohttp.org/en/stable/) library.
  - `AsyncHttpXTransport` -  An asynchronous transport based on the [HTTPX](https://www.python-httpx.org/) library.

  Each transport has its own dependencies, which you can install using the `corehttp` extras:

  ```bash

  pip install corehttp[requests]
  pip install corehttp[aiohttp]
  pip install corehttp[httpx]


  pip install corehttp[requests,httpx]
  ```

  If no transports are specified, `corehttp` will default to using `RequestsTransport` for synchronous pipeline requests and `AioHttpTransport` for asynchronous pipeline requests.



  This project welcomes contributions and suggestions. Most contributions require
  you to agree to a Contributor License Agreement (CLA) declaring that you have
  the right to, and actually do, grant us the rights to use your contribution.
  For details, visit [https://cla.microsoft.com](https://cla.microsoft.com).

  When you submit a pull request, a CLA-bot will automatically determine whether
  you need to provide a CLA and decorate the PR appropriately (e.g., label,
  comment). Simply follow the instructions provided by the bot. You will only
  need to do this once across all repos using our CLA.

  This project has adopted the
  [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
  For more information, see the
  [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
  or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any
  additional questions or comments.










  - Accept float for `retry_after` header.





  - Relax type checking in `Pipeline` constructors to only check that each user-supplied policy object has either a `send` method or both an `on_request` and `on_response` method. This allows for more flexible policy implementations. [#34296](https://github.com/Azure/azure-sdk-for-python/pull/34296)





  - Support tuple input for `files` values to `corehttp.rest.HttpRequest` #34082
  - Support simultaneous `files` and `data` field entry into `corehttp.rest.HttpRequest` #34082





  - Added the initial implementation of the HTTPX transport. [#32813](https://github.com/Azure/azure-sdk-for-python/pull/32813)



  - Removed `requests` as a default dependency of `corehttp`. This is now an "extras" dependency and can be installed via `corehttp[requests]`. [#32813](https://github.com/Azure/azure-sdk-for-python/pull/32813)
  - Renamed the `aio` extra to `aiohttp`. [#32813](https://github.com/Azure/azure-sdk-for-python/pull/32813)



  - Fixed an issue with `multipart/form-data` in the async transport where `data` was not getting encoded into the request body. [#32473](https://github.com/Azure/azure-sdk-for-python/pull/32473)
  - Fixed an issue with `connection_verify`, `connection_cert`, and `connection_timeout` not being propagated to underlying transports.  [#33057](https://github.com/Azure/azure-sdk-for-python/pull/33057)
  - Fixed an issue with the `aiohttp` transport not using SSL by default. [#33057](https://github.com/Azure/azure-sdk-for-python/pull/33057)



  - Added extras for `httpx`. [#32813](https://github.com/Azure/azure-sdk-for-python/pull/32813)



  * Initial Release


pkgId: 7a3e459771d430b488b88972f60c9bfcc5f8a60c45fcc59918f0728e60cc9dae
name: python-coreml
arch: src
version: 0.0.15
epoch: 0
release: 1
summary: Generic Framework for ML projects
url: https://github.com/dalmia/coreml
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-coreml-0.0.15-1.src.rpm
checksum_type: sha256
description:
  `coreml` is an end-to-end machine learning framework aimed at supporting rapid prototyping. It is built on top of `PyTorchLightning` by combining the several components of any ML pipeline, right from definining the dataset object, choosing how to sample each batch, preprocessing your inputs and labels, iterating on different network architectures, applying various weight initializations, running pretrained models, freezing certain layers, changing optimizers, adding learning rate schedulers, and detailed logging, into a simple `model.fit()` framework, similar to [`scikit-learn`](https://github.com/scikit-learn/scikit-learn). The codebase is very modular making it easily extensible for different tasks, modalities and training recipes, avoiding duplication wherever possible. The contents of the README are as follows:

  - [Features](#features)
  - [Setup](#setup)
  - [Quickstart](#quickstart)
  - [How-Tos](#how-tos)
    - [Optimization](#optimization)
    - [Network architectures](#network-architectures)
    - [Datasets](#datasets)
    - [Preprocessing](#preprocessing)
  - [Testing](#testing)
  - [TODOs](#todos)
  - [Authors](#authors)


  - Support for end-to-end training using `PyTorchLightning` with custom training and validation loops.
  - Makes every aspect of the training pipeline configurable.
  - Data preprocessing on GPU using `kornia`.
  - Provides the ability to define and change architectures right in the config file.
  - Built-in support for experiment tracking using `Weights & Biases`.
  - Enables replicability through `Docker` containers.
  - Defines several new metrics like `PrecisionAtRecall`, `SpecificityAtSensitivity` and `ConfusionMatrix`.
  - Logs several classification curves like `PR` curve, `Sensitivity-Specificity` curve and `ROC` curve.
  - Explicitly requires data versioning.
  - Supports adding new datasets adhering to a required format.
  - Contains unit tests wherever applicable.



  Clone the project:

  ```bash
  $ git clone https://github.com/dalmia/coreml.git
  ```


  We use [`wandb`](http://wandb.com/) for experiment tracking. You'll need to have that set up:
  - Install wandb

  ```bash
  $ pip install wandb
  ```

  2. Login to wandb:

  ```bash
  $ wandb login
  ```

  You will be redirected to a link that will show you your `WANDB_API_KEY` .

  3. Set the `WANDB_API_KEY` by adding this to your `~/.bashrc` file:
  ```bash
  export WANDB_API_KEY=YOUR_API_KEY
  ```

  4. Run `source ~/.bashrc`.
  5. During training, you'll have an option to turn off `wandb` as well.



  We use Docker containers to ensure replicability of experiments. You can either fetch the Docker image from DockerHub using the following line:
  ```bash
  $ docker pull adalmia/coreml:v1.0-lightning
  ```
  OR

  You can build the image using the `DockerFile`:
  ```bash
  $ docker build -t adalmia/coreml:v1.0-lightning .
  ```

  The repository runs inside a Docker container. When creating the container, you need to mount the directory containing data to `/data` and directory where you want to store the ouptuts to `/output` on the container. Make the corresponding changes to `create_container.sh` to mount the respective directories by changing `/path/to/coreml`, `/path/to/data` and `/path/to/outputs` to the appropriate values.

  Use the following command to launch a container:

  ```bash
  $ bash create_container.sh
  ```



  - Download and prepare the data
  ```
  $ python tasks/data/classification/CIFAR.py
  ```

  This will create a folder named `CIFAR10` under the directory mounted at `/data` on your container along with default data versions and the required directory structure.

  - Since the codebase only supports binary classification for now, the step above also creates a `binary.yml` data version which converts the 10-class problem into a binary classification problem.

  - Run training using the default config:
  ```
  $ python training/train.py -v configs/defaults/binary-cifar-classification.yml
  ```

  The `training/train.py` adds a few more flags on top of the ones defined by [`Trainer`](https://pytorch-lightning.readthedocs.io/en/latest/trainer.html#trainer-class-api) from `PyTorchLightning` You can view all the flags that can be passed using `-h`:
  ```
  root@ip:/workspace/coreml# python training/train.py -h

  usage: train.py [-h] [--logger [LOGGER]]
                  [--checkpoint_callback [CHECKPOINT_CALLBACK]]
                  [--early_stop_callback [EARLY_STOP_CALLBACK]]
                  [--default_root_dir DEFAULT_ROOT_DIR]
                  [--gradient_clip_val GRADIENT_CLIP_VAL]
                  [--process_position PROCESS_POSITION] [--num_nodes NUM_NODES]
                  [--num_processes NUM_PROCESSES] [--gpus GPUS]
                  [--auto_select_gpus [AUTO_SELECT_GPUS]]
                  [--tpu_cores TPU_CORES] [--log_gpu_memory LOG_GPU_MEMORY]
                  [--progress_bar_refresh_rate PROGRESS_BAR_REFRESH_RATE]
                  [--overfit_batches OVERFIT_BATCHES]
                  [--track_grad_norm TRACK_GRAD_NORM]
                  [--check_val_every_n_epoch CHECK_VAL_EVERY_N_EPOCH]
                  [--fast_dev_run [FAST_DEV_RUN]]
                  [--accumulate_grad_batches ACCUMULATE_GRAD_BATCHES]
                  [--max_epochs MAX_EPOCHS] [--min_epochs MIN_EPOCHS]
                  [--max_steps MAX_STEPS] [--min_steps MIN_STEPS]
                  [--limit_train_batches LIMIT_TRAIN_BATCHES]
                  [--limit_val_batches LIMIT_VAL_BATCHES]
                  [--limit_test_batches LIMIT_TEST_BATCHES]
                  [--val_check_interval VAL_CHECK_INTERVAL]
                  [--log_save_interval LOG_SAVE_INTERVAL]
                  [--row_log_interval ROW_LOG_INTERVAL]
                  [--distributed_backend DISTRIBUTED_BACKEND]
                  [--sync_batchnorm [SYNC_BATCHNORM]] [--precision PRECISION]
                  [--weights_summary WEIGHTS_SUMMARY]
                  [--weights_save_path WEIGHTS_SAVE_PATH]
                  [--num_sanity_val_steps NUM_SANITY_VAL_STEPS]
                  [--truncated_bptt_steps TRUNCATED_BPTT_STEPS]
                  [--resume_from_checkpoint RESUME_FROM_CHECKPOINT]
                  [--profiler [PROFILER]] [--benchmark [BENCHMARK]]
                  [--deterministic [DETERMINISTIC]]
                  [--reload_dataloaders_every_epoch [RELOAD_DATALOADERS_EVERY_EPOCH]]
                  [--auto_lr_find [AUTO_LR_FIND]]
                  [--replace_sampler_ddp [REPLACE_SAMPLER_DDP]]
                  [--terminate_on_nan [TERMINATE_ON_NAN]]
                  [--auto_scale_batch_size [AUTO_SCALE_BATCH_SIZE]]
                  [--prepare_data_per_node [PREPARE_DATA_PER_NODE]]
                  [--amp_backend AMP_BACKEND] [--amp_level AMP_LEVEL]
                  [--val_percent_check VAL_PERCENT_CHECK]
                  [--test_percent_check TEST_PERCENT_CHECK]
                  [--train_percent_check TRAIN_PERCENT_CHECK]
                  [--overfit_pct OVERFIT_PCT] -v VERSION [-n NUM_WORKERS]
                  [--id ID] [--wandb] [--seed SEED]

  Trains a model

  optional arguments:
    -h, --help            show this help message and exit
    --logger [LOGGER]     autogenerated by pl.Trainer
    --checkpoint_callback [CHECKPOINT_CALLBACK]
                          autogenerated by pl.Trainer
    --early_stop_callback [EARLY_STOP_CALLBACK]
                          autogenerated by pl.Trainer
    --default_root_dir DEFAULT_ROOT_DIR
                          autogenerated by pl.Trainer
    --gradient_clip_val GRADIENT_CLIP_VAL
                          autogenerated by pl.Trainer
    --process_position PROCESS_POSITION
                          autogenerated by pl.Trainer
    --num_nodes NUM_NODES
                          autogenerated by pl.Trainer
    --num_processes NUM_PROCESSES
                          autogenerated by pl.Trainer
    --gpus GPUS           autogenerated by pl.Trainer
    --auto_select_gpus [AUTO_SELECT_GPUS]
                          autogenerated by pl.Trainer
    --tpu_cores TPU_CORES
                          autogenerated by pl.Trainer
    --log_gpu_memory LOG_GPU_MEMORY
                          autogenerated by pl.Trainer
    --progress_bar_refresh_rate PROGRESS_BAR_REFRESH_RATE
                          autogenerated by pl.Trainer
    --overfit_batches OVERFIT_BATCHES
                          autogenerated by pl.Trainer
    --track_grad_norm TRACK_GRAD_NORM
                          autogenerated by pl.Trainer
    --check_val_every_n_epoch CHECK_VAL_EVERY_N_EPOCH
                          autogenerated by pl.Trainer
    --fast_dev_run [FAST_DEV_RUN]
                          autogenerated by pl.Trainer
    --accumulate_grad_batches ACCUMULATE_GRAD_BATCHES
                          autogenerated by pl.Trainer
    --max_epochs MAX_EPOCHS
                          autogenerated by pl.Trainer
    --min_epochs MIN_EPOCHS
                          autogenerated by pl.Trainer
    --max_steps MAX_STEPS
                          autogenerated by pl.Trainer
    --min_steps MIN_STEPS
                          autogenerated by pl.Trainer
    --limit_train_batches LIMIT_TRAIN_BATCHES
                          autogenerated by pl.Trainer
    --limit_val_batches LIMIT_VAL_BATCHES
                          autogenerated by pl.Trainer
    --limit_test_batches LIMIT_TEST_BATCHES
                          autogenerated by pl.Trainer
    --val_check_interval VAL_CHECK_INTERVAL
                          autogenerated by pl.Trainer
    --log_save_interval LOG_SAVE_INTERVAL
                          autogenerated by pl.Trainer
    --row_log_interval ROW_LOG_INTERVAL
                          autogenerated by pl.Trainer
    --distributed_backend DISTRIBUTED_BACKEND
                          autogenerated by pl.Trainer
    --sync_batchnorm [SYNC_BATCHNORM]
                          autogenerated by pl.Trainer
    --precision PRECISION
                          autogenerated by pl.Trainer
    --weights_summary WEIGHTS_SUMMARY
                          autogenerated by pl.Trainer
    --weights_save_path WEIGHTS_SAVE_PATH
                          autogenerated by pl.Trainer
    --num_sanity_val_steps NUM_SANITY_VAL_STEPS
                          autogenerated by pl.Trainer
    --truncated_bptt_steps TRUNCATED_BPTT_STEPS
                          autogenerated by pl.Trainer
    --resume_from_checkpoint RESUME_FROM_CHECKPOINT
                          autogenerated by pl.Trainer
    --profiler [PROFILER]
                          autogenerated by pl.Trainer
    --benchmark [BENCHMARK]
                          autogenerated by pl.Trainer
    --deterministic [DETERMINISTIC]
                          autogenerated by pl.Trainer
    --reload_dataloaders_every_epoch [RELOAD_DATALOADERS_EVERY_EPOCH]
                          autogenerated by pl.Trainer
    --auto_lr_find [AUTO_LR_FIND]
                          autogenerated by pl.Trainer
    --replace_sampler_ddp [REPLACE_SAMPLER_DDP]
                          autogenerated by pl.Trainer
    --terminate_on_nan [TERMINATE_ON_NAN]
                          autogenerated by pl.Trainer
    --auto_scale_batch_size [AUTO_SCALE_BATCH_SIZE]
                          autogenerated by pl.Trainer
    --prepare_data_per_node [PREPARE_DATA_PER_NODE]
                          autogenerated by pl.Trainer
    --amp_backend AMP_BACKEND
                          autogenerated by pl.Trainer
    --amp_level AMP_LEVEL
                          autogenerated by pl.Trainer
    --val_percent_check VAL_PERCENT_CHECK
                          autogenerated by pl.Trainer
    --test_percent_check TEST_PERCENT_CHECK
                          autogenerated by pl.Trainer
    --train_percent_check TRAIN_PERCENT_CHECK
                          autogenerated by pl.Trainer
    --overfit_pct OVERFIT_PCT
                          autogenerated by pl.Trainer
    -v VERSION, --version VERSION
                          path to the experiment config file
    -n NUM_WORKERS, --num_workers NUM_WORKERS
                          number of CPU workers to use
    --id ID               experiment ID in wandb
    --wandb               whether to use wandb
    --seed SEED           seed for the experiment
  ```


  This section demonstrates the power of everything being parameterized by a config. Refer to `configs/defaults/binary-cifar.yml`
  as the base config file on top of which we demonstrate the individual components.



  ```yaml
  optimizer:
      name: SGD
      args:
        lr: 0.001
        momentum: 0.9
        nesterov: true
      scheduler:
        name: StepLR
        init_params:
            gamma: 0.9
            step_size: 1
        opt_params:
          interval: epoch

  loss:
      train:
        name: binary-cross-entropy
        params:
            reduction: none
      val:
        name: binary-cross-entropy
        params:
            reduction: none
      test:
        name: binary-cross-entropy
        params:
            reduction: none
  ```
  The above example shows how to set various hyperparameters like the batch size, number of epochs, optimizer, learning rate scheduler and the loss function. The interesting aspect is how the optimizer, learning rate scheduler and the loss function is directly defined in the config file. This is possible because of the [Factory Design Pattern](https://www.tutorialspoint.com/design_pattern/factory_pattern.htm) used throughout the codebase. For `optimizer`, we currently support:
  - `SGD`
  - `Adam`
  - `AdamW`

  However, other optimization functions can be simply added by registering their corresponding builders in `coreml/modules/optimization.py`. For each optimizer, `args` contains any parameters required by their corresponding `PyTorch` definition.

  Similarly, we support multiple learning rate schedulers defined in `PyTorch` along parameterizing whether the scheduler's step should take place after each batch or after each epoch. This is controlled by the key `interval`, which can be one of `['epoch', 'step']`. The key `monitor` can be set to decide what parameter should be monitored for the scheduler's step. In the above example, the validation `loss` is being monitored. Currently, we suport the following schedulers:
  - `ReduceLROnPlateau`
  - `StepLR`
  - `CyclicLR`
  - `OneCycleLR`
  - `MultiStepLR`

  We also parameterize the loss function to be used and allow for different loss functions for training and validation. The need for making them different could arise in various situations. One such example is applying label smoothing during training but not during validation.


  The network architecture can be completely defined in the config itself:
  ```yaml
  network:
      name: neural_net
      params:
          config:
          - name: Conv2d
            params:
              in_channels: 3
              out_channels: 64
              kernel_size: 3
          - name: BatchNorm2d
            params:
              num_features: 64
          - name: ReLU
            params: {}
          - name: Conv2d
            params:
              in_channels: 64
              out_channels: 64
              kernel_size: 3
          - name: BatchNorm2d
            params:
              num_features: 64
          - name: ReLU
            params: {}
          - name: AdaptiveAvgPool2d
            params:
              output_size:
              - 1
              - 1
          - name: Flatten
            params: {}
          - name: Linear
            params:
              in_features: 64
              out_features: 64
          - name: ReLU
            params: {}
          - name: Linear
            params:
              in_features: 64
              out_features: 1
  ```
  The `config` key takes as input a list of dictionaries, with each dictionary specifying a layer or a backbone network. Yes, if you want to use a pretrained ResNet, you can simply plug it in as a backbone layer:

  ```yaml
  network:
      name: neural_net
      params:
          config:
          - name: resnet50
            params:
              pretrained: true
              in_channels: 3
          - name: AdaptiveAvgPool2d
            params:
              output_size:
              - 1
              - 1
          - name: Flatten
            params: {}
          - name: Linear
            params:
              in_features: 2048
              out_features: 1
  ```
  Currently, we support a lot of backbones:
  - `Resnet` variations: `resnet18`, `resnet34`, `resnet50`, `resnet101`, `resnet152`, `resnext50_32x4d`, `resnext101_32x8d`
  - `VGGNet` variations: `vgg11`, `vgg11_bn`, `vgg13`, `vgg13_bn`, `vgg16`, `vgg16_bn`, `vgg19_bn`, `vgg19`
  -  `EfficientNet` variations: `efficientnet-b0`, `efficientnet-b4`, `efficientnet-b7`

  The implementations for the `Resnet` and `VGGNet` based backbones have been taken from `torchvision.models` and those based on `EfficientNet` are supported by [this](https://github.com/lukemelas/EfficientNet-PyTorch/tree/master/efficientnet_pytorch) PyTorch implementation.

  Support for other backbones can be similarly added to `coreml/modules/backbone`.


  The datasets to use can be specified as follows:
  ```yaml
  dataset:
      name: classification_dataset
      config:
        - name: CIFAR10
          version: binary
      params: {}
  ```
  Here, `name` is used to decide which `torch.utils.data.Dataset` object to use, as defined in `coreml/data/__init__.py`. `config` takes a list of dataset configs. Each dataset config is a dictionary with `name` as the name of the dataset folder under `/data` and `version` being the specific dataset version to use, present in `/data/{name}/processed/versions`. `params` contains additional arguments that can be passed to the dataset object, as defined in `coreml/data`. When values are passed to `params`, they are specified for `train`/`val`/`test` separately:
  ```yaml
  dataset:
      name: classification_dataset
      config:
        - name: CIFAR10
          version
      params:
        train:
          fraction: 0.1
        val:
          fraction: 0.5
  ```




  One the input is loaded, the pipeline for processing the input before it is fed into a batch, can be specified in the config as:
  ```yaml
  signal_transform:
      train:
      - name: Permute
        params:
          order:
            - 2
            - 0
            - 1
      val:
      - name: Permute
        params:
          order:
            - 2
            - 0
            - 1
  ```
  The pipeline for each split (`train`/`val`) is specified separately. For each split, a list of dictonaries are given. Each dictionary
  represents one transform, as defined in `coreml/data/transforms.py`, using the `name` of the transform and the arguments for that transform.


  The raw annotations might have to be transformed before processing as well. This is specified in the config as:
  ```yaml
  target_transform:
      name: classification
      params:
        classes:
          - 0
          - 1
  ```
  The specific target transform is selected from `annotation_factory` inside `coreml/data/transforms.py`


  We use `unittest` for all our tests. Simply run the following inside the Docker container:
  ```
  $ python -m unittest discover tests
  ```


  - Tracking inputs on W&B (currently `torch.cat` kills the process when the inputs are large).
  - Add augmentations
  - Label Smoothing for BCE
  - Incorporate models from `timm` (pytorch-image-models)
  - Training with TPUs
  - Training with multiple GPUs
  - Native TTA
  - Stochastic Weight Averaging
  - Demos for various things
  - Support for audio classification
  - Classification analyzer (similar to fast.ai)
  - Discriminative fine-tuning (see [this](https://course.fast.ai/videos/?lesson=1))
  - Add benchmarks for multiple datasets
  - Add documentation for using new datasets and configuring different parts of the pipeline


  - [Aman Dalmia](https://github.com/dalmia)
  - [Piyush Bagad](https://github.com/bpiyush)


pkgId: b138d59bcc1f31b54dc2e3f5f1354b8d9f8d465d8d3f7fb2b8ae066e62f83c42
name: python-coremltools
arch: src
version: 7.2
epoch: 0
release: 1
summary: Community Tools for Core ML
url: https://github.com/apple/coremltools
rpm_license: BSD
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-coremltools-7.2-1.src.rpm
checksum_type: sha256
description:
  `Core ML <http://developer.apple.com/documentation/coreml>`_
  is an Apple framework that allows developers to easily integrate
  machine learning (ML) models into apps. Core ML is available on iOS, iPadOS,
  watchOS, macOS, and tvOS. Core ML introduces a public file format (.mlmodel)
  for a broad set of ML methods including deep neural networks (convolutional
  and recurrent), tree ensembles (boosted trees, random forest, decision trees),
  and generalized linear models. Core ML models can be directly integrated into
  apps within Xcode.
  the .mlmodel format. In particular, it can be used to:
  - Convert trained models from popular machine learning tools into Core ML format
    (.mlmodel).
  - Write models to Core ML format with a simple API.
  - Making predictions using the Core ML framework (on select platforms) to
    verify conversion.


pkgId: 936a955510733272256070c287a7f73a62b2b3fb02f9c66932a530700d05f07f
name: python-coremstools
arch: src
version: 0.0.4
epoch: 0
release: 1
summary: A package for processing CoreMS assignments of ultrahigh mass resolution LC-ESI-MS data
url: https://github.com/deweycw/corems-tools
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-coremstools-0.0.4-1.src.rpm
checksum_type: sha256
description:
  A Python package for processing CoreMS assignments of ultrahigh mass resolution LC-ESI-MS data.



  - Alignment of assigned features across a dataset
  - Calculation of average assignment & feature parameters across a dataset:
      1. measured m/z
      2. calibrated m/z
      3. resolving power
      4. m/z error
      5. feature S/N
      6. confidence score
  - Gap filling of ambiguous assignments
  - Stoichiometric classifications
  - NOSC calucations
  - O/C, H/C, N/C calculations
  - Identification of significant assignment errors in a dataset, based on rolling average and standard deviation


  - Determination of a feature's chromatographic dispersity
  - Generation of calibrant list(s) for data calibration
  - QC checks of retention and intensity of an internal standard across a dataset




      git clone https://github.com/deweycw/corems-tools.git corems-tools
      cd corems-tools/src
      python -m pip install -e . # from root directory of project


      python -m pip install --index-url https://test.pypi.org/simple/ --no-deps coremstools


  See: https://packaging.python.org/en/latest/tutorials/packaging-projects/


      python -m pip install -U build
      python -m build


      python -m pip install -U twine
      python -m twine upload --repository testpypi dist/*




  1. Generate calibrants using calibrant generator function (requires CoreMS)
  2. Perform assignments (requires CoreMS)
  3. Calculate dispersity (requires CoreMS)
  4. Evaluate retention and intensity of internal standard (requires CoreMS)
  5. Generate assignment error plots (error v. m/z; error dist in each time window)


  6. Align features across dataset
  7. Gapfill across dataset
  8. Perform blank correction
  9. Flag features with potentially signficant assignment error (i.e., feature is flagged if difference between rolling average of assignment error (across dataset) and error of individual assignment exceeds 4x the standard deviation of the assignment error for the specific feature)


  10. Determine O/C, H/C, N/C & NOSC for features
  11. Determine stoichiometric classifcations


pkgId: 5fa61c7cecce645364d2d56cda834d7493f5f118a203c18b85825543d26cbdbd
name: python-corenlp-protobuf
arch: src
version: 3.8.0
epoch: 0
release: 1
summary: Python bindings for Stanford CoreNLP protobufs
url: https://github.com/stanfordnlp/python-corenlp-protobuf
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-corenlp-protobuf-3.8.0-1.src.rpm
checksum_type: sha256
description:
  This package contains python bindings for `Stanford
  CoreNLP <https://github.com/stanfordnlp/CoreNLP>`_'s protobuf
  specifications, as generated by `protoc`. These bindings can used to
  parse binary data produced by, e.g., the `Stanford CoreNLP


pkgId: 3669c70b6b5478fe6528ca888780ffecd5109e15e47387311342a3e85e612df2
name: python-coretex
arch: src
version: 1.0.187
epoch: 0
release: 1
url: https://coretex.ai
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-coretex-1.0.187-1.src.rpm
checksum_type: sha256
summary:
  A package for AI experiment tracking, infrastructure and dataset management using Coretex.ai platform.

description:
  <div align="center">
  [Coretex AI](https://www.coretex.ai) - Manage the complete lifecycle of your experiments and complex workloads, from project inception to production deployment and monitoring.
  <br />
  [![Linter code check](https://github.com/coretex-ai/coretexpylib/actions/workflows/linter-code-check.yml/badge.svg?branch=develop)](https://github.com/coretex-ai/coretexpylib/actions/workflows/linter-code-check.yml)
  </div>

  Coretex is a powerful MLOps platform designed to make AI experimentation fast and efficient. It contains multiple key features to help with that:
  - [MLOps Workflow Management]() - Use powerful yet simple tools to optimize, build and run your ML Workflows
  - [Model Deployment](https://docs.coretex.ai/v1/getting-started/learn-basics/deployment) - Deploy your Model to production efforlessly with full tracking capabilities
  - [Task Library](https://github.com/coretex-ai/coretex-jobs) - Out-of-the-box support for common ML Tasks:
      - LLM (Llama3)
      - RAG
      - Text-to-image (Stable Diffusion)
      - Object Detection (YOLOv10)
      - BioInformatics (Qiime2)
      - and many others...
  - [Multi-language Support]() - You are not limited to just Python, with Coretex we support all of these:
      - Python (including Notebooks)
      - R
      - Bash
      - Docker - Define a custom Dockerfile which should be executed
  - [Parameter Optimization](https://docs.coretex.ai/v1/getting-started/learn-basics/project-and-task#parameter-optimization) - Define multiple values for parameters and Coretex will magically take care of performing grid search using those parameters
  - [Team Collaboration](https://docs.coretex.ai/v1/getting-started/learn-basics/organizations#collaboration-and-sharing) - Invite other people to collaborate with you on a Project by using a role-based access control (RBAC) for your Project
  - [Dataset Management](https://docs.coretex.ai/v1/getting-started/learn-basics/dataset) - Manage your Datasets by using multitude of features provided by Coretex such as:
      - Support for annotatin images and IMU data directly on the platform
      - Combine and duplicate functionality for re-using or merging existing Datasets
      - Automatic Dataset lineage tracking which offers insight into how the Dataset was created
  - [Real-time Experiment Tracking](#coretex-experiment-tracking) - Real-time tracking of Run metrics, Artifacts, stdout and stderr, etc...
  - [Infrastructure Setup](#infrastructure-setup) - Connect your own on-premise machines, or use dynamically scalable cloud machines
  Coretex helps you iterate faster and with more confidence. You get reproducibility, scalability, transparency, and cost-effectiveness.

  **Step 1:** [Sign up for free](https://app.coretex.ai/register-organization)
  **Step 2:** Install Coretex python library:
  ```bash
  $ pip3 install coretex
  ```
  ```bash
  $ pip install coretex
  ```
  **Step 3:** Run your project on Coretex with <b><u>zero changes</u></b>:
  ```bash
  $ coretex run main.py
  ```

  Connecting your own on-premise machines or your cloud machines to an MLOps platform has never been easier. This can be achieved by running one simple command:
  ```bash
  $ coretex node start
  ```

  Coretex will automatically track:
  - Source code and parameters
  - Artifacts - files which are generated as a result of execution
  - Console output - stdout and stderr
  - Resouce usage (CPU, GPU, RAM, Swap, IO, network, etc...)
  <table>
  <tbody>
    <tr>
      <td>Metrics</td>
      <td>Artifacts</td>
    </tr>
    <tr>
      <td><img src="./docs_images/metrics_preview.png" width="100%" /></td>
      <td><img src="./docs_images/artifacts_preview.png" width="100%" /></td>
    </tr>
    <tr>
      <td>Console</td>
      <td>Source code</td>
    </tr>
    <tr>
      <td><img src="./docs_images/console_preview.png" width="100%" /></td>
      <td><img src="./docs_images/snapshot_preview.png" width="100%" /></td>
    </tr>
  </tbody>
  </table>
  One of the key benefits of Coretex is its ability to guarantee reproducibility. Since the platform keeps track of code, all configurations and parameters between runs, this ensures that you can run the same identical Workflow over and over again.

  Coretex is a versatile platform that can be used for a variety of use cases, including:
  - Training ML models
  - Large-scale statistical analysis
  - Simulations (physics, molecular dynamics, population dynamics, econometrics, and more)
  - Deploying all kinds of ML models (including LLMs)

  Coretex is compatible with all existing Python ML frameworks (PyTorch, Tensorflow, Keras, XGBoost, Scikit-Learn, and many others). We also support using other libraries like Tensorboard, Weights & Biases, and others for tracking the experiments.

  If you require any assistance or have any questions feel free to join our [Discord server](https://discord.gg/zm7PAtKZkn). You can also reach out to us through via email support@coretex.ai. We will be happy to assist you with any inquiries or issues you may have. Check out the Coretex platform overview at [coretex.ai](https://www.coretex.ai) for more information, tutorials, and documentation.


pkgId: dbd11b6bc515bba9dc7efe11025d28ec08b092ced136a6ca13f17c961b7ca97c
name: python-corextopic
arch: src
version: 1.1
epoch: 0
release: 1
url: https://github.com/gregversteeg/corex_topic
rpm_license: Apache Software License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-corextopic-1.1-1.src.rpm
checksum_type: sha256
summary:
  Hierarchical and semi-supervised topic modeling with minimal domain knowledge through Anchored Correlation Explanation

description:
  **Cor**relation **Ex**planation (CorEx) is a topic model that yields rich topics that are maximally informative about a set of documents. The advantage of using CorEx versus other topic models is that it can be easily run as an unsupervised, semi-supervised, or hierarchical topic model depending on a user's needs. For semi-supervision, CorEx allows a user to integrate their domain knowledge via "anchor words."  This integration is flexible and allows the user to guide the topic model in the direction of those words. This allows for creative strategies that promote topic representation, separability, and aspects. More generally, this implementation of CorEx is good for clustering any sparse binary data.

  If you use this code, please cite the following:

  > Gallagher, R. J., Reing, K., Kale, D., and Ver Steeg, G. "[Anchored Correlation Explanation: Topic Modeling with Minimal Domain Knowledge](https://www.transacl.org/ojs/index.php/tacl/article/view/1244)." *Transactions of the Association for Computational Linguistics (TACL)*, 2017.





  Python code for the CorEx topic model can be installed via pip:

  ```
  pip install corextopic
  ```



  Full details on how to retrieve and interpret output from the CorEx topic model are given in the [example notebook](https://github.com/gregversteeg/corex_topic/blob/master/corextopic/example/corex_topic_example.ipynb). Below we describe how to get CorEx running as an unsupervised, semi-supervised, or hierarchical topic model.



  Given a doc-word matrix, the CorEx topic model is easy to run. The code follows the scikit-learn fit/transform conventions.

  ```python
  import numpy as np
  import scipy.sparse as ss
  from corextopic import corextopic as ct


  X = np.array([[0,0,0,1,1],
                [1,1,1,0,0],
                [1,1,1,1,1]], dtype=int)

  X = ss.csr_matrix(X)

  words = ['dog', 'cat', 'fish', 'apple', 'orange']

  docs = ['fruit doc', 'animal doc', 'mixed doc']


  topic_model = ct.Corex(n_hidden=2)  # Define the number of latent (hidden) topics to use.
  topic_model.fit(X, words=words, docs=docs)
  ```

  Once the model is trained, we can get topics using the ```get_topics()``` function.

  ```python
  topics = topic_model.get_topics()
  for topic_n,topic in enumerate(topics):
      
      topic = [(w,mi,s) if s > 0 else ('~'+w,mi,s) for w,mi,s in topic]
      
      words,mis,signs = zip(*topic)
      
      topic_str = str(topic_n+1)+': '+', '.join(words)
      print(topic_str)
  ```

  Similarly, the most probable documents for each topic can be accessed through the ``get_top_docs()`` function.

  ```python
  top_docs = topic_model.get_top_docs()
  for topic_n, topic_docs in enumerate(top_docs):
      docs,probs = zip(*topic_docs)
      topic_str = str(topic_n+1)+': '+', '.join(docs)
      print(topic_str)
  ```

  Summary files and visualizations can be outputted from ```vis_topic.py```.

  ```python
  from corextopic import vis_topic as vt
  vt.vis_rep(topic_model, column_label=words, prefix='topic-model-example')
  ```




  Each topic explains a certain portion of the *total correlation* (TC). We can access the topic TCs through the `tcs` attribute, as well as the overall TC (the sum of the topic TCs) through the `tc` attribute. To determine how many topics we should use, we can look at the distribution of `tcs`.  If adding additional topics contributes little to the overall TC, then the topics already explain a large portion of the information in the documents. If this is the case, then we likely do not need more topics in our topic model. So, as a general rule of thumb continue adding topics until the overall TC plateaus.

  We can also restart the CorEx topic model from several different initializations. This allows CorEx to explore different parts of the topic space and potentially find more informative topics. If we want to follow a strictly quantitative approach to choosing which of the multiple topic model runs we should use, then we can choose the topic model that has the highest TC (the one that explains the most information about the documents)








  Anchored CorEx allows a user integrate their domain knowledge through "anchor words." Anchoring encourages (but does not force) CorEx to search for topics that are related to the anchor words. This helps us find topics of interest, enforce separability of topics, and find aspects around topics.

  If ```words``` is initialized, then it is easy to use anchor words:

  ```python
  topic_model.fit(X, words=words, anchors=[['dog','cat'], 'apple'], anchor_strength=2)
  ```

  This anchors "dog" and "cat" to the first topic, and "apple" to the second topic. The `anchor_strength` is the relative amount of weight given to an anchor word relative to all the other words. For example, if `anchor_strength=2`, then CorEx will place twice as much weight on the anchor word when searching for relevant topics. The `anchor_strength` should always be set above 1. The choice of `anchor_strength` beyond that depends on the size of the vocabulary and the task at hand. We encourage users to experiment with ```anchor_strength``` to find what is useful for their own purposes.

  If ```words``` is not initialized, we can anchor by specifying the column indices of the document-term matrix that we wish to anchor on. For example,

  ```python
  topic_model.fit(X, anchors=[[0, 2], 1], anchor_strength=2)
  ```

  anchors the words of columns 0 and 2 to the first topic, and word 1 to the second topic.



  There are a number of strategies we can use with anchored CorEx. Below we provide just a handful of examples.

  1. *Anchoring a single set of words to a single topic*. This can help promote a topic that did not naturally emerge when running an unsupervised instance of the CorEx topic model. For example, we might anchor words like "snow," "cold," and "avalanche" to a topic if we supsect there should be a snow avalanche topic within a set of disaster relief articles.

  ```python
  topic_model.fit(X, words=words, anchors=[['snow', 'cold', 'avalanche']], anchor_strength=4)
  ```

  2. *Anchoring single sets of words to multiple topics*. This can help find different aspects of a topic that may be discussed in several different contexts. For example, we might anchor "protest" to three topics and "riot" to three other topics to understand different framings that arise from tweets about political protests.

  ```python
  topic_model.fit(X, words=words, anchors=['protest', 'protest', 'protest', 'riot', 'riot', 'riot'], anchor_strength=2)
  ```

  3. *Anchoring different sets of words to multiple topics.* This can help enforce topic separability if there appear to be "chimera" topics that are not well-separated. For example, we might anchor "mountain," "Bernese," and "dog" to one topic and "mountain," "rocky," and "colorado" to another topic to help separate topics that merge discussion of Bernese Mountain Dogs and the Rocky Mountains.

  ```python
  topic_model.fit(X, words=words, anchors=[['bernese', 'mountain', 'dog'], ['mountain', 'rocky', 'colorado']], anchor_strength=2)
  ```

  The [example notebook](https://github.com/gregversteeg/corex_topic/blob/master/corextopic/example/corex_topic_example.ipynb) details other examples of using anchored CorEx. We encourage domain experts to experiment with other anchoring strategies that suit their needs.

  **Note:** when running unsupervised CorEx, the topics are returned and sorted according to how much total correlation they each explain. When running anchored CorEx, the topics are not sorted by total correlation, and the first *n* topics will correspond to the *n* anchored topics in the order given by the model input.







  For the CorEx topic model, topics are latent factors that can be expressed or not in each document. We can use the matrices of these topic expressions as input for another layer of the CorEx topic model, yielding a hierarchical topic model.

  ```python

  topic_model = ct.Corex(n_hidden=100)
  topic_model.fit(X)


  tm_layer2 = ct.Corex(n_hidden=10)
  tm_layer2.fit(topic_model.labels)

  tm_layer3 = ct.Corex(n_hidden=1)
  tm_layer3.fit(tm_layer2.labels)
  ```

  Visualizations of the hierarchical topic model can be accessed through ```vis_topic.py```.

  ```python
  vt.vis_hierarchy([topic_model, tm_layer2, tm_layer3], column_label=words, max_edges=300, prefix='topic-model-example')
  ```







  For speed reasons, this version of the CorEx topic model works only on binary data and produces binary latent factors. Despite this limitation, our work demonstrates CorEx produces coherent topics that are as good as or better than those produced by LDA for short to medium length documents. However, you may wish to consider additional preprocessing for working with longer documents. We have several strategies for handling text data.

  0. Naive binarization. This will be good for documents of similar length and especially short- to medium-length documents.

  1. Average binary bag of words. We split documents into chunks, compute the binary bag of words for each documents and then average. This implicitly weights all documents equally.

  2. All binary bag of words. Split documents into chunks and consider each chunk as its own binary bag of words documents.This changes the number of documents so it may take some work to match the ids back, if desired. Implicitly, this will weight longer documents more heavily. Generally this seems like the most theoretically justified method. Ideally, you could aggregate the latent factors over sub-documents to get 'counts' of latent factors at the higher layers.

  3. Fractional counts. This converts counts into a fraction of the background rate, with 1 as the max. Short documents tend to stay binary and words in long documents are weighted according to their frequency with respect to background in the corpus. This seems to work Ok on tests. It requires no preprocessing of count data and it uses the full range of possible inputs. However, this approach is not very rigorous or well tested.

  For the python API, for 1 and 2, you can use the functions in ```vis_topic``` to process data or do the same yourself. Naive binarization is specified through the python api with count='binarize' and fractional counts with count='fraction'. While fractional counts may be work theoretically, their usage in the CorEx topic model has not be adequately tested.



  Also for speed reasons, the CorEx topic model enforces single membership of words in topics. If a user anchors a word to multiple topics, the single membership will be overriden.



  If you use this code, please cite the following:

  > Gallagher, R. J., Reing, K., Kale, D., and Ver Steeg, G. "[Anchored Correlation Explanation: Topic Modeling with Minimal Domain Knowledge](https://www.transacl.org/ojs/index.php/tacl/article/view/1244)." *Transactions of the Association for Computational Linguistics (TACL)*, 2017.

  See the following papers if you interested in how CorEx works generally beyond sparse binary data.

  > [*Discovering Structure in High-Dimensional Data Through Correlation Explanation*](http://arxiv.org/abs/1406.1222), Ver Steeg and Galstyan, NIPS 2014. <br>

  >[*Maximally Informative Hierarchical Representions of High-Dimensional Data*](http://arxiv.org/abs/1410.7404), Ver Steeg and Galstyan, AISTATS 2015.


pkgId: 72778a272d9a1c51cdc35c6baea3adbac418ceb9a715e5516b22f08caed2aa1d
name: python-corflow
arch: src
version: 3.2.15
epoch: 0
release: 1
summary: A conversion/manipulation tool for oral linguistics.
url: https://pypi.org/project/corflow/
rpm_license: CC-BY-4.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-corflow-3.2.15-1.src.rpm
checksum_type: sha256
description:
  A file conversion/manipulation software for corpus linguistics.

  See the [Github's wiki](https://github.com/DoReCo/corflow/wiki) for documentation.


  François Delafontaine: Neuchâtel (Switzerland), 22.08.2022


  *Corflow*, originally the 'multitool', has been started around 2015 to anonymize and convert files for the [OFROM](http://www11.unine.ch/) corpus (at Neuchatel, Switzerland). Initially in C++, it was reworked between 2016-9 in the ANR-DFG [SegCor](segcor.cnrs.fr) project (at Orleans, France) and translated in Python. It is now and since 2019 being developped within the ANR-DFG [DoReCo](http://www.doreco.info/) project (at Lyon, France).


  While core objectives are the conversion and manipulation of files in the context of corpus linguistics (notably oral linguistics), some precisions are needed.
  But first: *conversion* means changing a file's format. A *format* is the way information is stored in the file. We will generally use the software or collection associated with a format to designate the format itself. *Elan-to-Praat* for example means converting from the '.eaf' format to the '.TextGrid' format. Finally *manipulation* means operations on the stored information itself: merging, anonymization, inter-rater agreement, etc.
  In details, the objectives are:
  1. An "X-to-Y" conversion: meaning conversion should be possible from any supported format to any other supported format (see [Pepper](https://corpus-tools.org/pepper/)'s swiss-army knife approach).
  2. A *lossless* conversion: meaning that as little information should be lost during conversion as is feasible.
  3. Accessibility: meaning that the package should be available (a) for automatic integration, (b) through command prompt and (c) through a dedicated graphical interface.
  4. More accessibility: meaning that the package should require as few third-party libraries as possible, be easy to understand and to expand (by users adding their own scripts).
  This software's public (in corpus linguistics) is expected to have little to no experience with code. More advanced users are expected to prefer [Pepper](https://corpus-tools.org/pepper/).


  No versioning has been yet set in place.
  * No user interface provided.
  * No customized error messages.
  * Current supported formats are. 'Praat (.TextGrid)', 'Elan (.eaf)', 'Pangloss (.xml)'.
  Testing has been limited and users should expect potential errors. TEI import is still in development.


  In its Python version, Corflow is considered as a package to import as is. That package corresponds to the `conversion` folder.
  The *conversion* folder should contain a 'Transcription.py' file and a set of 'fromX.py' and 'toX.py' files (for import and export respectively).


  Corflow is built around a `Transcription` class used for "universal" information storage: all information from all the supported formats should fit in. Import scripts instantiate a Transcription object and fill it with the file's information; export scripts use a Transcription object to write a file:
      X -fromX-> Transcription -toY-> Y
  Manipulations are expected to operate on Transcription objects:
      X -fromX-> Transcription -manipulation-> Transcription -toY-> Y
  In practice this can vary, as manipulations are open and dependent on the user's needs.

  The `Transcription` class is divided in (a) *data* and (b) *metadata*.
  (5a) `Data` is, for oral linguistics, what corresponds to a transcription. A transcription is text aligned to sound. The alignment relies on time points (`time boundaries` or `timestamps`). A set composed of a given text and two time boundaries (its start and end points relative to sound) is called a `Segment`: technically any arbitrary unit generated that way. *Segments* might not be linguistic units, and might not be units at all (and conversely, a linguistic unit like the *pause* might have no corresponding segment). A set of segments is called a `Tier` and a set of *tiers* corresponds to the whole *transcription*.
  We don't claim here that all *tiers*, that is, all sets of segments, are linguistic *transcriptions*. They can also represent translations, annotations, etc. Tiers, like segments, are type-neutral.
  (5b) `Metadata` is, for corpus linguistics, all information around the transcription: where, when, who, how...

  ```
  *Start* and *end* contain the time boundaries and the content the *text*. This is how data is stored in the `Transcription` class in general, although more variables exist.


  The question of [file conversion](https://corflo.hypotheses.org/122) might never be answered in a satisfactory manner. Originally just an nth homemade conversion tool, our hope is this becomes an easily-accessible package for other teams/projects to use either as is, for basic use, or by being able to quickly adapt it to their requirements.


pkgId: a780aa0d88b4545351d9146297dc7f4fa9dd3b4d9fc5e1e6160b5ca6da5a39e3
name: python-cornellGrading
arch: src
version: 2.20.0
epoch: 0
release: 1
summary: Routines for interacting with Cornell installations of Canvas and Qualtrics
url: https://github.com/dsavransky/grading
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cornellGrading-2.20.0-1.src.rpm
checksum_type: sha256
description:
  To install from PyPI:
  ```
  pip install --user cornellGrading
  ```
  Or, with optional dependencies required to push LaTeX into Canvas HTML:
  ```
  pip install --user cornellGrading[latex2html]
  ```


pkgId: ce385160e0c05dd935252ae0c7e88f1ee20df01e8c0b1b0e0c1ae29a6fc8d4e4
name: python-corner
arch: src
version: 2.2.2
epoch: 0
release: 1
summary: Make some beautiful corner plots
url: https://corner.readthedocs.io
rpm_license: BSD 2-Clause License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-corner-2.2.2-1.src.rpm
checksum_type: sha256
description:
  [![Tests](https://github.com/dfm/corner.py/workflows/Tests/badge.svg?style=flat)](https://github.com/dfm/corner.py/actions)
  [![License](https://img.shields.io/badge/license-BSD-blue.svg?style=flat)](https://github.com/dfm/corner.py/blob/main/LICENSE)
  [![DOI](https://zenodo.org/badge/4729/dfm/corner.py.svg?style=flat)](https://zenodo.org/badge/latestdoi/4729/dfm/corner.py)
  [![Paper](https://joss.theoj.org/papers/10.21105/joss.00024/status.svg?style=flat)](http://dx.doi.org/10.21105/joss.00024)



  If you make use of this code, please cite [the JOSS paper](http://dx.doi.org/10.21105/joss.00024):

  ```tex
  @article{corner,
    doi = {10.21105/joss.00024},
    url = {https://doi.org/10.21105/joss.00024},
    year  = {2016},
    month = {jun},
    publisher = {The Open Journal},
    volume = {1},
    number = {2},
    pages = {24},
    author = {Daniel Foreman-Mackey},
    title = {corner.py: Scatterplot matrices in Python},
    journal = {The Journal of Open Source Software}
  }
  ```


pkgId: 0170996716d36b01c1ec673a5eab02b2561077deb20eecfb3f4c36841dc60953
name: python-cornice
arch: src
version: 6.1.0
epoch: 0
release: 1
summary: Define Web Services in Pyramid.
url: https://pypi.org/project/cornice/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cornice-6.1.0-1.src.rpm
checksum_type: sha256
rpm_license:
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.


pkgId: 2a72296edb7db27ba009413c3ef925b07bc9d3f6ad46e9deda679104e8030fce
name: python-cornice-swagger
arch: src
version: 1.0.1
epoch: 0
release: 1
summary: Generate swagger from a Cornice application
url: https://github.com/Cornices/cornice.ext.swagger
rpm_license: Apache License (2.0)
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cornice-swagger-1.0.1-1.src.rpm
checksum_type: sha256
description:
  |pypi| |docs| |slack| |travis| |master-coverage|
  *Cornice extension to generate OpenAPI/Swagger Specification*
  Cornice Swagger creates an
  `OpenAPI/Swagger 2.0 compliant specification <https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md>`_
  from `Cornice <https://github.com/Cornices/cornice>`_ applications
  maximizing the extracted documentation data from functional code,
  while allowing users to override some parts of the generated document.
  * `Documentation <https://cornices.github.io/cornice.ext.swagger/>`_
  * `Tutorial <https://cornices.github.io/cornice.ext.swagger/tutorial.html>`_
  * `Issue tracker <https://github.com/Cornices/cornice.ext.swagger/issues>`_
  * `Live chat <https://corniceswagger.herokuapp.com/>`_


pkgId: f5ef3bd7bf0a261ca888c8979060d70cb0972e7783ea2102939f3e942bcaa9df
name: python-cornsnake
arch: src
version: 0.0.66
epoch: 0
release: 1
summary: Wrap common Python utilities for working with files, git, ZIP, lists, processes, dates and times.
url: https://github.com/mrseanryan/cornsnake
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cornsnake-0.0.66-1.src.rpm
checksum_type: sha256
description:
  A small library wrapping common Python utilities for working with files, git, ZIP, lists, processes, dates and times.

  Functions that I find myself writing time and again, on various OSS and personal projects - so collecting in one place, in case it is of use!

  For more details, see the [documentation](http://docs.mrseanryan.cornsnake.s3-website-eu-west-1.amazonaws.com/).

  [url_repo]: https://github.com/mrseanryan/cornsnake
  [url_semver_org]: https://semver.org/

  [![MIT License][img_license]][url_license]
  [![Supported Python Versions][img_pyversions]][url_pyversions]
  [![cornsnake][img_version]][url_version]

  [![PyPI Releases][img_pypi]][url_pypi]
  [![PyPI - Downloads](https://img.shields.io/pypi/dm/cornsnake.svg)](https://pypi.org/project/cornsnake)

  [img_license]: https://img.shields.io/badge/License-MIT-blue.svg
  [url_license]: https://github.com/mrseanryan/cornsnake/blob/master/LICENSE

  [url_version]: https://pypi.org/project/cornsnake/

  [img_version]: https://img.shields.io/static/v1.svg?label=SemVer&message=cornsnake&color=blue
  [url_version]: https://pypi.org/project/bumpver/

  [img_pypi]: https://img.shields.io/badge/PyPI-wheels-green.svg
  [url_pypi]: https://pypi.org/project/cornsnake/#files

  [img_pyversions]: https://img.shields.io/pypi/pyversions/cornsnake.svg
  [url_pyversions]: https://pypi.python.org/pypi/cornsnake

  [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/K3K73ALBJ)



  ```
  python -m pip install --upgrade cornsnake
  ```



  - Python 3.11 or higher

  ```
  pip install PyMuPDF
  ```

  - fitz is for PDF parsing (installed as PyMuPDF)



  Functions are organised in modules, providing logical groups like `util_file` or `util_print`.

  To use a particular module, simply import it from cornsnake:

  ```python
  from cornsnake import util_file, util_print
  ```

  Then, the modules are available to use:

  ```python
  lines = util_file.read_lines_from_file("my-file.txt")
  util_print.print_result(f"Read {len(lines)} lines")
  ```

  To see what functions are available, see the [Documentation](http://docs.mrseanryan.cornsnake.s3-website-eu-west-1.amazonaws.com/) or [source code](https://github.com/mrseanryan/cornsnake/tree/master/cornsnake).

  For examples see the [unit tests](https://github.com/mrseanryan/cornsnake/tree/master/tests/unit) and [e2e tests](https://github.com/mrseanryan/cornsnake/tree/master/tests/e2e).



  | Module | Description | Documentation |
  |---|---|---|
  | config | Globally accessible config object. Can be configured by for example reading from command line arguments or TOML file (via tomllib), and then writing to the properties in-memory. See util_toml.py for an example of reading from an ini file (TOML format). | [config docs](http://docs.mrseanryan.cornsnake.s3-website-eu-west-1.amazonaws.com/cornsnake/config.html) |
  | util_color | Defines color constants and a function for colorizing text output for terminal. | [util_color docs](http://docs.mrseanryan.cornsnake.s3-website-eu-west-1.amazonaws.com/cornsnake/util_color.html) |
  | util_date | Functions for date manipulation. It includes functions to parse, format, add days to, and validate dates in the yyyy-mm-dd format. | [util_date docs](http://docs.mrseanryan.cornsnake.s3-website-eu-west-1.amazonaws.com/cornsnake/util_date.html) |
  | util_dependencies | Functions for checking the versions of Python and Git. It ensures that the major and minor versions of these dependencies meet the required criteria. | [util_dependencies docs](http://docs.mrseanryan.cornsnake.s3-website-eu-west-1.amazonaws.com/cornsnake/util_dependencies.html) |
  | util_dir | Working with directories, files, and file paths. | [util_dir docs](http://docs.mrseanryan.cornsnake.s3-website-eu-west-1.amazonaws.com/cornsnake/util_dir.html) |
  | util_file | File operations including copying, reading, and writing text to files. | [util_file docs](http://docs.mrseanryan.cornsnake.s3-website-eu-west-1.amazonaws.com/cornsnake/util_file.html) |
  | util_git | Functions for interacting with a Git repository. It includes functions for executing Git commands, checking out branches, handling commits, and managing Git configuration settings. | [util_git docs](http://docs.mrseanryan.cornsnake.s3-website-eu-west-1.amazonaws.com/cornsnake/util_git.html) |
  | util_input | Functions for handling user input with various formats and validations. | [util_input docs](http://docs.mrseanryan.cornsnake.s3-website-eu-west-1.amazonaws.com/cornsnake/util_input.html) |
  | util_json | Functions for reading from and writing to a JSON file. The `read_from_json_file` function reads JSON data from a file, and the `write_to_json_file` function writes JSON data to a file. | [util_json docs](http://docs.mrseanryan.cornsnake.s3-website-eu-west-1.amazonaws.com/cornsnake/util_json.html) |
  | util_list | Functions for manipulating lists of data. Functions include chunking lists, excluding elements from one list that are present in another, finding the intersection of two lists, and various other list operations. | [util_list docs](http://docs.mrseanryan.cornsnake.s3-website-eu-west-1.amazonaws.com/cornsnake/util_list.html) |
  | util_log | Functions for logging exceptions and setting up logging configurations. | [util_log docs](http://docs.mrseanryan.cornsnake.s3-website-eu-west-1.amazonaws.com/cornsnake/util_log.html) |
  | util_markdown_table | Generating Markdown content. Functions like adding row separators, generating Markdown images, and generating italicized text are included. | [util_markdown_table docs](http://docs.mrseanryan.cornsnake.s3-website-eu-west-1.amazonaws.com/cornsnake/util_markdown_table.html) |
  | util_network | Making a POST request using the urllib library. | [util_network docs](http://docs.mrseanryan.cornsnake.s3-website-eu-west-1.amazonaws.com/cornsnake/util_network.html) |
  | util_object | Functions for working with object attributes. The `get_attributes` function retrieves all non-private attributes of an object. The `get_attribute_value` function returns the value of a specific attribute of an object. | [util_object docs](http://docs.mrseanryan.cornsnake.s3-website-eu-west-1.amazonaws.com/cornsnake/util_object.html) |
  | util_os | Functions for checking the operating system and logging OS information. The functions determine if the OS is Windows, Mac, or Unix, and log relevant OS details. | [util_os docs](http://docs.mrseanryan.cornsnake.s3-website-eu-west-1.amazonaws.com/cornsnake/util_os.html) |
  | util_pdf | Functions for extracting text from a PDF file and checking if a file is a PDF. | [util_pdf docs](http://docs.mrseanryan.cornsnake.s3-website-eu-west-1.amazonaws.com/cornsnake/util_pdf.html) |
  | util_pick | Functions for randomly selecting text. The `pick_one_random` function chooses a random text from a list. The `pick_one_by_prompt` function prompts the user to pick a text from a list. | [util_pick docs](http://docs.mrseanryan.cornsnake.s3-website-eu-west-1.amazonaws.com/cornsnake/util_pick.html) |
  | util_print | A Single entry point for printing - so can add custom printing with color and logging. Functions for printing with different colors, logging messages, printing sections, and handling warnings. | [util_print docs](http://docs.mrseanryan.cornsnake.s3-website-eu-west-1.amazonaws.com/cornsnake/util_print.html) |
  | util_proc | Running processes and opening Windows Explorer at a specified directory. | [util_proc docs](http://docs.mrseanryan.cornsnake.s3-website-eu-west-1.amazonaws.com/cornsnake/util_proc.html) |
  | util_progress | Functions for tracking progress and updating a progress bar. | [util_progress docs](http://docs.mrseanryan.cornsnake.s3-website-eu-west-1.amazonaws.com/cornsnake/util_progress.html) |
  | util_robust_delete | Functions for recursively deleting directories and their contents. | [util_robust_delete docs](http://docs.mrseanryan.cornsnake.s3-website-eu-west-1.amazonaws.com/cornsnake/util_robust_delete.html) |
  | util_string | Check if a text string is empty. The `is_empty` function checks if a text string is None or contains only whitespace or a hyphen. | [util_string docs](http://docs.mrseanryan.cornsnake.s3-website-eu-west-1.amazonaws.com/cornsnake/util_string.html) |
  | util_text | Defines text constant variables - including for line endings. | [util_text docs](http://docs.mrseanryan.cornsnake.s3-website-eu-west-1.amazonaws.com/cornsnake/util_text.html) |
  | util_toml | Reading TOML (ini) files and updating the global config in memory (from config.py). | [util_toml docs](http://docs.mrseanryan.cornsnake.s3-website-eu-west-1.amazonaws.com/cornsnake/util_toml.html) |
  | util_validate | Functions for checking and validating configuration settings in the config.py file. | [util_validate docs](http://docs.mrseanryan.cornsnake.s3-website-eu-west-1.amazonaws.com/cornsnake/util_validate.html) |
  | util_wait | Function for waiting for a specified number of seconds. The `wait_seconds` function pauses the program execution for the specified number of seconds. | [util_wait docs](http://docs.mrseanryan.cornsnake.s3-website-eu-west-1.amazonaws.com/cornsnake/util_wait.html) |
  | zip_dir | Function for creating a zip archive from a directory. The `create_zip` function creates a zip archive of a specified directory. | [zip_dir docs](http://docs.mrseanryan.cornsnake.s3-website-eu-west-1.amazonaws.com/cornsnake/zip_dir.html) |



  - [github repo](https://github.com/mrseanryan/cornsnake)
  - [pypi package](https://pypi.org/project/cornsnake/)
  - [documentation](http://docs.mrseanryan.cornsnake.s3-website-eu-west-1.amazonaws.com/)

rpm_license:
  MIT License  Copyright (c) 2023 Sean Ryan  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


pkgId: 7541361d3eb567c93c6f3a40c1f09c8ee6c4785f153f30ffa17b7a1550dbe84a
name: python-coro-context-manager
arch: src
version: 0.2.0
epoch: 0
release: 1
summary: A simple object to wrap coroutines to make them awaitable or used via an asyn context manager
url: https://pypi.org/project/coro-context-manager/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-coro-context-manager-0.2.0-1.src.rpm
checksum_type: sha256
description:
  [![test](https://github.com/zschumacher/coro-context-manager/actions/workflows/test.yml/badge.svg)](https://github.com/zschumacher/coro-context-manager/actions/workflows/test.yml)
  [![PyPI version](https://badge.fury.io/py/coro-context-manager.svg)](https://badge.fury.io/py/coro-context-manager)
  [![codecov](https://codecov.io/gh/zschumacher/coro-context-manager/branch/main/graph/badge.svg?token=6610H3V6JE)](https://codecov.io/gh/zschumacher/coro-context-manager)
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
  [![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
  ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/coro-context-manager)


  *coro-context-manager* is a simple python package that includes an object that can wrap a coroutine to allow it to
  behave as a context manager or a regular awaitable.

  This class is super useful when you have a coroutine that returns an object that defines an async context manager using
  `__aenter__` and `__aexit__`




  ```console
  pip install coro-context-manager
  ```


  ```console
  poetry add coro-context-manager
  ```



  *CoroContextManager* can be used to wrap a coroutine so that it can be awaited or called via an async context manager
  in which case the library will try to use the underlying object's `__aenter__` and `__aexit__`, if they exist.
  ```python
  import asyncio

  from coro_context_manager import CoroContextManager


  class MyObject:

      def __init__(self, initial_value):
          self.some_value = initial_value

      async def __aenter__(self):
          await asyncio.sleep(.1)
          self.some_value += 1
          return self

      async def __aexit__(self, exc_type, exc_val, exc_tb):
          await asyncio.sleep(.1)
          self.some_value -= 1

      @classmethod
      async def an_io_intensive_constructor(cls, initial_value):
          await asyncio.sleep(10)
          return cls(initial_value)


  async def main():
      """
      Using CoroContextManager, I get a coroutine I can await or use with an async context manager, which proxies to
      the context manager defined on object returned by the coroutine, if it exists.
      """

      
      myobj = await CoroContextManager(MyObject.an_io_intensive_constructor(5))
      print(type(myobj))
      

      
      async with CoroContextManager(MyObject.an_io_intensive_constructor(5)) as myobj:
          print(type(myobj))
          
          print(myobj.some_value)
          

      print(myobj.some_value)
      


  asyncio.run(main())
  ```


  This is a common enough pattern used in several async packages all with slightly different implementation.  It would be
  nice if there was a consistent pattern everyone was using; this package aims to provide that.

  * [aiopg](https://github.com/aio-libs/aiopg/blob/master/aiopg/utils.py#L44)
  * [aioodbc](https://github.com/aio-libs/aioodbc/blob/master/aioodbc/utils.py#L36)
  * [aiohttp](https://github.com/aio-libs/aiohttp/blob/7514f220947ce078d4dd039cd0be49929b9976cc/aiohttp/client.py#L1082)
  * [cx_Oracle_async](https://github.com/GoodManWEN/cx_Oracle_async/blob/main/cx_Oracle_async/context.py#L3)
  * [aiomysql](https://github.com/aio-libs/aiomysql/blob/master/aiomysql/utils.py#L30)


pkgId: 647d4142da460c6c992bbc98c212daa0b4518a4aac93a6dc8b17d20fab18d5f2
name: python-corporate-reputation
arch: src
version: 0.18.0
epoch: 0
release: 1
summary: Unraveling Corporate and CEO Reputation using Aspect-Based Sentiment Analysis and Signal Modeling
url: https://entelecheia.github.io/corporate-reputation
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-corporate-reputation-0.18.0-1.src.rpm
checksum_type: sha256
description:
  [![pypi-image]][pypi-url]
  [![version-image]][release-url]
  [![release-date-image]][release-url]
  [![license-image]][license-url]
  [![codecov][codecov-image]][codecov-url]
  [![jupyter-book-image]][docs-url]

  <!-- Links: -->
  [codecov-image]: https://codecov.io/gh/entelecheia/corporate-reputation/branch/main/graph/badge.svg?token=5QP39SFTGR
  [codecov-url]: https://codecov.io/gh/entelecheia/corporate-reputation
  [pypi-image]: https://img.shields.io/pypi/v/corporate-reputation
  [license-image]: https://img.shields.io/github/license/entelecheia/corporate-reputation
  [license-url]: https://github.com/entelecheia/corporate-reputation/blob/main/LICENSE
  [version-image]: https://img.shields.io/github/v/release/entelecheia/corporate-reputation?sort=semver
  [release-date-image]: https://img.shields.io/github/release-date/entelecheia/corporate-reputation
  [release-url]: https://github.com/entelecheia/corporate-reputation/releases
  [jupyter-book-image]: https://jupyterbook.org/en/stable/_images/badge.svg

  [repo-url]: https://github.com/entelecheia/corporate-reputation
  [pypi-url]: https://pypi.org/project/corporate-reputation
  [docs-url]: https://corporate-reputation.entelecheia.ai
  [changelog]: https://github.com/entelecheia/corporate-reputation/blob/main/CHANGELOG.md
  [contributing guidelines]: https://github.com/entelecheia/corporate-reputation/blob/main/CONTRIBUTING.md
  <!-- Links: -->

  Unraveling Corporate and CEO Reputation using Aspect-Based Sentiment Analysis and Signal Modeling

  - Documentation: [https://corporate-reputation.entelecheia.ai][docs-url]
  - GitHub: [https://github.com/entelecheia/corporate-reputation][repo-url]
  - PyPI: [https://pypi.org/project/corporate-reputation][pypi-url]

  The reputation of a company and its CEO forms an intangible asset that significantly influences organizational success. With digital media becoming the central stage for public opinion formation, understanding and quantifying reputation has become more complex yet critically important. This study proposes an innovative approach to disentangle and measure the reputation of a company and its CEO using Aspect-Based Sentiment Analysis (ABSA) coupled with a signal model to trace the evolution of sentiment over time.

  The research first leverages ABSA, through a generative language modeling approach, to separately analyze sentiments associated with a company and its CEO. ABSA's granular nature allows us to differentiate aspects associated with the CEO from those linked to the company, thereby creating distinct reputation metrics.

  Next, a signal model, built upon principles from the Stochastic Process Theory and probability density functions, is used to analyze sentiment evolution over time, providing insights into the dynamic nature of reputation. This model further quantifies the mutual information between the sentiment scores of the CEO and the company, assessing their interdependence and the influence they exert on each other.

  While recognizing the challenges associated with employing ABSA and the proposed signal model, this research highlights the potential of these tools to inform strategic decision-making. Whether it's for companies striving to manage their reputation, investors evaluating corporate reputation, regulators ensuring compliance, or media organizations reporting on trends, the ability to separate and track the reputations of a company and its CEO could offer profound insights.

  The study, therefore, presents a new frontier in reputation analysis and management, enabling a granular, dynamic, and nuanced understanding of corporate and CEO reputations in the digital age.



  See the [CHANGELOG] for more information.



  Contributions are welcome! Please see the [contributing guidelines] for more information.



  This project is released under the [MIT License][license-url].


pkgId: c6f80752028b117ab05bbd5964baf1c145e1312ad51d7776edd0df3bc90f97c4
name: python-corpus-pax
arch: src
version: 0.1.27
epoch: 0
release: 1
url: https://lawsql.com
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-corpus-pax-0.1.27-1.src.rpm
checksum_type: sha256
summary:
  Using Github API (to pull individuals, orgs, and article content), setup a local sqlite database, syncing images to Cloudflare.

description:
  ![Github CI](https://github.com/justmars/corpus-pax/actions/workflows/main.yml/badge.svg)

  Using Github API (to pull individuals, orgs, and article content), setup a local sqlite database, syncing images to Cloudflarel utilized in the [LawSQL dataset](https://lawsql.com).



  See [documentation](https://justmars.github.io/corpus-pax).



  Checkout code, create a new virtual environment:

  ```sh
  poetry add corpus-pax # python -m pip install corpus-pax
  poetry update # install dependencies
  poetry shell
  ```

  Run tests:

  ```sh
  pytest
  ```


pkgId: 82a7800f7146cc1c2f7f07a86a09932f52ab55b39a773f055b1eacd919437edb
name: python-corpus-replicator
arch: src
version: 1.1.2
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://github.com/MozillaSecurity/corpus-replicator
rpm_license: MPL 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-corpus-replicator-1.1.2-1.src.rpm
checksum_type: sha256
description:
  [![Task Status](https://community-tc.services.mozilla.com/api/github/v1/repository/MozillaSecurity/corpus-replicator/main/badge.svg)](https://community-tc.services.mozilla.com/api/github/v1/repository/MozillaSecurity/corpus-replicator/main/latest)
  [![Matrix](https://img.shields.io/badge/dynamic/json?color=green&label=chat&query=%24.chunk[%3F(%40.canonical_alias%3D%3D%22%23fuzzing%3Amozilla.org%22)].num_joined_members&suffix=%20users&url=https%3A%2F%2Fmozilla.modular.im%2F_matrix%2Fclient%2Fr0%2FpublicRooms&style=flat&logo=matrix)](https://riot.im/app/#/room/#fuzzing:mozilla.org)
  [![PyPI](https://img.shields.io/pypi/v/corpus-replicator)](https://pypi.org/project/corpus-replicator)
  Corpus Replicator is a corpus generation tool that enables the creation of multiple
  unique output files based on templates. The primary intended use case is the
  creation of a seed corpus that can be used by fuzzers. Support for additional output
  formats can be added via the creation of `Recipes`. If a desired format is unsupported,
  support can be added via the creation of a `CorpusGenerator`.
  The goal is to create an efficient corpus that maximizes code coverage and minimizes
  file size. Small unique files that execute quickly are preferred.
  Currently four media types can be generated `animation`, `audio`, `image` and
  `video`.


pkgId: 149f2ecd57be59d12c43b64e59edaae8ae8674cf6baef60b9fab85ab83e05377
name: python-corpus2alpino
arch: src
version: 0.3.12
epoch: 0
release: 1
summary: Converts FoLiA and TEI files to Alpino XML files
url: https://github.com/UUDigitalHumanitieslab/corpus2alpino
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-corpus2alpino-0.3.12-1.src.rpm
checksum_type: sha256
description:
  [![Actions Status](https://github.com/UUDigitalHumanitiesLab/corpus2alpino/workflows/Unit%20tests/badge.svg)](https://github.com/UUDigitalHumanitiesLab/corpus2alpino/actions)

  [![PyPi/corpus2alpino](https://img.shields.io/pypi/v/corpus2alpino)](https://pypi.org/project/corpus2alpino/)



  Converts [CHAT](https://childes.talkbank.org/), [FoLiA](https://proycon.github.io/folia/), [PaQu metadata](https://dspace.library.uu.nl/bitstream/1874/356078/1/AnnCor_Annotation_2017_05_11_2017_05_11.pdf), plaintext and [TEI](http://www.tei-c.org) XML files to [Alpino](https://www.let.rug.nl/vannoord/alp/Alpino) XML files. Each sentence in the input file is parsed separately.





  ```bash
  pip install corpus2alpino
  corpus2alpino -s localhost:7001 folia.xml -o alpino.xml
  ```

  Or from project root:

  ```bash
  python -m corpus2alpino -s localhost:7001 folia.xml -o alpino.xml
  ```



  ```python
  from corpus2alpino.converter import Converter
  from corpus2alpino.annotators.alpino import AlpinoAnnotator
  from corpus2alpino.collectors.filesystem import FilesystemCollector
  from corpus2alpino.targets.memory import MemoryTarget
  from corpus2alpino.writers.lassy import LassyWriter

  alpino = AlpinoAnnotator("localhost", 7001)
  converter = Converter(FilesystemCollector(["folia.xml"]),
      
      annotators=[alpino],
      
      target=MemoryTarget(),
      
      writer=LassyWriter(True))


  parses = converter.convert()
  print(''.join(parses)) # <treebank><alpino_ds ... /></treebank>
  ```



  It is possible to add custom properties to (existing) Lassy/Alpino files. This is done using a csv-file containing the node attributes and values to look for and the custom properties to assign.

  For example:

  ```bash
  python -m corpus2alpino tests/example_lassy.xml -e tests/enrichment.csv -of lassy
  ```

  See [`corpus2alpino.annotators.enrich_lassy`](corpus2alpino/annotators/enrich_lassy.py) for more information.





  ```bash
  python -m unittest
  ```



  See: https://packaging.python.org/tutorials/packaging-projects/#generating-distribution-archives

  Make sure `setuptools` and `wheel` are installed. Then from the virtualenv:

  ```bash
  pip install build
  python -m build
  twine upload dist/*
  ```



  * [Alpino parser](http://www.let.rug.nl/vannoord/alp/Alpino) running as a server: `Alpino batch_command=alpino_server -notk server_port=7001`
  * Python 3.8 or higher
  * [libfolia-dev](https://packages.ubuntu.com/bionic/libfolia-dev)
  * [libxml2-dev](https://packages.ubuntu.com/bionic/libxml2-dev)



  ```bash
  sudo apt install libfolia-dev libxml2-dev
  pip install -r requirements.txt
  ```


pkgId: c9fdca1318a7adcd89478d876f9b89dc4e5ff65938292bd634103cde91bbc6c6
name: python-corrct
arch: src
version: 0.9.1
epoch: 0
release: 1
summary: Physically corrected projectors for X-ray induced emission CT.
url: https://github.com/cicwi/PyCorrectedEmissionCT
rpm_license: BSD license
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-corrct-0.9.1-1.src.rpm
checksum_type: sha256
description:
  [![Python package](https://github.com/cicwi/PyCorrectedEmissionCT/actions/workflows/pythonpackage.yml/badge.svg)](https://github.com/cicwi/PyCorrectedEmissionCT/actions/workflows/pythonpackage.yml)
  ![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/cicwi/PyCorrectedEmissionCT)
  ![License](https://img.shields.io/github/license/cicwi/PyCorrectedEmissionCT)
  [![DOI](https://zenodo.org/badge/218092017.svg)](https://zenodo.org/badge/latestdoi/218092017)

  Physically corrected projectors for X-ray induced emission CT.
  PyCorrectedEmissionCT is usually abbreviated to its python module name: `corrct` (either pronounced "corr-C-T" or "correct").

  This package provides the following functionality:

  * Support for **attenuation correction** of the forward-projection and back-projection.
  * Various solvers (reconstruction algorithms):
    - Simultaneous Iterative Reconstruction Technique (**SIRT**).
    - Maximum Likelihood Estimation Maximisation (**MLEM**).
    - Simultaneous Algebraic Reconstruction Technique (**SART**).
    - Primal-dual optimization from Chambolle-Pock (Primal-Dual Hybrid Gradient - **PDHG**), with:
      * Various data fitting terms, including **Gaussian and Poisson noise** modelling.
      * Various optional regularization terms, including: **TV-min**, l1-min, laplacian, and **wavelet** l1-min.
      * Multi-channel (collaborative) regularization terms, like: **TNV** (Total Nuclear Variation).
    - Filtered Back-Projection (**FBP**), and its data-dependent filter learning variant
  (**[PyMR-FBP](https://github.com/dmpelt/pymrfbp)**).
  * Two projector backends, based on: [astra-toolbox](https://github.com/astra-toolbox/astra-toolbox) and
  [scikit-image](https://github.com/scikit-image/scikit-image).
  * Guided **regularization parameter selection**, through cross-validation and elbow method.
  * Projection **alignment** routines.

  It contains the code used for the following paper, which also provides a
  mathematical description of the attenuation correction concepts and algorithms used here:

  * N. Viganò and V. A. Solé, "Physically corrected forward operators for
  induced emission tomography: a simulation study," Meas. Sci. Technol., no.
  Advanced X-Ray Tomography, pp. 1–26, Nov. 2017.
  [https://doi.org/10.1088/1361-6501/aa9d54](https://doi.org/10.1088/1361-6501/aa9d54)

  Other useful information:

  * Free software: BSD 3-Clause license
  * Documentation: [https://cicwi.github.io/PyCorrectedEmissionCT/](https://cicwi.github.io/PyCorrectedEmissionCT/)



  It takes a few steps to setup PyCorrectedEmissionCT on your
  machine. We recommend installing
  [Anaconda package manager](https://www.anaconda.com/download/) for
  Python 3.



  Simply install with:
  ```
  conda install -c n-vigano corrct
  ```

  If you want fast tomographic projectors using the astra-toolbox:
  ```
  conda install -c astra-toolbox astra-toolbox
  ```



  Simply install with:
  ```
  pip install corrct
  ```

  If you are on jupyter, and don't have the rights to install packages
  system-wide (e.g. on jupyter-slurm at ESRF), then you can install with:
  ```
  ! pip install --user corrct
  ```



  To install PyCorrectedEmissionCT, simply clone this GitHub
  project. Go to the cloned directory and run PIP installer:
  ```
  git clone https://github.com/cicwi/PyCorrectedEmissionCT.git corrct
  cd corrct
  pip install -e .
  ```



  To learn more about the functionality of the package check out our
  examples folder.



  * **Nicola VIGANÒ** - *Main developer*
  * **Jerome LESAINT** - *Contributor*
  * **Patrick HARRISON** - *Contributor*

  See also the list of [contributors](https://github.com/cicwi/PyCorrectedEmissionCT/contributors) who participated in this project.



  Contributions are always welcome. Please submit pull requests against the `master` branch.

  If you have any issues, questions, or remarks, then please open an issue on GitHub.



  This project is licensed under the BSD license - see the [LICENSE.md](LICENSE.md) file for details.


  All notable changes to this project will be documented in this file.

  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

  [Unreleased]: https://www.github.com/cicwi/corrct/compare/v0.9.1...develop



  - Overall improvements to `ProjectionGeometry` in the module `models`:
    - Initial support for cone-beam geometry, including Parker weights for FDK
    - Support for detector tilts
    - Better support for detector VU shifts (respecting axes orientation)
  - Function to fit scale and bias of an image against data (possibly in a different space)
  - Wavelet-Fourier method for the destriping of sinograms
  - Ghost Imaging / Structured Illumination:
    - Resolution estimation
    - Mask binning support
  - Linear attenuation coefficient computation for a given material

  - Bug introduced with scikit-image 0.22
  - Alignment and solvers tests



  - QR decomposition for structured illumination
  - Background computation function from projection edges
  - Basic alignment routines:
    - Simple pre-alignment methods, for projection alignment
    - Stack shift tracking, for correcting image drifts
  - Experimental astra-toolbox backend support (direct FP and BP)
  - Basic phase contrast support:
    - Computing and plotting delta-over-beta
    - Computing TIE and CTF phase propagation functions
  - MLEM solver (thanks to J. Lesaint #20)

  - Multi-platform pip conda package building
  - Type hinting fixes
  - Full-field transmission flat-fielding



  - Power spectrum calculation function.

  - Pypi package creation.



  - Ghost imaging support (structured illumination):
    - Theoretical mask generation (incl. MURA, Half-Gaussian, Bernoulli)
    - Dedicated projector (CPU based).

  - Circular mask initialization



  - Default VolumeGeometry creation from volume.
  - Tapering border size support in volume mask.
  - 1D gradient based regularizer shortcut.
  - Isotropic undecimented wavelet regularizer support.

  - Fluorescence line selection case sensitive bug.
  - Verbose feedback in parabolic fitting for parameter tuning.



  - More documentation / tutorial content.
  - Energy conversion functions (keV to m, and vice versa).
  - Tapering for truncated volumes in FSC computation.

  - Typo that preventing using `ProjectionGeometry` from `models`.
  - Shape dimensions (XYZ vs ZXY) interpretation in `VolumeGeometry` and other functions.
  - Cross-validation data term initialization in solvers.
  - Tapering to circular masks.



  - Wide API refactoring: renamed various modules, and moved processing routines to sub-package.
  - Initial draft of tutorial. More documentation on the way.
  - Line intersection computation.
  - Plotting of FRCs.
  - Tests: initial support for projectors.

  - Typo in function name.
  - Simplified examples 01 and 02.
  - FRC/FSC axes selection.



  - Multi-channel (collaborative) regularization (including TNV - Total Nuclear Variation).
  - Support for custom (external, user defined) projection backends.
  - Dedicated FBP filters module.
  - Parallelization of guided regularization functions.
  - A lot of work towards full type hinting usage.

  - Potential memory leak in astra-toolbox projector backend.
  - Gradient and laplacian implementations for arbitrary directions.
  - Output and consistency from tests for solver classes.
  - Residual norm computation in the weighted least squares data term.
  - Dimension mismatch in projector, when using only one angle.
  - Back-projection normalization in scikit-image projector backend.



  - Better support for FBP:
    - Dedicated solver class.
    - Support for 3D geometries.
    - Use of scikit-image's filters, with `rfft`.
    - Support for various padding modes (constant, edge, etc).
  - Support for various padding modes in gradient, Laplacian and convolution operators.
  - Support for Lorentzian and sech^2 beam shapes.
  - Computation of Center-of-Mass for volume.

  - Border behavior in convolution operator.
  - Sanitized projector's angle input.
  - Denoising / deconvolution method.
  - Models: handling of astra-toolbox's 2D rotation direction.



  - New module called `models`:
    - VolumeGeometry: description of the volume.
    - ProjectionGeometry: description / manipulation of the projection geometry.
    - Support for unmatched pixel-voxel size, cone beam geometry, uneven volume shape.
    - Arbitrary geometry, including tilted detector.
  - Convolution operator and deconvolution support.
  - Support for rotating projection stack.
  - Support for computing cross-correlation curves.
  - Computation of PSF for pencil beam scanning with gaussian beam.
  - Support for computing attenuation maps outside the corrected projector.

  - Pixel weights, when having small outliers.
  - Volume mask generation
  - Dimension bug in azimuthal integration.
  - Inconsistency between astra-toolbox and scikit-image backends.



  - Support for XRF line handling (Siegbahn).
  - Support for log-scaling of data weigths.
  - More type hinting and docstrings.

  - 3D volume support (especially in astra-toolbox backend).
  - Attenuation correction in 3D volumes.
  - Handling of multi-detector in attenuation corrected projector (non-symmetric).
  - Handling of multi-detector in SART.
  - Wavelet scaling in regularizers.
  - Installation instructions.
  - Flat-fielding function.
  - Updated examples to latest solvers changes.



  - Uncertainty propagation functions, for weighted minimizations.
  - Unpreconditioned l1-minimization (standard behavior).

  - Double application of weights in SIRT weighted least squares.
  - Use PDHG preconditioning by default.
  - Wavelet approximation minimization by default.



  - Moved data terms and regularizers to dedicated module.
  - Conditional minimization of low pass (approximation) portion of wavelet decomposition.
  - Cross-validation and L-curve methods for selecting regularization parameters.
  - Support for different regularization weights across reconstruction volume.
  - Improved corrected projector performance.
  - Restructured and expanded test phantom creation.
  - Basic multi-threading support for CPU operations.
  - Initial type hinting.
  - FRC/FSC and azimuthal integration support.
  - Automatic image denoising (with cross-validation).

  - Size of transformed volumes in dwt.
  - Deprecation warnings from recent numpy versions.
  - Warning in scikit-image projector backend.
  - Copy of x0 and data terms in solvers.
  - Angle consistency among different projectors.
  - ProjectorMatrix when using precondioned PDHG solver.



  - scikit-image backend, as preferred in 2D non-GPU reconstructions.
  - Renamed AttenuationProjector into ProjectorAttenuationXRF.
  - Support for test/cross-validation sets in solvers.
  - Residual calculation with different data-fidelity terms.
  - Projection matrix based projector.

  - PyWavelets interface change.
  - Background usage in the data terms.
  - Examples on the different data-fidelity terms.
  - Github workflows to use pip instead of conda.



  - FFT operator, and FFT regularizer.
  - l2-gradient (smooth) regularizer.
  - Support for multiple regularizers.

  - Norm l2b (deadzone) is also weighted now.
  - Weighted least-squares implementation.
  - Crop inverse DWT output when necessary.
  - Changelog of 0.3.0



  - Data fidelity classes:
    - Use as norms for regularizers.
    - New classes: Huber norm, l12, l2b (l2 with deadzone), l1b (l1 with deadzone).
    - Residual computation.
    - Background bias support.
  - Regularization:
    - New classes: smoothness based on gradient, Huber TV, decimated wavelets, Huber wavelet, median filter.
    - Constraint classes (lower and upper limits) based on regularization.
    - Simplified and unified code.
  - Solvers:
    - SIRT now supports various l2 norm data terms.
    - CP and SIRT report better information on regularization.
    - Use of data term to compute residual correctly.
  - More flexibility and options to image denoiser.
  - New module for easing development of tests and examples.

  - Python hard crash when CUDA not available.
  - Examples to comply with recent changes.
  - Axes passing to wavelet transform.
  - Stationary wavelet weights calculation.



  - Operator form (based on scipy.linalg.LinearOperator) for regularizers and projectors
  - Data fidelity function classes, including weighted least-squares
  - More test coverage
  - Support for non GPU reconstructions (in 2D)
  - Multi-dimensional volume mask creation

  - SIRT regularization
  - Windows conda package build, and Python 3.8 target
  - Laplacian regularizer norm
  - Wavelet regularizer normalization



  - On-demand padding for Wavelet regularizer
  - Projection intensity rescaling for different angles in base projector
  - Support for 3D absorption maps (but not thouroughly tested, yet)
  - Data-term residual computation to all solvers
  - Some tests to solvers and regularizers
  - Automated testing and linting on github workflows
  - Support for ASTRA's super-sampling of pixels and voxels
  - Implemented scipy's sparse LinearOperator interface for the projectors
  - Utility min-log and simple flat-fielding functions for transmission data

  - Copy-paste error, and detector data axis order in SART algorithm implementation
  - Weights for masks in SART algorithm
  - Error in unpreconditioned CP implementation
  - Applied linting changes, to improve the readability of the code



  - Unpreconditioned Chambolle-Pock algorithm (as default)
  - Utility functions for sinogram padding and circular volume mask creation
  - FBP data-dependent filters from D. Pelt
  - Improved performance of backprojection in non-symmetric uncorrected

  - Wavelet decomposition along one dimension
  - TV regularizer for dimensions larger than ndims
  - Documentation and links
  - Handling of matrices



  - New regularizers: non-decimated wavelets and laplacian
  - Solvers: added projection masks, relaxation parameters, sirt regularizers
  - Uncorrected projector for 2D and 3D data

  - sub-pixel attenuation correction



  - Multi-detector reconstruction

  - TV-min sign
  - Solvers' name visualization
  - Back-projection behavior with different inputs



  - Initial release, with corrected forward and back-projections.
  - SIRT, SART, and Chambolle-Pock solvers.
  - TV-min and l1-norm based regularizers.


pkgId: 6c4833124bfd2a0fd7143cedaa712357d8f2b20930e7407f3415b797b97170ca
name: python-correction-helper
arch: src
version: 2024.15
epoch: 0
release: 1
summary: Some helpers to help writing correction bots, use by hackinscience.org.
url: https://github.com/JulienPalard/correction-helper
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-correction-helper-2024.15-1.src.rpm
checksum_type: sha256
description:
  This is just a set of tools to help writing correction bots in Python for Python.

  It is used for [hackinscience](https://hackinscience.org), but could
  be used elsewhere.




  Running student code is probably really unsafe, unless you trust your
  students not to drop you a backdoor.

  This projet does *not* help with security in any ways, maybe take a
  look at [firejail](https://github.com/netblue30/firejail) if you have
  trust issues (Yes you can use `correction-helper` inside `firejail`).




  To install it, run: `pip install correction-helper`.


  In your checking code, you can use it like this:




  This decorator is aimed to catch most problems that could happen in
  student code, use it simply as:

  ```python
  with student_code():
      their_function()
  ```

  Find a more complete example in the `examples/` directory.






  Printed right before the exception, if any.

  It's allowed to give a list of strings, in which case they'll be
  separated by `"\n\n"`, useful to render markdown paragraphs.




  Message to display before the student prints (in case `print_allowed`
  is `False` or `None`).

  It's allowed to give a list of strings, in which case they'll be
  separated by `"\n\n"`, useful to render markdown paragraphs.




  Message to display in case the code runs slower than the given `timeout` (defaults to 1s).

  It's allowed to give a list of strings, in which case they'll be
  separated by `"\n\n"`, useful to render markdown paragraphs.




  A prefix for `print_prefix`, `exception_prefix`, and
  `too_slow_message=`, usefull to deduplicate strings, like:

  ```python
  with student_code(
      prefix="While calling blahblah('bar')",
      print_prefix="it printed:",
      exception_prefix="it raised:",
      too_slow_message="it took more than 1s, had to kill it.",
  ):
      blahblah('bar')
  ```




  To use, or not
  [friendly-traceback](https://github.com/aroberge/friendly-traceback/)
  instead of bare Python exceptions.




  To allow or deny the student to print to stdout and stderr.

  - `True`: Prints are allowed (and displayed).
  - `None`: Prints are allowed (but not displayed).
  - `False`: Prints are disallowed (and displayed).

  In all cases you can read what they printed using the value of the
  context manager:

  ```python
  with student_code(print_allowed=None) as run:
      their_function()
  assert run.err == ""
  assert run.out == "42"
  ```




  Write the student checking code a you would write unit test for your
  own code.


pkgId: 17b9785feba2692ba0b6c9b7b84d707cf90edba366e6ba09e12ddfe4849f09e2
name: python-cors
arch: src
version: 1.0.1
epoch: 0
release: 1
summary: Fast CORS misconfiguration vulnerabilities scanner
url: http://github.com/chenjj/CORScanner
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cors-1.0.1-1.src.rpm
checksum_type: sha256
description:
  -u            | --url         | URL/domain to check it's CORS policy
  -d            | --headers     | Add headers to the request
  -i            | --input       | URL/domain list file to check their CORS policy
  -t            | --threads     | Number of threads to use for CORS scan
  -o            | --output      | Save the results to json file
  -v            | --verbose     | Enable the verbose mode and display results in realtime
  -T            | --timeout     | Set requests timeout (default 10 sec)
  -p            | --proxy       | Enable proxy (http or socks5)
  -h            | --help        | show the help message and exit

  * To check CORS misconfigurations of specific domain:
  ``python cors_scan.py -u example.com``
  * To enable more debug info, use -v:
  ``python cors_scan.py -u example.com -v``
  * To save scan results to a JSON file, use -o:
  ``python cors_scan.py -u example.com -o output_filename``
  * To check CORS misconfigurations of specific URL:
  ``python cors_scan.py -u http://example.com/restapi``
  * To check CORS misconfiguration with specific headers:
  ``python cors_scan.py -u example.com -d "Cookie: test"``
  * To check CORS misconfigurations of multiple domains/URLs:
  ``python cors_scan.py -i top_100_domains.txt -t 100``
  * To enable proxy for CORScanner, use -p
  ```python cors_scan.py -u example.com -p http://127.0.0.1:8080```
  To use socks5 proxy, install PySocks with `pip install PySocks`
  ```python cors_scan.py -u example.com -p socks5://127.0.0.1:8080```
  * To list all the basic options and switches use -h switch:
  ```python cors_scan.py -h```

  This tool covers the following misconfiguration types:


pkgId: dbd6a2faf3ee1f9abac0ab04d53046c6e893f20d31f782a1ce430bf53233adff
name: python-corsikaio
arch: src
version: 0.4.0
epoch: 0
release: 1
summary: Reader for corsika binary output files using numpy
url: http://github.com/cta-observatory/corsikaio
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-corsikaio-0.4.0-1.src.rpm
checksum_type: sha256
description:
  Python module to read the CORSIKA binary output files.



  Run
  ```
  pip install corsikaio
  ```



  Load CORSIKA binary particle or cherenkov data files using python and numpy.

  Also supports MMCS 6.5

  ```python
  from corsikaio import CorsikaCherenkovFile
  import matplotlib.pyplot as plt


  with CorsikaCherenkovFile('cer000001') as f:
      print(f.run_header['run_number'])
      print(f.version)

      for e in f:
          print(e.header['total_energy'])

          plt.scatter(e.photons['x'], e.photons['y'])
          plt.show()
  ```


pkgId: 9163c15b8bf9bc2284d6dce863a8845e507c3cca41867ef550f4513dbe93f3c5
name: python-cortex-data-product-sdk
arch: src
version: 0.3.124
epoch: 0
release: 1
summary: Cortex Data Product SDK
url: https://pypi.org/project/cortex-data-product-sdk/
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cortex-data-product-sdk-0.3.124-1.src.rpm
checksum_type: sha256
description:
  ```json
  {
    "data_type": "",
    "catalog_name": "",
    "data_pack_name": "",
    "database_name": "",
    "dataset_name": "",
    "table_fields": [
      {
        "name": "",
        "nullable": true,
        "type": ""
      }
    ],
    "table_modifiers": [
      ""
    ],
    "table_name": "",
    "table_owner": "",
    "table_properties": {
      "": ""
    },
    "table_selectors": [
      ""
    ]
  }
  ```


pkgId: d46e5935afbcc7473fd8717fc3d6af0694c8566c0357058ec79a35c2fd36779b
name: python-cortex-python-profiles
arch: src
version: 1.2.1
epoch: 0
release: 1
summary: Profile of 1 Extension for the Base Python Module of the Cortex Cognitive Platform
url: https://github.com/CognitiveScale/cortex-python-profiles
rpm_license: Apache License Version 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cortex-python-profiles-1.2.1-1.src.rpm
checksum_type: sha256
description:
  [cortex-python][https://github.com/CognitiveScale/cortex-python]
  The Cortex Python Profiles module extends the [Base Python Module of the Cortex Cognitive Platform](cortex-python) with Profile of 1 related functionality.

  Refer to the Cortex documentation for details on how to use the library:

  - Developer guide: https://docs.cortex.insights.ai/docs/developer-guide/overview/
  - Cortex Python references: https://docs.cortex.insights.ai/docs/developer-guide/reference-guides




  To install:
  ```
    > pip install cortex-python-profiles
  ```

  or from source code:
  ```
    > git clone git@github.com:CognitiveScale/cortex-python-profiles.git
    > cd cortex-python-profiles
    > pip install -e .
  ```





  When developing, it's a best practice to work in a virtual environment. Create and activate a virtual environment:
  ```
    > virtualenv --python=python3.6 _venv
    > source _venv/bin/activate
  ```

  Install developer dependencies:

  ```
    > git clone git@github.com:CognitiveScale/cortex-python-profiles.git
    > cd cortex-python-profiles
    > make dev.install
  ```

  There's a convenience `Makefile` that has commands to common tasks, such as build, test, etc. Use it!





  Follow above setup instructions (making sure to be in the virtual environment and having the necessary dependencies)

  - `make test` to run test suite

  To run an individual file or class method, use pytest. Example tests shown below:

  - file: `pytest test/unit/agent_test.py`
  - class method: `pytest test/unit/agent_test.py::TestAgent::test_get_agent`



  Suppose you want to release new functionality so it can be installed without releasing a new official version. We need to use an alpha version in PyPi.

  - we need to create and publish an alpha release:
  - get credentials to the `cortex-python` pypi CognitiveScale account (via lastpass)
  - run `make dev.push TAG=<alpha release number>`. Example: `make dev.push TAG=1`



  After contributing to the library, and before you submit changes as a PR, please do the following

  1. Run unit tests via `make test`
  2. Manually verification (i.e. try the new changes out in Cortex) to make sure everything is going well. Not required, but highly encouraged.
  3. Bump up `setup.py` version and update the `CHANGELOG.md`



  Activate your virtual environment:
  ```
  > source _venv/bin/activate
  ```

  Setup your environment, if you have not done so:
  ```
  > make dev.install
  ```

  The package documentation is built with Sphinx and generates versioned documentation for all tag matching the `release/X.Y.Z` pattern and for the `master` branch. To build the documentation:

  ```
  > make docs.multi
  ```
  The documentation will be rendered in HTML format under the `docs/_build/${VERSION}` directory.



  1. Create and push an alpha release:
      ```
      > make dev.push TAG=1
      ```
      Where `TAG` is the alpha version number. This will build an alpha-tagged package.
  2. Merge `develop` to `staging` branch:
      ```
      > make stage
      ```
  3. In GitHub, create a pull request from `staging` to `master`.


pkgId: f51f378801ca911437cd81d72e7db5a684df48bc153cbe121237a0a7671bc761
name: python-cortex-xdr-client
arch: src
version: 1.8.9
epoch: 0
release: 1
summary: API client for Cortex XDR Prevent
url: https://github.com/ebarti/cortex-xdr-client
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cortex-xdr-client-1.8.9-1.src.rpm
checksum_type: sha256
description:
  About the cortex-xdr-client


  A python-based API client for `Cortex XDR
  API <https://cortex-panw.stoplight.io/docs/cortex-xdr/axpm6b98x4p18-cortex-xdr-api-overview>`__.

  Currently, it supports the following Cortex XDR **Prevent & Pro** APIs:

  *Alerts API:*

  -  `Get Alerts <https://cortex-panw.stoplight.io/docs/cortex-xdr/813e387002342-get-all-alerts>`__


  *Downloads API:*

  -  `Download File <https://cortex-panw.stoplight.io/docs/cortex-xdr/2932f29d2ccdd-file-retrieval-details>`__


  *Endpoints API:*

  -  `Get All Endpoints <https://cortex-panw.stoplight.io/docs/cortex-xdr/89535019b740f-get-all-endpoints>`__
  -  `Get Endpoint <https://cortex-panw.stoplight.io/docs/cortex-xdr/b149d40bd4c51-get-endpoint>`__
  -  `Isolate Endpoints <https://cortex-panw.stoplight.io/docs/cortex-xdr/9c730a966cdd8-isolate-endpoints>`__
  -  `Unisolate Endpoints <https://cortex-panw.stoplight.io/docs/cortex-xdr/c719336adb46b-unisolate-endpoints>`__
  -  `Scan Endpoints <https://cortex-panw.stoplight.io/docs/cortex-xdr/2e666ee0be1c6-scan-endpoints>`__
  -  `Set an Endpoint Alias <https://cortex-panw.stoplight.io/docs/cortex-xdr/c1ff89fa71c74-set-an-endpoint-alias>`__
  -  `Retrieve File <https://cortex-panw.stoplight.io/docs/cortex-xdr/08b1ba9fcfae0-retrieve-file>`__
  -  `Quarantine File <https://cortex-panw.stoplight.io/docs/cortex-xdr/76e8cca7fcb2e-quarantine-files>`__


  *Incidents API:*

  -  `Get Incidents <https://cortex-panw.stoplight.io/docs/cortex-xdr/a61eadc13dd54-get-all-incidents>`__
  -  `Get Extra Incident Data <https://cortex-panw.stoplight.io/docs/cortex-xdr/5a2fff98016d5-get-extra-incident-data>`__


  *Indicators API:*

  -  `Insert Simple Indicators JSON <https://cortex-panw.stoplight.io/docs/cortex-xdr/24e778d89726d-insert-simple-indicators-json>`__


  *Response Actions API:*

  -  `Get Action Status <https://cortex-panw.stoplight.io/docs/cortex-xdr/9782594f400c3-get-action-status>`__


  *Scripts API:*

  -  `Get Scripts <https://cortex-panw.stoplight.io/docs/cortex-xdr/6c41fe0732805-get-scripts>`__
  -  `Get Script Metadata <https://cortex-panw.stoplight.io/docs/cortex-xdr/52ea90b5f5c72-get-script-metadata>`__
  -  `Get Script Execution Status <https://cortex-panw.stoplight.io/docs/cortex-xdr/28073c365903b-get-script-execution-status>`__
  -  `Get Script Execution Results <https://cortex-panw.stoplight.io/docs/cortex-xdr/fa2ca3b1ff49b-get-script-execution-results>`__
  -  `Get Script Execution Result Files <https://cortex-panw.stoplight.io/docs/cortex-xdr/0fb66ea9988ff-get-script-execution-result-files>`__
  -  `Run Script <https://cortex-panw.stoplight.io/docs/cortex-xdr/7223bea7d2bea-run-script>`__
  -  `Run Snippet Code Script <https://cortex-panw.stoplight.io/docs/cortex-xdr/083859c8c6729-run-snippet-code-script>`__


  *XQL API:*

  -  `Start XQL <https://cortex-panw.stoplight.io/docs/cortex-xdr/ecc87ad01e173-start-an-xql-query>`__
  -  `Get XQL Results <https://cortex-panw.stoplight.io/docs/cortex-xdr/be3d47e8dce5a-get-xql-query-results>`__
  -  `Get XQL Result Stream <https://cortex-panw.stoplight.io/docs/cortex-xdr/155abd6ca4b4d-get-xql-query-results-stream>`__


  *Contributing:*

  See `CONTRIBUTING.md <./CONTRIBUTING.md>`__ for details.


pkgId: 294eaed9bc46842bba316a7d5fbb83a7466d1ec37a549c85cc2514b7a9682e12
name: python-cortx-jupyter
arch: src
version: 0.1.135
epoch: 0
release: 1
summary: Jupyter Notebook Manager for Cortx
url: https://github.com/sumanthreddym/cortx_jupyter
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cortx-jupyter-0.1.135-1.src.rpm
checksum_type: sha256
description:
  **Built for [Seagate Cortx Hackathon 2021](https://devpost.com/software/cortx-jupyter)**



  [Cortx Jupyter Integration](https://devpost.com/software/cortx-jupyter) is an Open Source python package which combines the power of Cortx and Jupyter Notebooks to empower you to save and manage all of your Notebooks, Checkpoints and Data Files on Cortx. As a bonus, you can also use Cortx Jupyter Integration to load any pre-trained models from or to cortx server without any hassle of configuring or using Library specific integrations.

  ![logo](https://raw.githubusercontent.com/sumanthreddym/cortx_jupyter/main/media/cortx_jupyter_header.png)



  Jupyter is widely used by all Data Scientists, Researchers, Students and Engineers across the Software Industry to perform all types of Data Science tasks. Cortx is a high performance and scalable Object Storage. And we think that it is a match made in heaven to bring them together!

  Haven't you had those scary moments when your disk crashes after you finished training a Machine Learning model on Jupyter Notebook after hours of work. No more losing precious work because you forgot to save changes or no more worrying about local filesystem crashes or paying exorbitant subscription fees for Premium features of Hosted Jupyter Notebooks. **Cortx Jupyter Integration** is here to save you from all these! **Cortx Jupyter** is an Open Source python package which combines the power of Cortx and Jupyter Notebooks to empower you to store all of your Jupyter Notebooks, Checkpoints and Data Files on **Cortx Object Storage** instead of Jupyter's standard filesystem-backed storage.

  When you opt to use a plain Jupyter notebook as your development environment, everything is saved in your local machine. If you want your Jupyter notebooks to be accessible to you from anywhere or any device, then *Cortx Jupyter Integration*  is the way to go. All of your Jupyter notebooks, checkpoints and data files are saved in your *Cortx Object Storage*, so that you can access it from anywhere on the go.

  *Cortx Jupyter Integration* can be used by developers and organizations who want a central repository of Notebooks, Checkpoints and Files. This feature can help multiple developers across an organization to collaborate with each other. *Cortx Jupyter Integration* integration periodically saves updates to your notebook as checkpoints to *Cortx Object Storage* so that you can either revert to a previous checkpoint or your colleague can continue working on the Jupyter Notebook from where you left.

  You don't have to worry about having notebooks and data saved in different places. With **Cortx Jupyter Integration**, you can have them together on **CORTX: World's Only 100% Open Source Mass-Capacity Optimized Object Store**. Now, you can concentrate on Machine Learning while *Cortx Jupyter* does the boring work of saving and tracking your work.

  You can use Cortx Jupyter Integration to run any Jupyter Notebook that uses complex Machine Learning or Deep Learning models without dependency on the Library's native configuration files. ie., When you use `Cortx Jupyter Integration`, there is no need for changing configuration files or worrying about library native way of fetching data or using another ML Library specific integration to build ML models such as Pytorch, Tensorflow, Keras, etc. `Cortx Jupyter Integration` provides an easy way to Load data from Cortx into your Jupyter notebook  and pass it to any Machine Learning library. *As we promised before, you only have to worry about Machine Learning, we worry about Jupyter and Cortx integration!*

  You can find the Python Package that we built at [pypi.org](https://pypi.org/project/cortx-jupyter/)





  - `cortx_authenticator.py`: Class that provides functionality to authenticate to Cortx.
  - `cortx_file_manager.py`: This Module provides methods that can be used by anyone importing cortx_jupyter Python package to use methods such as `read_data()`, `write_data()`, `read_model()` and `write_model()`.
  - `cortx_jupyter.py`: Class that provides core functionality of integrating Jupyter Notebook to Cortx. Jupyter Notebook calls the methods in this class to perform file operations instead of it's in-built File Manager.
  - `utils.py`: This class all the additional functionality such as using boto3 to send requests to Cortx.

  ![architecture](https://raw.githubusercontent.com/sumanthreddym/cortx_jupyter/main/media/cortx_jupyer_architecture.png)




   - Seamlessly Save notebooks, checkpoints, data files to Cortx.
   - Save multiple checkpoints for each notebooks to Cortx.
   - Checkpoints are saved to Cortx, under the key `<file_name>/.checkpoints/`.
   - Restore from any of the previous checkpoints.
   - Multiple checkpoints are saved.
   - Already, have notebooks on S3? No worries, **Cortx Jupyter integration** can help you can switch easily from S3 to Cortx Open Source object storage.
   - Use **Cortx Jupyter integration's** `read_data()` and `write_data()` APIs to Read and Write large amount of data to and from your notebook directly from Cortx High Performance Object Storage for Machine Learning tasks.
   - Use **Cortx Jupyter integration's** `read_model()` and `write_model()` APIs to Save and Load a pre-trained model Machine learning models from Cortx High Performance Object Storage for Machine Learning tasks.
   - Delete Notebooks, Files that you don't need from Cortx.
   - Renaming Notebook name automatically updates Notebook and Checkpoint names on Cortx.
   - Jupyter Notebook is not blocked when requests are made to Cortx as everything has been implemented asynchronously.
   - View, Upload and Download any types of files that are in Cortx using Jupyter






  Use the instructions at the following link to setup CORTX:

  https://github.com/Seagate/cortx/blob/main/QUICK_START.md




  [Setup Instructions Video](https://youtu.be/GGAUWTDkhp8)



  Install the Cortx Jupyter python package using the following command:

      pip install cortx-jupyter

  You can find the package on [pypi.org](https://pypi.org/project/cortx-jupyter/)



  Configure Jupyter to our `Cortx Jupyter`integration for its storage backend. This can be done by modifying your notebook config file. On a Unix-like system, your Jupyter Notebook config will be located at `~/.jupyter/jupyter_notebook_config.py`

  **NOTE:** If you can't find this config file on your machine, you can create this file using the following command in terminal:

      jupyter notebook --generate-config

  Now, edit the `~/.jupyter/jupyter_notebook_config.py`  file.

  **NOTE:** Please remember to replace credentials(`access_key_id` , `secret_access_key`) and `endpoint_url` with credentials of your Cortx environment.


      import cortx_jupyter
      from cortx_jupyter import CortxJupyter, CortxAuthenticator

      c = get_config()

      c.NotebookApp.contents_manager_class = CortxJupyter
      c.CortxJupyter.authentication_class = CortxAuthenticator


      c.CortxAuthenticator.access_key_id = "YOUR_ACCESS_KEY_ID"
      c.CortxAuthenticator.secret_access_key = "YOUR_SECRET_ACCESS_KEY"
      c.CortxJupyter.endpoint_url = "http://uvo1ettj69aisne19p9.vm.cld.sr"
      c.CortxJupyter.bucket_name = "testbucket"
      c.CortxJupyter.prefix = "notebooks/test/"


  **Following Configuration options are available on CortxAuthenticator:**

  `access_key_id` *(required)*

  `secret_access_key` *(required)*

  **Following Configuration options are available on CortxJupyter:**

  `endpoint_url`*(required)* - Endpoint URL of your Cortx instance.

  Example: ```http://uvo1ettj69aisne19p9.vm.cld.sr```

  `bucket_name`*(required)*  - Cortx Bucket Name where you want to store your notebook.

  Example: ```testbucket```

  `prefix`*(required)*  - Path in the bucket where you want to store your notebook.

  Example: ```notebooks/test/```



  Now that we have completed installation and configuration, it is time to run Jupyter Notebook and check if the Jupyter Cortx magic works!

  Use the following command on Linux-like systems to run Jupyter Notebook server:

      jupyter notebook

  This will print some information about the notebook server in your terminal(as seen in the screenshot below), including the URL of the web application (by default,  `http://localhost:8888`):

  ![Jupyter Notebook Run](https://raw.githubusercontent.com/sumanthreddym/cortx_jupyter/main/media/jupyter_run.png)

  It will then open your default web browser to this URL(as seen in the screenshot below). When the notebook opens in your browser, you will see the Notebook Dashboard, which will show a list of the notebooks, files, and subdirectories present in Cortx.

  ![Jupyter Cortx Files](https://raw.githubusercontent.com/sumanthreddym/cortx_jupyter/main/media/jupyter_cortx_files.png)

  If you go to Cyberduck and list the files present in Cortx(as seen in the screenshot below), you can verify that all your Notebooks, Checkpoints and Data Files are stored on Cortx by the `Cortx Jupyter Integration`:

  ![Cyberduck](https://raw.githubusercontent.com/sumanthreddym/cortx_jupyter/main/media/cyberduck.jpeg)

  If you want some examples to get started on Jupyter Notebooks with Cortx as storage, take a look at the following sample notebooks in our repository:

   - [Tensorflow example](https://github.com/sumanthreddym/cortx_jupyter/blob/main/Examples/Tensorflow-Demo.ipynb)
   - [Pytorch example](https://github.com/sumanthreddym/cortx_jupyter/blob/main/Examples/Pytorch-Demo.ipynb)
   - [Keras example](https://github.com/sumanthreddym/cortx_jupyter/blob/main/Examples/Keras-Demo.ipynb)



  When you use `Cortx Jupyter Integration`, there is no need for changing configuration files or worrying about library native way of fetching data. Load data from Cortx into your Jupyter notebook using `Cortx Jupyter Integration` an pass it to any Machine Learning library. *As we promised before, you only have to worry about Machine Learning, we worry about Jupyter and Cortx integration!*

  Import Cortx Jupyter Python Package's methods into your notebook using the following statements:

      from cortx_jupyter import read_data, write_data, read_model, write_model

  Following 4 methods are available to work work with data when using Cortx and Jupter Notebook.

  |API method| Description |Parameters|
  |--|--|--|
  | **read_data()**  | Reads any type of data from Cortx into a variable in Python that you can pass as input to different libraries. |  file_name |
  | **write_data()**  | Writes any type of data to Cortx. | file_name, data |
  | **read_mode()**  | Reads a trained Machine Learning model from Cortx. | file_name, model |
  | **write_model()**  | Writes a trained Machine Learning model to Cortx. | file_name, model |



   **read_data() Example:**

      from cortx_jupyter import read_data, write_data

      import pandas as pd

      data = read_data('ionosphere.csv')
  	df = pd.read_csv(data, header=None)

  In above example, take a look at how we load data from Cortx using `Cortx Jupyter Integration` . You can pass it to different ML libraries. **You can load data from Cortx to Jupyter to work with Keras, Tensorflow, Pytorch, etc using the following method. There is absolutely no dependency on the ML library that you are working with.** (thanks to `Cortx Jupyter Integration`)!

   **write_data() Example:**

      from cortx_jupyter import read_data, write_data

      import pandas as pd

      data = write_data('filename.csv', df)


  If you want more examples, take a look at the following sample notebooks:

   - [Tensorflow example](https://github.com/sumanthreddym/cortx_jupyter/blob/main/Examples/Tensorflow-Demo.ipynb)
   - [Pytorch example](https://github.com/sumanthreddym/cortx_jupyter/blob/main/Examples/Pytorch-Demo.ipynb)
   - [Keras example](https://github.com/sumanthreddym/cortx_jupyter/blob/main/Examples/Keras-Demo.ipynb)

  The screenshot below shows that you can load data from Cortx and pass it to any ML library or Write data to Cortx using simple methods provided in our Cortx Jupyter Python Package:

  ![Read and Write](https://raw.githubusercontent.com/sumanthreddym/cortx_jupyter/main/media/read_write_cortx_jupyter.png)




  ![Checkpoints](https://raw.githubusercontent.com/sumanthreddym/cortx_jupyter/main/media/revert_checkpoint.png)




  This was our first time publishing a Python Package to Python Package Index. It was quite an inspiration to learn how Jupyter works internally by looking at all the complex and well-written source code and writing code to integrate it with Cortx Object Storage. Also, this was our first time contributing to an open source project which makes us even prouder to have contributed to Open-Source software. We also learnt asynchronous networking library called `tornado` to make our integration's network IO non-blocking. This Hackathon has made us more interested in contributing to more Open Source projects.



  When there was delay in fetching objects from Cortx storage due to networking issues, it was causing Jupyter Notebook to be blocked. We had to learn and use an asynchronous networking library called `tornado` to make sure that any issue with network IO blocking doesn't hamper User Experience. We were able to successfully resolve the issue and make the User Experience better with this. Also, given the time constraint and the size of the Jupyter project, it was a tough task for us to go through all of Jupyter's Source code and understand and identify the methods that we may have to rewrite to ensure that Jupyter uses Cortx for all of its storage functionality. However, we loved the experience of looking into source code of a product that we use in our daily professional lives and extending its functionality to work with an High Performance and Scalable Object Storage like Cortx.



   - Cortx
   - S3 API
   - Python
   - Python Package Index
   - Jupyter
   - boto3
   - Pandas
   - Keras
   - tornado
   - numpy
   - joblib
   - tensorflow



  Watch the [Youtube video](https://youtu.be/TFZvOT2fbXw) to learn more about the project.

  [Complete Information](https://youtu.be/cgLWvrlB75Q)

  [Features Demo](https://youtu.be/TFZvOT2fbXw)

  [Setup Instructions Video](https://youtu.be/GGAUWTDkhp8)



  - We aim to provide an option to switch between S3, Cortx and FileSystem.
  - Provide more methods in cortx_jupyter package.



  [Sumanth Reddy Muni](https://www.linkedin.com/in/sumanthmuni/)

  [Priyadarshini Murugan](https://www.linkedin.com/in/priya-murugan/)


pkgId: 2fec96ce53fe27c039e8ea69f29b335cb13a8f71989d7d37fa699ba03d2a9e4c
name: python-corus
arch: src
version: 0.10.0
epoch: 0
release: 1
summary: Links to russian corpora, functions for loading and parsing
url: https://github.com/natasha/corus
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-corus-0.10.0-1.src.rpm
checksum_type: sha256
description:
  <img src="https://github.com/natasha/natasha-logos/blob/master/corus.svg">

  ![CI](https://github.com/natasha/corus/actions/workflows/test.yml/badge.svg)

  Links to publicly available Russian corpora + code for loading and parsing. <a href="#reference">20+ datasets, 350Gb+ of text</a>.



  For example lets use <a href="https://github.com/yutkin/Lenta.Ru-News-Dataset">dump of lenta.ru by @yutkin</a>. Manually download the archive (link in the <a href="#reference">Reference</a> section):
  ```bash
  wget https://github.com/yutkin/Lenta.Ru-News-Dataset/releases/download/v1.0/lenta-ru-news.csv.gz
  ```

  Use `corus` to load the data:

  ```python
  >>> from corus import load_lenta

  >>> path = 'lenta-ru-news.csv.gz'
  >>> records = load_lenta(path)
  >>> next(records)

  LentaRecord(
      url='https://lenta.ru/news/2018/12/14/cancer/',
      title='Названы регионы России с\xa0самой высокой смертностью от\xa0рака',
      text='Вице-премьер по социальным вопросам Татьяна Голикова рассказала, в каких регионах России зафиксирована наиболее высокая смертность от рака, сооб...',
      topic='Россия',
      tags='Общество'
  )
  ```

  Iterate over texts:

  ```python
  >>> records = load_lenta(path)
  >>> for record in records:
  ...     text = record.text
  ...     ...

  ```

  For links to other datasets and their loaders see the <a href="#reference">Reference</a> section.



  Materials are in Russian:

  * <a href="https://natasha.github.io/corus">Corus page on natasha.github.io</a>
  * <a href="https://youtu.be/-7XT_U6hVvk?t=2758">Corus section of Datafest 2020 talk</a>



  `corus` supports Python 3.5+, PyPy 3.

  ```bash
  $ pip install corus
  ```



  <!--- metas --->
  <table>
  <tr>
  <th>Dataset</th>
  <th>API <code>from corus import</code></th>
  <th>Tags</th>
  <th>Texts</th>
  <th>Uncompressed</th>
  <th>Description</th>
  </tr>
  <tr>
  <td>
  <a href="https://github.com/yutkin/Lenta.Ru-News-Dataset">Lenta.ru</a>
  </td>
  <td colspan="5">
  </td>
  </tr>
  <tr>
  <td>
  Lenta.ru v1.0
  </td>
  <td>
  <a name="load_lenta"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_lenta">load_lenta</a></code>
  <a href="#load_lenta"><code>#</code></a>
  </td>
  <td>
  <code>news</code>
  </td>
  <td align="right">
  739&nbsp;351
  </td>
  <td align="right">
  1.66 Gb
  </td>
  <td>
  <code>wget https://github.com/yutkin/Lenta.Ru-News-Dataset/releases/download/v1.0/lenta-ru-news.csv.gz</code>
  </td>
  </tr>
  <tr>
  <td>
  Lenta.ru v1.1+
  </td>
  <td>
  <a name="load_lenta2"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_lenta2">load_lenta2</a></code>
  <a href="#load_lenta2"><code>#</code></a>
  </td>
  <td>
  <code>news</code>
  </td>
  <td align="right">
  800&nbsp;975
  </td>
  <td align="right">
  1.94 Gb
  </td>
  <td>
  <code>wget https://github.com/yutkin/Lenta.Ru-News-Dataset/releases/download/v1.1/lenta-ru-news.csv.bz2</code>
  </td>
  </tr>
  <tr>
  <td>
  <a href="https://russe.nlpub.org/downloads/">Lib.rus.ec</a>
  </td>
  <td>
  <a name="load_librusec"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_librusec">load_librusec</a></code>
  <a href="#load_librusec"><code>#</code></a>
  </td>
  <td>
  <code>fiction</code>
  </td>
  <td align="right">
  301&nbsp;871
  </td>
  <td align="right">
  144.92 Gb
  </td>
  <td>
  Dump of lib.rus.ec prepared for RUSSE workshop
  </br>
  </br>
  <code>wget http://panchenko.me/data/russe/librusec_fb2.plain.gz</code>
  </td>
  </tr>
  <tr>
  <td>
  <a href="https://github.com/RossiyaSegodnya/ria_news_dataset">Rossiya Segodnya</a>
  </td>
  <td>
  <a name="load_ria_raw"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_ria_raw">load_ria_raw</a></code>
  <a href="#load_ria_raw"><code>#</code></a>
  </br>
  <a name="load_ria"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_ria">load_ria</a></code>
  <a href="#load_ria"><code>#</code></a>
  </td>
  <td>
  <code>news</code>
  </td>
  <td align="right">
  1&nbsp;003&nbsp;869
  </td>
  <td align="right">
  3.70 Gb
  </td>
  <td>
  <code>wget https://github.com/RossiyaSegodnya/ria_news_dataset/raw/master/ria.json.gz</code>
  </td>
  </tr>
  <tr>
  <td>
  <a href="http://study.mokoron.com/">Mokoron Russian Twitter Corpus</a>
  </td>
  <td>
  <a name="load_mokoron"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_mokoron">load_mokoron</a></code>
  <a href="#load_mokoron"><code>#</code></a>
  </td>
  <td>
  <code>social</code>
  <code>sentiment</code>
  </td>
  <td align="right">
  17&nbsp;633&nbsp;417
  </td>
  <td align="right">
  1.86 Gb
  </td>
  <td>
  Russian Twitter sentiment markup
  </br>
  </br>
  Manually download https://www.dropbox.com/s/9egqjszeicki4ho/db.sql
  </td>
  </tr>
  <tr>
  <td>
  <a href="https://dumps.wikimedia.org/">Wikipedia</a>
  </td>
  <td>
  <a name="load_wiki"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_wiki">load_wiki</a></code>
  <a href="#load_wiki"><code>#</code></a>
  </td>
  <td>
  </td>
  <td align="right">
  1&nbsp;541&nbsp;401
  </td>
  <td align="right">
  12.94 Gb
  </td>
  <td>
  Russian Wiki dump
  </br>
  </br>
  <code>wget https://dumps.wikimedia.org/ruwiki/latest/ruwiki-latest-pages-articles.xml.bz2</code>
  </td>
  </tr>
  <tr>
  <td>
  <a href="https://github.com/dialogue-evaluation/GramEval2020">GramEval2020</a>
  </td>
  <td>
  <a name="load_gramru"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_gramru">load_gramru</a></code>
  <a href="#load_gramru"><code>#</code></a>
  </td>
  <td>
  </td>
  <td align="right">
  162&nbsp;372
  </td>
  <td align="right">
  30.04 Mb
  </td>
  <td>
  <code>wget https://github.com/dialogue-evaluation/GramEval2020/archive/master.zip</code>
  </br>
  <code>unzip master.zip</code>
  </br>
  <code>mv GramEval2020-master/dataTrain train</code>
  </br>
  <code>mv GramEval2020-master/dataOpenTest dev</code>
  </br>
  <code>rm -r master.zip GramEval2020-master</code>
  </br>
  <code>wget https://github.com/AlexeySorokin/GramEval2020/raw/master/data/GramEval_private_test.conllu</code>
  </td>
  </tr>
  <tr>
  <td>
  <a href="http://opencorpora.org/">OpenCorpora</a>
  </td>
  <td>
  <a name="load_corpora"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_corpora">load_corpora</a></code>
  <a href="#load_corpora"><code>#</code></a>
  </td>
  <td>
  <code>morph</code>
  </td>
  <td align="right">
  4&nbsp;030
  </td>
  <td align="right">
  20.21 Mb
  </td>
  <td>
  <code>wget http://opencorpora.org/files/export/annot/annot.opcorpora.xml.zip</code>
  </td>
  </tr>
  <tr>
  <td>
  RusVectores SimLex-965
  </td>
  <td>
  <a name="load_simlex"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_simlex">load_simlex</a></code>
  <a href="#load_simlex"><code>#</code></a>
  </td>
  <td>
  <code>emb</code>
  <code>sim</code>
  </td>
  <td align="right">
  </td>
  <td align="right">
  </td>
  <td>
  <code>wget https://rusvectores.org/static/testsets/ru_simlex965_tagged.tsv</code>
  </br>
  <code>wget https://rusvectores.org/static/testsets/ru_simlex965.tsv</code>
  </td>
  </tr>
  <tr>
  <td>
  <a href="https://omnia-russica.github.io/">Omnia Russica</a>
  </td>
  <td>
  <a name="load_omnia"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_omnia">load_omnia</a></code>
  <a href="#load_omnia"><code>#</code></a>
  </td>
  <td>
  <code>morph</code>
  <code>web</code>
  <code>fiction</code>
  </td>
  <td align="right">
  </td>
  <td align="right">
  489.62 Gb
  </td>
  <td>
  Taiga + Wiki + Araneum. Read "Even larger Russian corpus" https://events.spbu.ru/eventsContent/events/2019/corpora/corp_sborn.pdf
  </br>
  </br>
  Manually download http://bit.ly/2ZT4BY9
  </td>
  </tr>
  <tr>
  <td>
  <a href="https://github.com/dialogue-evaluation/factRuEval-2016/">factRuEval-2016</a>
  </td>
  <td>
  <a name="load_factru"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_factru">load_factru</a></code>
  <a href="#load_factru"><code>#</code></a>
  </td>
  <td>
  <code>ner</code>
  <code>news</code>
  </td>
  <td align="right">
  254
  </td>
  <td align="right">
  969.27 Kb
  </td>
  <td>
  Manual PER, LOC, ORG markup prepared for 2016 Dialog competition
  </br>
  </br>
  <code>wget https://github.com/dialogue-evaluation/factRuEval-2016/archive/master.zip</code>
  </br>
  <code>unzip master.zip</code>
  </br>
  <code>rm master.zip</code>
  </td>
  </tr>
  <tr>
  <td>
  <a href="https://www.researchgate.net/publication/262203599_Introducing_Baselines_for_Russian_Named_Entity_Recognition">Gareev</a>
  </td>
  <td>
  <a name="load_gareev"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_gareev">load_gareev</a></code>
  <a href="#load_gareev"><code>#</code></a>
  </td>
  <td>
  <code>ner</code>
  <code>news</code>
  </td>
  <td align="right">
  97
  </td>
  <td align="right">
  455.02 Kb
  </td>
  <td>
  Manual PER, ORG markup (no LOC)
  </br>
  </br>
  Email Rinat Gareev (gareev-rm@yandex.ru) ask for dataset
  </br>
  <code>tar -xvf rus-ner-news-corpus.iob.tar.gz</code>
  </br>
  <code>rm rus-ner-news-corpus.iob.tar.gz</code>
  </td>
  </tr>
  <tr>
  <td>
  <a href="http://www.labinform.ru/pub/named_entities/">Collection5</a>
  </td>
  <td>
  <a name="load_ne5"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_ne5">load_ne5</a></code>
  <a href="#load_ne5"><code>#</code></a>
  </td>
  <td>
  <code>ner</code>
  <code>news</code>
  </td>
  <td align="right">
  1&nbsp;000
  </td>
  <td align="right">
  2.96 Mb
  </td>
  <td>
  News articles with manual PER, LOC, ORG markup
  </br>
  </br>
  <code>wget http://www.labinform.ru/pub/named_entities/collection5.zip</code>
  </br>
  <code>unzip collection5.zip</code>
  </br>
  <code>rm collection5.zip</code>
  </td>
  </tr>
  <tr>
  <td>
  <a href="https://www.aclweb.org/anthology/I17-1042">WiNER</a>
  </td>
  <td>
  <a name="load_wikiner"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_wikiner">load_wikiner</a></code>
  <a href="#load_wikiner"><code>#</code></a>
  </td>
  <td>
  <code>ner</code>
  </td>
  <td align="right">
  203&nbsp;287
  </td>
  <td align="right">
  36.15 Mb
  </td>
  <td>
  Sentences from Wiki auto annotated with PER, LOC, ORG tags
  </br>
  </br>
  <code>wget https://github.com/dice-group/FOX/raw/master/input/Wikiner/aij-wikiner-ru-wp3.bz2</code>
  </td>
  </tr>
  <tr>
  <td>
  <a href="http://bsnlp.cs.helsinki.fi/shared_task.html">BSNLP-2019</a>
  </td>
  <td>
  <a name="load_bsnlp"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_bsnlp">load_bsnlp</a></code>
  <a href="#load_bsnlp"><code>#</code></a>
  </td>
  <td>
  <code>ner</code>
  </td>
  <td align="right">
  464
  </td>
  <td align="right">
  1.16 Mb
  </td>
  <td>
  Markup prepared for 2019 BSNLP Shared Task
  </br>
  </br>
  <code>wget http://bsnlp.cs.helsinki.fi/TRAININGDATA_BSNLP_2019_shared_task.zip</code>
  </br>
  <code>wget http://bsnlp.cs.helsinki.fi/TESTDATA_BSNLP_2019_shared_task.zip</code>
  </br>
  <code>unzip TRAININGDATA_BSNLP_2019_shared_task.zip</code>
  </br>
  <code>unzip TESTDATA_BSNLP_2019_shared_task.zip -d test_pl_cs_ru_bg</code>
  </br>
  <code>rm TRAININGDATA_BSNLP_2019_shared_task.zip TESTDATA_BSNLP_2019_shared_task.zip</code>
  </td>
  </tr>
  <tr>
  <td>
  <a href="http://ai-center.botik.ru/Airec/index.php/ru/collections/28-persons-1000">Persons-1000</a>
  </td>
  <td>
  <a name="load_persons"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_persons">load_persons</a></code>
  <a href="#load_persons"><code>#</code></a>
  </td>
  <td>
  <code>ner</code>
  <code>news</code>
  </td>
  <td align="right">
  1&nbsp;000
  </td>
  <td align="right">
  2.96 Mb
  </td>
  <td>
  Same as Collection5, only PER markup + normalized names
  </br>
  </br>
  <code>wget http://ai-center.botik.ru/Airec/ai-resources/Persons-1000.zip</code>
  </td>
  </tr>
  <tr>
  <td>
  <a href="https://github.com/cimm-kzn/RuDReC">The Russian Drug Reaction Corpus (RuDReC)</a>
  </td>
  <td>
  <a name="load_rudrec"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_rudrec">load_rudrec</a></code>
  <a href="#load_rudrec"><code>#</code></a>
  </td>
  <td>
  <code>ner</code>
  </td>
  <td align="right">
  4&nbsp;809
  </td>
  <td align="right">
  1.73 Kb
  </td>
  <td>
  RuDReC is a new partially annotated corpus of consumer reviews in Russian about pharmaceutical products for the detection of health-related named entities and the effectiveness of pharmaceutical products. Here you can download and work with the annotated part, to get the raw part (1.4M reviews) please refer to https://github.com/cimm-kzn/RuDReC.
  </br>
  </br>
  <code>wget https://github.com/cimm-kzn/RuDReC/raw/master/data/rudrec_annotated.json</code>
  </td>
  </tr>
  <tr>
  <td>
  <a href="https://tatianashavrina.github.io/taiga_site/">Taiga</a>
  </td>
  <td colspan="5">
  Large collection of Russian texts from various sources: news sites, magazines, literacy, social networks
  </br>
  </br>
  <code>wget https://linghub.ru/static/Taiga/retagged_taiga.tar.gz</code>
  </br>
  <code>tar -xzvf retagged_taiga.tar.gz</code>
  </td>
  </tr>
  <tr>
  <td>
  Arzamas
  </td>
  <td>
  <a name="load_taiga_arzamas"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_taiga_arzamas">load_taiga_arzamas</a></code>
  <a href="#load_taiga_arzamas"><code>#</code></a>
  </td>
  <td>
  <code>news</code>
  </td>
  <td align="right">
  311
  </td>
  <td align="right">
  4.50 Mb
  </td>
  <td>
  </td>
  </tr>
  <tr>
  <td>
  Fontanka
  </td>
  <td>
  <a name="load_taiga_fontanka"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_taiga_fontanka">load_taiga_fontanka</a></code>
  <a href="#load_taiga_fontanka"><code>#</code></a>
  </td>
  <td>
  <code>news</code>
  </td>
  <td align="right">
  342&nbsp;683
  </td>
  <td align="right">
  786.23 Mb
  </td>
  <td>
  </td>
  </tr>
  <tr>
  <td>
  Interfax
  </td>
  <td>
  <a name="load_taiga_interfax"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_taiga_interfax">load_taiga_interfax</a></code>
  <a href="#load_taiga_interfax"><code>#</code></a>
  </td>
  <td>
  <code>news</code>
  </td>
  <td align="right">
  46&nbsp;429
  </td>
  <td align="right">
  77.55 Mb
  </td>
  <td>
  </td>
  </tr>
  <tr>
  <td>
  KP
  </td>
  <td>
  <a name="load_taiga_kp"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_taiga_kp">load_taiga_kp</a></code>
  <a href="#load_taiga_kp"><code>#</code></a>
  </td>
  <td>
  <code>news</code>
  </td>
  <td align="right">
  45&nbsp;503
  </td>
  <td align="right">
  61.79 Mb
  </td>
  <td>
  </td>
  </tr>
  <tr>
  <td>
  Lenta
  </td>
  <td>
  <a name="load_taiga_lenta"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_taiga_lenta">load_taiga_lenta</a></code>
  <a href="#load_taiga_lenta"><code>#</code></a>
  </td>
  <td>
  <code>news</code>
  </td>
  <td align="right">
  36&nbsp;446
  </td>
  <td align="right">
  95.15 Mb
  </td>
  <td>
  </td>
  </tr>
  <tr>
  <td>
  Taiga/N+1
  </td>
  <td>
  <a name="load_taiga_nplus1"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_taiga_nplus1">load_taiga_nplus1</a></code>
  <a href="#load_taiga_nplus1"><code>#</code></a>
  </td>
  <td>
  <code>news</code>
  </td>
  <td align="right">
  7&nbsp;696
  </td>
  <td align="right">
  24.96 Mb
  </td>
  <td>
  </td>
  </tr>
  <tr>
  <td>
  Magazines
  </td>
  <td>
  <a name="load_taiga_magazines"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_taiga_magazines">load_taiga_magazines</a></code>
  <a href="#load_taiga_magazines"><code>#</code></a>
  </td>
  <td>
  </td>
  <td align="right">
  39&nbsp;890
  </td>
  <td align="right">
  2.19 Gb
  </td>
  <td>
  </td>
  </tr>
  <tr>
  <td>
  Subtitles
  </td>
  <td>
  <a name="load_taiga_subtitles"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_taiga_subtitles">load_taiga_subtitles</a></code>
  <a href="#load_taiga_subtitles"><code>#</code></a>
  </td>
  <td>
  </td>
  <td align="right">
  19&nbsp;011
  </td>
  <td align="right">
  909.08 Mb
  </td>
  <td>
  </td>
  </tr>
  <tr>
  <td>
  Social
  </td>
  <td>
  <a name="load_taiga_social"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_taiga_social">load_taiga_social</a></code>
  <a href="#load_taiga_social"><code>#</code></a>
  </td>
  <td>
  <code>social</code>
  </td>
  <td align="right">
  1&nbsp;876&nbsp;442
  </td>
  <td align="right">
  648.18 Mb
  </td>
  <td>
  </td>
  </tr>
  <tr>
  <td>
  Proza
  </td>
  <td>
  <a name="load_taiga_proza"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_taiga_proza">load_taiga_proza</a></code>
  <a href="#load_taiga_proza"><code>#</code></a>
  </td>
  <td>
  <code>fiction</code>
  </td>
  <td align="right">
  1&nbsp;732&nbsp;434
  </td>
  <td align="right">
  38.25 Gb
  </td>
  <td>
  </td>
  </tr>
  <tr>
  <td>
  Stihi
  </td>
  <td>
  <a name="load_taiga_stihi"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_taiga_stihi">load_taiga_stihi</a></code>
  <a href="#load_taiga_stihi"><code>#</code></a>
  </td>
  <td>
  </td>
  <td align="right">
  9&nbsp;157&nbsp;686
  </td>
  <td align="right">
  12.80 Gb
  </td>
  <td>
  </td>
  </tr>
  <tr>
  <td>
  <a href="https://github.com/buriy/russian-nlp-datasets/releases">Russian NLP Datasets</a>
  </td>
  <td colspan="5">
  Several Russian news datasets from webhose.io, lenta.ru and other news sites.
  </td>
  </tr>
  <tr>
  <td>
  News
  </td>
  <td>
  <a name="load_buriy_news"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_buriy_news">load_buriy_news</a></code>
  <a href="#load_buriy_news"><code>#</code></a>
  </td>
  <td>
  <code>news</code>
  </td>
  <td align="right">
  2&nbsp;154&nbsp;801
  </td>
  <td align="right">
  6.84 Gb
  </td>
  <td>
  Dump of top 40 news + 20 fashion news sites.
  </br>
  </br>
  <code>wget https://github.com/buriy/russian-nlp-datasets/releases/download/r4/news-articles-2014.tar.bz2</code>
  </br>
  <code>wget https://github.com/buriy/russian-nlp-datasets/releases/download/r4/news-articles-2015-part1.tar.bz2</code>
  </br>
  <code>wget https://github.com/buriy/russian-nlp-datasets/releases/download/r4/news-articles-2015-part2.tar.bz2</code>
  </td>
  </tr>
  <tr>
  <td>
  Webhose
  </td>
  <td>
  <a name="load_buriy_webhose"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_buriy_webhose">load_buriy_webhose</a></code>
  <a href="#load_buriy_webhose"><code>#</code></a>
  </td>
  <td>
  <code>news</code>
  </td>
  <td align="right">
  285&nbsp;965
  </td>
  <td align="right">
  859.32 Mb
  </td>
  <td>
  Dump from webhose.io, 300 sources for one month.
  </br>
  </br>
  <code>wget https://github.com/buriy/russian-nlp-datasets/releases/download/r4/webhose-2016.tar.bz2</code>
  </td>
  </tr>
  <tr>
  <td>
  <a href="https://github.com/ods-ai-ml4sg/proj_news_viz/releases/tag/data">ODS #proj_news_viz</a>
  </td>
  <td colspan="5">
  Several news sites scraped by members of #proj_news_viz ODS project.
  </td>
  </tr>
  <tr>
  <td>
  Interfax
  </td>
  <td>
  <a name="load_ods_interfax"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_ods_interfax">load_ods_interfax</a></code>
  <a href="#load_ods_interfax"><code>#</code></a>
  </td>
  <td>
  <code>news</code>
  </td>
  <td align="right">
  543&nbsp;961
  </td>
  <td align="right">
  1.22 Gb
  </td>
  <td>
  <code>wget https://github.com/ods-ai-ml4sg/proj_news_viz/releases/download/data/interfax.csv.gz</code>
  </td>
  </tr>
  <tr>
  <td>
  Gazeta
  </td>
  <td>
  <a name="load_ods_gazeta"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_ods_gazeta">load_ods_gazeta</a></code>
  <a href="#load_ods_gazeta"><code>#</code></a>
  </td>
  <td>
  <code>news</code>
  </td>
  <td align="right">
  865&nbsp;847
  </td>
  <td align="right">
  1.63 Gb
  </td>
  <td>
  <code>wget https://github.com/ods-ai-ml4sg/proj_news_viz/releases/download/data/gazeta.csv.gz</code>
  </td>
  </tr>
  <tr>
  <td>
  Izvestia
  </td>
  <td>
  <a name="load_ods_izvestia"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_ods_izvestia">load_ods_izvestia</a></code>
  <a href="#load_ods_izvestia"><code>#</code></a>
  </td>
  <td>
  <code>news</code>
  </td>
  <td align="right">
  86&nbsp;601
  </td>
  <td align="right">
  307.19 Mb
  </td>
  <td>
  <code>wget https://github.com/ods-ai-ml4sg/proj_news_viz/releases/download/data/iz.csv.gz</code>
  </td>
  </tr>
  <tr>
  <td>
  Meduza
  </td>
  <td>
  <a name="load_ods_meduza"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_ods_meduza">load_ods_meduza</a></code>
  <a href="#load_ods_meduza"><code>#</code></a>
  </td>
  <td>
  <code>news</code>
  </td>
  <td align="right">
  71&nbsp;806
  </td>
  <td align="right">
  270.11 Mb
  </td>
  <td>
  <code>wget https://github.com/ods-ai-ml4sg/proj_news_viz/releases/download/data/meduza.csv.gz</code>
  </td>
  </tr>
  <tr>
  <td>
  RIA
  </td>
  <td>
  <a name="load_ods_ria"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_ods_ria">load_ods_ria</a></code>
  <a href="#load_ods_ria"><code>#</code></a>
  </td>
  <td>
  <code>news</code>
  </td>
  <td align="right">
  101&nbsp;543
  </td>
  <td align="right">
  233.88 Mb
  </td>
  <td>
  <code>wget https://github.com/ods-ai-ml4sg/proj_news_viz/releases/download/data/ria.csv.gz</code>
  </td>
  </tr>
  <tr>
  <td>
  Russia Today
  </td>
  <td>
  <a name="load_ods_rt"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_ods_rt">load_ods_rt</a></code>
  <a href="#load_ods_rt"><code>#</code></a>
  </td>
  <td>
  <code>news</code>
  </td>
  <td align="right">
  106&nbsp;644
  </td>
  <td align="right">
  187.12 Mb
  </td>
  <td>
  <code>wget https://github.com/ods-ai-ml4sg/proj_news_viz/releases/download/data/rt.csv.gz</code>
  </td>
  </tr>
  <tr>
  <td>
  TASS
  </td>
  <td>
  <a name="load_ods_tass"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_ods_tass">load_ods_tass</a></code>
  <a href="#load_ods_tass"><code>#</code></a>
  </td>
  <td>
  <code>news</code>
  </td>
  <td align="right">
  1&nbsp;135&nbsp;635
  </td>
  <td align="right">
  3.27 Gb
  </td>
  <td>
  <code>wget https://github.com/ods-ai-ml4sg/proj_news_viz/releases/download/data/tass-001.csv.gz</code>
  </td>
  </tr>
  <tr>
  <td>
  <a href="https://universaldependencies.org/">Universal Dependencies</a>
  </td>
  <td colspan="5">
  </td>
  </tr>
  <tr>
  <td>
  GSD
  </td>
  <td>
  <a name="load_ud_gsd"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_ud_gsd">load_ud_gsd</a></code>
  <a href="#load_ud_gsd"><code>#</code></a>
  </td>
  <td>
  <code>morph</code>
  <code>syntax</code>
  </td>
  <td align="right">
  5&nbsp;030
  </td>
  <td align="right">
  1.01 Mb
  </td>
  <td>
  <code>wget https://github.com/UniversalDependencies/UD_Russian-GSD/raw/master/ru_gsd-ud-dev.conllu</code>
  </br>
  <code>wget https://github.com/UniversalDependencies/UD_Russian-GSD/raw/master/ru_gsd-ud-test.conllu</code>
  </br>
  <code>wget https://github.com/UniversalDependencies/UD_Russian-GSD/raw/master/ru_gsd-ud-train.conllu</code>
  </td>
  </tr>
  <tr>
  <td>
  Taiga
  </td>
  <td>
  <a name="load_ud_taiga"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_ud_taiga">load_ud_taiga</a></code>
  <a href="#load_ud_taiga"><code>#</code></a>
  </td>
  <td>
  <code>morph</code>
  <code>syntax</code>
  </td>
  <td align="right">
  3&nbsp;264
  </td>
  <td align="right">
  353.80 Kb
  </td>
  <td>
  <code>wget https://github.com/UniversalDependencies/UD_Russian-Taiga/raw/master/ru_taiga-ud-dev.conllu</code>
  </br>
  <code>wget https://github.com/UniversalDependencies/UD_Russian-Taiga/raw/master/ru_taiga-ud-test.conllu</code>
  </br>
  <code>wget https://github.com/UniversalDependencies/UD_Russian-Taiga/raw/master/ru_taiga-ud-train.conllu</code>
  </td>
  </tr>
  <tr>
  <td>
  PUD
  </td>
  <td>
  <a name="load_ud_pud"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_ud_pud">load_ud_pud</a></code>
  <a href="#load_ud_pud"><code>#</code></a>
  </td>
  <td>
  <code>morph</code>
  <code>syntax</code>
  </td>
  <td align="right">
  1&nbsp;000
  </td>
  <td align="right">
  207.78 Kb
  </td>
  <td>
  <code>wget https://github.com/UniversalDependencies/UD_Russian-PUD/raw/master/ru_pud-ud-test.conllu</code>
  </td>
  </tr>
  <tr>
  <td>
  SynTagRus
  </td>
  <td>
  <a name="load_ud_syntag"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_ud_syntag">load_ud_syntag</a></code>
  <a href="#load_ud_syntag"><code>#</code></a>
  </td>
  <td>
  <code>morph</code>
  <code>syntax</code>
  </td>
  <td align="right">
  61&nbsp;889
  </td>
  <td align="right">
  11.33 Mb
  </td>
  <td>
  <code>wget https://github.com/UniversalDependencies/UD_Russian-SynTagRus/raw/master/ru_syntagrus-ud-dev.conllu</code>
  </br>
  <code>wget https://github.com/UniversalDependencies/UD_Russian-SynTagRus/raw/master/ru_syntagrus-ud-test.conllu</code>
  </br>
  <code>wget https://github.com/UniversalDependencies/UD_Russian-SynTagRus/raw/master/ru_syntagrus-ud-train.conllu</code>
  </td>
  </tr>
  <tr>
  <td>
  <a href="https://github.com/dialogue-evaluation/morphoRuEval-2017">morphoRuEval-2017</a>
  </td>
  <td colspan="5">
  </td>
  </tr>
  <tr>
  <td>
  General Internet-Corpus
  </td>
  <td>
  <a name="load_morphoru_gicrya"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_morphoru_gicrya">load_morphoru_gicrya</a></code>
  <a href="#load_morphoru_gicrya"><code>#</code></a>
  </td>
  <td>
  <code>morph</code>
  </td>
  <td align="right">
  83&nbsp;148
  </td>
  <td align="right">
  10.58 Mb
  </td>
  <td>
  <code>wget https://github.com/dialogue-evaluation/morphoRuEval-2017/raw/master/GIKRYA_texts_new.zip</code>
  </br>
  <code>unzip GIKRYA_texts_new.zip</code>
  </br>
  <code>rm GIKRYA_texts_new.zip</code>
  </td>
  </tr>
  <tr>
  <td>
  Russian National Corpus
  </td>
  <td>
  <a name="load_morphoru_rnc"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_morphoru_rnc">load_morphoru_rnc</a></code>
  <a href="#load_morphoru_rnc"><code>#</code></a>
  </td>
  <td>
  <code>morph</code>
  </td>
  <td align="right">
  98&nbsp;892
  </td>
  <td align="right">
  12.71 Mb
  </td>
  <td>
  <code>wget https://github.com/dialogue-evaluation/morphoRuEval-2017/raw/master/RNC_texts.rar</code>
  </br>
  <code>unrar x RNC_texts.rar</code>
  </br>
  <code>rm RNC_texts.rar</code>
  </td>
  </tr>
  <tr>
  <td>
  OpenCorpora
  </td>
  <td>
  <a name="load_morphoru_corpora"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_morphoru_corpora">load_morphoru_corpora</a></code>
  <a href="#load_morphoru_corpora"><code>#</code></a>
  </td>
  <td>
  <code>morph</code>
  </td>
  <td align="right">
  38&nbsp;510
  </td>
  <td align="right">
  4.80 Mb
  </td>
  <td>
  <code>wget https://github.com/dialogue-evaluation/morphoRuEval-2017/raw/master/OpenCorpora_Texts.rar</code>
  </br>
  <code>unrar x OpenCorpora_Texts.rar</code>
  </br>
  <code>rm OpenCorpora_Texts.rar</code>
  </td>
  </tr>
  <tr>
  <td>
  <a href="https://russe.nlpub.org/downloads/">RUSSE Russian Semantic Relatedness</a>
  </td>
  <td colspan="5">
  </td>
  </tr>
  <tr>
  <td>
  HJ: Human Judgements of Word Pairs
  </td>
  <td>
  <a name="load_russe_hj"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_russe_hj">load_russe_hj</a></code>
  <a href="#load_russe_hj"><code>#</code></a>
  </td>
  <td>
  <code>emb</code>
  <code>sim</code>
  </td>
  <td align="right">
  </td>
  <td align="right">
  </td>
  <td>
  <code>wget https://github.com/nlpub/russe-evaluation/raw/master/russe/evaluation/hj.csv</code>
  </td>
  </tr>
  <tr>
  <td>
  RT: Synonyms and Hypernyms from the Thesaurus RuThes
  </td>
  <td>
  <a name="load_russe_rt"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_russe_rt">load_russe_rt</a></code>
  <a href="#load_russe_rt"><code>#</code></a>
  </td>
  <td>
  <code>emb</code>
  <code>sim</code>
  </td>
  <td align="right">
  </td>
  <td align="right">
  </td>
  <td>
  <code>wget https://raw.githubusercontent.com/nlpub/russe-evaluation/master/russe/evaluation/rt.csv</code>
  </td>
  </tr>
  <tr>
  <td>
  AE: Cognitive Associations from the Sociation.org Experiment
  </td>
  <td>
  <a name="load_russe_ae"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_russe_ae">load_russe_ae</a></code>
  <a href="#load_russe_ae"><code>#</code></a>
  </td>
  <td>
  <code>emb</code>
  <code>sim</code>
  </td>
  <td align="right">
  </td>
  <td align="right">
  </td>
  <td>
  <code>wget https://github.com/nlpub/russe-evaluation/raw/master/russe/evaluation/ae-train.csv</code>
  </br>
  <code>wget https://github.com/nlpub/russe-evaluation/raw/master/russe/evaluation/ae-test.csv</code>
  </br>
  <code>wget https://raw.githubusercontent.com/nlpub/russe-evaluation/master/russe/evaluation/ae2.csv</code>
  </td>
  </tr>
  <tr>
  <td>
  <a href="https://toloka.yandex.ru/datasets/">Toloka Datasets</a>
  </td>
  <td colspan="5">
  </td>
  </tr>
  <tr>
  <td>
  Lexical Relations from the Wisdom of the Crowd (LRWC)
  </td>
  <td>
  <a name="load_toloka_lrwc"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_toloka_lrwc">load_toloka_lrwc</a></code>
  <a href="#load_toloka_lrwc"><code>#</code></a>
  </td>
  <td>
  <code>emb</code>
  <code>sim</code>
  </td>
  <td align="right">
  </td>
  <td align="right">
  </td>
  <td>
  <code>wget https://tlk.s3.yandex.net/dataset/LRWC.zip</code>
  </br>
  <code>unzip LRWC.zip</code>
  </br>
  <code>rm LRWC.zip</code>
  </td>
  </tr>
  <tr>
  <td>
  <a href="https://github.com/cimm-kzn/RuDReC">The Russian Adverse Drug Reaction Corpus of Tweets (RuADReCT)</a>
  </td>
  <td>
  <a name="load_ruadrect"></a>
  <code><a href="https://nbviewer.jupyter.org/github/natasha/corus/blob/master/docs.ipynb#load_ruadrect">load_ruadrect</a></code>
  <a href="#load_ruadrect"><code>#</code></a>
  </td>
  <td>
  <code>social</code>
  </td>
  <td align="right">
  9&nbsp;515
  </td>
  <td align="right">
  2.09 Mb
  </td>
  <td>
  This corpus was developed for the Social Media Mining for Health Applications (#SMM4H) Shared Task 2020
  </br>
  </br>
  <code>wget https://github.com/cimm-kzn/RuDReC/raw/master/data/RuADReCT.zip</code>
  </br>
  <code>unzip RuADReCT.zip</code>
  </br>
  <code>rm RuADReCT.zip</code>
  </td>
  </tr>
  </table>
  <!--- metas --->



  - Chat — https://t.me/natural_language_processing
  - Issues — https://github.com/natasha/corus/issues
  - Commercial support — https://lab.alexkuk.ru



  1. Implement `corus/sources/<source>.py`
  2. Add import into `corus/sources/__init__.py`
  3. Add meta into `corus/source/meta.py`
  4. Add example into `docs.ipynb` (check meta table is correct)
  5. Run tests (readme is updated)



  Dev env

  ```bash
  python -m venv ~/.venvs/natasha-corus
  source ~/.venvs/natasha-corus/bin/activate

  pip install -r requirements/dev.txt
  pip install -e .

  python -m ipykernel install --user --name natasha-corus
  ```

  Lint + update docs

  ```bash
  make lint
  make exec-docs
  ```

  Release

  ```bash


  git commit -am 'Up version'
  git tag v0.10.0

  git push
  git push --tags
  ```


pkgId: 078f0aa39d3581444547f2af2933f9e16b49e77c84818e7078a0a9f5d60da04a
name: python-cos-python-sdk-v5
arch: src
version: 1.9.31
epoch: 0
release: 1
summary: cos-python-sdk-v5
url: https://www.qcloud.com/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cos-python-sdk-v5-1.9.31-1.src.rpm
checksum_type: sha256
description:
  Qcloud COSv5 SDK


  .. image:: https://img.shields.io/pypi/v/cos-python-sdk-v5.svg
     :target: https://pypi.org/search/?q=cos-python-sdk-v5
     :alt: Pypi
  .. image:: https://api.travis-ci.com/tencentyun/cos-python-sdk-v5.svg?branch=master
     :target: https://app.travis-ci.com/github/tencentyun/cos-python-sdk-v5
     :alt: Travis CI

  介绍
  _______

  腾讯云COSV5Python SDK, 目前可以支持Python2.6与Python2.7以及Python3.x。

  安装指南
  __________

  使用pip安装 ::

      pip install -U cos-python-sdk-v5

  手动安装::

      python setup.py install

  使用方法
  __________

  使用python sdk，参照 https://github.com/tencentyun/cos-python-sdk-v5/blob/master/demo/demo.py

  cos最新可用地域，参照 https://cloud.tencent.com/document/product/436/6224

  python sdk 快速入门，参照 https://cloud.tencent.com/document/product/436/12269

  python sdk 接口文档，参照 https://cloud.tencent.com/document/product/436/12270


pkgId: 87eb5690458265b2c3e3c3fb5e7053bc86f87d69ad10cbf9247aca73a27474c0
name: python-cosapp
arch: src
version: 0.18.0
epoch: 0
release: 1
summary: CoSApp, the Collaborative System Approach.
url: https://cosapp.readthedocs.io
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cosapp-0.18.0-1.src.rpm
checksum_type: sha256
description:
  The primary goal of **CoSApp** is to help technical departments in the design of complex systems.
  To do so, the framework allows the simulation of various systems representing the different parts of the final product in a common environment.
  The benefit is the ability for each subsystem team to carry out design study with a direct feedback at product level.

  The main features are:



  Couple your simulation models with CoSApp to get immediate impact on main product variables and iterate to converge on a better design.



  All systems can share design parameters associated with an acceptable range.
  You can take advantage of those limited degrees of freedom without fear of breaking your collaborators' work.



  CoSApp solvers can be combined into versatile, customized workflows that fit specific simulation intents.

  Have a look at the [introduction](https://cosapp.readthedocs.io/en/stable/tutorials/00-Introduction.html#), containing many tutorials!

  This code is the property of Safran SA.
  It uses code coming from various open-source projects (see [LICENSE](https://gitlab.com/cosapp/cosapp/blob/master/LICENSE.rst) file).



  If you use CoSApp, please cite us!

  Lac *et al.* (2024), [CoSApp: a Python library to create, simulate and design complex systems](https://doi.org/10.21105/joss.06292), Journal of Open Source Software 9(94), 6292.

  BibTeX entry:

  ```bibtex
  @article{Lac.etal:joss2024,
      author={Étienne Lac and Guy {De Spiegeleer} and Adrien Delsalle and Frédéric Collonval and Duc-Trung Lê and Mathias Malandain},
      title={CoSApp: a Python library to create, simulate and design complex systems},
      journal={Journal of Open Source Software},
      year={2024},
      volume={9},
      number={94},
      pages={6292},
      doi={10.21105/joss.06292},
      publisher={The Open Journal}
  }
  ```



  Run a Jupyter Lab instance with binder to try out CoSApp features through examples.

  [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gl/cosapp%2Fcosapp/master?urlpath=lab/tree/docs/tutorials)
  [![lite-badge](https://jupyterlite.rtfd.io/en/latest/_static/badge.svg)]( https://cosapp.gitlab.io/cosapp/)








  - Improved data recording mechanism for `NonLinearSolver`, to facilitate convergence path analysis (MR [#312](https://gitlab.com/cosapp/cosapp/-/merge_requests/312)).
  - New driver `FixedPointSolver`, solving algebraic loops by fixed-point iterations (MRs [#315](https://gitlab.com/cosapp/cosapp/-/merge_requests/315) & [#322](https://gitlab.com/cosapp/cosapp/-/merge_requests/322)).
  - New method `Driver.available_options`, returning the list of options available for a particular driver (MR [#316](https://gitlab.com/cosapp/cosapp/-/merge_requests/316)).
  - New method `System.pull_design_method`, to promote sub-system design methods at parent level easily (MR [#314](https://gitlab.com/cosapp/cosapp/-/merge_requests/314)).
  - Bug fix in FMU exporter (MR [#324](https://gitlab.com/cosapp/cosapp/-/merge_requests/324)).
  - Bug fixes in system transition logic (MR [#338](https://gitlab.com/cosapp/cosapp/-/merge_requests/338)).
  - New method `System.init_mode` called before each time simulation, for mode initialization (MR [#347](https://gitlab.com/cosapp/cosapp/-/merge_requests/347)).



  - Fix bad rendering of tutorial notebooks on time simulations (MR [#321](https://gitlab.com/cosapp/cosapp/-/merge_requests/321)).
  - Fix bad rendering of mermaid graph in logger documentation (MR [#326](https://gitlab.com/cosapp/cosapp/-/merge_requests/326)).
  - Updated tutorial on advanced time simulations and on design methods (MR [#343](https://gitlab.com/cosapp/cosapp/-/merge_requests/343)).
  - Add a section on `FixedPointSolver` in the driver tutorial (MR [#346](https://gitlab.com/cosapp/cosapp/-/merge_requests/346)).



  - Improved type hints for drivers (MR [#318](https://gitlab.com/cosapp/cosapp/-/merge_requests/318)).
  - Updated JupyterLite image (MR [#313](https://gitlab.com/cosapp/cosapp/-/merge_requests/313)).
  - Add new test on `swap_system` (MR [#342](https://gitlab.com/cosapp/cosapp/-/merge_requests/342)).
  - Various updates of CI/CD settings (MRs [#317](https://gitlab.com/cosapp/cosapp/-/merge_requests/317), [#319](https://gitlab.com/cosapp/cosapp/-/merge_requests/319) [#320](https://gitlab.com/cosapp/cosapp/-/merge_requests/320), [#336](https://gitlab.com/cosapp/cosapp/-/merge_requests/336), [#337](https://gitlab.com/cosapp/cosapp/-/merge_requests/337)).
  - Various test improvements (MRs [#340](https://gitlab.com/cosapp/cosapp/-/merge_requests/340), [#342](https://gitlab.com/cosapp/cosapp/-/merge_requests/342)).






  - A JupyterLite image including CoSApp is now available in the main README file (MR [#300](https://gitlab.com/cosapp/cosapp/-/merge_requests/300)).
  - Fix a bug with primary event initialization (MR [#293](https://gitlab.com/cosapp/cosapp/-/merge_requests/293)).
  - Improved API for partial connections: name mappings can now be given as lists mixing variable names and dictionaries, which is convenient when most variable names are identical, and only a few differ (MRs [#294](https://gitlab.com/cosapp/cosapp/-/merge_requests/294), [#295](https://gitlab.com/cosapp/cosapp/-/merge_requests/295) & [#306](https://gitlab.com/cosapp/cosapp/-/merge_requests/306)).
    Example:

    ```python
    from cosapp.base import System

    class SomeSystem(System):
        def setup(self):
            foo = self.add_child(Foo('foo'), pulling=['a', 'b', {'c': 'c_foo'}])
            bar = self.add_child(Bar('bar'))

            self.connect(foo, bar, ['x', 'y', {'z': 'v'}])
    ```

  - New utility function `cosapp.tools.views.show_tree` displaying the hierarchical tree of a system similar to a folder tree in a filesystem (MRs [#296](https://gitlab.com/cosapp/cosapp/-/merge_requests/296)-[#298](https://gitlab.com/cosapp/cosapp/-/merge_requests/298)).



  - New attribute `Residue.variables` providing the names of the variables involved in the residue (MR [#299](https://gitlab.com/cosapp/cosapp/-/merge_requests/299)).
  - Minor bug fix in Newton-Raphson algorithm (MR [#303](https://gitlab.com/cosapp/cosapp/-/merge_requests/303)).
  - Fix bad markdown rendering of systems (MR [#292](https://gitlab.com/cosapp/cosapp/-/merge_requests/292)).
  - Improved type hints throughout the code (MR [#307](https://gitlab.com/cosapp/cosapp/-/merge_requests/307)).
  - Other improvements (MRs [#291](https://gitlab.com/cosapp/cosapp/-/merge_requests/291), [#301](https://gitlab.com/cosapp/cosapp/-/merge_requests/301), [#302](https://gitlab.com/cosapp/cosapp/-/merge_requests/302), [#304](https://gitlab.com/cosapp/cosapp/-/merge_requests/304), [#305](https://gitlab.com/cosapp/cosapp/-/merge_requests/305), [#307](https://gitlab.com/cosapp/cosapp/-/merge_requests/307), [#308](https://gitlab.com/cosapp/cosapp/-/merge_requests/308)).



  - Pin dependency to `numpy` v1, until full migration to v2 (MR [#310](https://gitlab.com/cosapp/cosapp/-/merge_requests/310)).






  - Primary events triggered within the same time step are now correctly captured (MR [#287](https://gitlab.com/cosapp/cosapp/-/merge_requests/287)).
    A bug persists when several primary events occur at the exact same time, though, as only one will be retained.
  - Fix bug preventing events from occurring during the first time step of a simulation (MR [#288](https://gitlab.com/cosapp/cosapp/-/merge_requests/288)).
  - Fix a bug causing recorders to crash when inspecting ports with properties (MR [#282](https://gitlab.com/cosapp/cosapp/-/merge_requests/282)).
  - Algebraic and time-dependent problems are now dissociated (MR [#284](https://gitlab.com/cosapp/cosapp/-/merge_requests/284)). As a consequence, invoking `self.problem.clear()` during transitions, for instance, no longer affects time-dependent unknowns such as transients.
  - Fix ambiguous warning message raised by `RunSingleCase` (MR [#279](https://gitlab.com/cosapp/cosapp/-/merge_requests/279)).
  - Various refactoring passes (MRs [#283](https://gitlab.com/cosapp/cosapp/-/merge_requests/283) and [#286](https://gitlab.com/cosapp/cosapp/-/merge_requests/286)).



  - Updated description inside the conda recipe (MR [#276](https://gitlab.com/cosapp/cosapp/-/merge_requests/276)).
  - Pin `pytest` version due to a bug in version 8.1 (MR [#280](https://gitlab.com/cosapp/cosapp/-/merge_requests/280)).
  - Add a "Citing" section in the main README file (MR [#281](https://gitlab.com/cosapp/cosapp/-/merge_requests/281)).
  - The module parser was updated (MR [#285](https://gitlab.com/cosapp/cosapp/-/merge_requests/285)).
  - Force `sphinx` < 7.3 in the documentation building environment, owing to an incompatibility with `sphinx-mdinclude` (MR [#289](https://gitlab.com/cosapp/cosapp/-/merge_requests/289)). This is a temporary patch until root cause is fixed.






  - Fix bug raised in `NonLinearSolver` for systems with rates (MR [#268](https://gitlab.com/cosapp/cosapp/-/merge_requests/268)).
  - Minor refactoring pass (MR [#274](https://gitlab.com/cosapp/cosapp/-/merge_requests/274)).



  - Drop Python 3.8 support and add Python 3.11 test pipeline (MR [#270](https://gitlab.com/cosapp/cosapp/-/merge_requests/270)).
  - Update installation and contribution guidelines (MR [#270](https://gitlab.com/cosapp/cosapp/-/merge_requests/270)).
  - Update dependency list (MRs [#269](https://gitlab.com/cosapp/cosapp/-/merge_requests/269) and [#270](https://gitlab.com/cosapp/cosapp/-/merge_requests/270)).



  Publication of an article on CoSApp in the [Journal of Open-Source Software](https://joss.theoj.org/), referenced to version 0.15.4 (MR [#271](https://gitlab.com/cosapp/cosapp/-/merge_requests/271)).






  - Fix minor bug in `NonLinearSolver` (MR [#261](https://gitlab.com/cosapp/cosapp/-/merge_requests/261)).
  - Fix incorrect return type hints in `System` (MR [#259](https://gitlab.com/cosapp/cosapp/-/merge_requests/259)).
  - Improve support for read-only properties in system getters and setters (MR [#264](https://gitlab.com/cosapp/cosapp/-/merge_requests/264)).



  - Remove deprecated dependency for compatibility with Python 3.12 (MR [#258](https://gitlab.com/cosapp/cosapp/-/merge_requests/258)).
  - Force `pythonfmu` < 0.6.3 in dependency list, to prevent a crash during tests (MR [#262](https://gitlab.com/cosapp/cosapp/-/merge_requests/262)). Temporary fix until root cause is identified.






  - Fix crash with `VisJs` rendering of sub-systems (MR [#252](https://gitlab.com/cosapp/cosapp/-/merge_requests/252)).
  - Fix minor bug in `EvalString` (MR [#253](https://gitlab.com/cosapp/cosapp/-/merge_requests/253)).
  - Fix bad synchronization of mode variables during transitions (MR [#254](https://gitlab.com/cosapp/cosapp/-/merge_requests/254)).
  - Improve error message when pulling variables with different roles (MR [#255](https://gitlab.com/cosapp/cosapp/-/merge_requests/255)).
  - Fix `TypeError` when passing `pulling` argument as a tuple in `System.add_child` (MR [#256](https://gitlab.com/cosapp/cosapp/-/merge_requests/256)).






  - The representation of `MathematicalProblem` objects now indicates the number of unknowns and equations, for a better readability (MR [#249](https://gitlab.com/cosapp/cosapp/-/merge_requests/249)).
  - Optional argument `execution_index` in `System.add_child` and `Driver.add_child` can now take a negative value, with a behaviour following that of `list.insert` (MR [#250](https://gitlab.com/cosapp/cosapp/-/merge_requests/250)).



  - Add missing field "time" in `ExplicitTimeRecorder.event_data`, when no recorder is set (MR [#245](https://gitlab.com/cosapp/cosapp/-/merge_requests/245)).
  - Fix bug with recorders inspecting systems with iterators (MRs [#246](https://gitlab.com/cosapp/cosapp/-/merge_requests/246) and [#247](https://gitlab.com/cosapp/cosapp/-/merge_requests/247)).
  - Fix bug with `NonLinearSolver` with NumPy array residues (MR [#248](https://gitlab.com/cosapp/cosapp/-/merge_requests/248)).
  - Fix initialization bug of targets involving expressions (MR [#249](https://gitlab.com/cosapp/cosapp/-/merge_requests/249)).






  - Suppression of default `RunSingleCase` subdriver `runner` in `NonLinearSolver` drivers (MR [#239](https://gitlab.com/cosapp/cosapp/-/merge_requests/239)).
  - Enable target initialization in multi-point design problems (MR [#233](https://gitlab.com/cosapp/cosapp/-/merge_requests/233)).
  - New utility function `swap_system` to replace on the fly a subsystem by another `System` instance (MR [#238](https://gitlab.com/cosapp/cosapp/-/merge_requests/238)).



  - Refactor driver `Optimizer` (MR [#240](https://gitlab.com/cosapp/cosapp/-/merge_requests/240)).
  - Various bug fixes (MRs [#234](https://gitlab.com/cosapp/cosapp/-/merge_requests/234), [#235](https://gitlab.com/cosapp/cosapp/-/merge_requests/235), [#241](https://gitlab.com/cosapp/cosapp/-/merge_requests/241)).



  - New tutorial on `swap_system` (MR [#243](https://gitlab.com/cosapp/cosapp/-/merge_requests/243)).
  - General update of tutorials (MRs [#232](https://gitlab.com/cosapp/cosapp/-/merge_requests/232) and [#242](https://gitlab.com/cosapp/cosapp/-/merge_requests/242)).






  - Fix incorrect output file name in `cosapp.tools.parse_module` (MR [#229](https://gitlab.com/cosapp/cosapp/-/merge_requests/229)).
  - Refactoring pass (MR [#230](https://gitlab.com/cosapp/cosapp/-/merge_requests/230)).



  - Upgrade documentation build stack (MRs [#224](https://gitlab.com/cosapp/cosapp/-/merge_requests/224) and [#226](https://gitlab.com/cosapp/cosapp/-/merge_requests/226)).
  - Fix bad rendering of ports and systems (MRs [#227](https://gitlab.com/cosapp/cosapp/-/merge_requests/227) and [#228](https://gitlab.com/cosapp/cosapp/-/merge_requests/228)).






  * Improved performance, through a revised clean/dirty mechanism (MR [#215](https://gitlab.com/cosapp/cosapp/-/merge_requests/215)).
  * Possibility to add a contextual description to sub-systems and ports of a system, as well as sub-drivers (MR [#216](https://gitlab.com/cosapp/cosapp/-/merge_requests/216)). This feature is useful for automatic documentation tools, and has been included in the Markdown representation of systems (also used in function `cosapp.tools.display_doc`). Example:

    ```python
    from cosapp.base import System
    from my_module import FlowPort

    class MySystem(System):
        def setup(self):
            self.add_input(FlowPort, "fl_in1", desc="Primary inlet flow port")
            self.add_input(FlowPort, "fl_in2", desc="Secondary inlet flow port")

            self.add_output(FlowPort, "fl_out")
    ```

  * New hook function `_parse_module_config`, returning pre-defined settings for `cosapp.tools.parse_module` (MR [#218](https://gitlab.com/cosapp/cosapp/-/merge_requests/218)). This allows module maintainers to simply call

    ```python
    from cosapp.tools import parse_module
    import my_module

    parse_module(my_module)
    ```

    instead of, *e.g.*,

    ```python
    parse_module(
        my_module,
        ctor_config={
            "ComplexSystem1": [
                dict(n=1, foo=0.5),
                dict(n=2, foo=0.1),
            ],
            "ComplexSystem2": [
                dict(xi=0.0, __alias__="ComplexSystem2_a"),
                dict(xi=1.0, __alias__="ComplexSystem2_b"),
            ],
        },
        excludes=["Foo*", "*Bar?"],
    )
    ```

    provided `my_module._parse_module_config()` returns a dictionary specifying the values of `ctor_config`, `excludes`, *etc.*

  * Make `SolverResults` a `dataclass`, for easier handling of `NonLinearSolver.results`, *e.g.* (MR [#220](https://gitlab.com/cosapp/cosapp/-/merge_requests/220)).
  * Expose attribute `problem` in system setup (MR [#221](https://gitlab.com/cosapp/cosapp/-/merge_requests/221)). Previously, `problem` was only exposed in method `System.transition`.



  * Fix bug in `NonLinearSolver` log message (MR [#214](https://gitlab.com/cosapp/cosapp/-/merge_requests/214)).
  * Add missing JSON file in PyPI and conda packages, preventing the use of `cosapp.tools.parse_module` (MR [#219](https://gitlab.com/cosapp/cosapp/-/merge_requests/219)).



  * Illustrate port and sub-system description in tutorials (MR [#215](https://gitlab.com/cosapp/cosapp/-/merge_requests/215)).






  * Update test baseline to pass in a Python 3.11 environment (MR [#200](https://gitlab.com/cosapp/cosapp/-/merge_requests/200)).
  * Creation of a dummy system factory, mostly for tests (MR [#201](https://gitlab.com/cosapp/cosapp/-/merge_requests/201)).
  * Improve clean/dirty mechanism (MR [#202](https://gitlab.com/cosapp/cosapp/-/merge_requests/202)) and fix incorrect clean/dirty status with surrogate models (MR [#205](https://gitlab.com/cosapp/cosapp/-/merge_requests/205)).
  * Fix bug in function `cosapp.tools.display_doc` for classes with setup arguments (MR [#208](https://gitlab.com/cosapp/cosapp/-/merge_requests/208)).
  * Various code quality improvements (MRs [#211](https://gitlab.com/cosapp/cosapp/-/merge_requests/211), [#212](https://gitlab.com/cosapp/cosapp/-/merge_requests/212)).



  Note: extensive use of self-documenting f-strings (introduced in Python 3.8) has made tutorials incompatible with Python 3.7.

  * Updated tutorials (MRs [#203](https://gitlab.com/cosapp/cosapp/-/merge_requests/203), [#206](https://gitlab.com/cosapp/cosapp/-/merge_requests/206), [#207](https://gitlab.com/cosapp/cosapp/-/merge_requests/207), [#210](https://gitlab.com/cosapp/cosapp/-/merge_requests/210)).
  * The image used in binder is now based on Python 3.10 (MR [#204](https://gitlab.com/cosapp/cosapp/-/merge_requests/204)).



  * New function `parse_module` in `cosapp.tools` collecting all system and port classes within a Python module. This parser, generating a JSON file containing the description of all CoSApp symbols, is primarily meant to be used for constructional GUI applications, developed separately (MRs [#192](https://gitlab.com/cosapp/cosapp/-/merge_requests/192) & [#209](https://gitlab.com/cosapp/cosapp/-/merge_requests/209)).






  The code is now tested for Python 3.8, 3.9 and 3.10.
  Support of Python 3.7 is thus officially dropped, although no version-specific Python code was introduced in this version of CoSApp.



  * Module `connectors` moved from `cosapp.core` to `cosapp.ports` (MR [#189](https://gitlab.com/cosapp/cosapp/-/merge_requests/189)).
  * New "direct" (with no unit conversion) connector classes `PlainConnector`, `CopyConnector` and `DeepCopyConnector`, in `cosapp.ports.connectors` (MR [#188](https://gitlab.com/cosapp/cosapp/-/merge_requests/188)).
  * New method `MathematicalProblem.is_empty()`, equivalent to `shape == (0, 0)` (MR [#186](https://gitlab.com/cosapp/cosapp/-/merge_requests/186)).
  * Improved VisJs graph rendering, by limiting node size for long system names (MR [#184](https://gitlab.com/cosapp/cosapp/-/merge_requests/184)).
  * New utility functions `get_state` and `set_state` in `cosapp.utils`, for quick system data recovery (MR [#193](https://gitlab.com/cosapp/cosapp/-/merge_requests/193)):

    ```python
    from cosapp.utils import get_state, set_state

    s = SomeSystem('s')
    

    
    designed = get_state(s)

    s.drivers.clear()
    s.add_driver(SomeDriver('driver'))

    try:
        s.run_drivers()
    except:
        
        set_state(s, designed)
    ```

  * Functions `radians`, `degrees` and `arctan2`/`atan2` have been added to the scope of `EvalString` objects, and can therefore be used in equations, *e.g.* (MR [#178](https://gitlab.com/cosapp/cosapp/-/merge_requests/178)).
  * Recorders can now record constant properties (MR [#181](https://gitlab.com/cosapp/cosapp/-/merge_requests/181)).
  * Deprecation of `System.get_unsolved_problem` in favour of new method `assembled_problem` (MR [#174](https://gitlab.com/cosapp/cosapp/-/merge_requests/174)).
  * Inner off-design problem of systems is now exposed as attribute `problem`, but only within the `transition` method (MR [#174](https://gitlab.com/cosapp/cosapp/-/merge_requests/174)). This allows users to add or remove off-design constraints during event-driven transitions, while keeping this property inaccessible the rest of the time.

    ```python
    from cosapp.base import System
    from math import sin, cos

    class SomeSystem(System):
        def setup(self):
            self.add_inward('x', 0.0)
            self.add_inward('y', 0.0)
            self.add_outward('z', 0.0)
            a = self.add_event('event_a', trigger='x > y')
            b = self.add_event('event_b', trigger='x < y')

        def compute(self):
            self.z = cos(self.x) * sin(self.y)

        def transition(self):
            offdesign = self.problem
            if self.event_a.present:
                offdesign.clear()
                offdesign.add_equation('z == 0.5').add_unknown('x')
            if self.event_b.present:
                offdesign.clear()
    ```



  * Fix serialization bugs for systems with setup parameters (MR [#180](https://gitlab.com/cosapp/cosapp/-/merge_requests/180)) and `None` variables (MR [#172](https://gitlab.com/cosapp/cosapp/-/merge_requests/172)).
  * Bug fix on event time calculation involving array transients (MR [#177](https://gitlab.com/cosapp/cosapp/-/merge_requests/177)).
  * Bug fix on possible name conflicts in connector storage (MR [#173](https://gitlab.com/cosapp/cosapp/-/merge_requests/173)).
  * Fix inconsistent behaviour of `System.add_child` when a `pulling` error is raised (MR [#197](https://gitlab.com/cosapp/cosapp/-/merge_requests/197)).
  * Various code quality improvements (MRs [#175](https://gitlab.com/cosapp/cosapp/-/merge_requests/175), [#185](https://gitlab.com/cosapp/cosapp/-/merge_requests/185), [#186](https://gitlab.com/cosapp/cosapp/-/merge_requests/186), [#187](https://gitlab.com/cosapp/cosapp/-/merge_requests/187), [#190](https://gitlab.com/cosapp/cosapp/-/merge_requests/190), [#191](https://gitlab.com/cosapp/cosapp/-/merge_requests/191), [#194](https://gitlab.com/cosapp/cosapp/-/merge_requests/194)).



  * Updated time driver tutorial (MR [#182](https://gitlab.com/cosapp/cosapp/-/merge_requests/182)).
  * Updated Tips & Tricks (MR [#196](https://gitlab.com/cosapp/cosapp/-/merge_requests/196)).
  * Other updates (MRs [#176](https://gitlab.com/cosapp/cosapp/-/merge_requests/176), [#195](https://gitlab.com/cosapp/cosapp/-/merge_requests/195), [#198](https://gitlab.com/cosapp/cosapp/-/merge_requests/198)).





  * Improved user experience:
    * Auto-completion for dynamically added attributes of systems (ports, subsystems, inwards, outwards, events...) and drivers (sub-drivers) (MRs [#164](https://gitlab.com/cosapp/cosapp/-/merge_requests/164) and [#166](https://gitlab.com/cosapp/cosapp/-/merge_requests/166));
    * Improved representation of mathematical problems, in particular for loop equations and multi-point design problems (MRs [#159](https://gitlab.com/cosapp/cosapp/-/merge_requests/159), [#160](https://gitlab.com/cosapp/cosapp/-/merge_requests/160) and [#163](https://gitlab.com/cosapp/cosapp/-/merge_requests/163)).
  * New method `System.new_problem` to facilitate the creation of dynamic design methods, *e.g.* (MR [#162](https://gitlab.com/cosapp/cosapp/-/merge_requests/162)).



  * Updated tutorials (MRs [#169](https://gitlab.com/cosapp/cosapp/-/merge_requests/169) and [#170](https://gitlab.com/cosapp/cosapp/-/merge_requests/170)).



  * Bug fix on unknown dealiasing (MR [#157](https://gitlab.com/cosapp/cosapp/-/merge_requests/157)).
  * Bug fix on port variable export (MR [#158](https://gitlab.com/cosapp/cosapp/-/merge_requests/158)).
  * Bug fix on system serialization (MR [#161](https://gitlab.com/cosapp/cosapp/-/merge_requests/161)).
  * Bug fix on subsystem read-only constants (MR [#167](https://gitlab.com/cosapp/cosapp/-/merge_requests/167)).
  * Various code quality improvements (MRs [#154](https://gitlab.com/cosapp/cosapp/-/merge_requests/154), [#155](https://gitlab.com/cosapp/cosapp/-/merge_requests/155), [#162](https://gitlab.com/cosapp/cosapp/-/merge_requests/162), [#168](https://gitlab.com/cosapp/cosapp/-/merge_requests/168)).





  * Automatic tolerance in `NonLinearSolver` (MRs [#148](https://gitlab.com/cosapp/cosapp/-/merge_requests/148) and [#152](https://gitlab.com/cosapp/cosapp/-/merge_requests/152)).
  * `Optimizer.set_objective` is deprecated, in favour of `set_minimum` and `set_maximum` (MR [#150](https://gitlab.com/cosapp/cosapp/-/merge_requests/150)).
  * Loop residues are no longer normalized (MR [#151](https://gitlab.com/cosapp/cosapp/-/merge_requests/151)).
  * Improved type hints for ports, systems and drivers, in functions whose return type depends on arguments, such as `System.add_child`, `add_driver`, *etc.* (MR [#145](https://gitlab.com/cosapp/cosapp/-/merge_requests/145)).



  * Updated tutorials (MRs [#144](https://gitlab.com/cosapp/cosapp/-/merge_requests/144), [#147](https://gitlab.com/cosapp/cosapp/-/merge_requests/147) and [#154](https://gitlab.com/cosapp/cosapp/-/merge_requests/154)).



  * Fix inconsistent behaviour of recorders (MR [#143](https://gitlab.com/cosapp/cosapp/-/merge_requests/143)).
  * Fix bug on event initialization (MR [#146](https://gitlab.com/cosapp/cosapp/-/merge_requests/146)).
  * Fix bad markdown formatting of ports occurring in `jupyterlab` 3.4 (MR [#149](https://gitlab.com/cosapp/cosapp/-/merge_requests/149)).
  * Fix failed test caused by a regression in `pytest` 7.1 (MR [#142](https://gitlab.com/cosapp/cosapp/-/merge_requests/142)).





  * Simplification of driver `Optimizer`:
    * Suppression of sub-driver `runner` (MR [#136](https://gitlab.com/cosapp/cosapp/-/merge_requests/136)). This change introduces new methods `set_objective`, `add_unknowns` and `add_constraints` in driver `Optimizer`.
    * Optimization constraints are now declared with human-readable expressions in `Optimizer.add_constraints` (MR [#138](https://gitlab.com/cosapp/cosapp/-/merge_requests/138)).

    Before:

    ```python
    from cosapp.drivers import Optimizer

    s = SomeSystem('s')
    optim = s.add_driver(Optimizer('optim'))

    optim.runner.set_objective('cost')
    optim.runner.add_unknown(['a', 'b', 'p_in.x'])
    
    optim.runner.add_constraints([
        "b - a",  # b >= a
        "a",      # a >= 0
        "1 - a",  # a <= 1
    ])
    optim.runner.add_constraints(
        "p_out.y",
        inequality = False,  # p_out.y == 0
    )

    s.run_drivers()
    ```

    After:

    ```python
    optim.set_objective('cost')
    optim.add_unknown(['a', 'b', 'p_in.x'])
    optim.add_constraints(
        "b >= a",
        "0 <= a <= 1",
        "p_out.y == 0",
    )
    ```

    * New, convenient iterators and setters for ports (MR [#137](https://gitlab.com/cosapp/cosapp/-/merge_requests/137)):

    ```python
    from cosapp.base import Port, System

    class XyzPort(Port):
        def setup(self):
            self.add_variable('x')
            self.add_variable('y')
            self.add_variable('z')

    class SomeSystem(System):
        def setup(self):
            self.add_input(XyzPort, 'p_in')
            self.add_output(XyzPort, 'p_out')

        def compute(self):
            self.p_out.set_from(self.p_in)  # assign values from `p_in`
            self.p_out.z = 0.0

    s = SomeSystem('s')
    
    s.p_in.set_values(x=1, y=-0.5, z=0.1)

    s.run_once()
    
    for varname, value in s.p_out.items():
        print(f"p_out.{varname} = {value})
    ```



  * Updated tutorials on ports (MR [#139](https://gitlab.com/cosapp/cosapp/-/merge_requests/139)) and on optimization (MR [#140](https://gitlab.com/cosapp/cosapp/-/merge_requests/140)).



  * Fix bug in Jacobian computation for negative perturbations (MR [#129](https://gitlab.com/cosapp/cosapp/-/merge_requests/129)).
  * Fix bug in `RunOnce` and `RunSingleCase` recorders with `hold=False` (MR [#130](https://gitlab.com/cosapp/cosapp/-/merge_requests/130)).
  * Resolve input aliasing in time driver scenarios (MR [#135](https://gitlab.com/cosapp/cosapp/-/merge_requests/135)).
  * Fix bugs with events (MRs [#123](https://gitlab.com/cosapp/cosapp/-/merge_requests/123), [#126](https://gitlab.com/cosapp/cosapp/-/merge_requests/126), [#128](https://gitlab.com/cosapp/cosapp/-/merge_requests/128)).
  * Discard empty connectors, and send a warning (MR [#132](https://gitlab.com/cosapp/cosapp/-/merge_requests/132)).
  * Other code quality improvements (MRs [#127](https://gitlab.com/cosapp/cosapp/-/merge_requests/127), [#131](https://gitlab.com/cosapp/cosapp/-/merge_requests/131), [#133](https://gitlab.com/cosapp/cosapp/-/merge_requests/133), [#134](https://gitlab.com/cosapp/cosapp/-/merge_requests/134)).





  * Implementation of multimode systems and hybrid continuous/discrete time solver (MRs [#100](https://gitlab.com/cosapp/cosapp/-/merge_requests/100), [#103](https://gitlab.com/cosapp/cosapp/-/merge_requests/103), [#105](https://gitlab.com/cosapp/cosapp/-/merge_requests/105)-[#108](https://gitlab.com/cosapp/cosapp/-/merge_requests/108), [#110](https://gitlab.com/cosapp/cosapp/-/merge_requests/110)-[#121](https://gitlab.com/cosapp/cosapp/-/merge_requests/121)):
    * Possibility to declare events and mode variables in systems.
    * New method `System.transition` describing system transition upon the occurrence of events.
    * Event detection in `ExplicitTimeDriver`.

  * Possibility to specify a stop criterion in time simulation scenarios (MR [#107](https://gitlab.com/cosapp/cosapp/-/merge_requests/107)).



  * New tutorial on hybrid time simulations and multimode systems (MRs [#116](https://gitlab.com/cosapp/cosapp/-/merge_requests/116) and [#120](https://gitlab.com/cosapp/cosapp/-/merge_requests/120)).
  * Updated build config file following up a bug fix in [github.com/readthedocs](https://github.com/readthedocs/readthedocs.org) (MR [#109](https://gitlab.com/cosapp/cosapp/-/merge_requests/109)).





  * New module `cosapp.base` (MR [#96](https://gitlab.com/cosapp/cosapp/-/merge_requests/96)) containing base classes for user-defined classes (in particular, `Port`, `System` and `Driver`). Also contains `BaseConnector`, base class for custom connectors (see "User-defined and peer-to-peer connectors" below), as well as CoSApp-specific exceptions `ScopeError`, `UnitError` and `ConnectorError`.
  **Note:** `Port`, `System` and `Driver` can still be imported from `cosapp.ports`, `cosapp.systems` and `cosapp.drivers`, respectively.

  * Public API `cosapp.base.SurrogateModel` to define custom surrogate models used in `System.make_surrogate` (MR [#97](https://gitlab.com/cosapp/cosapp/-/merge_requests/97)).
  Pre-defined models have been moved to module `cosapp.utils.surrogate_models`.

  * System-to-system connections (MR [#94](https://gitlab.com/cosapp/cosapp/-/merge_requests/94)).

  ```python
  class LegacyPortToPort(System):
      def setup(self):
          a = self.add_child(ModelA('a'))
          b = self.add_child(ModelB('b'))

          
          self.connect(a.p_in, b.p_out)
          self.connect(a.outwards, b.inwards, {'y': 'x'})

  class Alternative(System):
    """Same as `LegacyPortToPort`, with alternative connection syntax"""
      def setup(self):
          a = self.add_child(ModelA('a'))
          b = self.add_child(ModelB('b'))

          
          self.connect(a, b, {'p_in': 'p_out', 'y': 'x'})
  ```

  * User-defined and peer-to-peer connectors (MR [#87](https://gitlab.com/cosapp/cosapp/-/merge_requests/87) and MR [#98](https://gitlab.com/cosapp/cosapp/-/merge_requests/98)).

  ```python
  import numpy
  from copy import deepcopy
  from cosapp.base import Port, System, BaseConnector

  class DeepCopyConnector(BaseConnector):
    """User-defined deep-copy connector"""
      def transfer(self) -> None:
          source, sink = self.source, self.sink

          for target, origin in self.mapping.items():
              value = getattr(source, origin)
              setattr(sink, target, deepcopy(value))

  class CustomPort(Port):
      def setup(self):
          self.add_variable('x', 0.0)
          self.add_variable('y', 1.0)

      class Connector(BaseConnector):
        """Connector for peer-to-peer connections"""
          def transfer(self) -> None:
              source, sink = self.source, self.sink
              sink.x = source.y
              sink.y = -source.x

  class MyModel(System):
      def setup(self):
          self.add_input(CustomPort, 'p_in')
          self.add_output(CustomPort, 'p_out')

          self.add_inward('entry', numpy.identity(3))
          self.add_outward('exit', numpy.zeros_like(self.entry))

  class Assembly(System):
      def setup(self):
          a = self.add_child(MyModel('a'))
          b = self.add_child(MyModel('b'))

          self.connect(a, b, {'exit', 'entry'}, cls=DeepCopyConnector)
          self.connect(a.p_in, b.p_out)  # will use CustomPort.Connector
  ```



  * Updated tutorials (MR [#102](https://gitlab.com/cosapp/cosapp/-/merge_requests/102)).
    * Include latest API evolutions in tutorials on ports and systems.
    * New tutorial on user-defined connectors.
    * New section on user-defined surrogate models.



  * Simplify loop resolution (MR [#77](https://gitlab.com/cosapp/cosapp/-/merge_requests/77), [#101](https://gitlab.com/cosapp/cosapp/-/merge_requests/101)).
  * Improve connector transfer (MR [#99](https://gitlab.com/cosapp/cosapp/-/merge_requests/99)).
  * Update binder settings, to take advantage of prebuilt plotly extension for jupyter lab (MR [#95](https://gitlab.com/cosapp/cosapp/-/merge_requests/95)).
  * Other code quality improvements (MR [#76](https://gitlab.com/cosapp/cosapp/-/merge_requests/76), [#82](https://gitlab.com/cosapp/cosapp/-/merge_requests/82), [#90](https://gitlab.com/cosapp/cosapp/-/merge_requests/90)).





  * Possibility to define unknowns and equations at solver level (MR [#65](https://gitlab.com/cosapp/cosapp/-/merge_requests/65)).
  Minor API evolution facilitating the definition of nonlinear problems and of multi-point design problems.

  ```python
  engine = Turbofan('engine')
  solver = engine.add_driver(NonLinearSolver('solver'))


  takeoff = solver.add_child(RunSingleCase('takeoff'))
  cruise = solver.add_child(RunSingleCase('cruise'))


  solver.add_unknown(['fan.diameter', 'core.turbine.inlet.area'])


  takeoff.add_equation('thrust == 1.2e5')
  cruise.add_equation('Mach == 0.8')
  ```

  * New recursive iterator `tree()` for systems and drivers, yielding all elements in a composite tree (MR [#68](https://gitlab.com/cosapp/cosapp/-/merge_requests/68)).

  ```python
  head = CompositeSystem('head')

  bottom_to_top = [s.name for s in head.tree()]
  top_to_bottom = [s.name for s in head.tree(downwards=True)]
  ```

  * Visitor pattern for composite collections of systems, drivers and ports (MR [#68](https://gitlab.com/cosapp/cosapp/-/merge_requests/68)).

  ```python
  from cosapp.patterns.visitor import Visitor, send as send_visitor

  class DataCollector(Visitor):
      def __init__(self):
          self.data = {}

      def visit_system(self, system):
          key = system.full_name()
          self.data.setdefault(key, {})
          self.data[key]['children'] = [
              child.name for child in system.children.values()
          ]
          send_visitor(self, system.inputs.values())

      def visit_port(self, port):
          

      def visit_driver(self, driver):
          

  head = CompositeSystem('head')
  collector = DataCollector()

  send_visitor(collector, head.tree())
  print(collector.data)
  ```



  * New tutorials, and new "Tips & Tricks" notebook (MR [#71](https://gitlab.com/cosapp/cosapp/-/merge_requests/71)).



  * Improved tests on clean/dirty status (MR [#66](https://gitlab.com/cosapp/cosapp/-/merge_requests/66)).
  * Bug fix in tutorial notebook on validation (MR [#67](https://gitlab.com/cosapp/cosapp/-/merge_requests/67)).
  * Code quality improvements (MR [#69](https://gitlab.com/cosapp/cosapp/-/merge_requests/69)).
  * Make `System.exec_order` a view on `System.children` dictionary keys, rather than an independent attribute (MR [#70](https://gitlab.com/cosapp/cosapp/-/merge_requests/70)). Execution order can still be specified, via a dedicated setter for `exec_order`.
  * Fix solver bugs occurring when system structure changes (MR [#73](https://gitlab.com/cosapp/cosapp/-/merge_requests/73)).





  * Resolve unknown aliasing for pulled input variables (MR [#58](https://gitlab.com/cosapp/cosapp/-/merge_requests/58)).
  * Resolve bugs and issues related to `add_target` (MR [#61](https://gitlab.com/cosapp/cosapp/-/merge_requests/61)).
  * Fix wrong comparison of Jacobian matrix `jac is None` after converting it as a `numpy` array (MR [#56](https://gitlab.com/cosapp/cosapp/-/merge_requests/56)).
  * Set transparent background in `PortMarkdownFormatter` (MR [#59](https://gitlab.com/cosapp/cosapp/-/merge_requests/59)).
  * Other code quality improvements (MR [#55](https://gitlab.com/cosapp/cosapp/-/merge_requests/55), [#57](https://gitlab.com/cosapp/cosapp/-/merge_requests/57), [#60](https://gitlab.com/cosapp/cosapp/-/merge_requests/60)).





  * **New [binder container](https://mybinder.org/v2/gl/cosapp%2Fcosapp/master?urlpath=lab/tree/docs/tutorials)**,
    allowing anyone to run interactively the tutorials used in the online documentation
    (MR [#30](https://gitlab.com/cosapp/cosapp/-/merge_requests/30) and [#36](https://gitlab.com/cosapp/cosapp/-/merge_requests/36)).

  * **Deferred equations to set targets:**

    New method `add_target`, defining a deferred equation on on a target variable (MR [#48](https://gitlab.com/cosapp/cosapp/-/merge_requests/48)).
    In effect, `add_target` creates an equation whose right-hand side is evaluated dynamically prior to each execution of the nonlienar solver.

    In the example below, the feature is illustrated in design mode. Outward `z` is a function of two independent variables `x` and `y`.
    When design method `'target_z'` is activated, the actual value of `z`, set interactively, is used as a target value, with unknown `y`:

  ```python
  class SystemWithTarget(System):
      def setup(self):
          self.add_inward('x', 1.0)
          self.add_inward('y', 1.0)
          self.add_outward('z', 1.0)

          
          design = self.add_design_method('target_z')
          design.add_unknown('y').add_target('z')

      def compute(self):
          self.z = self.x * self.y**2

  s = SystemWithTarget('s')

  solver = s.add_driver(NonLinearSolver('solver', tol=1e-9))

  solver.runner.design.extend(s.design_methods['target_z'])

  s.x = 0.5
  s.y = 0.5
  s.z = 2.0  # set target
  s.run_drivers()
  assert s.y == pytest.approx(2)  # solution of x * y**2 == 2
  assert s.z == pytest.approx(2)

  s.z = 4.0  # dynamically set new target
  s.run_drivers()
  assert s.y == pytest.approx(np.sqrt(8))  # solution of x * y**2 == 4
  assert s.z == pytest.approx(4)
  ```
    Targets can be also be declared in off-design mode, by calling `self.add_target(...)` in `System.setup`.



  * Updated tutorials on `System`, `Driver`, and design methods (MR [#41](https://gitlab.com/cosapp/cosapp/-/merge_requests/41)).
  * Typo fix and improvements in time driver tutorial (MR [#33](https://gitlab.com/cosapp/cosapp/-/merge_requests/33))



  * Report variable name in unit-related Connector warning message (MR [#32](https://gitlab.com/cosapp/cosapp/-/merge_requests/32)).
  * Automatically include field `time` in `DataFrame` recorders attached to a time driver (MR [#34](https://gitlab.com/cosapp/cosapp/-/merge_requests/34)).
  * Bug fix in `MonteCarlo` driver (MR [#37](https://gitlab.com/cosapp/cosapp/-/merge_requests/37)).
  * Replace `conda` by `mamba` in CI scripts (MR [#39](https://gitlab.com/cosapp/cosapp/-/merge_requests/39)).
  * Revamp markdown and JS rendering of systems and ports (MR [#40](https://gitlab.com/cosapp/cosapp/-/merge_requests/40) and [#43](https://gitlab.com/cosapp/cosapp/-/merge_requests/43), [#47](https://gitlab.com/cosapp/cosapp/-/merge_requests/47) and [#51](https://gitlab.com/cosapp/cosapp/-/merge_requests/51)).
  * Fix bug in `rate` type inference (MR [#44](https://gitlab.com/cosapp/cosapp/-/merge_requests/44)).
  * Other code quality improvement (MR [#35](https://gitlab.com/cosapp/cosapp/-/merge_requests/35), [#38](https://gitlab.com/cosapp/cosapp/-/merge_requests/38), [#42](https://gitlab.com/cosapp/cosapp/-/merge_requests/42), [#46](https://gitlab.com/cosapp/cosapp/-/merge_requests/46), [#50](https://gitlab.com/cosapp/cosapp/-/merge_requests/50), [#52](https://gitlab.com/cosapp/cosapp/-/merge_requests/52), [#53](https://gitlab.com/cosapp/cosapp/-/merge_requests/53)).





  * Recorders:
    It is now possible to add evaluable expressions in recorders (MR [#27](https://gitlab.com/cosapp/cosapp/-/merge_requests/27)):

  ```python
  point = PointMass('point')
  driver = point.add_driver(RungeKutta(order=3, time_interval=(0, 2), dt=0.01))

  recorder = driver.add_recorder(recorders.DataFrameRecorder(
      includes=['x', 'a', 'norm(v)']),  # norm(v) will be recorded in DataFrame
      period=0.1,
  )
  ```


  * New tutorial on `SystemSurrogate` (MR [#15](https://gitlab.com/cosapp/cosapp/-/merge_requests/15)).



  * Initialization bug in time simulations (MR [#23](https://gitlab.com/cosapp/cosapp/-/merge_requests/23)).
  * Bug in nonlinearity estimation in `NumericalSolver` (MR [#22](https://gitlab.com/cosapp/cosapp/-/merge_requests/22)).
  * Do not raise `ArithmeticError` when an unknown is declared several time (MR [#18](https://gitlab.com/cosapp/cosapp/-/merge_requests/18)).
  * Suppress deprecation warnings raised by `numpy` (MR [#20](https://gitlab.com/cosapp/cosapp/-/merge_requests/20) and [#24](https://gitlab.com/cosapp/cosapp/-/merge_requests/24)).
  * Suppress undue warning raised by `numpy` in `NonLinearSolver` (MR [#19](https://gitlab.com/cosapp/cosapp/-/merge_requests/19)).
  * Fix incompatibility between `pandas` and `xlrd` (MR [#21](https://gitlab.com/cosapp/cosapp/-/merge_requests/21)).
  * Other code quality improvement (MR [#16](https://gitlab.com/cosapp/cosapp/-/merge_requests/16), [#17](https://gitlab.com/cosapp/cosapp/-/merge_requests/17), [#26](https://gitlab.com/cosapp/cosapp/-/merge_requests/26), [#27](https://gitlab.com/cosapp/cosapp/-/merge_requests/27)).





  * Surrogate models:
    It is now possible to create a surrogate model at any system level with new method `System.make_surrogate` (MR [#3](https://gitlab.com/cosapp/cosapp/-/merge_requests/3) and [#12](https://gitlab.com/cosapp/cosapp/-/merge_requests/12)):

  ```python
  plane = Aeroplane('plane')  # system with subsystems engine1 and engine2





  doe = pandas.DataFrame(
      
      columns=['fuel_rate', 'fan.diameter', ..]  # input names
  )
  plane.engine1.make_surrogate(doe)  # generates output data and train model

  plane.run_once()  # executes the surrogate model of `engine1` instead of original compute()


  plane.engine1.dump_surrogate('engine.bin')

  plane.engine2.load_surrogate('engine.bin')


  plane.engine1.active_surrogate = plane.engine2.active_surrogate = False
  ```



  * Add several US-common unit conversions (MR [#2](https://gitlab.com/cosapp/cosapp/-/merge_requests/2)).
  * New method to export cosapp system structure into a dictionary (MR [#5](https://gitlab.com/cosapp/cosapp/-/merge_requests/5))
  * Make recorders capture port and system properties (MR [#8](https://gitlab.com/cosapp/cosapp/-/merge_requests/8)).
  * Fix Module/System naming bug: *'inwards' and 'outwards' are allowed as Module/System names* (MR [#9](https://gitlab.com/cosapp/cosapp/-/merge_requests/9)).
  * Broad code quality improvement (MR [#11](https://gitlab.com/cosapp/cosapp/-/merge_requests/11)).

    * Replace `typing.NoReturn` by `None` when appropriate.
    * Rewording pass, typo and error fixes in tutorial notebooks.
    * Suppress a `DeprecationWarning` raised by `numpy` in class `Variable`.
    * Reformat many strings as Python f-strings, for clarity.
    * Symplify many occurrences of `str.join()` for just two elements.

  Global rewording of tutorial notebooks, including a few error fixes.



  First open-source version.
  No major code change; mostly updates of license files, URLs in docs, and CI scripts.





  * Add the possibility to set boundary condition of transient simulation from interpolate profile.
  * Add the possibility to prescribe a maximum step for transient variables.



  * Bug fix in `RunOnce` driver, preventing undue call to `run_once` method.
  * Bug fix in AssignString: force copy for numpy arrays.
  * New tutorial for advanced features of time simulations in CosApp.





  * Improve documentation at various places, add documentation about the cosapp packages structure and sequence diagram for transient simulation.
  * Add a advanced logger feature for CoSApp simulations.
  * Update FMU export to PythonFMU 0.6.0
  * New method `System.add_property` allowing users to create read-only properties.



  * Suppress deprecation warnings raised by external dependencies.
  * Fix bug in AssignString with arrays, `AssignString` of the kind `'x = [0, 1, 2]'` won't change variable `x` into an array of integers,  if `x` is declared as an array of floats.
  * Fix `TimeStackUnknown` not able to stack transient variables defined on a children System or with partially pulled transient variable.
  * Fix the bug related to the initialization of `rate` attributes in systems.





  * [BETA] Export CoSApp System as FMU



  * Apply Broyden correction on Jacobian matrix for iteration without Jacobian update
  * Support varying time step
  * Fix time not being set before `setup_run` are called.
  * Fix reference for residues in `IterativeConnector` (it equals 1. now)
  * Drop pyhamcrest for pytest





  * Time varying boundary conditions are now possible:

  ```python
  system = MySystem('something')  # system with transient variables x and v
  driver = system.add_driver(RungeKutta(time_interval=(0, 2), dt=0.01, order=3))

  driver.set_scenario(
      init = {'x': 0.5, 'v': 0},  # initial conditions
      values =
      {
          'omega': 0.7,
          'F_ext': '0.6 * cos(omega * t)'  # explicit time-dependency
      }
  )
  ```



  * Fix various bug on the transient simulation front
  * Correct implementation of step limitation in the Newton-Raphson solver
  * Using a logger at `DEBUG` level will now display the call stack through the systems and drivers
  * Rework of the Python evaluable string to be more efficient



  * Introduce continuous time simulations with dedicated time drivers (see `TimeDriver` notebook in tutorials).
  * Suppress notion of (un)freeze; all variables are considered as known, unless explicitly declared as unknowns.
  * Drivers no longer use ports.
  * Connectors are now stored by parent system.
  * Migrate to pytest.



  * Ports:

    * `add_variable("x", units="m", types=Number)` => `add_variable("x", unit="m", dtype=Number)`
    * `freeze` => removed
    * `unfreeze` => replaced by `add_unknown` in Systems and Drivers
    * `connect_to` => replaced by `connect` at system level

  * Systems:

    * `time_ref` is no longer an argument of method `compute`:

      `def compute(self, time_ref):` => `def compute(self):`

    * Create a new connection between `a.in1` and `b.out`:

      `self.a.in1.connect_to(self.b.out)` => `self.connect(self.a.in1, self.b.out)`

    * `add_residues` => `add_equation`
    * `set_numerical_default` => Pass keyword to `add_unknown`
    * `add_inward("x", units="m", types=Number)` => `add_inward("x", unit="m", dtype=Number)`
    * `add_outward("x", units="m", types=Number)` => `add_outward("x", unit="m", dtype=Number)`

  * Drivers:

    * `add_unknowns(maximal_absolute_step, maximal_relative_step, low_bound, high_bound)` => `add_unknown(max_abs_step, max_rel_step, lower_bound, upper_bound)`
    * `add_equations` => `add_equation`
    * Equations are now represented by a unique string, instead of two strings (left-hand-side, right-hand-side):

      `add_equations("a", "b")` => `add_equation("a == b")`

      `add_equations([("x", "2 * y + 1"), ("a", "b")])` => `add_equation(["x == 2 * y + 1", "a == b"])`

    * For `NonLinearSolver`:

      `fatol` and `xtol` => `tol`

      `maxiter` => `max_iter`

    * For `Optimizer`:

      `ftol` => `tol`

      `maxiter` => `max_iter`



  * More correction for VISjs viewer and System HTML representation



  * Correct D3 & VISjs Viewers



  * Introduce an optional environment variable `COSAPP_CONFIG_DIR`





  * MonteCarlo:

    * `Montecarlo` => `MonteCarlo`
    * `Montecarlo.add_input_vars` => `MonteCarlo.add_random_variable`
    * `Montecarlo.add_response_vars` => `MonteCarlo.add_response`

  * MonteCarlo has been improved by using Sobol random generator
  * Viewers code on `System` is moved in a subpackage of `cosapp.tools`
  * Residue reference is now calculated only once
  * Various bug fix


  * In nonlinear solver, store LU factorization of the Jacobian matrix, rather than its inverse.
  * Minor refactoring of the core source code, with no API changes



  * Create `Variable` class to manage variable attributes
  * `watchdog` is now optional
  * Configuration is now inside a folder `$HOME/.cosapp.d`
  * API changes:
    - `get_latest_solution` => `save_solution`
    - `load_solver_solution` => `load_solution`
  * Various bug fix



  This release introduces lots of API changes:

  * Core ports and unit are available in `cosapp.ports`
  * Core systems are available in `cosapp.systems`
  * Core drivers are available in `cosapp.drivers`
  * Core recorders are available in `cosapp.recorders`
  * Core tools are available in `cosapp.tools`
  * Core notebook tools are available in `cosapp.notebook` (! this is now a separated package)
  * `data` have been renamed in `inwards` and `add_data` in `add_inward`
  * `locals` have been renamed in `outwards` and `add_locals` in `add_outward`
  * `BaseRecorder.record_iteration` renamed in `BaseRecorder.record_state`

  - Huge code refractoring: cosapp is now a [Python namespace](https://packaging.python.org/guides/packaging-namespace-packages).
  - `cosapp.notebook` has been moved to an independent package `cosapp_notebook`. But it is still accessible from `cosapp.notebook`.
  - Introduce *Signal* / *Slot* pattern to connect to internal event (implementation from [signalslot](https://github.com/Numergy/signalslot), included in `cosapp.core.signal`)
      * `Module.setup_ran`: Signal emitted after the `call_setup_run` execution
      * `Module.computed`: Signal emitted after the full `compute` stack (i.e.: `_postcompute`)
      * `Module.clean_ran`: Signal emitted after the `call_clean_run` execution
      * `BaseRecorder.state_recorded`: Signale emitted after the `record_state` execution



  - Add Jacobian partial matrix update
  - Add numerical features to variables to ease convergence control
  - Add monitoring of solver residues
  - Add restoration of solver result for initialization
  - Rework residues and unknowns handling (remove virtual port and pulling port)
  - Rework optimizer to be more homogeneous with non-linear solver
  - Improve linear Monte Carlo computation time
  - Improve data viewer for non-linear solver
  - Create viewer for Monte Carlo
  - Add dropdown widget for enum variables



  - Add helper functions to present solver evolutions
  - Add new d3 visualization of systems



  - Implement clean-dirty policy
  - Restore compatibility with Python 3.4
  - Display influence matrix



  - Simplify drivers structure, all actions for a case are supported by a single class `RunSingleCase`
  - Add support for vector variables; they can be partially (un)frozen and are handled correctly by the solver.
  - Add `MonteCarlo` driver
  - Add recording data capability



  - `System` and `Driver` have now a common ancestor `Module` => `Driver` variables are now stored as data or locals
  - Add visualization of `System` connections based on N2 graph (syntax: `cosapp.viewmodel(mySystem)`)



  **API changes:** `System.add_driver` and `Driver.add_child` take now an instance of `Driver`

  - Add external code caller System
  - Add validation range attributes on variables
  - Add variable visibility
  - Add metamodel training and DoE generator
  - Add helper function to list inputs and outputs variables of a `System`



  * Stabilization of the user API



  * First release.


pkgId: eace097b1b9a31990e761969e072f8ebd694034a3e075cadc40160a9212bbebc
name: python-cosapp
arch: src
version: 0.19.0
epoch: 0
release: 1
summary: CoSApp, the Collaborative System Approach.
url: https://cosapp.readthedocs.io
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cosapp-0.19.0-1.src.rpm
checksum_type: sha256
description:
  The primary goal of **CoSApp** is to help technical departments in the design of complex systems.
  To do so, the framework allows the simulation of various systems representing the different parts of the final product in a common environment.
  The benefit is the ability for each subsystem team to carry out design study with a direct feedback at product level.

  The main features are:



  Couple your simulation models with CoSApp to get immediate impact on main product variables and iterate to converge on a better design.



  All systems can share design parameters associated with an acceptable range.
  You can take advantage of those limited degrees of freedom without fear of breaking your collaborators' work.



  CoSApp solvers can be combined into versatile, customized workflows that fit specific simulation intents.

  Have a look at the [introduction](https://cosapp.readthedocs.io/en/stable/tutorials/00-Introduction.html#), containing many tutorials!

  This code is the property of Safran SA.
  It uses code coming from various open-source projects (see [LICENSE](https://gitlab.com/cosapp/cosapp/blob/master/LICENSE.rst) file).



  If you use CoSApp, please cite us!

  Lac *et al.* (2024), [CoSApp: a Python library to create, simulate and design complex systems](https://doi.org/10.21105/joss.06292), Journal of Open Source Software 9(94), 6292.

  BibTeX entry:

  ```bibtex
  @article{Lac.etal:joss2024,
      author={Étienne Lac and Guy {De Spiegeleer} and Adrien Delsalle and Frédéric Collonval and Duc-Trung Lê and Mathias Malandain},
      title={CoSApp: a Python library to create, simulate and design complex systems},
      journal={Journal of Open Source Software},
      year={2024},
      volume={9},
      number={94},
      pages={6292},
      doi={10.21105/joss.06292},
      publisher={The Open Journal}
  }
  ```



  Run a Jupyter Lab instance with binder to try out CoSApp features through examples.

  [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gl/cosapp%2Fcosapp/master?urlpath=lab/tree/docs/tutorials)
  [![lite-badge](https://jupyterlite.rtfd.io/en/latest/_static/badge.svg)]( https://cosapp.gitlab.io/cosapp/)








  - Improve the performance of unknowns and residues (MRs [#350](https://gitlab.com/cosapp/cosapp/-/merge_requests/350), [#352](https://gitlab.com/cosapp/cosapp/-/merge_requests/352)).
    In particular, this version introduces the possiblity to declare as unknown any settable attribute of an input object (that is an object contained in an input port), which until now was only possible for input port variables.
    Example:

    ```python
    from cosapp.base import System
    from cosapp.drivers import NonLinearSolver
    from dataclasses import dataclass

    @dataclass
    class Foo:
      a: float
      x: float

    class SomeSystem(System):
        def setup(self):
            self.add_inward("foo", Foo(a=1.0, x=1.0))
            self.add_outward("y", 0.0)

        def compute(self):
            self.y = self.foo.a - self.foo.x**3

    system = SomeSystem("system")
    solver = system.add_driver(NonLinearSolver("solver"))

    solver.add_unknown("foo.x")   # attribute `x` can now be manipulated by the solver
    solver.add_equation("y == 0")

    system.foo.a = -2.0
    system.run_drivers()

    import pytest, math
    assert system.foo.x == pytest.approx(math.cbrt(system.foo.a))
    ```

  - Fix bug in `TwoPointCubicInterpolator` with multidimensional arrays (MR [#355](https://gitlab.com/cosapp/cosapp/-/merge_requests/355)).
  - Allow filtered events in merged events (MR [#356](https://gitlab.com/cosapp/cosapp/-/merge_requests/356)):

    ```python
    system.event.trigger = Event.merge(
        event_a,
        event_b.filter("x > 0"),
    )
    ```

  - Introduction of periodic events (MR [#360](https://gitlab.com/cosapp/cosapp/-/merge_requests/360)):

    ```python
    from cosapp.multimode import PeriodicTrigger

    system.event_a.trigger = PeriodicTrigger(period=2.3)
    system.event_b.trigger = PeriodicTrigger(period=0.25, t0=0.33)
    ```



  - Add instructions on how to perform benchmarks with `asv_runner` in main README file (MR [#358](https://gitlab.com/cosapp/cosapp/-/merge_requests/358)).



  - Fix import error in JupyterLite (MR [#351](https://gitlab.com/cosapp/cosapp/-/merge_requests/351)).
  - Minor code refactoring (MR [#354](https://gitlab.com/cosapp/cosapp/-/merge_requests/354)).
  - Use public runners for all CI jobs (MR [#359](https://gitlab.com/cosapp/cosapp/-/merge_requests/359)).






  - Improved data recording mechanism for `NonLinearSolver`, to facilitate convergence path analysis (MR [#312](https://gitlab.com/cosapp/cosapp/-/merge_requests/312)).
  - New driver `FixedPointSolver`, solving algebraic loops by fixed-point iterations (MRs [#315](https://gitlab.com/cosapp/cosapp/-/merge_requests/315) & [#322](https://gitlab.com/cosapp/cosapp/-/merge_requests/322)).
  - New method `Driver.available_options`, returning the list of options available for a particular driver (MR [#316](https://gitlab.com/cosapp/cosapp/-/merge_requests/316)).
  - New method `System.pull_design_method`, to promote sub-system design methods at parent level easily (MR [#314](https://gitlab.com/cosapp/cosapp/-/merge_requests/314)).
  - Bug fix in FMU exporter (MR [#324](https://gitlab.com/cosapp/cosapp/-/merge_requests/324)).
  - Bug fixes in system transition logic (MR [#338](https://gitlab.com/cosapp/cosapp/-/merge_requests/338)).
  - New method `System.init_mode` called before each time simulation, for mode initialization (MR [#347](https://gitlab.com/cosapp/cosapp/-/merge_requests/347)).



  - Fix bad rendering of tutorial notebooks on time simulations (MR [#321](https://gitlab.com/cosapp/cosapp/-/merge_requests/321)).
  - Fix bad rendering of mermaid graph in logger documentation (MR [#326](https://gitlab.com/cosapp/cosapp/-/merge_requests/326)).
  - Updated tutorial on advanced time simulations and on design methods (MR [#343](https://gitlab.com/cosapp/cosapp/-/merge_requests/343)).
  - Add a section on `FixedPointSolver` in the driver tutorial (MR [#346](https://gitlab.com/cosapp/cosapp/-/merge_requests/346)).



  - Improved type hints for drivers (MR [#318](https://gitlab.com/cosapp/cosapp/-/merge_requests/318)).
  - Updated JupyterLite image (MR [#313](https://gitlab.com/cosapp/cosapp/-/merge_requests/313)).
  - Add new test on `swap_system` (MR [#342](https://gitlab.com/cosapp/cosapp/-/merge_requests/342)).
  - Various updates of CI/CD settings (MRs [#317](https://gitlab.com/cosapp/cosapp/-/merge_requests/317), [#319](https://gitlab.com/cosapp/cosapp/-/merge_requests/319) [#320](https://gitlab.com/cosapp/cosapp/-/merge_requests/320), [#336](https://gitlab.com/cosapp/cosapp/-/merge_requests/336), [#337](https://gitlab.com/cosapp/cosapp/-/merge_requests/337)).
  - Various test improvements (MRs [#340](https://gitlab.com/cosapp/cosapp/-/merge_requests/340), [#342](https://gitlab.com/cosapp/cosapp/-/merge_requests/342)).






  - A JupyterLite image including CoSApp is now available in the main README file (MR [#300](https://gitlab.com/cosapp/cosapp/-/merge_requests/300)).
  - Fix a bug with primary event initialization (MR [#293](https://gitlab.com/cosapp/cosapp/-/merge_requests/293)).
  - Improved API for partial connections: name mappings can now be given as lists mixing variable names and dictionaries, which is convenient when most variable names are identical, and only a few differ (MRs [#294](https://gitlab.com/cosapp/cosapp/-/merge_requests/294), [#295](https://gitlab.com/cosapp/cosapp/-/merge_requests/295) & [#306](https://gitlab.com/cosapp/cosapp/-/merge_requests/306)).
    Example:

    ```python
    from cosapp.base import System

    class SomeSystem(System):
        def setup(self):
            foo = self.add_child(Foo('foo'), pulling=['a', 'b', {'c': 'c_foo'}])
            bar = self.add_child(Bar('bar'))

            self.connect(foo, bar, ['x', 'y', {'z': 'v'}])
    ```

  - New utility function `cosapp.tools.views.show_tree` displaying the hierarchical tree of a system similar to a folder tree in a filesystem (MRs [#296](https://gitlab.com/cosapp/cosapp/-/merge_requests/296)-[#298](https://gitlab.com/cosapp/cosapp/-/merge_requests/298)).



  - New attribute `Residue.variables` providing the names of the variables involved in the residue (MR [#299](https://gitlab.com/cosapp/cosapp/-/merge_requests/299)).
  - Minor bug fix in Newton-Raphson algorithm (MR [#303](https://gitlab.com/cosapp/cosapp/-/merge_requests/303)).
  - Fix bad markdown rendering of systems (MR [#292](https://gitlab.com/cosapp/cosapp/-/merge_requests/292)).
  - Improved type hints throughout the code (MR [#307](https://gitlab.com/cosapp/cosapp/-/merge_requests/307)).
  - Other improvements (MRs [#291](https://gitlab.com/cosapp/cosapp/-/merge_requests/291), [#301](https://gitlab.com/cosapp/cosapp/-/merge_requests/301), [#302](https://gitlab.com/cosapp/cosapp/-/merge_requests/302), [#304](https://gitlab.com/cosapp/cosapp/-/merge_requests/304), [#305](https://gitlab.com/cosapp/cosapp/-/merge_requests/305), [#307](https://gitlab.com/cosapp/cosapp/-/merge_requests/307), [#308](https://gitlab.com/cosapp/cosapp/-/merge_requests/308)).



  - Pin dependency to `numpy` v1, until full migration to v2 (MR [#310](https://gitlab.com/cosapp/cosapp/-/merge_requests/310)).






  - Primary events triggered within the same time step are now correctly captured (MR [#287](https://gitlab.com/cosapp/cosapp/-/merge_requests/287)).
    A bug persists when several primary events occur at the exact same time, though, as only one will be retained.
  - Fix bug preventing events from occurring during the first time step of a simulation (MR [#288](https://gitlab.com/cosapp/cosapp/-/merge_requests/288)).
  - Fix a bug causing recorders to crash when inspecting ports with properties (MR [#282](https://gitlab.com/cosapp/cosapp/-/merge_requests/282)).
  - Algebraic and time-dependent problems are now dissociated (MR [#284](https://gitlab.com/cosapp/cosapp/-/merge_requests/284)). As a consequence, invoking `self.problem.clear()` during transitions, for instance, no longer affects time-dependent unknowns such as transients.
  - Fix ambiguous warning message raised by `RunSingleCase` (MR [#279](https://gitlab.com/cosapp/cosapp/-/merge_requests/279)).
  - Various refactoring passes (MRs [#283](https://gitlab.com/cosapp/cosapp/-/merge_requests/283) and [#286](https://gitlab.com/cosapp/cosapp/-/merge_requests/286)).



  - Updated description inside the conda recipe (MR [#276](https://gitlab.com/cosapp/cosapp/-/merge_requests/276)).
  - Pin `pytest` version due to a bug in version 8.1 (MR [#280](https://gitlab.com/cosapp/cosapp/-/merge_requests/280)).
  - Add a "Citing" section in the main README file (MR [#281](https://gitlab.com/cosapp/cosapp/-/merge_requests/281)).
  - The module parser was updated (MR [#285](https://gitlab.com/cosapp/cosapp/-/merge_requests/285)).
  - Force `sphinx` < 7.3 in the documentation building environment, owing to an incompatibility with `sphinx-mdinclude` (MR [#289](https://gitlab.com/cosapp/cosapp/-/merge_requests/289)). This is a temporary patch until root cause is fixed.






  - Fix bug raised in `NonLinearSolver` for systems with rates (MR [#268](https://gitlab.com/cosapp/cosapp/-/merge_requests/268)).
  - Minor refactoring pass (MR [#274](https://gitlab.com/cosapp/cosapp/-/merge_requests/274)).



  - Drop Python 3.8 support and add Python 3.11 test pipeline (MR [#270](https://gitlab.com/cosapp/cosapp/-/merge_requests/270)).
  - Update installation and contribution guidelines (MR [#270](https://gitlab.com/cosapp/cosapp/-/merge_requests/270)).
  - Update dependency list (MRs [#269](https://gitlab.com/cosapp/cosapp/-/merge_requests/269) and [#270](https://gitlab.com/cosapp/cosapp/-/merge_requests/270)).



  Publication of an article on CoSApp in the [Journal of Open-Source Software](https://joss.theoj.org/), referenced to version 0.15.4 (MR [#271](https://gitlab.com/cosapp/cosapp/-/merge_requests/271)).






  - Fix minor bug in `NonLinearSolver` (MR [#261](https://gitlab.com/cosapp/cosapp/-/merge_requests/261)).
  - Fix incorrect return type hints in `System` (MR [#259](https://gitlab.com/cosapp/cosapp/-/merge_requests/259)).
  - Improve support for read-only properties in system getters and setters (MR [#264](https://gitlab.com/cosapp/cosapp/-/merge_requests/264)).



  - Remove deprecated dependency for compatibility with Python 3.12 (MR [#258](https://gitlab.com/cosapp/cosapp/-/merge_requests/258)).
  - Force `pythonfmu` < 0.6.3 in dependency list, to prevent a crash during tests (MR [#262](https://gitlab.com/cosapp/cosapp/-/merge_requests/262)). Temporary fix until root cause is identified.






  - Fix crash with `VisJs` rendering of sub-systems (MR [#252](https://gitlab.com/cosapp/cosapp/-/merge_requests/252)).
  - Fix minor bug in `EvalString` (MR [#253](https://gitlab.com/cosapp/cosapp/-/merge_requests/253)).
  - Fix bad synchronization of mode variables during transitions (MR [#254](https://gitlab.com/cosapp/cosapp/-/merge_requests/254)).
  - Improve error message when pulling variables with different roles (MR [#255](https://gitlab.com/cosapp/cosapp/-/merge_requests/255)).
  - Fix `TypeError` when passing `pulling` argument as a tuple in `System.add_child` (MR [#256](https://gitlab.com/cosapp/cosapp/-/merge_requests/256)).






  - The representation of `MathematicalProblem` objects now indicates the number of unknowns and equations, for a better readability (MR [#249](https://gitlab.com/cosapp/cosapp/-/merge_requests/249)).
  - Optional argument `execution_index` in `System.add_child` and `Driver.add_child` can now take a negative value, with a behaviour following that of `list.insert` (MR [#250](https://gitlab.com/cosapp/cosapp/-/merge_requests/250)).



  - Add missing field "time" in `ExplicitTimeRecorder.event_data`, when no recorder is set (MR [#245](https://gitlab.com/cosapp/cosapp/-/merge_requests/245)).
  - Fix bug with recorders inspecting systems with iterators (MRs [#246](https://gitlab.com/cosapp/cosapp/-/merge_requests/246) and [#247](https://gitlab.com/cosapp/cosapp/-/merge_requests/247)).
  - Fix bug with `NonLinearSolver` with NumPy array residues (MR [#248](https://gitlab.com/cosapp/cosapp/-/merge_requests/248)).
  - Fix initialization bug of targets involving expressions (MR [#249](https://gitlab.com/cosapp/cosapp/-/merge_requests/249)).






  - Suppression of default `RunSingleCase` subdriver `runner` in `NonLinearSolver` drivers (MR [#239](https://gitlab.com/cosapp/cosapp/-/merge_requests/239)).
  - Enable target initialization in multi-point design problems (MR [#233](https://gitlab.com/cosapp/cosapp/-/merge_requests/233)).
  - New utility function `swap_system` to replace on the fly a subsystem by another `System` instance (MR [#238](https://gitlab.com/cosapp/cosapp/-/merge_requests/238)).



  - Refactor driver `Optimizer` (MR [#240](https://gitlab.com/cosapp/cosapp/-/merge_requests/240)).
  - Various bug fixes (MRs [#234](https://gitlab.com/cosapp/cosapp/-/merge_requests/234), [#235](https://gitlab.com/cosapp/cosapp/-/merge_requests/235), [#241](https://gitlab.com/cosapp/cosapp/-/merge_requests/241)).



  - New tutorial on `swap_system` (MR [#243](https://gitlab.com/cosapp/cosapp/-/merge_requests/243)).
  - General update of tutorials (MRs [#232](https://gitlab.com/cosapp/cosapp/-/merge_requests/232) and [#242](https://gitlab.com/cosapp/cosapp/-/merge_requests/242)).






  - Fix incorrect output file name in `cosapp.tools.parse_module` (MR [#229](https://gitlab.com/cosapp/cosapp/-/merge_requests/229)).
  - Refactoring pass (MR [#230](https://gitlab.com/cosapp/cosapp/-/merge_requests/230)).



  - Upgrade documentation build stack (MRs [#224](https://gitlab.com/cosapp/cosapp/-/merge_requests/224) and [#226](https://gitlab.com/cosapp/cosapp/-/merge_requests/226)).
  - Fix bad rendering of ports and systems (MRs [#227](https://gitlab.com/cosapp/cosapp/-/merge_requests/227) and [#228](https://gitlab.com/cosapp/cosapp/-/merge_requests/228)).






  * Improved performance, through a revised clean/dirty mechanism (MR [#215](https://gitlab.com/cosapp/cosapp/-/merge_requests/215)).
  * Possibility to add a contextual description to sub-systems and ports of a system, as well as sub-drivers (MR [#216](https://gitlab.com/cosapp/cosapp/-/merge_requests/216)). This feature is useful for automatic documentation tools, and has been included in the Markdown representation of systems (also used in function `cosapp.tools.display_doc`). Example:

    ```python
    from cosapp.base import System
    from my_module import FlowPort

    class MySystem(System):
        def setup(self):
            self.add_input(FlowPort, "fl_in1", desc="Primary inlet flow port")
            self.add_input(FlowPort, "fl_in2", desc="Secondary inlet flow port")

            self.add_output(FlowPort, "fl_out")
    ```

  * New hook function `_parse_module_config`, returning pre-defined settings for `cosapp.tools.parse_module` (MR [#218](https://gitlab.com/cosapp/cosapp/-/merge_requests/218)). This allows module maintainers to simply call

    ```python
    from cosapp.tools import parse_module
    import my_module

    parse_module(my_module)
    ```

    instead of, *e.g.*,

    ```python
    parse_module(
        my_module,
        ctor_config={
            "ComplexSystem1": [
                dict(n=1, foo=0.5),
                dict(n=2, foo=0.1),
            ],
            "ComplexSystem2": [
                dict(xi=0.0, __alias__="ComplexSystem2_a"),
                dict(xi=1.0, __alias__="ComplexSystem2_b"),
            ],
        },
        excludes=["Foo*", "*Bar?"],
    )
    ```

    provided `my_module._parse_module_config()` returns a dictionary specifying the values of `ctor_config`, `excludes`, *etc.*

  * Make `SolverResults` a `dataclass`, for easier handling of `NonLinearSolver.results`, *e.g.* (MR [#220](https://gitlab.com/cosapp/cosapp/-/merge_requests/220)).
  * Expose attribute `problem` in system setup (MR [#221](https://gitlab.com/cosapp/cosapp/-/merge_requests/221)). Previously, `problem` was only exposed in method `System.transition`.



  * Fix bug in `NonLinearSolver` log message (MR [#214](https://gitlab.com/cosapp/cosapp/-/merge_requests/214)).
  * Add missing JSON file in PyPI and conda packages, preventing the use of `cosapp.tools.parse_module` (MR [#219](https://gitlab.com/cosapp/cosapp/-/merge_requests/219)).



  * Illustrate port and sub-system description in tutorials (MR [#215](https://gitlab.com/cosapp/cosapp/-/merge_requests/215)).






  * Update test baseline to pass in a Python 3.11 environment (MR [#200](https://gitlab.com/cosapp/cosapp/-/merge_requests/200)).
  * Creation of a dummy system factory, mostly for tests (MR [#201](https://gitlab.com/cosapp/cosapp/-/merge_requests/201)).
  * Improve clean/dirty mechanism (MR [#202](https://gitlab.com/cosapp/cosapp/-/merge_requests/202)) and fix incorrect clean/dirty status with surrogate models (MR [#205](https://gitlab.com/cosapp/cosapp/-/merge_requests/205)).
  * Fix bug in function `cosapp.tools.display_doc` for classes with setup arguments (MR [#208](https://gitlab.com/cosapp/cosapp/-/merge_requests/208)).
  * Various code quality improvements (MRs [#211](https://gitlab.com/cosapp/cosapp/-/merge_requests/211), [#212](https://gitlab.com/cosapp/cosapp/-/merge_requests/212)).



  Note: extensive use of self-documenting f-strings (introduced in Python 3.8) has made tutorials incompatible with Python 3.7.

  * Updated tutorials (MRs [#203](https://gitlab.com/cosapp/cosapp/-/merge_requests/203), [#206](https://gitlab.com/cosapp/cosapp/-/merge_requests/206), [#207](https://gitlab.com/cosapp/cosapp/-/merge_requests/207), [#210](https://gitlab.com/cosapp/cosapp/-/merge_requests/210)).
  * The image used in binder is now based on Python 3.10 (MR [#204](https://gitlab.com/cosapp/cosapp/-/merge_requests/204)).



  * New function `parse_module` in `cosapp.tools` collecting all system and port classes within a Python module. This parser, generating a JSON file containing the description of all CoSApp symbols, is primarily meant to be used for constructional GUI applications, developed separately (MRs [#192](https://gitlab.com/cosapp/cosapp/-/merge_requests/192) & [#209](https://gitlab.com/cosapp/cosapp/-/merge_requests/209)).






  The code is now tested for Python 3.8, 3.9 and 3.10.
  Support of Python 3.7 is thus officially dropped, although no version-specific Python code was introduced in this version of CoSApp.



  * Module `connectors` moved from `cosapp.core` to `cosapp.ports` (MR [#189](https://gitlab.com/cosapp/cosapp/-/merge_requests/189)).
  * New "direct" (with no unit conversion) connector classes `PlainConnector`, `CopyConnector` and `DeepCopyConnector`, in `cosapp.ports.connectors` (MR [#188](https://gitlab.com/cosapp/cosapp/-/merge_requests/188)).
  * New method `MathematicalProblem.is_empty()`, equivalent to `shape == (0, 0)` (MR [#186](https://gitlab.com/cosapp/cosapp/-/merge_requests/186)).
  * Improved VisJs graph rendering, by limiting node size for long system names (MR [#184](https://gitlab.com/cosapp/cosapp/-/merge_requests/184)).
  * New utility functions `get_state` and `set_state` in `cosapp.utils`, for quick system data recovery (MR [#193](https://gitlab.com/cosapp/cosapp/-/merge_requests/193)):

    ```python
    from cosapp.utils import get_state, set_state

    s = SomeSystem('s')
    

    
    designed = get_state(s)

    s.drivers.clear()
    s.add_driver(SomeDriver('driver'))

    try:
        s.run_drivers()
    except:
        
        set_state(s, designed)
    ```

  * Functions `radians`, `degrees` and `arctan2`/`atan2` have been added to the scope of `EvalString` objects, and can therefore be used in equations, *e.g.* (MR [#178](https://gitlab.com/cosapp/cosapp/-/merge_requests/178)).
  * Recorders can now record constant properties (MR [#181](https://gitlab.com/cosapp/cosapp/-/merge_requests/181)).
  * Deprecation of `System.get_unsolved_problem` in favour of new method `assembled_problem` (MR [#174](https://gitlab.com/cosapp/cosapp/-/merge_requests/174)).
  * Inner off-design problem of systems is now exposed as attribute `problem`, but only within the `transition` method (MR [#174](https://gitlab.com/cosapp/cosapp/-/merge_requests/174)). This allows users to add or remove off-design constraints during event-driven transitions, while keeping this property inaccessible the rest of the time.

    ```python
    from cosapp.base import System
    from math import sin, cos

    class SomeSystem(System):
        def setup(self):
            self.add_inward('x', 0.0)
            self.add_inward('y', 0.0)
            self.add_outward('z', 0.0)
            a = self.add_event('event_a', trigger='x > y')
            b = self.add_event('event_b', trigger='x < y')

        def compute(self):
            self.z = cos(self.x) * sin(self.y)

        def transition(self):
            offdesign = self.problem
            if self.event_a.present:
                offdesign.clear()
                offdesign.add_equation('z == 0.5').add_unknown('x')
            if self.event_b.present:
                offdesign.clear()
    ```



  * Fix serialization bugs for systems with setup parameters (MR [#180](https://gitlab.com/cosapp/cosapp/-/merge_requests/180)) and `None` variables (MR [#172](https://gitlab.com/cosapp/cosapp/-/merge_requests/172)).
  * Bug fix on event time calculation involving array transients (MR [#177](https://gitlab.com/cosapp/cosapp/-/merge_requests/177)).
  * Bug fix on possible name conflicts in connector storage (MR [#173](https://gitlab.com/cosapp/cosapp/-/merge_requests/173)).
  * Fix inconsistent behaviour of `System.add_child` when a `pulling` error is raised (MR [#197](https://gitlab.com/cosapp/cosapp/-/merge_requests/197)).
  * Various code quality improvements (MRs [#175](https://gitlab.com/cosapp/cosapp/-/merge_requests/175), [#185](https://gitlab.com/cosapp/cosapp/-/merge_requests/185), [#186](https://gitlab.com/cosapp/cosapp/-/merge_requests/186), [#187](https://gitlab.com/cosapp/cosapp/-/merge_requests/187), [#190](https://gitlab.com/cosapp/cosapp/-/merge_requests/190), [#191](https://gitlab.com/cosapp/cosapp/-/merge_requests/191), [#194](https://gitlab.com/cosapp/cosapp/-/merge_requests/194)).



  * Updated time driver tutorial (MR [#182](https://gitlab.com/cosapp/cosapp/-/merge_requests/182)).
  * Updated Tips & Tricks (MR [#196](https://gitlab.com/cosapp/cosapp/-/merge_requests/196)).
  * Other updates (MRs [#176](https://gitlab.com/cosapp/cosapp/-/merge_requests/176), [#195](https://gitlab.com/cosapp/cosapp/-/merge_requests/195), [#198](https://gitlab.com/cosapp/cosapp/-/merge_requests/198)).





  * Improved user experience:
    * Auto-completion for dynamically added attributes of systems (ports, subsystems, inwards, outwards, events...) and drivers (sub-drivers) (MRs [#164](https://gitlab.com/cosapp/cosapp/-/merge_requests/164) and [#166](https://gitlab.com/cosapp/cosapp/-/merge_requests/166));
    * Improved representation of mathematical problems, in particular for loop equations and multi-point design problems (MRs [#159](https://gitlab.com/cosapp/cosapp/-/merge_requests/159), [#160](https://gitlab.com/cosapp/cosapp/-/merge_requests/160) and [#163](https://gitlab.com/cosapp/cosapp/-/merge_requests/163)).
  * New method `System.new_problem` to facilitate the creation of dynamic design methods, *e.g.* (MR [#162](https://gitlab.com/cosapp/cosapp/-/merge_requests/162)).



  * Updated tutorials (MRs [#169](https://gitlab.com/cosapp/cosapp/-/merge_requests/169) and [#170](https://gitlab.com/cosapp/cosapp/-/merge_requests/170)).



  * Bug fix on unknown dealiasing (MR [#157](https://gitlab.com/cosapp/cosapp/-/merge_requests/157)).
  * Bug fix on port variable export (MR [#158](https://gitlab.com/cosapp/cosapp/-/merge_requests/158)).
  * Bug fix on system serialization (MR [#161](https://gitlab.com/cosapp/cosapp/-/merge_requests/161)).
  * Bug fix on subsystem read-only constants (MR [#167](https://gitlab.com/cosapp/cosapp/-/merge_requests/167)).
  * Various code quality improvements (MRs [#154](https://gitlab.com/cosapp/cosapp/-/merge_requests/154), [#155](https://gitlab.com/cosapp/cosapp/-/merge_requests/155), [#162](https://gitlab.com/cosapp/cosapp/-/merge_requests/162), [#168](https://gitlab.com/cosapp/cosapp/-/merge_requests/168)).





  * Automatic tolerance in `NonLinearSolver` (MRs [#148](https://gitlab.com/cosapp/cosapp/-/merge_requests/148) and [#152](https://gitlab.com/cosapp/cosapp/-/merge_requests/152)).
  * `Optimizer.set_objective` is deprecated, in favour of `set_minimum` and `set_maximum` (MR [#150](https://gitlab.com/cosapp/cosapp/-/merge_requests/150)).
  * Loop residues are no longer normalized (MR [#151](https://gitlab.com/cosapp/cosapp/-/merge_requests/151)).
  * Improved type hints for ports, systems and drivers, in functions whose return type depends on arguments, such as `System.add_child`, `add_driver`, *etc.* (MR [#145](https://gitlab.com/cosapp/cosapp/-/merge_requests/145)).



  * Updated tutorials (MRs [#144](https://gitlab.com/cosapp/cosapp/-/merge_requests/144), [#147](https://gitlab.com/cosapp/cosapp/-/merge_requests/147) and [#154](https://gitlab.com/cosapp/cosapp/-/merge_requests/154)).



  * Fix inconsistent behaviour of recorders (MR [#143](https://gitlab.com/cosapp/cosapp/-/merge_requests/143)).
  * Fix bug on event initialization (MR [#146](https://gitlab.com/cosapp/cosapp/-/merge_requests/146)).
  * Fix bad markdown formatting of ports occurring in `jupyterlab` 3.4 (MR [#149](https://gitlab.com/cosapp/cosapp/-/merge_requests/149)).
  * Fix failed test caused by a regression in `pytest` 7.1 (MR [#142](https://gitlab.com/cosapp/cosapp/-/merge_requests/142)).





  * Simplification of driver `Optimizer`:
    * Suppression of sub-driver `runner` (MR [#136](https://gitlab.com/cosapp/cosapp/-/merge_requests/136)). This change introduces new methods `set_objective`, `add_unknowns` and `add_constraints` in driver `Optimizer`.
    * Optimization constraints are now declared with human-readable expressions in `Optimizer.add_constraints` (MR [#138](https://gitlab.com/cosapp/cosapp/-/merge_requests/138)).

    Before:

    ```python
    from cosapp.drivers import Optimizer

    s = SomeSystem('s')
    optim = s.add_driver(Optimizer('optim'))

    optim.runner.set_objective('cost')
    optim.runner.add_unknown(['a', 'b', 'p_in.x'])
    
    optim.runner.add_constraints([
        "b - a",  # b >= a
        "a",      # a >= 0
        "1 - a",  # a <= 1
    ])
    optim.runner.add_constraints(
        "p_out.y",
        inequality = False,  # p_out.y == 0
    )

    s.run_drivers()
    ```

    After:

    ```python
    optim.set_objective('cost')
    optim.add_unknown(['a', 'b', 'p_in.x'])
    optim.add_constraints(
        "b >= a",
        "0 <= a <= 1",
        "p_out.y == 0",
    )
    ```

    * New, convenient iterators and setters for ports (MR [#137](https://gitlab.com/cosapp/cosapp/-/merge_requests/137)):

    ```python
    from cosapp.base import Port, System

    class XyzPort(Port):
        def setup(self):
            self.add_variable('x')
            self.add_variable('y')
            self.add_variable('z')

    class SomeSystem(System):
        def setup(self):
            self.add_input(XyzPort, 'p_in')
            self.add_output(XyzPort, 'p_out')

        def compute(self):
            self.p_out.set_from(self.p_in)  # assign values from `p_in`
            self.p_out.z = 0.0

    s = SomeSystem('s')
    
    s.p_in.set_values(x=1, y=-0.5, z=0.1)

    s.run_once()
    
    for varname, value in s.p_out.items():
        print(f"p_out.{varname} = {value})
    ```



  * Updated tutorials on ports (MR [#139](https://gitlab.com/cosapp/cosapp/-/merge_requests/139)) and on optimization (MR [#140](https://gitlab.com/cosapp/cosapp/-/merge_requests/140)).



  * Fix bug in Jacobian computation for negative perturbations (MR [#129](https://gitlab.com/cosapp/cosapp/-/merge_requests/129)).
  * Fix bug in `RunOnce` and `RunSingleCase` recorders with `hold=False` (MR [#130](https://gitlab.com/cosapp/cosapp/-/merge_requests/130)).
  * Resolve input aliasing in time driver scenarios (MR [#135](https://gitlab.com/cosapp/cosapp/-/merge_requests/135)).
  * Fix bugs with events (MRs [#123](https://gitlab.com/cosapp/cosapp/-/merge_requests/123), [#126](https://gitlab.com/cosapp/cosapp/-/merge_requests/126), [#128](https://gitlab.com/cosapp/cosapp/-/merge_requests/128)).
  * Discard empty connectors, and send a warning (MR [#132](https://gitlab.com/cosapp/cosapp/-/merge_requests/132)).
  * Other code quality improvements (MRs [#127](https://gitlab.com/cosapp/cosapp/-/merge_requests/127), [#131](https://gitlab.com/cosapp/cosapp/-/merge_requests/131), [#133](https://gitlab.com/cosapp/cosapp/-/merge_requests/133), [#134](https://gitlab.com/cosapp/cosapp/-/merge_requests/134)).





  * Implementation of multimode systems and hybrid continuous/discrete time solver (MRs [#100](https://gitlab.com/cosapp/cosapp/-/merge_requests/100), [#103](https://gitlab.com/cosapp/cosapp/-/merge_requests/103), [#105](https://gitlab.com/cosapp/cosapp/-/merge_requests/105)-[#108](https://gitlab.com/cosapp/cosapp/-/merge_requests/108), [#110](https://gitlab.com/cosapp/cosapp/-/merge_requests/110)-[#121](https://gitlab.com/cosapp/cosapp/-/merge_requests/121)):
    * Possibility to declare events and mode variables in systems.
    * New method `System.transition` describing system transition upon the occurrence of events.
    * Event detection in `ExplicitTimeDriver`.

  * Possibility to specify a stop criterion in time simulation scenarios (MR [#107](https://gitlab.com/cosapp/cosapp/-/merge_requests/107)).



  * New tutorial on hybrid time simulations and multimode systems (MRs [#116](https://gitlab.com/cosapp/cosapp/-/merge_requests/116) and [#120](https://gitlab.com/cosapp/cosapp/-/merge_requests/120)).
  * Updated build config file following up a bug fix in [github.com/readthedocs](https://github.com/readthedocs/readthedocs.org) (MR [#109](https://gitlab.com/cosapp/cosapp/-/merge_requests/109)).





  * New module `cosapp.base` (MR [#96](https://gitlab.com/cosapp/cosapp/-/merge_requests/96)) containing base classes for user-defined classes (in particular, `Port`, `System` and `Driver`). Also contains `BaseConnector`, base class for custom connectors (see "User-defined and peer-to-peer connectors" below), as well as CoSApp-specific exceptions `ScopeError`, `UnitError` and `ConnectorError`.
  **Note:** `Port`, `System` and `Driver` can still be imported from `cosapp.ports`, `cosapp.systems` and `cosapp.drivers`, respectively.

  * Public API `cosapp.base.SurrogateModel` to define custom surrogate models used in `System.make_surrogate` (MR [#97](https://gitlab.com/cosapp/cosapp/-/merge_requests/97)).
  Pre-defined models have been moved to module `cosapp.utils.surrogate_models`.

  * System-to-system connections (MR [#94](https://gitlab.com/cosapp/cosapp/-/merge_requests/94)).

  ```python
  class LegacyPortToPort(System):
      def setup(self):
          a = self.add_child(ModelA('a'))
          b = self.add_child(ModelB('b'))

          
          self.connect(a.p_in, b.p_out)
          self.connect(a.outwards, b.inwards, {'y': 'x'})

  class Alternative(System):
    """Same as `LegacyPortToPort`, with alternative connection syntax"""
      def setup(self):
          a = self.add_child(ModelA('a'))
          b = self.add_child(ModelB('b'))

          
          self.connect(a, b, {'p_in': 'p_out', 'y': 'x'})
  ```

  * User-defined and peer-to-peer connectors (MR [#87](https://gitlab.com/cosapp/cosapp/-/merge_requests/87) and MR [#98](https://gitlab.com/cosapp/cosapp/-/merge_requests/98)).

  ```python
  import numpy
  from copy import deepcopy
  from cosapp.base import Port, System, BaseConnector

  class DeepCopyConnector(BaseConnector):
    """User-defined deep-copy connector"""
      def transfer(self) -> None:
          source, sink = self.source, self.sink

          for target, origin in self.mapping.items():
              value = getattr(source, origin)
              setattr(sink, target, deepcopy(value))

  class CustomPort(Port):
      def setup(self):
          self.add_variable('x', 0.0)
          self.add_variable('y', 1.0)

      class Connector(BaseConnector):
        """Connector for peer-to-peer connections"""
          def transfer(self) -> None:
              source, sink = self.source, self.sink
              sink.x = source.y
              sink.y = -source.x

  class MyModel(System):
      def setup(self):
          self.add_input(CustomPort, 'p_in')
          self.add_output(CustomPort, 'p_out')

          self.add_inward('entry', numpy.identity(3))
          self.add_outward('exit', numpy.zeros_like(self.entry))

  class Assembly(System):
      def setup(self):
          a = self.add_child(MyModel('a'))
          b = self.add_child(MyModel('b'))

          self.connect(a, b, {'exit', 'entry'}, cls=DeepCopyConnector)
          self.connect(a.p_in, b.p_out)  # will use CustomPort.Connector
  ```



  * Updated tutorials (MR [#102](https://gitlab.com/cosapp/cosapp/-/merge_requests/102)).
    * Include latest API evolutions in tutorials on ports and systems.
    * New tutorial on user-defined connectors.
    * New section on user-defined surrogate models.



  * Simplify loop resolution (MR [#77](https://gitlab.com/cosapp/cosapp/-/merge_requests/77), [#101](https://gitlab.com/cosapp/cosapp/-/merge_requests/101)).
  * Improve connector transfer (MR [#99](https://gitlab.com/cosapp/cosapp/-/merge_requests/99)).
  * Update binder settings, to take advantage of prebuilt plotly extension for jupyter lab (MR [#95](https://gitlab.com/cosapp/cosapp/-/merge_requests/95)).
  * Other code quality improvements (MR [#76](https://gitlab.com/cosapp/cosapp/-/merge_requests/76), [#82](https://gitlab.com/cosapp/cosapp/-/merge_requests/82), [#90](https://gitlab.com/cosapp/cosapp/-/merge_requests/90)).





  * Possibility to define unknowns and equations at solver level (MR [#65](https://gitlab.com/cosapp/cosapp/-/merge_requests/65)).
  Minor API evolution facilitating the definition of nonlinear problems and of multi-point design problems.

  ```python
  engine = Turbofan('engine')
  solver = engine.add_driver(NonLinearSolver('solver'))


  takeoff = solver.add_child(RunSingleCase('takeoff'))
  cruise = solver.add_child(RunSingleCase('cruise'))


  solver.add_unknown(['fan.diameter', 'core.turbine.inlet.area'])


  takeoff.add_equation('thrust == 1.2e5')
  cruise.add_equation('Mach == 0.8')
  ```

  * New recursive iterator `tree()` for systems and drivers, yielding all elements in a composite tree (MR [#68](https://gitlab.com/cosapp/cosapp/-/merge_requests/68)).

  ```python
  head = CompositeSystem('head')

  bottom_to_top = [s.name for s in head.tree()]
  top_to_bottom = [s.name for s in head.tree(downwards=True)]
  ```

  * Visitor pattern for composite collections of systems, drivers and ports (MR [#68](https://gitlab.com/cosapp/cosapp/-/merge_requests/68)).

  ```python
  from cosapp.patterns.visitor import Visitor, send as send_visitor

  class DataCollector(Visitor):
      def __init__(self):
          self.data = {}

      def visit_system(self, system):
          key = system.full_name()
          self.data.setdefault(key, {})
          self.data[key]['children'] = [
              child.name for child in system.children.values()
          ]
          send_visitor(self, system.inputs.values())

      def visit_port(self, port):
          

      def visit_driver(self, driver):
          

  head = CompositeSystem('head')
  collector = DataCollector()

  send_visitor(collector, head.tree())
  print(collector.data)
  ```



  * New tutorials, and new "Tips & Tricks" notebook (MR [#71](https://gitlab.com/cosapp/cosapp/-/merge_requests/71)).



  * Improved tests on clean/dirty status (MR [#66](https://gitlab.com/cosapp/cosapp/-/merge_requests/66)).
  * Bug fix in tutorial notebook on validation (MR [#67](https://gitlab.com/cosapp/cosapp/-/merge_requests/67)).
  * Code quality improvements (MR [#69](https://gitlab.com/cosapp/cosapp/-/merge_requests/69)).
  * Make `System.exec_order` a view on `System.children` dictionary keys, rather than an independent attribute (MR [#70](https://gitlab.com/cosapp/cosapp/-/merge_requests/70)). Execution order can still be specified, via a dedicated setter for `exec_order`.
  * Fix solver bugs occurring when system structure changes (MR [#73](https://gitlab.com/cosapp/cosapp/-/merge_requests/73)).





  * Resolve unknown aliasing for pulled input variables (MR [#58](https://gitlab.com/cosapp/cosapp/-/merge_requests/58)).
  * Resolve bugs and issues related to `add_target` (MR [#61](https://gitlab.com/cosapp/cosapp/-/merge_requests/61)).
  * Fix wrong comparison of Jacobian matrix `jac is None` after converting it as a `numpy` array (MR [#56](https://gitlab.com/cosapp/cosapp/-/merge_requests/56)).
  * Set transparent background in `PortMarkdownFormatter` (MR [#59](https://gitlab.com/cosapp/cosapp/-/merge_requests/59)).
  * Other code quality improvements (MR [#55](https://gitlab.com/cosapp/cosapp/-/merge_requests/55), [#57](https://gitlab.com/cosapp/cosapp/-/merge_requests/57), [#60](https://gitlab.com/cosapp/cosapp/-/merge_requests/60)).





  * **New [binder container](https://mybinder.org/v2/gl/cosapp%2Fcosapp/master?urlpath=lab/tree/docs/tutorials)**,
    allowing anyone to run interactively the tutorials used in the online documentation
    (MR [#30](https://gitlab.com/cosapp/cosapp/-/merge_requests/30) and [#36](https://gitlab.com/cosapp/cosapp/-/merge_requests/36)).

  * **Deferred equations to set targets:**

    New method `add_target`, defining a deferred equation on on a target variable (MR [#48](https://gitlab.com/cosapp/cosapp/-/merge_requests/48)).
    In effect, `add_target` creates an equation whose right-hand side is evaluated dynamically prior to each execution of the nonlienar solver.

    In the example below, the feature is illustrated in design mode. Outward `z` is a function of two independent variables `x` and `y`.
    When design method `'target_z'` is activated, the actual value of `z`, set interactively, is used as a target value, with unknown `y`:

  ```python
  class SystemWithTarget(System):
      def setup(self):
          self.add_inward('x', 1.0)
          self.add_inward('y', 1.0)
          self.add_outward('z', 1.0)

          
          design = self.add_design_method('target_z')
          design.add_unknown('y').add_target('z')

      def compute(self):
          self.z = self.x * self.y**2

  s = SystemWithTarget('s')

  solver = s.add_driver(NonLinearSolver('solver', tol=1e-9))

  solver.runner.design.extend(s.design_methods['target_z'])

  s.x = 0.5
  s.y = 0.5
  s.z = 2.0  # set target
  s.run_drivers()
  assert s.y == pytest.approx(2)  # solution of x * y**2 == 2
  assert s.z == pytest.approx(2)

  s.z = 4.0  # dynamically set new target
  s.run_drivers()
  assert s.y == pytest.approx(np.sqrt(8))  # solution of x * y**2 == 4
  assert s.z == pytest.approx(4)
  ```
    Targets can be also be declared in off-design mode, by calling `self.add_target(...)` in `System.setup`.



  * Updated tutorials on `System`, `Driver`, and design methods (MR [#41](https://gitlab.com/cosapp/cosapp/-/merge_requests/41)).
  * Typo fix and improvements in time driver tutorial (MR [#33](https://gitlab.com/cosapp/cosapp/-/merge_requests/33))



  * Report variable name in unit-related Connector warning message (MR [#32](https://gitlab.com/cosapp/cosapp/-/merge_requests/32)).
  * Automatically include field `time` in `DataFrame` recorders attached to a time driver (MR [#34](https://gitlab.com/cosapp/cosapp/-/merge_requests/34)).
  * Bug fix in `MonteCarlo` driver (MR [#37](https://gitlab.com/cosapp/cosapp/-/merge_requests/37)).
  * Replace `conda` by `mamba` in CI scripts (MR [#39](https://gitlab.com/cosapp/cosapp/-/merge_requests/39)).
  * Revamp markdown and JS rendering of systems and ports (MR [#40](https://gitlab.com/cosapp/cosapp/-/merge_requests/40) and [#43](https://gitlab.com/cosapp/cosapp/-/merge_requests/43), [#47](https://gitlab.com/cosapp/cosapp/-/merge_requests/47) and [#51](https://gitlab.com/cosapp/cosapp/-/merge_requests/51)).
  * Fix bug in `rate` type inference (MR [#44](https://gitlab.com/cosapp/cosapp/-/merge_requests/44)).
  * Other code quality improvement (MR [#35](https://gitlab.com/cosapp/cosapp/-/merge_requests/35), [#38](https://gitlab.com/cosapp/cosapp/-/merge_requests/38), [#42](https://gitlab.com/cosapp/cosapp/-/merge_requests/42), [#46](https://gitlab.com/cosapp/cosapp/-/merge_requests/46), [#50](https://gitlab.com/cosapp/cosapp/-/merge_requests/50), [#52](https://gitlab.com/cosapp/cosapp/-/merge_requests/52), [#53](https://gitlab.com/cosapp/cosapp/-/merge_requests/53)).





  * Recorders:
    It is now possible to add evaluable expressions in recorders (MR [#27](https://gitlab.com/cosapp/cosapp/-/merge_requests/27)):

  ```python
  point = PointMass('point')
  driver = point.add_driver(RungeKutta(order=3, time_interval=(0, 2), dt=0.01))

  recorder = driver.add_recorder(recorders.DataFrameRecorder(
      includes=['x', 'a', 'norm(v)']),  # norm(v) will be recorded in DataFrame
      period=0.1,
  )
  ```


  * New tutorial on `SystemSurrogate` (MR [#15](https://gitlab.com/cosapp/cosapp/-/merge_requests/15)).



  * Initialization bug in time simulations (MR [#23](https://gitlab.com/cosapp/cosapp/-/merge_requests/23)).
  * Bug in nonlinearity estimation in `NumericalSolver` (MR [#22](https://gitlab.com/cosapp/cosapp/-/merge_requests/22)).
  * Do not raise `ArithmeticError` when an unknown is declared several time (MR [#18](https://gitlab.com/cosapp/cosapp/-/merge_requests/18)).
  * Suppress deprecation warnings raised by `numpy` (MR [#20](https://gitlab.com/cosapp/cosapp/-/merge_requests/20) and [#24](https://gitlab.com/cosapp/cosapp/-/merge_requests/24)).
  * Suppress undue warning raised by `numpy` in `NonLinearSolver` (MR [#19](https://gitlab.com/cosapp/cosapp/-/merge_requests/19)).
  * Fix incompatibility between `pandas` and `xlrd` (MR [#21](https://gitlab.com/cosapp/cosapp/-/merge_requests/21)).
  * Other code quality improvement (MR [#16](https://gitlab.com/cosapp/cosapp/-/merge_requests/16), [#17](https://gitlab.com/cosapp/cosapp/-/merge_requests/17), [#26](https://gitlab.com/cosapp/cosapp/-/merge_requests/26), [#27](https://gitlab.com/cosapp/cosapp/-/merge_requests/27)).





  * Surrogate models:
    It is now possible to create a surrogate model at any system level with new method `System.make_surrogate` (MR [#3](https://gitlab.com/cosapp/cosapp/-/merge_requests/3) and [#12](https://gitlab.com/cosapp/cosapp/-/merge_requests/12)):

  ```python
  plane = Aeroplane('plane')  # system with subsystems engine1 and engine2





  doe = pandas.DataFrame(
      
      columns=['fuel_rate', 'fan.diameter', ..]  # input names
  )
  plane.engine1.make_surrogate(doe)  # generates output data and train model

  plane.run_once()  # executes the surrogate model of `engine1` instead of original compute()


  plane.engine1.dump_surrogate('engine.bin')

  plane.engine2.load_surrogate('engine.bin')


  plane.engine1.active_surrogate = plane.engine2.active_surrogate = False
  ```



  * Add several US-common unit conversions (MR [#2](https://gitlab.com/cosapp/cosapp/-/merge_requests/2)).
  * New method to export cosapp system structure into a dictionary (MR [#5](https://gitlab.com/cosapp/cosapp/-/merge_requests/5))
  * Make recorders capture port and system properties (MR [#8](https://gitlab.com/cosapp/cosapp/-/merge_requests/8)).
  * Fix Module/System naming bug: *'inwards' and 'outwards' are allowed as Module/System names* (MR [#9](https://gitlab.com/cosapp/cosapp/-/merge_requests/9)).
  * Broad code quality improvement (MR [#11](https://gitlab.com/cosapp/cosapp/-/merge_requests/11)).

    * Replace `typing.NoReturn` by `None` when appropriate.
    * Rewording pass, typo and error fixes in tutorial notebooks.
    * Suppress a `DeprecationWarning` raised by `numpy` in class `Variable`.
    * Reformat many strings as Python f-strings, for clarity.
    * Symplify many occurrences of `str.join()` for just two elements.

  Global rewording of tutorial notebooks, including a few error fixes.



  First open-source version.
  No major code change; mostly updates of license files, URLs in docs, and CI scripts.





  * Add the possibility to set boundary condition of transient simulation from interpolate profile.
  * Add the possibility to prescribe a maximum step for transient variables.



  * Bug fix in `RunOnce` driver, preventing undue call to `run_once` method.
  * Bug fix in AssignString: force copy for numpy arrays.
  * New tutorial for advanced features of time simulations in CosApp.





  * Improve documentation at various places, add documentation about the cosapp packages structure and sequence diagram for transient simulation.
  * Add a advanced logger feature for CoSApp simulations.
  * Update FMU export to PythonFMU 0.6.0
  * New method `System.add_property` allowing users to create read-only properties.



  * Suppress deprecation warnings raised by external dependencies.
  * Fix bug in AssignString with arrays, `AssignString` of the kind `'x = [0, 1, 2]'` won't change variable `x` into an array of integers,  if `x` is declared as an array of floats.
  * Fix `TimeStackUnknown` not able to stack transient variables defined on a children System or with partially pulled transient variable.
  * Fix the bug related to the initialization of `rate` attributes in systems.





  * [BETA] Export CoSApp System as FMU



  * Apply Broyden correction on Jacobian matrix for iteration without Jacobian update
  * Support varying time step
  * Fix time not being set before `setup_run` are called.
  * Fix reference for residues in `IterativeConnector` (it equals 1. now)
  * Drop pyhamcrest for pytest





  * Time varying boundary conditions are now possible:

  ```python
  system = MySystem('something')  # system with transient variables x and v
  driver = system.add_driver(RungeKutta(time_interval=(0, 2), dt=0.01, order=3))

  driver.set_scenario(
      init = {'x': 0.5, 'v': 0},  # initial conditions
      values =
      {
          'omega': 0.7,
          'F_ext': '0.6 * cos(omega * t)'  # explicit time-dependency
      }
  )
  ```



  * Fix various bug on the transient simulation front
  * Correct implementation of step limitation in the Newton-Raphson solver
  * Using a logger at `DEBUG` level will now display the call stack through the systems and drivers
  * Rework of the Python evaluable string to be more efficient



  * Introduce continuous time simulations with dedicated time drivers (see `TimeDriver` notebook in tutorials).
  * Suppress notion of (un)freeze; all variables are considered as known, unless explicitly declared as unknowns.
  * Drivers no longer use ports.
  * Connectors are now stored by parent system.
  * Migrate to pytest.



  * Ports:

    * `add_variable("x", units="m", types=Number)` => `add_variable("x", unit="m", dtype=Number)`
    * `freeze` => removed
    * `unfreeze` => replaced by `add_unknown` in Systems and Drivers
    * `connect_to` => replaced by `connect` at system level

  * Systems:

    * `time_ref` is no longer an argument of method `compute`:

      `def compute(self, time_ref):` => `def compute(self):`

    * Create a new connection between `a.in1` and `b.out`:

      `self.a.in1.connect_to(self.b.out)` => `self.connect(self.a.in1, self.b.out)`

    * `add_residues` => `add_equation`
    * `set_numerical_default` => Pass keyword to `add_unknown`
    * `add_inward("x", units="m", types=Number)` => `add_inward("x", unit="m", dtype=Number)`
    * `add_outward("x", units="m", types=Number)` => `add_outward("x", unit="m", dtype=Number)`

  * Drivers:

    * `add_unknowns(maximal_absolute_step, maximal_relative_step, low_bound, high_bound)` => `add_unknown(max_abs_step, max_rel_step, lower_bound, upper_bound)`
    * `add_equations` => `add_equation`
    * Equations are now represented by a unique string, instead of two strings (left-hand-side, right-hand-side):

      `add_equations("a", "b")` => `add_equation("a == b")`

      `add_equations([("x", "2 * y + 1"), ("a", "b")])` => `add_equation(["x == 2 * y + 1", "a == b"])`

    * For `NonLinearSolver`:

      `fatol` and `xtol` => `tol`

      `maxiter` => `max_iter`

    * For `Optimizer`:

      `ftol` => `tol`

      `maxiter` => `max_iter`



  * More correction for VISjs viewer and System HTML representation



  * Correct D3 & VISjs Viewers



  * Introduce an optional environment variable `COSAPP_CONFIG_DIR`





  * MonteCarlo:

    * `Montecarlo` => `MonteCarlo`
    * `Montecarlo.add_input_vars` => `MonteCarlo.add_random_variable`
    * `Montecarlo.add_response_vars` => `MonteCarlo.add_response`

  * MonteCarlo has been improved by using Sobol random generator
  * Viewers code on `System` is moved in a subpackage of `cosapp.tools`
  * Residue reference is now calculated only once
  * Various bug fix


  * In nonlinear solver, store LU factorization of the Jacobian matrix, rather than its inverse.
  * Minor refactoring of the core source code, with no API changes



  * Create `Variable` class to manage variable attributes
  * `watchdog` is now optional
  * Configuration is now inside a folder `$HOME/.cosapp.d`
  * API changes:
    - `get_latest_solution` => `save_solution`
    - `load_solver_solution` => `load_solution`
  * Various bug fix



  This release introduces lots of API changes:

  * Core ports and unit are available in `cosapp.ports`
  * Core systems are available in `cosapp.systems`
  * Core drivers are available in `cosapp.drivers`
  * Core recorders are available in `cosapp.recorders`
  * Core tools are available in `cosapp.tools`
  * Core notebook tools are available in `cosapp.notebook` (! this is now a separated package)
  * `data` have been renamed in `inwards` and `add_data` in `add_inward`
  * `locals` have been renamed in `outwards` and `add_locals` in `add_outward`
  * `BaseRecorder.record_iteration` renamed in `BaseRecorder.record_state`

  - Huge code refractoring: cosapp is now a [Python namespace](https://packaging.python.org/guides/packaging-namespace-packages).
  - `cosapp.notebook` has been moved to an independent package `cosapp_notebook`. But it is still accessible from `cosapp.notebook`.
  - Introduce *Signal* / *Slot* pattern to connect to internal event (implementation from [signalslot](https://github.com/Numergy/signalslot), included in `cosapp.core.signal`)
      * `Module.setup_ran`: Signal emitted after the `call_setup_run` execution
      * `Module.computed`: Signal emitted after the full `compute` stack (i.e.: `_postcompute`)
      * `Module.clean_ran`: Signal emitted after the `call_clean_run` execution
      * `BaseRecorder.state_recorded`: Signale emitted after the `record_state` execution



  - Add Jacobian partial matrix update
  - Add numerical features to variables to ease convergence control
  - Add monitoring of solver residues
  - Add restoration of solver result for initialization
  - Rework residues and unknowns handling (remove virtual port and pulling port)
  - Rework optimizer to be more homogeneous with non-linear solver
  - Improve linear Monte Carlo computation time
  - Improve data viewer for non-linear solver
  - Create viewer for Monte Carlo
  - Add dropdown widget for enum variables



  - Add helper functions to present solver evolutions
  - Add new d3 visualization of systems



  - Implement clean-dirty policy
  - Restore compatibility with Python 3.4
  - Display influence matrix



  - Simplify drivers structure, all actions for a case are supported by a single class `RunSingleCase`
  - Add support for vector variables; they can be partially (un)frozen and are handled correctly by the solver.
  - Add `MonteCarlo` driver
  - Add recording data capability



  - `System` and `Driver` have now a common ancestor `Module` => `Driver` variables are now stored as data or locals
  - Add visualization of `System` connections based on N2 graph (syntax: `cosapp.viewmodel(mySystem)`)



  **API changes:** `System.add_driver` and `Driver.add_child` take now an instance of `Driver`

  - Add external code caller System
  - Add validation range attributes on variables
  - Add variable visibility
  - Add metamodel training and DoE generator
  - Add helper function to list inputs and outputs variables of a `System`



  * Stabilization of the user API



  * First release.


pkgId: fb1c59165e8517e5f22045aaba9b455f01596e1377d3de5a94efe76a35f08a8b
name: python-coscmd
arch: src
version: 1.8.6.34
epoch: 0
release: 1
summary: simple command for cos
url: https://www.qcloud.com/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-coscmd-1.8.6.34-1.src.rpm
checksum_type: sha256
description:
  COSCMD


  .. image:: https://img.shields.io/pypi/v/coscmd.svg
        :target: https://pypi.org/search/?q=coscmd
     :alt: Pypi
  .. image:: https://travis-ci.org/tencentyun/coscmd.svg?branch=master
        :target: https://travis-ci.org/tencentyun/coscmd
     :alt: Travis CI

  介绍
  _______

  腾讯云COS命令行工具, 目前可以支持Python2.6与Python2.7以及Python3.x。

  安装指南
  __________

  使用pip安装 ::

      pip install -U coscmd

  手动安装::

      python setup.py install

  使用方法
  __________

  使用coscmd，参照 https://cloud.tencent.com/document/product/436/10976


pkgId: a4d7f95f638d4858c2b18fb41a033a4237a00749aa51f278960f17681d21fc19
name: python-cosecurity-amqp-lib
arch: src
version: 1.0.22
epoch: 0
release: 1
summary: This is a package that includes all AMQP handled messages by the CoSecurity infrastructure
url: https://pypi.org/project/cosecurity-amqp-lib/
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cosecurity-amqp-lib-1.0.22-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version shields.io](https://img.shields.io/pypi/v/cosecurity-amqp-lib.svg)](https://pypi.org/project/cosecurity-amqp-lib/) <br>
  Internal library for exchanging messages between services instantiated in the AWS environment.
  The base used for the elaboration of the package was the PIKA library developed by the RabbitMQ team.


  To use the library it is necessary to have [Python3](https://www.python.org/downloads/) installed on the machine and run the following command:
  ```bash
  python3 -m pip install cosecurity-amqp-lib
  ```


  - `AMQP_USER` user for connecting to RabbitMQ
  - `AMQP_PASSWORD` password for connecting to RabbitMQ
  - `[SERVICE_NAME]` service name and respective service queue name, can be more than one
  - `AMQP_SOCKET_TIMEOUT` socket connect timeout in seconds
  - `AMQP_HEARTBEAT` AMQP connection heartbeat timeout value for negotiation during connection tuning or callable which is invoked during connection tuning


  - `AMQP_HOST` host to connect to RabbitMQ, if localhost does not need to fill the port


  - `AMQP_BROKER_ID` amqp id inside aws
  - `AWS_REGION` region where amqp is allocated within aws


  Consumers are instances that monitor a specific queue, and if there is a change in the queue, they perform a certain action.<br>
  In this library a consumer can have more than one action/method, called `primitive`. In addition, each action will still have its default input set.
  Each method that must be an action must be registered so that it can be triggered if there is a change in the directed queue.<br>
  Below is an example of how to create a consumer class:
  ```python
  from typing import Any, Dict
  from cosecurity_amqp_lib.consumer import Consumer

  class ConsumerExample(Consumer):
      def __init__(self) -> None:
          super().__init__(
              name='example'
          )
          self.register(self.primitive_one)
          self.register(self.primitive_two)
          self.start()

      def primitive_one(self, content:Dict[str, Any]) -> None:
          print(content['hello'])

      def primitive_two(self, content:Dict[str, Any]) -> None:
          print(content['message'])
  ```


  Producers are responsible for producing and/or posting new messages in consumer queues. <br>
  In the internal library the producers are called `stub`, I try their methods defined and typed based on what has already been defined as `primitive` in their consumer.<br>
  Below is an example of how to create a `stub` inside the library in the [stub.py file](https://github.com/CoSecurity/amqp-internal-library/blob/main/cosecurity_amqp_lib/stub.py):
  ```python
  class ExampleStub(Stub):
      def __init__(self):
          super().__init__(
              destination='example'
          )

      def primitive_one(self) -> None:
          self._send(
              primitive='primitive_one',
              content={
                  'hello': 'word'
              }
          )

      def primitive_two(self, message:str) -> None:
          self._send(
              primitive='primitive_two',
              content={
                  'message': message
              }
          )
  ```
  Now, an example of how to use an already created `stub` and publish it in the library in Pypi:
  ```python
  from cosecurity_amqp_lib.stub import ExampleStub

  example_stub = ExampleStub()
  example_stub.primitive_one()
  example_stub.primitive_two(message='Hello world!')
  ```


  In the creation of the consumers it is possible to pass some additional configurations for the creation of the queue, these configurations can be found on the official RabbitMQ website. Below is a representation of how to pass an additional argument:
  ```python
  class ConsumerExample(Consumer):
      def __init__(self) -> None:
          [...]
          self.start(
              arguments={
                  'x-queue-mode': 'lazy'
              }
          )
  ```


  In the [example/simple](https://github.com/CoSecurity/amqp-internal-library/tree/main/example/simple)
  folder we have a real case example of a `stub` sending an string to a consumer.


pkgId: 7241e3922ae31d2b03653695cb184bd781bdd74ee219d1e38c7f8ba610950ae4
name: python-cosecurity-utility-internal-lib
arch: src
version: 0.0.24
epoch: 0
release: 1
summary: Built-in utility library for application development by the CoSecurity infrastructure
url: https://pypi.org/project/cosecurity-utility-internal-lib/
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cosecurity-utility-internal-lib-0.0.24-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version shields.io](https://img.shields.io/pypi/v/cosecurity-utility-internal-lib.svg)](https://pypi.org/project/cosecurity-utility-internal-lib/) <br>
  Library of built-in utilities for developing applications and services that reside within AWS.


  To use the library it is necessary to have [Python3](https://www.python.org/downloads/) installed on the machine and run the following command:
  ```bash
  python3 -m pip install cosecurity-utility-internal-lib
  ```


pkgId: 104693f8942935cc5f95a75d785e4ee89552684792590a4a5d70aa3123438bca
name: python-cosette
arch: src
version: 0.0.4
epoch: 0
release: 1
summary: A helper for using the OpenAI API
url: https://github.com/AnswerDotAI/cosette
rpm_license: Apache Software License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cosette-0.0.4-1.src.rpm
checksum_type: sha256
description:
  <!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->



  ``` sh
  pip install cosette
  ```



  OpenAI’s Python SDK will automatically be installed with Cosette, if you
  don’t already have it.

  ``` python
  from cosette import *
  ```

  Cosette only exports the symbols that are needed to use the library, so
  you can use `import *` to import them. Alternatively, just use:

  ``` python
  import cosette
  ```

  …and then add the prefix `cosette.` to any usages of the module.

  Cosette provides `models`, which is a list of models currently available
  from the SDK.

  ``` python
  models
  ```

      ('gpt-4o',
       'gpt-4-turbo',
       'gpt-4',
       'gpt-4-32k',
       'gpt-3.5-turbo',
       'gpt-3.5-turbo-instruct')

  For these examples, we’ll use GPT-4o.

  ``` python
  model = models[0]
  ```



  The main interface to Cosette is the
  [`Chat`](https://AnswerDotAI.github.io/cosette/core.html#chat) class,
  which provides a stateful interface to the models:

  ``` python
  chat = Chat(model, sp="""You are a helpful and concise assistant.""")
  chat("I'm Jeremy")
  ```

  Hi Jeremy! How can I assist you today?

  <details>

  - id: chatcmpl-9R8Z0uRHgWl7XaV6yJtahVDyDTzMZ
  - choices: \[Choice(finish_reason=‘stop’, index=0, logprobs=None,
    message=ChatCompletionMessage(content=‘Hi Jeremy! How can I assist you
    today?’, role=‘assistant’, function_call=None, tool_calls=None))\]
  - created: 1716254802
  - model: gpt-4o-2024-05-13
  - object: chat.completion
  - system_fingerprint: fp_729ea513f7
  - usage: CompletionUsage(completion_tokens=10, prompt_tokens=21,
    total_tokens=31)

  </details>

  ``` python
  r = chat("What's my name?")
  r
  ```

  Your name is Jeremy. How can I assist you further?

  <details>

  - id: chatcmpl-9R8Z1c76TFqYFYjyON08CbkAmjerN
  - choices: \[Choice(finish_reason=‘stop’, index=0, logprobs=None,
    message=ChatCompletionMessage(content=‘Your name is Jeremy. How can I
    assist you further?’, role=‘assistant’, function_call=None,
    tool_calls=None))\]
  - created: 1716254803
  - model: gpt-4o-2024-05-13
  - object: chat.completion
  - system_fingerprint: fp_729ea513f7
  - usage: CompletionUsage(completion_tokens=12, prompt_tokens=43,
    total_tokens=55)

  </details>

  As you see above, displaying the results of a call in a notebook shows
  just the message contents, with the other details hidden behind a
  collapsible section. Alternatively you can `print` the details:

  ``` python
  print(r)
  ```

      ChatCompletion(id='chatcmpl-9R8Z1c76TFqYFYjyON08CbkAmjerN', choices=[Choice(finish_reason='stop', index=0, logprobs=None, message=ChatCompletionMessage(content='Your name is Jeremy. How can I assist you further?', role='assistant', function_call=None, tool_calls=None))], created=1716254803, model='gpt-4o-2024-05-13', object='chat.completion', system_fingerprint='fp_729ea513f7', usage=In: 43; Out: 12; Total: 55)

  You can use `stream=True` to stream the results as soon as they arrive
  (although you will only see the gradual generation if you execute the
  notebook yourself, of course!)

  ``` python
  for o in chat("What's your name?", stream=True): print(o, end='')
  ```

      I don't have a personal name, but you can call me Assistant. How can I help you today, Jeremy?



  [Tool use](https://docs.openai.com/claude/docs/tool-use) lets the model
  use external tools.

  We use [docments](https://fastcore.fast.ai/docments.html) to make
  defining Python functions as ergonomic as possible. Each parameter (and
  the return value) should have a type, and a docments comment with the
  description of what it is. As an example we’ll write a simple function
  that adds numbers together, and will tell us when it’s being called:

  ``` python
  def sums(
      a:int,  # First thing to sum
      b:int=1 # Second thing to sum
  ) -> int: # The sum of the inputs
      "Adds a + b."
      print(f"Finding the sum of {a} and {b}")
      return a + b
  ```

  Sometimes the model will say something like “according to the `sums`
  tool the answer is” – generally we’d rather it just tells the user the
  answer, so we can use a system prompt to help with this:

  ``` python
  sp = "Never mention what tools you use."
  ```

  We’ll get the model to add up some long numbers:

  ``` python
  a,b = 604542,6458932
  pr = f"What is {a}+{b}?"
  pr
  ```

      'What is 604542+6458932?'

  To use tools, pass a list of them to
  [`Chat`](https://AnswerDotAI.github.io/cosette/core.html#chat):

  ``` python
  chat = Chat(model, sp=sp, tools=[sums])
  ```

  Now when we call that with our prompt, the model doesn’t return the
  answer, but instead returns a `tool_use` message, which means we have to
  call the named tool with the provided parameters:

  ``` python
  r = chat(pr)
  r
  ```

      Finding the sum of 604542 and 6458932

  - id: chatcmpl-9R8Z2JNenseQyQoseIs8XNImmy2Bo
  - choices: \[Choice(finish_reason=‘tool_calls’, index=0, logprobs=None,
    message=ChatCompletionMessage(content=None, role=‘assistant’,
    function_call=None,
    tool_calls=\[ChatCompletionMessageToolCall(id=‘call_HV4yaZEY1OYK1zYouAcVwfZK’,
    function=Function(arguments=‘{“a”:604542,“b”:6458932}’, name=‘sums’),
    type=‘function’)\]))\]
  - created: 1716254804
  - model: gpt-4o-2024-05-13
  - object: chat.completion
  - system_fingerprint: fp_729ea513f7
  - usage: CompletionUsage(completion_tokens=21, prompt_tokens=96,
    total_tokens=117)

  Cosette handles all that for us – we just have to pass along the
  message, and it all happens automatically:

  ``` python
  chat()
  ```

  The sum of 604542 and 6458932 is 7063474.

  <details>

  - id: chatcmpl-9R8Z4CrFU3zd71acZzdCsQFQDHxp9
  - choices: \[Choice(finish_reason=‘stop’, index=0, logprobs=None,
    message=ChatCompletionMessage(content=‘The sum of 604542 and 6458932
    is 7063474.’, role=‘assistant’, function_call=None,
    tool_calls=None))\]
  - created: 1716254806
  - model: gpt-4o-2024-05-13
  - object: chat.completion
  - system_fingerprint: fp_729ea513f7
  - usage: CompletionUsage(completion_tokens=18, prompt_tokens=128,
    total_tokens=146)

  </details>

  You can see how many tokens have been used at any time by checking the
  `use` property.

  ``` python
  chat.use
  ```

      In: 224; Out: 39; Total: 263



  We can do everything needed to use tools in a single step, by using
  [`Chat.toolloop`](https://AnswerDotAI.github.io/cosette/toolloop.html#chat.toolloop).
  This can even call multiple tools as needed solve a problem. For
  example, let’s define a tool to handle multiplication:

  ``` python
  def mults(
      a:int,  # First thing to multiply
      b:int=1 # Second thing to multiply
  ) -> int: # The product of the inputs
      "Multiplies a * b."
      print(f"Finding the product of {a} and {b}")
      return a * b
  ```

  Now with a single call we can calculate `(a+b)*2` – by passing
  `show_trace` we can see each response from the model in the process:

  ``` python
  chat = Chat(model, sp=sp, tools=[sums,mults])
  pr = f'Calculate ({a}+{b})*2'
  pr
  ```

      'Calculate (604542+6458932)*2'

  ``` python
  def pchoice(r): print(r.choices[0])
  ```

  ``` python
  r = chat.toolloop(pr, trace_func=pchoice)
  ```

      Finding the sum of 604542 and 6458932
      Finding the product of 2 and 1
      Choice(finish_reason='tool_calls', index=0, logprobs=None, message=ChatCompletionMessage(content=None, role='assistant', function_call=None, tool_calls=[ChatCompletionMessageToolCall(id='call_OfypQBQoAuIUksucevaxwH5Z', function=Function(arguments='{"a": 604542, "b": 6458932}', name='sums'), type='function'), ChatCompletionMessageToolCall(id='call_yKAL5o96cDef83OFJhDB21MM', function=Function(arguments='{"a": 2}', name='mults'), type='function')]))
      Finding the product of 7063474 and 2
      Choice(finish_reason='tool_calls', index=0, logprobs=None, message=ChatCompletionMessage(content=None, role='assistant', function_call=None, tool_calls=[ChatCompletionMessageToolCall(id='call_Ffye7Tf65CjVjwwx8Sp8031i', function=Function(arguments='{"a":7063474,"b":2}', name='mults'), type='function')]))
      Choice(finish_reason='stop', index=0, logprobs=None, message=ChatCompletionMessage(content='The result of \\((604542 + 6458932) \\times 2\\) is 14,126,948.', role='assistant', function_call=None, tool_calls=None))

  OpenAI uses special tags for math equations, which we can replace using
  [`wrap_latex`](https://AnswerDotAI.github.io/cosette/core.html#wrap_latex):

  ``` python
  wrap_latex(contents(r))
  ```

  The result of $(604542 + 6458932) \times 2$ is 14,126,948.



  As everyone knows, when testing image APIs you have to use a cute puppy.

  ``` python
  fn = Path('samples/puppy.jpg')
  display.Image(filename=fn, width=200)
  ```

  <img src="index_files/figure-commonmark/cell-21-output-1.jpeg"
  width="200" />

  We create a
  [`Chat`](https://AnswerDotAI.github.io/cosette/core.html#chat) object as
  before:

  ``` python
  chat = Chat(model)
  ```

  Claudia expects images as a list of bytes, so we read in the file:

  ``` python
  img = fn.read_bytes()
  ```

  Prompts to Claudia can be lists, containing text, images, or both, eg:

  ``` python
  chat([img, "In brief, what color flowers are in this image?"])
  ```

  The flowers in the image are purple.

  <details>

  - id: chatcmpl-9R8Vqpx62OezZDjAt3SIfnjMpH3I8
  - choices: \[Choice(finish_reason=‘stop’, index=0, logprobs=None,
    message=ChatCompletionMessage(content=‘The flowers in the image are
    purple.’, role=‘assistant’, function_call=None, tool_calls=None))\]
  - created: 1716254606
  - model: gpt-4o-2024-05-13
  - object: chat.completion
  - system_fingerprint: fp_927397958d
  - usage: CompletionUsage(completion_tokens=8, prompt_tokens=273,
    total_tokens=281)

  </details>

  The image is included as input tokens.

  ``` python
  chat.use
  ```

      In: 273; Out: 8; Total: 281

  Alternatively, Cosette supports creating a multi-stage chat with
  separate image and text prompts. For instance, you can pass just the
  image as the initial prompt (in which case the model will make some
  general comments about what it sees), and then follow up with questions
  in additional prompts:

  ``` python
  chat = Chat(model)
  chat(img)
  ```

  What an adorable puppy! This puppy has a white and light brown coat and
  is lying on green grass next to some purple flowers. Puppies like this
  are commonly seen from breeds such as Cavalier King Charles Spaniels,
  though without more context, it’s difficult to identify the breed
  precisely. It looks very playful and cute!

  <details>

  - id: chatcmpl-9R8VsAnTWr9k1DShC7mZsnhRtqxRA
  - choices: \[Choice(finish_reason=‘stop’, index=0, logprobs=None,
    message=ChatCompletionMessage(content=“What an adorable puppy! This
    puppy has a white and light brown coat and is lying on green grass
    next to some purple flowers. Puppies like this are commonly seen from
    breeds such as Cavalier King Charles Spaniels, though without more
    context, it’s difficult to identify the breed precisely. It looks very
    playful and cute!”, role=‘assistant’, function_call=None,
    tool_calls=None))\]
  - created: 1716254608
  - model: gpt-4o-2024-05-13
  - object: chat.completion
  - system_fingerprint: fp_927397958d
  - usage: CompletionUsage(completion_tokens=63, prompt_tokens=262,
    total_tokens=325)

  </details>

  ``` python
  chat('What direction is the puppy facing?')
  ```

  The puppy is facing slightly to the right of the camera, with its head
  turned towards the viewer. Its body is positioned in such a way that
  suggests it is laying down or resting on the grass.

  <details>

  - id: chatcmpl-9R8VuzGIABwg341oOHMXbGGa7daya
  - choices: \[Choice(finish_reason=‘stop’, index=0, logprobs=None,
    message=ChatCompletionMessage(content=‘The puppy is facing slightly to
    the right of the camera, with its head turned towards the viewer. Its
    body is positioned in such a way that suggests it is laying down or
    resting on the grass.’, role=‘assistant’, function_call=None,
    tool_calls=None))\]
  - created: 1716254610
  - model: gpt-4o-2024-05-13
  - object: chat.completion
  - system_fingerprint: fp_927397958d
  - usage: CompletionUsage(completion_tokens=40, prompt_tokens=340,
    total_tokens=380)

  </details>

  ``` python
  chat('What color is it?')
  ```

  The puppy has a predominantly white coat with light brown patches,
  particularly around its ears and eyes. This coloration is commonly seen
  in certain breeds, such as the Cavalier King Charles Spaniel.

  <details>

  - id: chatcmpl-9R8Vwtlu6aDEGQ8O7bZFk8rfT9FGL
  - choices: \[Choice(finish_reason=‘stop’, index=0, logprobs=None,
    message=ChatCompletionMessage(content=‘The puppy has a predominantly
    white coat with light brown patches, particularly around its ears and
    eyes. This coloration is commonly seen in certain breeds, such as the
    Cavalier King Charles Spaniel.’, role=‘assistant’, function_call=None,
    tool_calls=None))\]
  - created: 1716254612
  - model: gpt-4o-2024-05-13
  - object: chat.completion
  - system_fingerprint: fp_927397958d
  - usage: CompletionUsage(completion_tokens=38, prompt_tokens=393,
    total_tokens=431)

  </details>

  Note that the image is passed in again for every input in the dialog, so
  that number of input tokens increases quickly with this kind of chat.

  ``` python
  chat.use
  ```

      In: 995; Out: 141; Total: 1136


pkgId: 3f455fe8d24b4661a82d5b8843a93565ac3562d56ee02798956309204dc72dda
name: python-cosine-crypto
arch: src
version: 0.2.50
epoch: 0
release: 1
summary: A modular open source cryptocurrency trading algo framework.
url: https://github.com/oladotunr/cosine
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cosine-crypto-0.2.50-1.src.rpm
checksum_type: sha256
description:
  A modular open source cryptocurrency trading algo framework. You can check out the documentation [here](https://cosine-documentation.readthedocs.io/en/latest/).


pkgId: f4e294cc7cc24ec90e8c43dc2404225bec6ddec9461d7d4cab3ae282e2cf8bc5
name: python-cosine-similarity
arch: src
version: 0.1.2
epoch: 0
release: 1
summary: This package help you to calculate similarity of texts.
url: https://github.com/avikdas29
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cosine-similarity-0.1.2-1.src.rpm
checksum_type: sha256
description:
  **#Developer : Avik Das**

  *## Calculate Similarity*

  *How to run this package*

  from cosinesimilarity import cosine
  cosine.cosineSimilarity(text1,text1)


  *Return the exception details as well *


pkgId: 999ded8e793adea8147efb772184b566c19d854376a72c06207febc7783bb1db
name: python-cosipymodel
arch: src
version: 2.0.0
epoch: 0
release: 1
summary: Coupled snowpack and ice surface energy and mass balance model in Python.
url: https://github.com/cryotools/cosipy
rpm_license: GPL-3.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cosipymodel-2.0.0-1.src.rpm
checksum_type: sha256
description:
  The documentation for COSIPY is available at the following link:
  https://cosipy.readthedocs.io/en/latest/
  **Confused about migrating to the new .toml configuration system?**
  The documentation contains an in-depth tutorial and a guide on upgrading.
  Convert your existing configuration files before merging the latest update:
      pip install toml
      git fetch --all
      git checkout master -- convert_config.py
      python convert_config.py  # generate .toml files
  This works on any branch regardless of local changes.
  Alternatively you can copy and run ``convert_config.py`` into any older COSIPY source tree.
  This will preserve your configuration for ``config.py``, ``constants.py``, ``aws2cosipyConfig.py`` and ``wrf2cosipyConfig.py``.
  Parameters for ``create_static`` must still be added manually to the generated ``utilities_config.toml``.
  Checkout a new branch with a clean version of COSIPY and merge your modifications.
  This minimises the number of merge conflicts.
  After updating to the latest version of COSIPY, run ``python COSIPY.py --help`` to see how to specify paths to configuration files.
  COSIPY will default to ``./config.toml``, ``./constants.toml``, ``./slurm_config.toml``, ``./utilities_config.toml`` in the current working directory.


pkgId: 4ae2015a68d108b8599c80f4c83fe0218996fc4e0a598c3bbdbb2b8d52df16e5
name: python-cosl
arch: src
version: 0.0.34
epoch: 0
release: 1
summary: Utils for COS Lite charms
url: https://github.com/canonical/cos-lib
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cosl-0.0.34-1.src.rpm
checksum_type: sha256
description:
  ![PyPI](https://img.shields.io/pypi/v/cosl)

  This library provides utilities for
  [COS Lite](https://github.com/canonical/cos-lite-bundle/) charms:

  - [`CosTool`](src/cosl/cos_tool.py): bindings for
    [cos-tool](https://github.com/canonical/cos-tool)
  - [`JujuTopology`](src/cosl/juju_topology.py): logic for
    [topology labels](https://ubuntu.com/blog/model-driven-observability-part-2-juju-topology-metrics)
  - [`LokiHandler`](src/cosl/loki_logger.py): python logging handler that forwards logs to a Loki push api endpoint.



  Go to https://github.com/canonical/cos-lib/releases and click on 'Draft a new release'.

  Select a tag from the dropdown, or create a new one from the `main` target branch.

  Enter a meaningful release title and in the description, put an itemized changelog listing new features and bugfixes, and whatever is good to mention.

  Click on 'Publish release'.


pkgId: 9ec3e4390515f2ae330581fd3365a36a0e447cabc37c61af13b84eec8e8de9f1
name: python-cosmic-ray
arch: src
version: 8.3.15
epoch: 0
release: 1
summary: Mutation testing
url: https://pypi.org/project/cosmic-ray/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cosmic-ray-8.3.15-1.src.rpm
checksum_type: sha256
description:
     "Four human beings -- changed by space-born cosmic rays into something more than merely human."
     -- The Fantastic Four
  Cosmic Ray is a mutation testing tool for Python 3.
  It makes small changes to your source code, running your test suite for each
  one. Here's how the mutations look:
  |full_documentation|_

rpm_license:
  Copyright (c) 2015-2017 Sixty North AS  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


pkgId: b4ad90d4b1a30c17803e4c8de14de300dc2f5586f2ae12501993e880c57a4d73
name: python-cosmicdb
arch: src
version: 0.0.33
epoch: 0
release: 1
summary: An easy way to setup a database site.
url: https://bitbucket.org/davidbradleycole/cosmicdb
rpm_license: BSD License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cosmicdb-0.0.33-1.src.rpm
checksum_type: sha256
description:
  ```
  virtualenv demoenv --no-site-packages
  demoenv\Scripts\activate
  pip install cosmicdb
  django-admin startproject demo
  ```




  ```
  INSTALLED_APPS = (
      'YOURAPPHERE',
      'cosmicdb',
      'crispy_forms',
      'django_tables2',
      ... (rest of django apps)
  )
  ```


  ```
      from django.conf.urls import url, include

      urlpatterns = [
          ...
          url(r'^', include('cosmicdb.urls')),
      ]
  ```


  ```
  LANGUAGE_CODE = 'en-au'
  COSMICDB_SITE_TITLE = 'Demo Site'
  COSMICDB_ALLOW_SIGNUP = True
  AUTH_USER_MODEL = 'cosmicdb.CosmicUser'
  LOGIN_URL = '/login/'
  CRISPY_TEMPLATE_PACK = 'bootstrap3'
  DJANGO_TABLES2_TEMPLATE = 'django_tables2/bootstrap-responsive.html'
  EMAIL_USE_TLS = True
  EMAIL_HOST = 'smtp.gmail.com'
  EMAIL_PORT = 587
  EMAIL_HOST_USER = 'test@test.com'
  EMAIL_HOST_PASSWORD = 'testpassword'
  DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
  DEFAULT_FROM_EMAIL_NAME = COSMICDB_SITE_TITLE
  ```


  ```
  python manage.py migrate

  python manage.py collectstatic

  python manage.py createsuperuser
  ```





  ```
  pip install setuptools twine wheel
  ```


  ```
  python setup.py sdist bdist_wheel
  ```


  ```
  twine upload dist/cosmicdb-0.0.32*
  ```


pkgId: 65b7e97ed80e95284b733a7419aab12876dea25313076f0ff6c8129f6569578b
name: python-cosmicdbsemantic
arch: src
version: 0.0.39
epoch: 0
release: 1
summary: An easy way to setup a database site.
url: https://bitbucket.org/davidbradleycole/cosmicdbsemantic
rpm_license: BSD License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cosmicdbsemantic-0.0.39-1.src.rpm
checksum_type: sha256
description:
  ```
  virtualenv demoenv --no-site-packages
  demoenv\Scripts\activate
  pip install cosmicdbsemantic --no-cache-dir
  django-admin startproject demo
  ```


  ```
  INSTALLED_APPS = (
      'YOURAPPHERE',
      'cosmicdb',
      'crispy_forms',
      'sitetree',
      'django_tables2',
      ... (rest of django apps)
  )
  ```


  ```
  from django.contrib import admin
  from django.urls import path, re_path, include

  urlpatterns = [
      re_path(r'^', include('cosmicdb.urls')),
      path('admin/', admin.site.urls),
  ]
  ```


  ```
  LANGUAGE_CODE = 'en-au'
  COSMICDB_SITE_TITLE = 'Demo Site'
  CRISPY_TEMPLATE_PACK = 'semanticui'
  CRISPY_ALLOWED_TEMPLATE_PACKS = (CRISPY_TEMPLATE_PACK)
  DJANGO_TABLES2_TEMPLATE = 'django_tables2/semantic.html'
  COSMICDB_ALLOW_SIGNUP = True
  AUTH_USER_MODEL = 'cosmicdb.CosmicUser'
  LOGIN_URL = '/login/'
  EMAIL_USE_TLS = True
  EMAIL_HOST = 'mysmtp.smtp.com'
  EMAIL_PORT = 465
  EMAIL_HOST_USER = 'mysmtpuser'
  EMAIL_HOST_PASSWORD = 'mysmtppw'
  DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
  DEFAULT_FROM_EMAIL_NAME = COSMICDB_SITE_TITLE
  SITETREE_MODEL_TREE = 'cosmicdb.CosmicDBTree'
  SITETREE_MODEL_TREE_ITEM = 'cosmicdb.CosmicDBTreeItem'
  ```


  ```
  python manage.py migrate
  python manage.py collectstatic
  python manage.py createsuperuser
  ```


  ```
  python manage.py sitetreeload SITE_PACKAGES_DIR/cosmicdb/treedump.json
  ```












  ```
  npm install -g gulp
  npm install -g gulp-cli
  ```




  ```
  cd PROJECT_DIR\cosmicdb\res\
  npm install semantic-ui --save
  ```


  ```
  cd semantic/
  gulp build
  ```


  ```
  cd PROJECT ROOT
  cp -rf cosmicdb/res/semanticui/semantic/dist cosmicdb/static/cosmicdb/semantic
  ```




  ```
  python manage.py sitetreedump > treedump.json
  ```





  ```
  rm -rf build
  python setup.py sdist bdist_wheel
  ```

  ```
  twine upload dist/cosmicdbsemantic-0.0.1*
  ```


pkgId: ae8add4e9985d897dbbf1d906d6757abad2deb934ed7ef4dfa993c24b8f21a60
name: python-cosmo
arch: src
version: 0.7.0
epoch: 0
release: 1
summary: A high-level web server with fine tuned low-level control.
url: https://github.com/kronifer/cosmo
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cosmo-0.7.0-1.src.rpm
checksum_type: sha256
description:
  Cosmo is an asynchronous python webserver that utilizes raw sockets to send and receive data, without using ASGI/WSGI.



  ![Connections Handled per Second](https://user-images.githubusercontent.com/44979306/191119603-e9b97cb1-b8dc-4cf0-8bf3-2a927dac8dac.png)





  ```py
  from cosmo import App, Request, Response

  app = App("0.0.0.0", 8080)

  @app.route("/", "text/html")
  async def index(request: Request):
      return Response(f"<h1>{request.address}</h1>")

  app.serve()
  ```



  ```py
  from cosmo import App, Request, Response

  app = App("0.0.0.0", 8080)

  @app.route("/", "text/html")
  async def index(request: Request):
      headers = {"x-custom-header": "custom"}
      content = "<h1>Custom Headers: </h1>\n<ul>"
      for header in headers.keys():
          content += f"<li>{header}: {headers[header]}</li>\n"
      content += "</ul>"
      return Response(content, headers)

  app.serve()
  ```



  ```py
  from cosmo import App, html_page, Request, Response

  app = App("0.0.0.0", 8080)

  @app.route("/", "text/html")
  async def index(request: Request):
      return Response(html_page("path/to/page.html"))

  app.serve()
  ```



  In `router.py`:
  ```py
  from cosmo import Request, Response, Router

  router = Router()

  @router.route("/")
  async def index():
      return Response("<h1>Hi</h1>")
  ```

  In `app.py`:
  ```py
  from cosmo import App, Request, Response

  from router import router

  app = App("0.0.0.0", 8080)

  app.import_router(router)

  app.serve()
  ```



  Coming soon...


pkgId: 898b620ad910f8ccbeba5df4aa8a87b253a392cd2204cd7b513ebc07480ce628
name: python-cosmoDA
arch: src
version: 0.1.0
epoch: 0
release: 1
summary: Compositional Score Matching Optimization for Differential Abundance Testing
url: https://github.com/bio-datascience/cosmoDA
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cosmoDA-0.1.0-1.src.rpm
checksum_type: sha256
description:
  ![cosmoDA](misc/concept_figure.png)

  This repository contains the cosmoDA model (Ostner et al., 2024), as well as a Python interface
  to the score matching estimator for power interaction models in the genscore R package (Yu et al., 2024).
  It also contains all code needed to reproduce the analyses in the publication (TODO).

  For usage info, please refer to the tutorial.

  Raw and intermediate data objects can be downloaded on [zenodo](TODO).
  Simply download the `data` directory from there and unpack it in the cosmoDA directory.



  TODO



  TODO



  This repository is structured as follows:

  - The `cosmoDA` directory contains the python code to run the cosmoDA or genscore models.
  - The `src` directory contains the C code from genscore, as well as its extension from the cosmoDA model.
  - The `simulation` and `applications` directories contain the simulated and real data applications from the paper, respectively.
  - The `misc` directory contains code for supplementary and concept figures.
  - The `figures` directory contains all generated figures.

rpm_license:
  BSD 3-Clause License  Copyright (c) 2023, johannesostner All rights reserved.  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


pkgId: a0982af6c8202c5d51fd4c537ba7c9257f37149c3ad6e9b6100659f3a6308f52
name: python-cosmonaut
arch: src
version: 0.0.2
epoch: 0
release: 1
summary: Helping you find structure in the cosmos of data.
url: https://github.com/am1tyadav/cosmonaut
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cosmonaut-0.0.2-1.src.rpm
checksum_type: sha256
description:
  ![Image](assets/cosmonaut_header.jpg)

  Helping you find structure in the cosmos of data.

  Cosmonaut is a tool for creating classifiers for unstructured data. Bring you own AI provider, provide minimal configuration, and get started in minutes.

  > Cosmonaut is currently in active development, and may not be suitable for production use.





  | Scenario                          | Description                                        | Example                                                                         |
  | --------------------------------- | -------------------------------------------------- | ------------------------------------------------------------------------------- |
  | Single label, individual category | Assigns one label from a single category           | Sentiment classification: Positive, Negative, or Neutral                        |
  | Single label, multiple categories | Assigns one label for each of multiple categories  | Topic: Tech/Finance/Health AND Sentiment: Positive/Negative                     |
  | Multi label, individual category  | Assigns multiple labels from a single category     | Topic tags: Can select any combination of Tech, Finance, and Health             |
  | Multi label, multiple categories  | Assigns multiple labels across multiple categories | Topics: Tech + Finance AND Languages: English + Spanish (multiple per category) |



  - Predictions are returned in structured outputs ✅
  - Supports structured outputs feature provided by the AI Providers, when available ⏳



  - Text ✅
  - Images ⏳
  - Audio ⏳
  - Video ⏳



  - Anthropic
    - Via Official REST API ✅
  - Gemini
    - Via Official REST API ⏳
    - Via OpenAI Compatible REST API ✅
  - OpenAI
    - Via Official REST API ✅
  - Support for other providers with OpenAI compatible REST API ✅



  - Configuration file generation via CLI ✅
  - Examples ✅



  Install Cosmonaut:

  ```bash
  pip install git+https://github.com/am1tyadav/cosmonaut.git
  ```



  Provided you have a configuration file (eg. [config.yml](https://github.com/am1tyadav/cosmonaut/tree/main/examples/single_label/config.yml)) describing your classification problem, and have a Pandas DataFrame for the inputs, you can run Cosmonaut with:

  ```python
  from pathlib import Path
  import pandas as pd
  from cosmonaut import Cosmonaut

  config_filepath: Path = ...
  inputs: pd.DataFrame = ...


  def create_prompt(row):
      return f"Some context about the input: {row['text']}"


  classifier = Cosmonaut(config_filepath, create_prompt)
  predictions = classifier.run(inputs)
  ```



  [Example Source Code](https://github.com/am1tyadav/cosmonaut/tree/main/examples/multi_label)

  A multi-label, single category classification problem allows each input to have multiple labels within the same category. In our example, we will classify "Gift Suggestions" based on a user's text description of their interests. Given a text input describing a user's preferences, the classifier will generate one or more appropriate gift suggestions as labels within the "Gift Suggestions" category.



  Cosmonaut expects the classification problem to be _described_ in a configuration file. Additionally, this config file is used to configure the AI provider. For this example, we will describe the classifier in the following way:

  ```yaml
  classifier:
    categories:
      0: # The ID of the category. In this example, we have just the one category
        name: Gift Suggestion # The name of the category
        description: A gift suggestion based on user preferences.
        max_predictions: 2 # The maximum number of predictions to generate for this category. We will generate up to 2 predictions for this category.
        labels:
          0: # The ID of the label. In this example, we have 4 labels
            name: Automobile # The name of the label
            description: a car, or any vehicle with 4 wheels
          1:
            name: Video Game
            description: a game played on a computer, console, or handheld device
          2:
            name: Book
            description: a book, or any written work
          3:
            name: Gift Card
            description: a gift card, or a gift certificate
  ```

  It is often a really good idea to provide a few examples to the AI provider. We can do this by adding a `examples` section to the configuration file:

  ```yaml
  classifier:
      examples:
        - prediction: # First example
            0: # The ID of the category the following prediction belongs to
              name: Gift Suggestion # The name of the category
              labels: # Predicted labels for this category
                1: # The ID of the label
                  name: Video Game # The name of the label
                  reason: The user is interested in video games. # The reason for the prediction
                3:
                  name: Gift Card
                  reason: The user likes to use gift cards to buy video games online.
      - prediction:
          0:
            name: Gift Suggestion
            labels:
              2:
                name: Book
                reason: The user likes to read books but don't have other interests.
  ```

  We have provided 2 examples - the first one has two predicted labels, and the second one has one label for the singular category.

  We also need to configure the AI provider:

  ```yaml
  ai_client:
    ai_provider: anthropic
    name: claude-3-5-sonnet-20241022
    api_key_var: ANTHROPIC_API_KEY # Please do not use the API key directly in your code. Instead, use an environment variable.
    base_url: https://api.anthropic.com/v1
    timeout: 10
    max_tokens: 2048
  ```

  And finally, we specify a column name for the predictions to be stored in:

  ```yaml
  data:
    result_column: result
  ```

  > 💡 Tip: While you can manually create the configuration file, a CLI is provided to generate the configuration file for you. After installing Cosmonaut, you can run `cosmonaut-config` to generate the configuration file interactively. Running `cosmonaut-config` will prompt you to enter the details of the classification problem and the AI provider.



  Now that the classifier is described, we need to provide the AI provider with instructions on how to generate the predictions. We can do this by creating a system instructions file. In the configuration file, we can specify the system instructions file to use:

  ```yaml
  classifier:
    instructions_filename: instructions.txt
    instructions: null
  ```

  Note that the `instructions` field is set to `null` because we will populating it when the config file is loaded.

  Next, we will create the instructions file:

  ```txt
  You are an expert gift recommender. You can recommend either one or two  gifts for a user given some information about their preferences.
  ```

  There is no need to provide any examples in the system instructions file as these will be created automatically from the examples provided in the configuration file.



  While the system prompt is populated automatically when we instantiate a `Cosmonaut` object, we need to create a prompt function that will be used to create the prompt for each input. This prompt function will be passed to the `Cosmonaut` object when it is instantiated. For this example, we will create the following prompt function:

  ```python
  def create_prompt(inputs: pd.Series) -> str:
      text = inputs["text"]
      return f"Please suggest one or two gifts for the following user: {text}"
  ```



  Finally, we can create a Cosmonaut classifier, and run it on some data. A full example is provided below:

  ```python
  from pathlib import Path
  from pprint import pprint

  import pandas as pd
  from dotenv import load_dotenv

  from cosmonaut import Cosmonaut



  load_dotenv()


  def create_prompt(inputs: pd.Series) -> str:
      text = inputs["text"]
      return f"Please suggest one or two gifts for the following user: {text}"


  if __name__ == "__main__":
      inputs = pd.DataFrame(
          {
              "text": [
                  (
                      "I am a 20 year old who likes to play video games."
                      "I buy them online often with gift cards that I get on my birthday."
                  ),
                  "I dont really do online shopping but I do like cars",
              ]
          }
      )

      config_filepath = Path(__file__).parent / "config.yml"
      classifier = Cosmonaut(config_filepath, create_prompt)
      response: pd.DataFrame = classifier.run(inputs)

      print(response.head())
  ```



  Cosmonaut uses Pandas to handle the input data - however, this can be a bottleneck when dealing with large datasets. Fortunately, we can use Dask, Ray or Spark to parallelize the data processing. Example(s) provided below.



  - [Single Label, Single Category Classification](https://github.com/am1tyadav/cosmonaut/tree/main/examples/single_label)
  - [Multi Label, Single Category Classification](https://github.com/am1tyadav/cosmonaut/tree/main/examples/multi_label)
  - [Multi Label, Multi Category Classification](https://github.com/am1tyadav/cosmonaut/tree/main/examples/multi_category)
  - [Distributed Predictions with PySpark](https://github.com/am1tyadav/cosmonaut/tree/main/examples/pyspark)



  Contributions are welcome - Please open an issue or submit a pull request. Please feel free to open issues for feature requests as well.

  Known issues:

  - No test coverage

rpm_license:
  MIT License  Copyright (c) 2024 Amit Yadav  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


pkgId: 37bf289d21935e3fed916d75f1388f060cfc4339817abcbfd39c05831c9642be
name: python-cosmonaut
arch: src
version: 0.0.6
epoch: 0
release: 1
summary: Helping you find structure in the cosmos of data.
url: https://github.com/am1tyadav/cosmonaut
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cosmonaut-0.0.6-1.src.rpm
checksum_type: sha256
description:
  ![Cosmonaut](assets/cosmonaut_header.jpg)

  Helping you find structure in the cosmos of data.

  Cosmonaut is a tool for creating classifiers for unstructured data. Bring you own AI provider, provide minimal configuration, and get started in minutes.

  > Cosmonaut is currently in active development, and may not be suitable for production use.



  - [Features](#features)
  - [Installation](#installation)
  - [Quickstart](#quickstart)
  - [Step by Step Example](#step-by-step-example)
  - [More Examples](#more-examples)
  - [Development](#development)
  - [WIP](#wip)





  - Single label - Classify an input with a single label
  - Multi label - Classify an input with multiple labels
  - Multi category, single label - Classify an input with multiple categories, each with a single label
  - Multi category, multi label - Classify an input with multiple categories, each with multiple labels



  - Predictions are returned in structured outputs
  - Supports structured outputs feature provided by the AI Providers, when available



  - Text
  - Images (coming soon)



  - Anthropic
  - Gemini
  - OpenAI
  - Support for other providers which support OpenAI REST API



  - Configuration file generation via CLI
  - Save fully built configurations for future use
  - Examples provided for common use cases



  Install Cosmonaut:

  ```bash
  pip install cosmonaut
  ```

  Or install the latest development version:

  ```bash
  pip install git+https://github.com/am1tyadav/cosmonaut.git
  ```



  Provided you have a configuration file (eg. [config.yml](https://github.com/am1tyadav/cosmonaut/tree/main/examples/single_label/config.yml)) describing your classification problem, and have a Pandas DataFrame for the inputs, you can run Cosmonaut with:

  ```python
  from cosmonaut import Cosmonaut


  def create_prompt(row: pd.DataFrame) -> str:
      return f"Some context about the input: {row['text']}"


  predictions = Cosmonaut("/config/filepath", create_prompt).run(...)
  ```



  [Example Source Code](https://github.com/am1tyadav/cosmonaut/tree/main/examples/multi_label)

  A multi-label, single category classification problem allows each input to have multiple labels within the same category. In our example, we will classify "Gift Suggestions" based on a user's text description of their interests. Given a text input describing a user's preferences, the classifier will generate one or more appropriate gift suggestions as labels within the "Gift Suggestions" category.



  Cosmonaut expects the classification problem to be _described_ in a configuration file. Additionally, this config file is used to configure the AI provider.

  Please take a look at one of the example configuration files to see what is required to describe the classification problem. [config.yml](https://github.com/am1tyadav/cosmonaut/blob/main/examples/multi_label/config.yml)

  In order to create the configuration file, we can use the CLI:

  ```bash
  cosmonaut-config
  ```

  Answer the questions, and a configuration file will be created for you.



  Now that the classifier is described, we need to provide the AI provider with instructions on how to generate the predictions. We can do this by creating a system instructions file. In the configuration file, we can specify the system instructions file to use:

  ```yaml
  classifier:
    instructions_filename: instructions.txt
  ```

  Next, we will create this instructions file:

  ```txt
  You are an expert gift recommender. You can recommend either one or two  gifts for a user given some information about their preferences.
  ```

  There is no need to provide any examples in the system instructions file as these will be created automatically from the examples provided in the configuration file.



  While the system prompt is populated automatically when we instantiate a `Cosmonaut` object, we need to create a prompt function that will be used to create the prompt for each input. This prompt function will be passed to the `Cosmonaut` object when it is instantiated. For this example, we will create the following prompt function:

  ```python
  def create_prompt(inputs: pd.DataFrame) -> str:
      text = inputs["text"]
      return f"Please suggest one or two gifts for the following user: {text}"
  ```



  Finally, we can create a Cosmonaut classifier, and run it on some data. A full example is provided below:

  ```python
  from pathlib import Path
  from pprint import pprint

  import pandas as pd
  from dotenv import load_dotenv

  from cosmonaut import Cosmonaut



  load_dotenv()


  def create_prompt(inputs: pd.DataFrame) -> str:
      text = inputs["text"]
      return f"Please suggest one or two gifts for the following user: {text}"


  if __name__ == "__main__":
      inputs = pd.DataFrame(
          {
              "text": [
                  (
                      "I am a 20 year old who likes to play video games."
                      "I buy them online often with gift cards that I get on my birthday."
                  ),
                  "I dont really do online shopping but I do like cars",
              ]
          }
      )

      config_filepath = Path(__file__).parent / "config.yml"
      response = Cosmonaut(config_filepath, create_prompt).run(inputs)

      print(response.head())
  ```

  You can expect to see something like the following output for each of the inputs:

  ```json
  {
    "success": true,
    "info": "success",
    "detail": null,
    "predictions": {
      "predictions": [
        {
          "category": "Gift Suggestion",
          "labels": [
            {
              "label": "Video Game",
              "reason": "The user explicitly states they enjoy playing video games and plays them frequently"
            },
            {
              "label": "Gift Card",
              "reason": "The user mentions they regularly use gift cards to purchase video games online"
            }
          ]
        }
      ]
    }
  }
  ```





  You can use a local model to make predictions as long as the model runner is compatible with the OpenAI REST API (eg. LM Studio).

  [Link](https://github.com/am1tyadav/cosmonaut/tree/main/examples/single_label)



  [Link](https://github.com/am1tyadav/cosmonaut/tree/main/examples/multi_label)



  Following examples uses a configuration that does not provide label descriptions or require reasons for predictions as both of these are optional.

  [Link](https://github.com/am1tyadav/cosmonaut/tree/main/examples/multi_category)



  Cosmonaut uses Pandas to handle the input data - however, this can be a bottleneck when dealing with large datasets. Fortunately, we can use Dask, Ray or Spark to parallelize the data processing. Following example uses PySpark to parallelize the data processing.

  [Link](https://github.com/am1tyadav/cosmonaut/tree/main/examples/pyspark)



  Contributions are welcome - Please open an issue or submit a pull request. Please feel free to open issues for feature requests as well. Some considerations when developing:

  - The project should support Python 3.10+
  - [trunk.io](https://trunk.io) is used but only as a linter



  - Unit Tests
  - Return usage information in the response
  - Support ingesting image data
  - Documentation
    - Code
    - Concepts
  - Examples
    - Artefact logging with MLFlow
    - Streaming Predictions with DuckDB

rpm_license:
  MIT License  Copyright (c) 2024 Amit Yadav  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


pkgId: 2c3d10542510d4ef750a56e56fac6d9e093dfc5953022a0bcf9598559239fb18
name: python-cosmos-wfm
arch: src
version: 2.13.11
epoch: 0
release: 1
summary: Workflow Management System
url: https://mizzou-cbmi.github.io/
rpm_license: GPL v3
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cosmos-wfm-2.13.11-1.src.rpm
checksum_type: sha256
description:
  Cosmos is a library for writing analysis pipelines, and is particularly suited pipelines which analyze next generation sequencing genomicdata. See https://github.com/Mizzou-CBMI/COSMOS2 for details.


pkgId: fe18c826e98238cfeff1e201076cf0547a342c0b07b74bf5b4b6c8eebe9df973
name: python-cosmosid-cli
arch: src
version: 2.1.17
epoch: 0
release: 1
summary: Command line interface (CLI) and Python 3 client library for interacting with the CosmosID API
url: https://www.cosmosid.com
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cosmosid-cli-2.1.17-1.src.rpm
checksum_type: sha256
description:
  Command line interface (CLI) and Python 3 client library for interacting with the CosmosID-HUB API. Only works with
  Python [3.6,3.7,3.8,3.9,3.10].





  * python3
  * python3-pip



  * poetry



  This package provides:

  * core Python 3 client library;
  * a simple CLI for interacting with the CosmosID-HUB API;



  The CLI with the core Python library can be installed using `pip3`.

  * simply run from console `sudo pip3 install cosmosid_cli`

  > Note: pip3 and setuptools should be upgraded to latest version. Please update those packages on you workstation
  > regarding to your OS update process before setup CosmosID-HUB CLI.
  >
  > ```shell
  > E.g. for Ubuntu 14.04 perform following steps:
  > $ sudo apt-get update
  > $ sudo apt-get upgrade
  > $ sudo -H pip3 install -U pip setuptools
  >```
  >
  > If you had have previously installed CosmosID-HUB CLI just upgrade CLI
  > to latest version.
  >
  > ```shell
  > $ sudo -H pip3 install --upgrade cosmosid_cli
  > ```

  To install package locally from folder with source files do the following:

  * install `poetry` check the [doc](https://python-poetry.org/docs/#osx--linux--bashonwindows-install-instructions)
  * `cd cosmosid-cli/package/`
  * `poetry install`


  Assure that you have Conda already installed or install it based on your system requirements - [link](https://docs.anaconda.com/anaconda/install/ )

  Follow the [cosmosid project page](https://anaconda.org/cosmosid/cosmosid-cli) to check the last version of cosmosid-cli available on Anaconda.org

  The CLI with Conda can be installed by the following command:
  ```shell
  conda install -c cosmosid -c conda-forge cosmosid-cli
  ```

  Verify the CLI version installed
  ```shell
  cosmosid --version
  ```



  The CosmosID-HUB CLI supports authentication via CosmosID-HUB API Key.
  Your API key can be found on the [CosmosID-HUB profile page](https://app.cosmosid.com/settings).
  To automatically authenticate via CosmosID-HUB API Key you should create
  credential file `~/.cosmosid` and store your API Key into it in
  the following format:

  ```json
  {
    "api_key": "<your api key string>"
  }
  ```

  You can directly use your CosmosID-HUB API Key, rather than storing it in a credential file. To use API Key authentication,
  pass your key as an argument to the `cosmosid` command:

  ```shell
  cosmosid --api_key=YOUR_API_KEY <command>
  ```

  CLI supports files of following extensions: 'fasta', 'fna', 'fasta.gz', 'fastq', 'fq', 'fastq.gz', 'bam', 'sra'



  There are several types of commands supported by the CosmosID-HUB CLI

  1. Commands for retrieving data to terminal (output) from CosmosID cloud - files, runs, analysis.
  2. Commands for uploading metagenomics or amplicon samples to
     CosmosID cloud for analysis - uploads.
  3. Commands for retrieving the reports archive from CosmosID cloud - reports

  > Note: Each command has options. To get usage information for each CosmosID-HUB CLI command, the user can simply
  > run `cosmosid <command> --help`



  The command to make a new directory or sub-directory. See --help for options:

  ```
  usage: cosmosid mkdir [-h] [--parent PARENT] [--name NAME]

  Make a new directory in a given directory.

  options:
    -h, --help            show this help message and exit
    --parent PARENT, -p PARENT
                          ID of the parent directory. Default: Root
    --name NAME, -n NAME
                          Name of the new directory
  ```
  Example to create a `New` in some parent (`41dad2d0-dcf2-429c-8e06-1ebea192985d`):
  ```shell
  cosmosid --api_key=your-key mkdir -n New -p 41dad2d0-dcf2-429c-8e06-1ebea192985d
  ```



  The commands for retrieving data have options for output format. The user can get data into the terminal (or another
  output) in a different format - csv, json, table, value, yaml (table is default), and specify the column(s) to show. In
  additional there are CSV format options, user can quote
  or unquote or partly quote output values - all, minimal, none, non-numeric (by default only non-numeric values are
  quoted)

  Example of output for the --help options for the <files> command:

  ```shell
  $ cosmosid files --help
  usage: cosmosid files [-h] [-f {csv,json,table,value,yaml}] [-c COLUMN]
                        [--noindent] [--max-width <integer>] [--fit-width]
                        [--print-empty] [--quote {all,minimal,none,nonnumeric}]
                        [--parent PARENT]
                        [--order {type,name,id,status,size,created}] [--up]

  Show files in a given directory.

  optional arguments:
    -h, --help            show this help message and exit
    --parent PARENT, -p PARENT
                          ID of the parent directory. Default: Root
    --order {type,name,id,status,reads,created}, -o {type,name,id,status,size,created}
                          field for ordering
    --up                  order direction

  output formatters:
    output formatter options

    -f {csv,json,table,value,yaml}, --format {csv,json,table,value,yaml}
                          the output format, defaults to table
    -c COLUMN, --column COLUMN
                          specify the column(s) to include, can be repeated

  json formatter:
    --noindent            whether to disable indenting the JSON

  table formatter:
    --max-width <integer>
                          Maximum display width, 1 to disable. You can also use
                          the CLIFF_MAX_TERM_WIDTH environment variable, but the
                          parameter takes precedence.

    --fit-width       Fit the table to the display width. Implied if --max-
                          width greater than 0. Set the environment variable
                          CLIFF_FIT_WIDTH=1 to always enable

   --print-empty     Print empty table if there is no data to show.

  CSV Formatter:
    --quote {all,minimal,none,nonnumeric} when to include quotes, defaults to nonnumeric
  ```

  To retrieve files (samples) stored in CosmosID simply run the `cosmosid` command with a `files` subcommand. For example:

  ```shell

  cosmosid files


  cosmosid files --parent=<folder_id>


  cosmosid files --parent=<folder_id> --order size --up
  ```



  An each file (sample) stored in CosmosID has one or more Sample Run(s) associated with it.

  Example of output for the --help options for the <runs> command:

  ```shell
  $ cosmosid runs --help

  usage: cosmosid runs [-h] [-f {csv,json,table,value,yaml}] [-c COLUMN] [--quote {all,minimal,none,nonnumeric}] [--noindent] [--max-width <integer>]
                       [--fit-width] [--print-empty] [--sort-column SORT_COLUMN] [--sort-ascending | --sort-descending] --id ID [--order {id,status,created}] [--up]

  Show List Of Runs for a given File.

  optional arguments:
    -h, --help            show this help message and exit
    --id ID, -i ID
                          ID of the sample
    --order {id,status,created}, -o {id,status,created}
                          field for ordering
    --up                  order direction

  output formatters:
    output formatter options

    -f {csv,json,table,value,yaml}, --format {csv,json,table,value,yaml}
                          the output format, defaults to table
    -c COLUMN, --column COLUMN
                          specify the column(s) to include, can be repeated to show multiple columns
    --sort-column SORT_COLUMN
                          specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated
    --sort-ascending      sort the column(s) in ascending order
    --sort-descending     sort the column(s) in descending order

  CSV Formatter:
    --quote {all,minimal,none,nonnumeric}
                          when to include quotes, defaults to nonnumeric

  json formatter:
    --noindent            whether to disable indenting the JSON

  table formatter:
    --max-width <integer>
                          Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.
    --fit-width           Fit the table to the display width. Implied if --max-width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable
    --print-empty         Print empty table if there is no data to show.
  ```


  For example:
  To retrieve sample run(s) associated with a file simply run the `cosmosid` command with `runs` subcommand.

  ```shell

  cosmosid runs --id=<file_id>



  Runs list for file example_2.fastq.gz (id: 5020a209-30b8-4fb3-bd78-b9fa1cd9f3ae)

  +--------------------------------------+---------------------+---------------+------------------+---------+--------------------------------------+
  | id                                   | created             | workflow_name | workflow_version | status  | artifact_types                       |
  +--------------------------------------+---------------------+---------------+------------------+---------+--------------------------------------+
  | a3dfe717-15d0-5053-a5b7-5c24597b73b4 | 2022-05-16 17:41:13 | ura           | 1.0.0            | Success | ura                                  |
  | d722bfcb-a3e7-4617-9141-20f5168e8c2f | 2022-05-16 17:40:15 | amr_vir       | 1.0.0            | Success | functional-pathway,functional-goterm |
  +--------------------------------------+---------------------+---------------+------------------+---------+--------------------------------------+
  ```



  The CosmosID-HUB CLI supports uploading sample files into CosmosID for analysis.
  CosmosID supports the following file formats and extension names:
  .fasta, .fna, .fasta.gz, .fastq, .fq, .fastq.gz, bam, bam.gz, sra, sra.gz. (SRA files can be uploaded without extension)

  CosmosID supports the following types of analysis:

  * Metagenomics
  * Amplicon - 16S or ITS (only 16S and ITS supported for now)

  > Note: you can get usage help for each command and arguments of CosmosID-HUB CLI by simply runnig `cosmosid --help`
  > or `cosmosid <command> --help`

  ```shell

  usage: cosmosid upload [-h] [--file FILE] [--parent PARENT] --type {metagenomics,amplicon-16s,amplicon-its}
                         [-wf WORKFLOW] [--forward-primer FORWARD_PRIMER] [--reverse-primer REVERSE_PRIMER]
                         [--amplicon-preset {v1_v3,v3_v4,v4}]
                         [--host-name {human:2.0.0,human:1.0.0,dog:2.0.0,domestic_cat:2.0.0,cow:1.0.0,chicken:2.0.0,mouse:2.0.0,monkey:2.0.0,cattle:2.0.0,pig:2.0.0}]
                         [--dir DIR]

  Upload files to cosmosid.

  optional arguments:
    -h, --help            show this help message and exit
    --file FILE, -f FILE
                          file(s) for upload. Supported file types: fasta, fna, fasta.gz, fastq, fq, fastq.gz, bam, sra e.g. cosmosid upload
                          -f /path/file1.fasta -f /path/file2.fn
    --parent PARENT, -p PARENT
                          cosmosid parent folder ID for upload
    --type {metagenomics,amplicon-16s,amplicon-its}, -t {metagenomics,amplicon-16s,amplicon-its}
                          Type of analysis for a file
    -wf WORKFLOW, --workflow WORKFLOW
                          To specify multiple workflows, define them coma separated without any additional symbols.For example:
                          -wf amr_vir,taxa
                          To specify workflow verions, define it by ':'. For example:
                          -wf taxa:1.1.0,amr_vir

    --forward-primer FORWARD_PRIMER
                          Only for 'ampliseq' workflow
    --reverse-primer REVERSE_PRIMER
                          Only for 'ampliseq' workflow
    --amplicon-preset {v1_v3,v3_v4,v4}
                          Only for 'ampliseq' workflowv1_v3:
                          - forward_primer: AGAGTTTGATCCTGGCTCAG
                          - reverse_primer: ATTACCGCGGCTGCTGG
                          v3_v4:
                          - forward_primer: CCTACGGGRSGCAGCA
                          - reverse_primer: GACTACHVGGGTATCTAATCC
                          v4:
                          - forward_primer: GTGYCAGCMGCCGCGGTAA
                          - reverse_primer: GGACTACHVGGGTWTCTAAT
    --host-name {human:2.0.0,human:1.0.0,dog:2.0.0,domestic_cat:2.0.0,cow:1.0.0,chicken:2.0.0,mouse:2.0.0,monkey:2.0.0,cattle:2.0.0,pig:2.0.0}
                          Name for host removal.
                          *Available only for type `metagenomics`
                          human:2.0.0 - Human 2.0.0 (GCF_009914755.1_T2T-CHM13v2.0)
                          human:1.0.0 - Human 1.0.0 (GRCh38_p6)
                          dog:2.0.0 - Dog (GCF_014441545.1_ROS_Cfam_1.0)
                          domestic_cat:2.0.0 - Domestic Cat (GCF_018350175.1_F.catus_Fca126_mat1.0)
                          cow:1.0.0 - Cow (GCF_002263795l_1_ARS-UCD1_2)
                          chicken:2.0.0 - Chicken (GCF_016699485.2_bGalGal1.mat.broiler.GRCg7b)
                          mouse:2.0.0 - Mouse (GCF_000001635.27_GRCm39)
                          monkey:2.0.0 - Monkey (GCF_003339765.1_Mmul_10)
                          cattle:2.0.0 - Cattle (GCF002263795.2 - ARS-UCD1.3)
                          pig:2.0.0 - Pig (GCF_000003025.6_Sscrofa11.1)
    --dir DIR, -d DIR
                          directory with files for upload e.g. cosmosid upload -d /path/my_dir

  ```

  To upload sample file to CosmosID run `cosmosid` command with `upload` subcommand. By default samples will be uploaded
  into root folder. To upload sample into specific *existing* folder you must use id of the folder as parameter.
  The CosmosID-HUB CLI supports uploading multiple Single-Read and Paired-End samples. For Paired-End samples, the CLI
  automatically parse and merge samples in pairs if the samples follow the naming conventions like: xxx_R1.fastq and
  xxx_R2.fastq OR xxx_R1_001.fastq and xxx_R2_001.fastq. Note: Paired-End samples require "fastq" format

  To upload all samples from folder run `cosmosid upload` command with path to folder specified by --dir/-d parameter
  > Note: _This command respects Paired-End samples grouping with the same rules as for regular upload_

  > Note: _The default workflow is `taxa`_, that is not allowed for amplicon samples, and should be overriden by `--workflow` argument.

  > Note: _You can view all possible workflows by `workflow` command

  Running example:

  `cosmosid upload --type metagenomics -f /pathtofile/test1_R1.fastq` -f /pathtofile/test1_R2.fastq -f
  /pathtofile/test2.fasta

  ```shell

  cosmosid upload --file <path to file> --type metagenomics


  cosmosid upload --file <path to file-1> --parent <folder id> --type amplicon-16s


  cosmosid upload -d /home/user/samples/ --type metagenomics


  cosmosid upload --file <path to file> --type metagenomics --host-name <host name>


  cosmosid upload --file <path to file> --type amplicon-16s --workflow ampliseq --amplicon-preset <preset>
  cosmosid upload --file <path to file> --type amplicon-16s --workflow ampliseq --forward-primer <forward primer> --reverse-primer <reverse primer>

  ```

  > Note: uploading of a big file takes time, please be patient
  > Available host names: human:2.0.0, human:1.0.0, dog:2.0.0, domestic_cat:2.0.0, cow:1.0.0, chicken:2.0.0, mouse:2.0.0, monkey:2.0.0, cattle:2.0.0, pig:2.0.0

  Once file has been uploaded to CosmosID the analyzing process will automatically begin.
  You can check the status of metagenomics analysis on the page [CosmosID Samples](https://app.cosmosid.com/samples).
  Amplicon analysis results available only from CosmosID-HUB CLI for now.



  To view workflows, that can be used for `upload` command, you can use `workflows` command:

  ```shell
  cosmosid workflows
  ```

  Result:
  ```
  Using base URL: https://app.cosmosid.com
  +---------------+---------+----------------------------+---------------------------------------------------------------------------------------------------------------+
  | Name          | Version | Sample Type                | Description                                                                                                   |
  +---------------+---------+----------------------------+---------------------------------------------------------------------------------------------------------------+
  | amplicon_its  | 1.0.0   | Amplicon ITS               | Amplicon ITS workflow allows you to characterize the fungi in a microbial community based on ITS              |
  |               |         |                            | (internal transcribed spacer) region with a genus to species taxonomic resolution of fungi.                   |
  | ampliseq      | 1.0.0   | Amplicon 16S               | Amplicon 16S workflow allows you to characterize the bacteria in a microbial community based on 16S           |
  |               |         |                            | rRNA marker gene with a genus to species taxonomic resolution of bacteria.                                    |
  |               |         |                            |                                                                                                               |
  |               |         |                            | Please be advised, we recommend running Amplicon 16S workflow with a batch of sequencing data that has        |
  |               |         |                            | been generated from the same sequencing run. Running the Amplicon 16S workflow in a group of samples          |
  |               |         |                            | from the same sequencing run allows for more accurate error correction and denoising because it takes         |
  |               |         |                            | advantage of the technical variability present within the sequencing run. This variability can be used        |
  |               |         |                            | to identify and correct errors that are specific to the sequencing run, rather than errors that are           |
  |               |         |                            | specific to individual samples. That&#39;s why running Amplicon 16S with only 1 sample may not yield          |
  |               |         |                            | successful results.                                                                                           |
  | amr_vir       | 1.0.0   | Shotgun metagenomics (WGS) | The AMR and Virulence Marker workflow allows you to characterize the antimicrobial and virulence genes        |
  |               |         |                            | in the microbiome community.                                                                                  |
  | amr_vir       | 1.1.0   | Shotgun metagenomics (WGS) | None                                                                                                          |
  | bacteria_beta | 1.0.0   | Shotgun metagenomics (WGS) | The Bacteria Beta 2.1.0 workflow allows you to characterize the composition of the bacterial community        |
  |               |         |                            | in your sample with our new Bacterial Beta Database 2.1.0.                                                    |
  | functional    | 1.0.0   | Shotgun metagenomics (WGS) | The Functional workflow allows you to leverage the power of the MetaCyc Pathway and Gene Ontology             |
  |               |         |                            | databases to characterize and predict the functional potential of the underlying microbiome community.        |
  |               |         |                            |                                                                                                               |
  |               |         |                            | If you are planning to run Functional 1.0 workflow for your data, please consider running Functional          |
  |               |         |                            | 2.0 since Functional 1.0 will be phased out and will be unavailable on the HUB in 6 months time.              |
  | kepler        | 1.0.0   | Shotgun metagenomics (WGS) | We are delighted to present the newest edition of our Taxa Workflow, "Taxa-Kepler". The taxa                  |
  |               |         |                            |       workflow has been upgraded to effectively merge the sensitivity and precision of our k-mer methodology  |
  |               |         |                            |       with our novel Probabilistic Smith-Waterman read-alignment approach. The resulting integration not only |
  |               |         |                            |       augments the ability to estimate taxa abundance but also enhances the classification accuracy and       |
  |               |         |                            |       precision. Experience accurate microbiome community characterization with "Taxa-Kepler"                 |
  | kepler        | 1.1.0   | Shotgun metagenomics (WGS) | None                                                                                                          |
  | kepler_domain | 1.1.0   | Shotgun metagenomics (WGS) | None                                                                                                          |
  | taxa          | 1.1.0   | Shotgun metagenomics (WGS) | The Taxa workflow allows you to leverage the power of the CosmosID taxonomic databases to characterize        |
  |               |         |                            | the microbiome community with strain level resolution across multiple kingdoms.                               |
  | taxa          | 1.2.0   | Shotgun metagenomics (WGS) | The Taxa workflow allows you to leverage the power of the CosmosID taxonomic databases to characterize        |
  |               |         |                            | the microbiome community with strain level resolution across multiple kingdoms.                               |
  +---------------+---------+----------------------------+---------------------------------------------------------------------------------------------------------------+

  ```



  Analysis results can be retrieved from CosmosID by useing run id or file id. The latest run analysis results will be
  retrieved when file id used.
  To retrieve analysis results for a specified run in CosmosID simply run `cosmosid` command with `analysis` subcommand.

  ```shell
  $ cosmosid analysis --help
  usage: cosmosid analysis [-h] [-f {csv,json,table,value,yaml}] [-c COLUMN] [--quote {all,minimal,none,nonnumeric}] [--noindent] [--max-width <integer>]
                           [--fit-width] [--print-empty] [--sort-column SORT_COLUMN] [--sort-ascending | --sort-descending] [--id ID] [--run_id RUN_ID]
                           [--order {database,id,strains,strains_filtered,status}] [--up]

  Show Analysis for a given file.

  optional arguments:
    -h, --help            show this help message and exit
    --id ID, -i ID
                          ID of a file
    --run_id RUN_ID, -r RUN_ID
                          ID of a sample run
    --order {database,id,strains,strains_filtered,status}, -o {database,id,strains,strains_filtered,status}
                          field for ordering
    --up                  order direction

  output formatters:
    output formatter options

    -f {csv,json,table,value,yaml}, --format {csv,json,table,value,yaml}
                          the output format, defaults to table
    -c COLUMN, --column COLUMN
                          specify the column(s) to include, can be repeated to show multiple columns
    --sort-column SORT_COLUMN
                          specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated
    --sort-ascending      sort the column(s) in ascending order
    --sort-descending     sort the column(s) in descending order

  CSV Formatter:
    --quote {all,minimal,none,nonnumeric}
                          when to include quotes, defaults to nonnumeric

  json formatter:
    --noindent            whether to disable indenting the JSON

  table formatter:
    --max-width <integer>
                          Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.
    --fit-width           Fit the table to the display width. Implied if --max-width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable
    --print-empty         Print empty table if there is no data to show.
  ```


  For example:

  ```shell

  cosmosid analysis --id=<file ID>


  cosmosid analysis --run_id=<run ID>


  cosmosid analysis --id=<file ID> --order created --up
  ```

  > Note: There is no analysis results for Amplicon 16S and Amplicon ITS sample. Use report generation instead of getting
  > list of analysis for Amplicon 16S and Amplicon ITS.



  The CosmosID-HUB CLI supports retrieving the archive of analysis reports from CosmosID for a given `File ID` with a
  given `Run ID` and saving the archive to a given file.

  To retrieve an analysis report archive with TSV files run the `cosmosid` command with `reports` subcommand.

  ```shell
  $ cosmosid reports --help
  usage: cosmosid reports [-h] --id ID [--timeout TIMEOUT]
                          [--output OUTPUT | --dir DIR]

  Get analysis reports TSV

  optional arguments:
    -h, --help            show this help message and exit
    --id ID, -i ID
                          ID of cosmosid sample.
    --timeout TIMEOUT, -t TIMEOUT
                          The timeout in seconds. Default: 5 minutes.
    --output OUTPUT, -o OUTPUT
                          output file name. Must have .zip extension. Default: is equivalent to cosmosid file name.
    --dir DIR, -d DIR
                          Output directory for a file. Default: is current directory.
  ```

  For example:

  ```shell


  cosmosid reports --id=<file ID>



  cosmosid reports --id=<file ID> --run_id=<run ID>



  cosmosid reports --id=<file ID> --run_id=<run ID> --dir ~/cosmosid/reports



  cosmosid reports --id=<file ID> --output /tmp/analysis_report.zip
  ```



  Artifacts results can be retrieved from CosmosID by using run id.
  To retrieve artifacts results for a specified run in CosmosID simply run `cosmosid` command with `artifacts` subcommand.
  ```shell
  $ cosmosid artifacts --help
  usage: cosmosid artifacts [-h] [-f {csv,json,table,value,yaml}] [-c COLUMN] [--quote {all,minimal,none,nonnumeric}] [--noindent] [--max-width <integer>]
                            [--fit-width] [--print-empty] [--sort-column SORT_COLUMN] [--sort-ascending | --sort-descending] --run_id RUN_ID [--type {fastqc-zip}]
                            [--url] [--output OUTPUT] [--dir DIR]

  Show Artifacts for a given file.

  optional arguments:
    -h, --help            show this help message and exit
    --run_id RUN_ID, -r RUN_ID
                          ID of a sample run
    --type {fastqc-zip}, -t {fastqc-zip}
                          Artifact type to download
    --url                 show download url
    --output OUTPUT, -o OUTPUT
                          output file name. Must have .zip extension. Default: is equivalent to cosmosid file name.
    --dir DIR, -d DIR
                          Output directory for a file. Default: is current directory.

  output formatters:
    output formatter options

    -f {csv,json,table,value,yaml}, --format {csv,json,table,value,yaml}
                          the output format, defaults to table
    -c COLUMN, --column COLUMN
                          specify the column(s) to include, can be repeated to show multiple columns
    --sort-column SORT_COLUMN
                          specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated
    --sort-ascending      sort the column(s) in ascending order
    --sort-descending     sort the column(s) in descending order

  CSV Formatter:
    --quote {all,minimal,none,nonnumeric}
                          when to include quotes, defaults to nonnumeric

  json formatter:
    --noindent            whether to disable indenting the JSON

  table formatter:
    --max-width <integer>
                          Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.
    --fit-width           Fit the table to the display width. Implied if --max-width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable
    --print-empty         Print empty table if there is no data to show.
  ```


  For example:

  ```shell


  cosmosid artifacts --run_id=<run ID>


  cosmosid artifacts --run_id=<run ID> --type=fastqc-zip --dir /home/user



  cosmosid artifacts --run_id=<run ID> --type=fastqc-zip --output artifacts_report.zip


  cosmosid artifacts --run_id=<run ID> --type=fastqc-zip --dir /home/user --output artifacts_report.zip


  cosmosid artifacts --run_id=<run ID> --type=fastqc-zip --url
  ```



  Original samples can be downloaded from CosmosID by using samples_ids.
  To download samples for a specified samples_id in CosmosID simply run `cosmosids` command with `download` subcommand.

  > Note: We recommend installing pycurl for the best experience with a sample download,
  > see: http://pycurl.io/docs/latest/index.html#installation

  ```shell
  $ cosmosid download --help
  usage: cosmosid download [-h] [-f {csv,json,table,value,yaml}] [-c COLUMN] [--quote {all,minimal,none,nonnumeric}] [--noindent] [--max-width <integer>]
                           [--fit-width] [--print-empty] [--sort-column SORT_COLUMN] [--sort-ascending | --sort-descending] [--samples_ids SAMPLES_IDS]
                           [--input-file INPUT_FILE] [--dir DIR] [--no-display] [--concurrent-downloads CONCURRENT_DOWNLOADS]

  Download Samples for a given samples ids.

  optional arguments:
    -h, --help            show this help message and exit
    --samples_ids SAMPLES_IDS, -s SAMPLES_IDS
                          Comma separated list of samples uuids
    --input-file INPUT_FILE
                          Path to file with samples' ids
    --dir DIR, -d DIR
                          Output directory for a file. Default: is current directory.
    --no-display          Disable displaying loading process
    --concurrent-downloads CONCURRENT_DOWNLOADS
                          Limit concurrent files downloads

  output formatters:
    output formatter options

    -f {csv,json,table,value,yaml}, --format {csv,json,table,value,yaml}
                          the output format, defaults to table
    -c COLUMN, --column COLUMN
                          specify the column(s) to include, can be repeated to show multiple columns
    --sort-column SORT_COLUMN
                          specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated
    --sort-ascending      sort the column(s) in ascending order
    --sort-descending     sort the column(s) in descending order

  CSV Formatter:
    --quote {all,minimal,none,nonnumeric}
                          when to include quotes, defaults to nonnumeric

  json formatter:
    --noindent            whether to disable indenting the JSON

  table formatter:
    --max-width <integer>
                          Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.
    --fit-width           Fit the table to the display width. Implied if --max-width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable
    --print-empty         Print empty table if there is no data to show.
  ```


  For example:

  ```shell


  cosmosid download --samples_ids=<sample_id>


  cosmosid download --samples_ids=<sample_id>,<sample_id> #separated by comma ","


  cosmosid download --samples_ids=<sample_id>,<sample_id> --dir=<path_to_directory>


  cosmosid download --samples_ids=<samples_id>,<sample_id> --no-display


  cosmosid download --samples_ids=<sample_id>,<sample_id> --concurrent-downloads=<quantity>


  cosmosid download --input-file=<path-to-file>

  ```

  > Note: You can specify chunk size by CHUNK_SIZE environment variable



  It's possible to view list of comparative analyses and download them.



  ```shell

  cosmosid comparatives --help

  usage: cosmosid comparatives [-h] [-f {csv,json,table,value,yaml}] [-c COLUMN] [--quote {all,minimal,none,nonnumeric}] [--noindent] [--max-width <integer>]
                               [--fit-width] [--print-empty] [--sort-column SORT_COLUMN] [--sort-ascending | --sort-descending]

  List of comparatives

  optional arguments:
    -h, --help            show this help message and exit

  output formatters:
    output formatter options

    -f {csv,json,table,value,yaml}, --format {csv,json,table,value,yaml}
                          the output format, defaults to table
    -c COLUMN, --column COLUMN
                          specify the column(s) to include, can be repeated to show multiple columns
    --sort-column SORT_COLUMN
                          specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated
    --sort-ascending      sort the column(s) in ascending order
    --sort-descending     sort the column(s) in descending order

  CSV Formatter:
    --quote {all,minimal,none,nonnumeric}
                          when to include quotes, defaults to nonnumeric

  json formatter:
    --noindent            whether to disable indenting the JSON

  table formatter:
    --max-width <integer>
                          Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.
    --fit-width           Fit the table to the display width. Implied if --max-width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable
    --print-empty         Print empty table if there is no data to show.
  ```

  Print list of comparatives generated using the comparative analysis menu:

  ```shell
  $ cosmosid comparative analyses --help
  usage: cosmosid comparative analyses [-h] [-f {csv,json,table,value,yaml}] [-c COLUMN] [--quote {all,minimal,none,nonnumeric}] [--noindent]
                                       [--max-width <integer>] [--fit-width] [--print-empty] [--sort-column SORT_COLUMN] [--sort-ascending | --sort-descending]
                                       [--comparative-id COMPARATIVE_ID]

  List of all comparative analyses outside comparatives (if there are no any comparative ids)

  optional arguments:
    -h, --help            show this help message and exit
    --comparative-id COMPARATIVE_ID
                          Comparatives' ids

  output formatters:
    output formatter options

    -f {csv,json,table,value,yaml}, --format {csv,json,table,value,yaml}
                          the output format, defaults to table
    -c COLUMN, --column COLUMN
                          specify the column(s) to include, can be repeated to show multiple columns
    --sort-column SORT_COLUMN
                          specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated
    --sort-ascending      sort the column(s) in ascending order
    --sort-descending     sort the column(s) in descending order

  CSV Formatter:
    --quote {all,minimal,none,nonnumeric}
                          when to include quotes, defaults to nonnumeric

  json formatter:
    --noindent            whether to disable indenting the JSON

  table formatter:
    --max-width <integer>
                          Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.
    --fit-width           Fit the table to the display width. Implied if --max-width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable
    --print-empty         Print empty table if there is no data to show.
  ```

  Example: print list of child comparatives generated under a parent comparative using metadata & cohorts menu

  ```shell
  $ cosmosid comparative analyses --comparative-id=<comparative_id>
  ```



  Export comparative analyses without log scale

  ```shell
  $ cosmosid comparative analyses export --help
  usage: cosmosid comparative analyses export [-h] --id ID [--tax-level {kingdom,order,phylum,class,family,genus,species,strain}] [--log-scale]
                                              [--concurrent-downloads CONCURRENT_DOWNLOADS] [--dir DIR]

  Download results of comparative analyses

  optional arguments:
    -h, --help            show this help message and exit
    --id ID       IDs of comparative analyses
    --tax-level {kingdom,order,phylum,class,family,genus,species,strain}
                          Taxonomy
    --log-scale           Includes results with logscale
    --concurrent-downloads CONCURRENT_DOWNLOADS
                          Limit concurrent files downloads
    --dir DIR, -d DIR
                          Output directory for a file. Default: is current directory.
  ```

  Example export comparative analyses with specified taxonomy level ('species' by default):

  ```shell
  $ cosmosid comparative analyses export --id=<analysis_id> --tax-level=class --tax-level=genus
  ```


pkgId: 31ce1f82acf2841f4db9ead96d0499e28653057a2ecdd1217652106526385348
name: python-cosmospl
arch: src
version: 0.0.12
epoch: 0
release: 1
summary: An alternative Azure Cosmos library with orjson, polars, and fastapi in mind
url: https://pypi.org/project/cosmospl/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cosmospl-0.0.12-1.src.rpm
checksum_type: sha256
description:
  * The MS library does excessive logging so (in my case), Azure Functions logs have to be turned off or are too costly
  https://github.com/Azure/azure-sdk-for-python/issues/12776

  * The MS library always converts the raw json into python lists and dicts immediately using built-in base `json`.

  * If running FastAPI then there is often no point to parsing cosmos results to python objects only for FastAPI to convert them right back to json.

  * Other libraries can parse json faster such as [orjson](https://github.com/ijl/orjson) for python lists and dicts or [polars](https://github.com/pola-rs/polars) to DataFrames. In my experience, polars is better at parsing raw json then row oriented python objects anyway.

  * When you try to read an item that doesn't exist, the MS lib raises an Error so checking if an item exists requires try/except blocks. I'd refer it return None or an empty list.



  Create a Cosmos DB instance
  ```
  from cosmospl import Cosmos

  cosdb = Cosmos('your_db_name', 'your_container_name', 'your_connection_string')


  df = await cosdb.query("select * from c", return_as='pl')
  ```


  All functionality is inside the `Cosmos` class which is similar to the container client in the MS SDK.

  For details please refer to the source.

  To initialize the class pass a database name, container name, and (optionally) the connection string to `Cosmos` as ordered arguments. If the connection string is omitted it'll use the `cosmos` environment variable.

  The methods in that class are:

  `query`: execute a query against the container. Use the `return_as` parameter to specify `pl` for polars dataframe, `dict` for dict/list, `resp` for the httpx response. Unlike MS, it returns everything in one call, it isn't an Async generator.

  `query_stream`: executes a query against the container. It returns an async generator of raw json. It is intended to be used in FastAPI streaming responses so it doesn't have to parse json or accumulate results before sending to end-user.

  In the case of both query methods, Cosmos returns a nested json where the data is inside a Documents key. In order to avoid parsing this in its entirety while only returning data, it looks for `Documents":[` and then only returns from there. Similarly at the end it truncates from  `,"_count"`.

  `create`: creates (not upserts) a record

  `upsert`: upserts a record

  `delete`: deletes a record

  `read`: will read one record based on input id and partition_key

  `get_container_meta`: returns meta data about the container

  `get_pk_ranges`: returns the pk ranges of the container. Can be useful for doing cross partition query requests in chunks using the `pk_id` parameter



  On the Cosmos python sdk page it says:

  > [WARNING] Using the asynchronous client for concurrent operations like shown in this sample will consume a lot of RUs very fast. We strongly recommend testing this out against the cosmos emulator first to verify your code works well and avoid incurring charges.



  1. (optionally) detect datetime columns and automatically convert to pl.Date or pl.Datetime
  2. save a df to cosmos directly (possibly) with metadata so columns can be restored to same types when loaded



  1. Add top level and database classes


pkgId: 1d297d362fe3f2c44d242a08358033dab9b17304467e2005fb94307602450d92
name: python-cosmospy
arch: src
version: 6.0.0
epoch: 0
release: 1
summary: Tools for Cosmos wallet management and offline transaction signing
url: https://github.com/hukkinj1/cosmospy
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-cosmospy-6.0.0-1.src.rpm
checksum_type: sha256
description:
  [![Build Status](https://github.com/hukkinj1/cosmospy/workflows/Tests/badge.svg?branch=master)](https://github.com/hukkinj1/cosmospy/actions?query=workflow%3ATests+branch%3Amaster+event%3Apush)
  [![codecov.io](https://codecov.io/gh/hukkinj1/cosmospy/branch/master/graph/badge.svg)](https://codecov.io/gh/hukkinj1/cosmospy)
  [![PyPI version](https://img.shields.io/pypi/v/cosmospy)](https://pypi.org/project/cosmospy)



  <!--- Don't edit the version line below manually. Let bump2version do it for you. -->

  > Version 6.0.0

  > Tools for Cosmos wallet management and offline transaction signing

  **Table of Contents**  *generated with [mdformat-toc](https://github.com/hukkinj1/mdformat-toc)*

  <!-- mdformat-toc start --slug=github --maxlevel=6 --minlevel=2 -->

  - [Installing](#installing)
  - [Usage](#usage)
    - [Generating a wallet](#generating-a-wallet)
    - [Converter functions](#converter-functions)
      - [Mnemonic seed to private key](#mnemonic-seed-to-private-key)
      - [Private key to public key](#private-key-to-public-key)
      - [Public key to address](#public-key-to-address)
      - [Private key to address](#private-key-to-address)
    - [Signing transactions](#signing-transactions)

  <!-- mdformat-toc end -->



  Installing from PyPI repository (https://pypi.org/project/cosmospy):

  ```bash
  pip install cosmospy
  ```





  ```python
  from cosmospy import generate_wallet

  wallet = generate_wallet()
  ```

  The value assigned to `wallet` will be a dictionary just like:

  ```python
  {
      "seed": "arch skill acquire abuse frown reject front second album pizza hill slogan guess random wonder benefit industry custom green ill moral daring glow elevator",
      "derivation_path": "m/44'/118'/0'/0/0",
      "private_key": b"\xbb\xec^\xf6\xdcg\xe6\xb5\x89\xed\x8cG\x05\x03\xdf0:\xc9\x8b \x85\x8a\x14\x12\xd7\xa6a\x01\xcd\xf8\x88\x93",
      "public_key": b"\x03h\x1d\xae\xa7\x9eO\x8e\xc5\xff\xa3sAw\xe6\xdd\xc9\xb8b\x06\x0eo\xc5a%z\xe3\xff\x1e\xd2\x8e5\xe7",
      "address": "cosmos1uuhna3psjqfxnw4msrfzsr0g08yuyfxeht0qfh",
  }
  ```





  ```python
  from cosmospy import BIP32DerivationError, seed_to_privkey

  seed = (
      "teach there dream chase fatigue abandon lava super senior artefact close upgrade"
  )
  try:
      privkey = seed_to_privkey(seed, path="m/44'/118'/0'/0/0")
  except BIP32DerivationError:
      print("No valid private key in this derivation path!")
  ```



  ```python
  from cosmospy import privkey_to_pubkey

  privkey = bytes.fromhex(
      "6dcd05d7ac71e09d3cf7da666709ebd59362486ff9e99db0e8bc663570515afa"
  )
  pubkey = privkey_to_pubkey(privkey)
  ```



  ```python
  from cosmospy import pubkey_to_address

  pubkey = bytes.fromhex(
      "03e8005aad74da5a053602f86e3151d4f3214937863a11299c960c28d3609c4775"
  )
  addr = pubkey_to_address(pubkey)
  ```



  ```python
  from cosmospy import privkey_to_address

  privkey = bytes.fromhex(
      "6dcd05d7ac71e09d3cf7da666709ebd59362486ff9e99db0e8bc663570515afa"
  )
  addr = privkey_to_address(privkey)
  ```



  ```python
  from cosmospy import Transaction

  tx = Transaction(
      privkey=bytes.fromhex(
          "26d167d549a4b2b66f766b0d3f2bdbe1cd92708818c338ff453abde316a2bd59"
      ),
      account_num=11335,
      sequence=0,
      fee=1000,
      gas=70000,
      memo="",
      chain_id="cosmoshub-3",
      sync_mode="sync",
  )
  tx.add_transfer(
      recipient="cosmos103l758ps7403sd9c0y8j6hrfw4xyl70j4mmwkf", amount=387000
  )
  tx.add_transfer(recipient="cosmos1lzumfk6xvwf9k9rk72mqtztv867xyem393um48", amount=123)
  pushable_tx = tx.get_pushable()
  ```

  One or more token transfers can be added to a transaction by calling the `add_transfer` method.

  When the transaction is fully prepared, calling `get_pushable` will return a signed transaction in the form of a JSON string.
  This can be used as request body when calling the `POST /txs` endpoint of the [Cosmos REST API](https://cosmos.network/rpc).


