semvec/pypi-packages huggingface dataset:
vhlsrs 0.0.95
Package to automate the synthesis of vivado HLS components
Requires Python: >=3.6

# vhlsrs

It means Vivado HLS run synthesis.

This package contains a script that runs vivado synthesis in a (somewhat)
reproducible way.

It also allow to search for the minimum pipeline depth design for a given clock
period constrain.

## Usage

### Experience description

The experience to run should be described in a .ini.

A complete experiment description looks like : 
```
[EXP_NAME]
comp_path=path/to/component/file.cpp
top_level_comp= Name of top level function
period= clock period in ns (float)
part= part code name (default is xc7k160tfbg484)
standard= c++ standard to use. (default is c++11)
includes=comma separated list of directories containing includes to use during the synthesis. optionnal.
defines=Key=comma separated list of key=value preprocessor macro that will be defined during synthesis
keep_env=True/False Should the synthesis environment be kept after the synthesis is performed. Default is False.
ip_lib= Name of the ip library to use when exporting the ip (optionnal)
ip_version= Version to use when exporting the ip (optionnal)
ip_descr= description that will be exported along the vivado ip (optionnal)
ip_vendor= vendor name for the exported vivado ip (optionnal)
latency= ltency constraint for the initial design (optionnal)
hdl= verilog|VHDL
no_pipeline=True|False if true the design will not be pipelined (default false)
no_inline=True|False if true the function call will not be inlined (default false)
ctrl_hs=True|False Block protocol will be ap_ctrl_hs if true, ap_ctrl_none else. Default false.
exp_type=hls|syn|impl until which phase is the experiment to be performed
```

### Running a one shot synthesis 

`python -m vhlsrs impl [expdescr.ini]`

will implement the experiments described in expdescr.ini either with a latency constraint if given or with the minimal latency estimated by the tool.


### Minimizing the latency

As vivado HLS is sometimes not very good at timing estimation, it can lead to overpessimistic latency.

the 
`python -m vhlsrs minimize [expdescr.ini]`

will attempt to find the lowest pipeline depth that still respect the clock constraints by dichotomy.
If a latency constraint is provided, it will start the exploration with a designed with this constraint. Otherwise, it will start the exploration with the latency estimated by the tool.
mongospawn 0.5.10
Spawn MongoDB resources from JSON Schema
Requires Python: >=3.6

`mongospawn` is a tool to help spawn MongoDB resources given JSON Schema
specifications.

The primary near-term use case is support for the [National Microbiome Data
Collaborative (NMDC)](https://microbiomedata.org/) pilot project. In particular,
given a JSON Schema with all array-typed properties and with each array item a
`$ref` reference to one of the JSON Schema `definitions` (see [NMDC
example](https://github.com/microbiomedata/nmdc-metadata/blob/d93d5f33b41d55a270dd014c8c27b18a6e804375/schema/nmdc.schema.json)),
`mongospawn` can generate MongoDB `$jsonSchema` documents to apply as validators
for collections in a database that correspond to each of the original JSON
Schema's array-typed properties. MongoDB's implementation of JSON Schema does
not support `$ref`, `definitions`, etc., so `mongospawn` expands references to
generate appropriate per-collection schema documents.

In addition to generating derived schema documents, `mongospawn` can spawn new
databases/collections, with schema validation set, via the `pymongo` driver, and
can also manage access to the spawned resources via `mongogrant`.

## Setup
For development:
```
pip install -e .[dev]
```

To update dependency versions:
```
make update
```

To use pinned dependencies for reproducible testing:
```
make
```

# Usage

Example using [NMDC's JSON
Schema](https://github.com/microbiomedata/nmdc-metadata/blob/d93d5f33b41d55a270dd014c8c27b18a6e804375/schema/nmdc.schema.json):

```python
from mongospawn.schema import dbschema_from_file, collschemas_for
from pymongo import MongoClient

client = MongoClient()
db = client.nmdc_test

dbschema = dbschema_from_file("nmdc.schema.json")
collschemas = collschemas_for(dbschema)
for name in collschemas:
    db.drop_collection(name)
    db.create_collection(name, validator={"$jsonSchema": collschemas[name]})
    print(f"created {name} collection")
# created activity_set collection
# created biosample_set collection
# created data_object_set collection
# created omics_processing_set collection
# created study_set collection
```

Now, e.g. if you try to insert a non-conformant JSON document, a
`pymongo.errors.WriteError` will be raised:
```python
db.biosample_set.insert_one({"not_a_real_field": 1})
# => WriteError: Document failed validation...
```