bam2tensor 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: bam2tensor
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Test deployment.
|
|
5
|
+
Author: Nick Semenkovich
|
|
6
|
+
Author-email: semenko@alum.mit.edu
|
|
7
|
+
Requires-Python: >=3.10,<4.0
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
11
|
+
Requires-Dist: click (>=8.1.5,<9.0.0)
|
|
12
|
+
Requires-Dist: requests (>=2.31.0,<3.0.0)
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
|
|
15
|
+
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
|
|
2
|
+
import requests
|
|
3
|
+
import click
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
@click.command()
|
|
7
|
+
@click.argument("metric", required=True)
|
|
8
|
+
@click.option("--latitude", "-lat", default=40.71, type=float, required=False, help="latitude (in degrees)")
|
|
9
|
+
@click.option("--longitude", "-lon", default=-74.01, type=float, required=False, help="longitude (in degrees)")
|
|
10
|
+
def cli(metric: str, latitude: float, longitude: float) -> None:
|
|
11
|
+
r = requests.get('https://api.open-meteo.com/v1/forecast?latitude=' + str(latitude) + '&longitude=' + str(longitude) + '¤t_weather=true')
|
|
12
|
+
if r.status_code == 200:
|
|
13
|
+
if metric in r.json()["current_weather"]:
|
|
14
|
+
print(r.json()['current_weather'][metric])
|
|
15
|
+
else:
|
|
16
|
+
print("Metric not supported!")
|
|
17
|
+
else:
|
|
18
|
+
print("Open-Meteo is down!")
|
|
19
|
+
|
|
20
|
+
if __name__ == "__main__":
|
|
21
|
+
cli()
|
|
22
|
+
|
|
23
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
import requests
|
|
3
|
+
|
|
4
|
+
def cli():
|
|
5
|
+
r = requests.get('https://api.open-meteo.com/v1/forecast?latitude=40.71&longitude=-74.01¤t_weather=true')
|
|
6
|
+
if r.status_code == 200:
|
|
7
|
+
print(r.json()["current_weather"]["temperature"])
|
|
8
|
+
else:
|
|
9
|
+
print("Open-Meteo is down!")
|
|
10
|
+
|
|
11
|
+
if __name__ == "__main__":
|
|
12
|
+
cli()
|
|
13
|
+
|
|
14
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[tool.poetry]
|
|
2
|
+
name = "bam2tensor"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Test deployment."
|
|
5
|
+
authors = ["Nick Semenkovich <semenko@alum.mit.edu>"]
|
|
6
|
+
readme = "README.md"
|
|
7
|
+
|
|
8
|
+
[tool.poetry.scripts]
|
|
9
|
+
bam2tensor = "bam2tensor.cli:cli"
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
[tool.poetry.dependencies]
|
|
13
|
+
python = "^3.10"
|
|
14
|
+
click = "^8.1.5"
|
|
15
|
+
requests = "^2.31.0"
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
[tool.poetry.group.dev.dependencies]
|
|
19
|
+
pytest = "^7.4.0"
|
|
20
|
+
|
|
21
|
+
[build-system]
|
|
22
|
+
requires = ["poetry-core"]
|
|
23
|
+
build-backend = "poetry.core.masonry.api"
|