Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MetObsAPI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MetObs
MetObsAPI
Commits
96c9cddd
Verified
Commit
96c9cddd
authored
10 months ago
by
David Hoese
Browse files
Options
Downloads
Patches
Plain Diff
Add ceilometer to files API
parent
fb293ad0
Branches
master
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.pre-commit-config.yaml
+6
-7
6 additions, 7 deletions
.pre-commit-config.yaml
metobsapi/util/file_responses.py
+38
-1
38 additions, 1 deletion
metobsapi/util/file_responses.py
with
44 additions
and
8 deletions
.pre-commit-config.yaml
+
6
−
7
View file @
96c9cddd
...
@@ -2,20 +2,20 @@ exclude: '^$'
...
@@ -2,20 +2,20 @@ exclude: '^$'
fail_fast
:
false
fail_fast
:
false
repos
:
repos
:
-
repo
:
https://github.com/psf/black
-
repo
:
https://github.com/psf/black
rev
:
2
3.1.0
rev
:
2
4.4.2
hooks
:
hooks
:
-
id
:
black
-
id
:
black
language_version
:
python3
language_version
:
python3
args
:
args
:
-
--target-version=py310
-
--target-version=py310
-
repo
:
https://github.com/pycqa/isort
-
repo
:
https://github.com/pycqa/isort
rev
:
5.1
2.0
rev
:
5.1
3.2
hooks
:
hooks
:
-
id
:
isort
-
id
:
isort
language_version
:
python3
language_version
:
python3
-
repo
:
https://github.com/charliermarsh/ruff-pre-commit
-
repo
:
https://github.com/charliermarsh/ruff-pre-commit
# Ruff version.
# Ruff version.
rev
:
'
v0.
0.254
'
rev
:
'
v0.
5.6
'
hooks
:
hooks
:
-
id
:
ruff
-
id
:
ruff
# - repo: https://github.com/PyCQA/flake8
# - repo: https://github.com/PyCQA/flake8
...
@@ -25,13 +25,13 @@ repos:
...
@@ -25,13 +25,13 @@ repos:
# additional_dependencies: [flake8-docstrings, flake8-debugger, flake8-bugbear, mccabe]
# additional_dependencies: [flake8-docstrings, flake8-debugger, flake8-bugbear, mccabe]
# args: [--max-complexity, "10"]
# args: [--max-complexity, "10"]
-
repo
:
https://github.com/pre-commit/pre-commit-hooks
-
repo
:
https://github.com/pre-commit/pre-commit-hooks
rev
:
v4.
4
.0
rev
:
v4.
6
.0
hooks
:
hooks
:
-
id
:
trailing-whitespace
-
id
:
trailing-whitespace
-
id
:
end-of-file-fixer
-
id
:
end-of-file-fixer
-
id
:
check-yaml
-
id
:
check-yaml
-
repo
:
https://github.com/scop/pre-commit-shfmt
-
repo
:
https://github.com/scop/pre-commit-shfmt
rev
:
v3.
6
.0-1
rev
:
v3.
8
.0-1
hooks
:
hooks
:
# Choose one of:
# Choose one of:
-
id
:
shfmt
# native (requires Go to build)
-
id
:
shfmt
# native (requires Go to build)
...
@@ -44,11 +44,10 @@ repos:
...
@@ -44,11 +44,10 @@ repos:
# - id: bandit
# - id: bandit
# args: [--ini, .bandit]
# args: [--ini, .bandit]
-
repo
:
https://github.com/pre-commit/mirrors-mypy
-
repo
:
https://github.com/pre-commit/mirrors-mypy
rev
:
'
v1.
0
.1'
# Use the sha / tag you want to point at
rev
:
'
v1.
11
.1'
# Use the sha / tag you want to point at
hooks
:
hooks
:
-
id
:
mypy
-
id
:
mypy
additional_dependencies
:
additional_dependencies
:
-
types-docutils
-
types-docutils
-
types-pkg-resources
-
types-PyYAML
-
types-PyYAML
-
types-requests
-
types-requests
This diff is collapsed.
Click to expand it.
metobsapi/util/file_responses.py
+
38
−
1
View file @
96c9cddd
"""
Configuration for file-based API responses.
"""
"""
Configuration for file-based API responses.
"""
from
collections
import
defaultdict
from
collections
import
defaultdict
from
pathlib
import
Path
from
pathlib
import
Path
from
typing
import
TypedDict
from
typing
import
TypedDict
...
@@ -37,7 +38,7 @@ ARCHIVE_INFO: dict[str, SiteInfo] = {
...
@@ -37,7 +38,7 @@ ARCHIVE_INFO: dict[str, SiteInfo] = {
"
ascii
"
:
{
"
ascii
"
:
{
"
frequency
"
:
ProductFrequency
.
DAILY_FILE
,
"
frequency
"
:
ProductFrequency
.
DAILY_FILE
,
"
pattern
"
:
"
aoss_tower.%Y-%m-%d.ascii
"
,
"
pattern
"
:
"
aoss_tower.%Y-%m-%d.ascii
"
,
"
display_name
"
:
"
Daily CSV (
rig
_tower.YYYY-MM-DD.ascii)
"
,
"
display_name
"
:
"
Daily CSV (
aoss
_tower.YYYY-MM-DD.ascii)
"
,
},
},
},
},
},
},
...
@@ -135,6 +136,42 @@ ARCHIVE_INFO: dict[str, SiteInfo] = {
...
@@ -135,6 +136,42 @@ ARCHIVE_INFO: dict[str, SiteInfo] = {
},
},
},
},
},
},
"
ceilo
"
:
{
"
display_name
"
:
"
Ceilometer
"
,
"
levels
"
:
{
"
level_00
"
:
{
"
description
"
:
L00_DESCRIPTION
,
"
versions
"
:
(
"
version_00
"
,),
"
products
"
:
{
"
ascii
"
:
{
"
frequency
"
:
ProductFrequency
.
DAILY_FILE
,
"
pattern
"
:
"
aoss_ceilo.%Y-%m-%d.ascii
"
,
"
display_name
"
:
"
Daily CSV (aoss_ceilo.YYYY-MM-DD.ascii)
"
,
},
},
},
"
level_b1
"
:
{
"
description
"
:
LB1_DESCRIPTION
,
"
versions
"
:
(
"
version_00
"
,),
"
products
"
:
{
# 'nc-monthly': {
# },
"
nc-daily
"
:
{
"
frequency
"
:
ProductFrequency
.
DAILY_FILE
,
"
pattern
"
:
"
aoss_ceilo.%Y-%m-%d.nc
"
,
"
display_name
"
:
"
Daily NetCDF file (aoss_ceilo.YYYY-MM-DD.nc)
"
,
"
preview_product
"
:
"
meteorogram-daily
"
,
},
"
backscatter-daily
"
:
{
"
frequency
"
:
ProductFrequency
.
DAILY_FILE
,
"
pattern
"
:
"
aoss_ceilo.%Y-%m-%d_000000_235959.png
"
,
"
thumbnail_pattern
"
:
"
aoss_ceilo.%Y-%m-%d_000000_235959_tn.png
"
,
"
display_name
"
:
"
Daily Backscatter (aoss_ceilo.YYYY-MM-DD.png)
"
,
},
},
},
},
},
},
},
},
},
"
mendota
"
:
{
"
mendota
"
:
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment