semvec/pypi-packages huggingface dataset:
allure-pytest-default-results 0.1.3
Generate default "unknown" results to show in Allure Report if test case does not run
Requires Python: >=3.8

[allure-pytest](https://pypi.org/project/allure-pytest/) only reports tests that were attempted

If a test case does not run (because the runner set up failed or because a CI job timed out on a previous test), the test case will be omitted from Allure Report.

This plugin creates default ["unknown" status](https://allurereport.org/docs/test-statuses/#unknown) results for each test case that's expected to run. After the tests run, the default result can be included for any test case that does not have an actual test result—so that those test cases show up as "unknown" in the Allure Report.

For example, to merge the actual test results with the default "unknown" results:
```python
import dataclasses
import json
import pathlib


@dataclasses.dataclass(frozen=True)
class Result:
    test_case_id: str
    path: pathlib.Path

    def __eq__(self, other):
        if not isinstance(other, type(self)):
            return False
        return self.test_case_id == other.test_case_id


actual_results = pathlib.Path("allure-results")
default_results = pathlib.Path("allure-default-results")

results: dict[pathlib.Path, set[Result]] = {
    actual_results: set(),
    default_results: set(),
}
for directory, results_ in results.items():
    for path in directory.glob("*-result.json"):
        with path.open("r") as file:
            id_ = json.load(file)["testCaseId"]
        results_.add(Result(id_, path))

actual_results.mkdir(exist_ok=True)

missing_results = results[default_results] - results[actual_results]
for default_result in missing_results:
    # Move to `actual_results` directory
    default_result.path.rename(actual_results / default_result.path.name)
```

As of 2025-01-31, the "unknown" status is not used by the allure-pytest adapter.

Upstream feature request to replace this plugin: https://github.com/allure-framework/allure-python/issues/821

## Usage
Generate default results
```
pytest --allure-default-dir=allure-default-results
```
berricake 0.1.3
a modular simulation software. 
Keywords: python, simulate, berricake, windows


# 软件名称

## <u>BerriCake</u>

## 概述

这是一个模块化构建能源系统仿真的实用工具库，计划用来构建光伏、风力发电等系统，后续会补充其他可再生能源模块。

- 简单的光伏模块
- 简单的风力发电模块
- 阴影表面组计算模块

本软件依赖于 `scipy` 和 `numpy` 等科学计算库，以下是详细的安装和使用说明。

## 环境要求

- Python 3.12
- `pip` 包管理工具

```
colorama==0.4.6
numpy==2.2.5
scipy==1.15.2
setuptools==79.0.0
```

## 安装程序

```commandline
pip install barricake
```



## 使用示例

首先编辑配置文件示例

```
!- in.txt
! 地点信息部分
Site,
    Shenyang,          !- 站点名称
    8,                 !- 时区
    41.8,              !- 纬度（单位：度）
    123.43,            !- 经度（单位：度）
    45;                !- 海拔高度（单位：米）

! 模拟控制相关设置
SimulationControl,
    No,                !- 是否针对 sizing periods 运行模拟，No 表示不运行
    Yes,               !- 是否针对 run periods 运行模拟，Yes 表示运行
    50;                !- 每个模拟步骤的最大迭代次数

! 时间步长设置
Timestep,
    3600.0;            !- 每个时间步长的秒数

! 运行周期设置
RunPeriod,
    Annual_Simulation_2025,  !- 运行周期名称
    2025,               !- 开始年份
    1,                  !- 开始月份
    1,                  !- 开始日期（当月的第几天）
    2025,               !- 结束年份
    12,                 !- 结束月份
    31;                 !- 结束日期（当月的第几天）

! EPW 文件读取器设置
EPWReader,
    weather_shenyang,                       !- 名称
    CHN_Liaoning.Shenyang.543420_CSWD.epw;  !- EPW 文件路径

! 风力模块设置
WindModule,
    wind,  !- 风力模块名称
    1,     !- 风力发电容量（单位：千瓦）
    0;     !- 风速（单位：米/秒）

! 输出设置
Output,
    out,                             !- 输出名称
    C:\Users\29574\Desktop\out.csv,  !- 输出文件路径
    wind_power;                      !- 输出变量名称

! 链接设置，连接气象数据的风速变量到风力模块的风速变量
Link,
    weather_shenyang,      !- 源对象名称（来自气象数据文件读取器）
    wind_speed,            !- 源对象的变量名称（风速）
    wind,                  !- 目标对象名称（风力模块）
    wind_speed;            !- 目标对象的变量名称（风速）

! 链接设置，连接风力模块的功率变量到输出文件的风力功率变量
Link,
    wind,                  !- 源对象名称（风力模块）
    power,                 !- 源对象的变量名称（功率）
    out,                   !- 目标对象名称（输出模块）
    wind_power;            !- 目标对象的变量名称（风力功率）
```

> 上述输入文件配置了3类对象，分别是全局参数、基本组件和链接。

然后创建代码

```python
# -*- coding: utf-8 -*-
from core.berricake import BerriCake

if __name__ == "__main__":
    file_path = 'in.txt'      # 输入文件路径
    bc = BerriCake(file_path) # 创建 Manager 实例
    bc.run()                  # 运行
```




# 更新日志

2025-05-01 `0.1.3`  新增简单的光伏计算模块
2025-04-28 `0.1.2`  第一个能正常运行的版本 
2025-04-28 `0.1.0`  第一个发布版本 删除了
Hikvision-OpenAPI-Signer 1.0.0
海康威视iSecure Center综合安防管理平台OpenAPI网关Artemis接口请求签名模块
Requires Python: >=3.9
Keywords: Hikvision, iSecure Center, OpenAPI, Artemis

# Hikvision-OpenAPI-Signer: 海康威视iSecure Center综合安防管理平台OpenAPI网关Artemis接口请求签名Python模块

## 功能

对OpenAPI网关Artemis接口请求进行签名。

## 安装

`pip install hikvision-openapi-signer`

## 示例

- 使用requests作为HTTP客户端
```python
>>> import requests
>>> from hikvision_openapi_signer import HikvisionOpenAPISigner
>>> signer = HikvisionOpenAPISigner("https://isc.example.com",
...     12345678, 'abcdefghijklmnopqrst', headers={'tagId': 0})
>>> method, url, headers, body = signer.sign('POST', '/api/resource/v1/org/advance/orgList',
...     jsons={'pageNo': 1, 'pageSize': 1}, accept='application/json')
>>> response = requests.request(method, url, headers=headers, data=body)
>>> response.json()
{'code': '0', 'msg': 'success', 'data': ...}
```

- 使用HTTPX作为异步HTTP客户端
```python
>>> import httpx
>>> from hikvision_openapi_signer import HikvisionOpenAPISigner
>>> client = httpx.AsyncClient()
>>> signer = HikvisionOpenAPISigner("https://isc.example.com",
...     12345678, 'abcdefghijklmnopqrst', headers={'tagId': 0})
>>> method, url, headers, body = signer.sign('POST', '/api/resource/v1/org/advance/orgList',
...     jsons={'pageNo': 1, 'pageSize': 1}, accept='application/json')
>>> response = await client.request(method, url, headers=headers, content=body)
>>> response.json()
{'code': '0', 'msg': 'success', 'data': ...}
```

## 参考文档

[综合安防管理平台（iSecure Center）文档](https://open.hikvision.com/docs/docId?productId=5c67f1e2f05948198c909700)
secure-proxy 0.8.0
Proxy orqali so‘rov yuborish uchun kutubxona
Requires Python: >=3.6

# **Secure Proxy Client**

`Secure Proxy Client` bu xavfsiz va bepul proksi orqali ma'lumotlarni olish uchun `async` kutubxona. Foydalanish uchun **token** talab qilinadi.

## 📌 **Xususiyatlari**
✅ Xavfsiz **proxy** orqali so'rov yuborish  
✅ **Async** yordamida tezkor ishlash  
✅ Video va boshqa fayllarni yuklab olish imkoniyati  

---

## 🔧 **O'rnatish**

```bash
pip install secure_proxy
```

---

## 🚀 **Foydalanish**

📌 **Kutubxona asinxron ishlaydi**, shuning uchun `async` kod yozish talab qilinadi. Quyidagi misolda video yuklab olish va saqlash jarayoni ko'rsatilgan.

```python
import asyncio
import aiofiles
from secure_proxy import SecureProxyClient

# 🔑 Proxy tokeningizni shu yerga yozing
PROXY_TOKEN = "your-proxy-token"

# 📌 Yuklab olinadigan video URL manzili
VIDEO_URL = "https://your-video-url.com/video.mp4"

# 📁 Saqlanadigan fayl nomi
OUTPUT_FILE = "video.mp4"

async def download_video():
    """ Video yuklab olish va saqlash """
    client = SecureProxyClient(proxy_token=PROXY_TOKEN)
    
    print("📥 Yuklab olinmoqda...")

    # 🔗 Proxy orqali video faylni yuklab olish
    content, status = await client.request(url=VIDEO_URL)
    
    if status != 200:
        print(f"❌ Xatolik: HTTP {status}")
        return

    # 💾 Faylni saqlash
    async with aiofiles.open(OUTPUT_FILE, "wb") as f:
        await f.write(content)

    print(f"✅ Video muvaffaqiyatli yuklandi! ({OUTPUT_FILE})")

if __name__ == "__main__":
    asyncio.run(download_video())
```

---

## 🎯 **Xulosa**
🚀 **Secure Proxy Client** yordamida **async** uslubida xavfsiz va tezkor **proxy orqali so'rov yuborish**, fayllarni yuklab olish va saqlash mumkin.

✅ **Oson o'rnatish**  
✅ **Asinxron ishlash**  
✅ **Tezkor video yuklab olish**  

❗ **Token olish uchun administrator bilan bog'laning!**  

---

**🔗 Bog'lanish**  
📧 Email: `abdujalilov2629@gmail.com`  
💬 Telegram: [@abduvohid_dev](https://t.me/abduvohid_dev)