ISTS3核心库

istsos的Python项目详细描述


#ISTSOS3

在这个存储库中,您可以找到ISTSOS3 python3模块。
按照说明,您将能够在计算机上运行并使用ISTSOS3的核心。
对于完整的打包版本,请转到(todo:dowload页的链接)。



要安装ISTSO3,可以使用pip:

`` bash
pip3安装ISTSO
````

《开发者安装指南》


如果您认为对开发有贡献,请在正式存储库中创建一个fork,然后将fork克隆到您的工作站上。

不是为了做一些测试,你可以直接克隆官方的存储库。

``bash
git clone https://github.com/istsos/istsos3.git
``````
install all the dependencies

``bash
sudo apt get install postgresql postgis python3 pip
````

特性:

``bash
sudo pip3 install lxml\
jsonschema\
python dateutil\
tornado\
psycopg2\
aiopg\
pytest
```

SQL文件
(postgresql 9.4\u istsos3.0.0.0.sql)可以在
`` istsos3/assets``文件夹中找到。


`` bash
sudo-u postgres createdb-e utf8 istsos3
sudo-u postgres psql-postsos3-a\
-f istsos3/istsos/istsos/assets/postgresql9.4\u istsos3.0.0.0.sqlbr/>```

设置postgres用户密码

``bash
sudo-u postgres psql
alter user postgres password'postgres';
````
ctrl-d退出psql控制台



根据加载程序属性创建配置文件。

``bash
cd istsos3
cp config-example.json config.json
```

编辑配置文件:

``json
{
"type":"aiopg"、
"host":"localhost"、
"port":"5432"、
"user":"postgres"、
"password":"postgres"、
"database":"istsos3"
}
```

使用[Townado网站](http://www.tornadowweb.org)进行网上试用[Townado网站](http://www.tornadowweb.http://www.tornadowweb.http://www.tornadowweb.org)进行网上试用

`` bash
python3实例/server-trando.py
`` ` `
收听http://localhost:8887/sos



lib使用:http://docs.pytest.org/en/latest/

/>//////////////////////todo-empoemprove this]
//是的st/folder在那里执行了与
相同的测试。


若要运行单个测试,请从
>终端执行此操作:


``bash
py test-s istsos/test/actions/actions/servers/sos-2-u 0/test-getcapabilitiesop.py
```


<>
``bash
``bash
``pytest-s istsos/test/actions/servers/sos-2-u 0/test/test-descibesensorop.py
`
` ` `
` ` `
基准

[要改进这个]
您还可以使用[示例/速度](示例/速度)文件夹中的文件进行一些基本的基准测试。

也许我们可以看一下这个工具:https://github.com/wg/wrk


``bash
``python curl.py http://localhost/sos
`````

使用curl:

``bash
curl-s-w'\n time廑namelookup=%{time廑namelookup}\ntime廑pretransfer=%{time廑pretransfer}\ntime廑startttransfer=%{time廑startttransfer}\ntime廑total=%{time廑total}\n\n'-o/dev/null"http://the.request?to=test"
```

```documentation

itlab.com/features/gitlab ci cd/

测试在远程存储库的每次提交时自动执行。
测试在Docker环境中执行。

e在本地测试,按照以下步骤进行:



``bash
sudo add apt repository"deb[arch=amd64]https://download.docker.com/linux/ubuntu$(lsb_release-cs)stable"
`````

install docker
``bash
sudo apt get update
sudo apt get install docker ce
```

sudo-usermod-ag docker${user}
su-${user}
```````


\\\\\\\\\安装gitlab ci runner




从以下网址下载正确的deb(gitlab-ci-multi-runner-gitlab-ci-multi-runner-amd64.deb)地址:
```bash
https://gitlab-ci-multi-runner-multi-runner-runner-multi-runner-amd64.deb)地址:
http://gitlab-lablablab-ci-ci--多用途Ti-runner\u amd64.deb
```````



>安装Gitlab Ci Runner:
```bash
>sudo dkpg-i gitlab-ci-multi-runner\u amd64.deb
`````


` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` br/>cd git root
gitlab runner exec docker[测试名称]

`````

始终必须包含脚本关键字。

如果测试失败,作业将停止。

操作系统/测试/操作/服务器/休息/测试材料.py
-py test-s ist s os/测试/操作/服务器/休息/测试方法.py
-pytest-s istsos/测试/操作/服务器/休息/测试提供.py
-pytest-s istsos/测试/操作/服务器/休息/测试样品.py

```````

SOS3 lib用法

用法示例:

[有待改进]

``python


import asyncio

from istsos.application import server
from istsos.entity.httprequest import httprequest

@asyncio.coroutine
def execute():
server=yield from servicer.create()
request=httprequest(
"get"、
"sos"、
参数={
"service":"sos"、
"version":"2.0.0"、
"request":"getobservation"、
"offering":"t_lugano"、
"temporalfilter":(
"OM:PhenomenonTime,"
"2009-01-01t00:00+0100/"
"2009-01-02t00:00+0100"

}

response=yield from server.execute_http_request(request,stats=true)
print("\nloaded%s observations"%len(响应['observations'])

loop=asyncio.get_event_loop()
loop.run_直到完成(
asyncio.gather(execute())
loop.close()

````

将在给定路径中创建新的配置文件(默认为config.pickle)。

``python


"type":"aiopg",
"host":"localhost",
"port":"5432",
"user":"postgres",
"password":"postgres",
"database":"istsos3"
}
}
}



```

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java Android首选项相同getPreference()值的不同数据   字符串如何在Java中连接两个列表中的单词   安卓 Java Socket编程:检测客户端和服务器是否连接   使用JTextField的java无法将值转换为int   在java中,如何在不通过超级构造函数设置的情况下将消息设置为自定义异常类   用于标识属性值的java正则表达式模式   Android中的java不可见谷歌地图   java正确取消启动ExecutorService的JavaFX任务   在非活动java类中使用安卓的融合位置提供程序,并在主活动类中获取经度和纬度   spring为什么我的大摇大摆不能用springboot在java中工作?   java JSF(2.2)ViewScope在Weblogic 12.2.1.2和JDK 8上使用Spring 4.3.7(在Mac OS和Docker Oracle Linux环境上)   java如何用一个按钮提高计时器速度   java如何检查字符是否是元音?   注册表引用了不存在的Java运行时环境安装或运行时已损坏错误   来自ResultSet java的mysql getDateTime   maven LanguageTool Java API是否具有“无用”依赖关系?   twitter api身份验证的java Trycatch问题   java在Apache Struts 1.1中是否可以显式白名单?   安卓致命异常:主java。lang.RuntimeException:被问及未知片段