Skip to content

Commit

Permalink
ESMCat pydantic Model: make id optional (intake#398)
Browse files Browse the repository at this point in the history
  • Loading branch information
andersy005 authored Nov 18, 2021
1 parent 50b15c5 commit ead1c1c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@

## Badges

| CI | [![GitHub Workflow Status][github-ci-badge]][github-ci-link] [![GitHub Workflow Status][github-lint-badge]][github-lint-link] [![Code Coverage Status][codecov-badge]][codecov-link] |
| :----------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| **Docs** | [![Documentation Status][rtd-badge]][rtd-link] |
| **Package** | [![Conda][conda-badge]][conda-link] [![PyPI][pypi-badge]][pypi-link] |
| **License** | [![License][license-badge]][repo-link] |
| **Citation** | [![Zenodo][zenodo-badge]][zenodo-link] |
| CI | [![GitHub Workflow Status][github-ci-badge]][github-ci-link] [![Code Coverage Status][codecov-badge]][codecov-link] |
| :----------- | :-----------------------------------------------------------------------------------------------------------------: |
| **Docs** | [![Documentation Status][rtd-badge]][rtd-link] |
| **Package** | [![Conda][conda-badge]][conda-link] [![PyPI][pypi-badge]][pypi-link] |
| **License** | [![License][license-badge]][repo-link] |
| **Citation** | [![Zenodo][zenodo-badge]][zenodo-link] |

## Motivation

Expand Down Expand Up @@ -94,9 +94,7 @@ conda install -c conda-forge intake-esm
```

[github-ci-badge]: https://img.shields.io/github/workflow/status/intake/intake-esm/CI?label=CI&logo=github&style=for-the-badge
[github-lint-badge]: https://img.shields.io/github/workflow/status/intake/intake-esm/linting?label=linting&logo=github&style=for-the-badge
[github-ci-link]: https://github.com/intake/intake-esm/actions?query=workflow%3ACI
[github-lint-link]: https://github.com/intake/intake-esm/actions?query=workflow%3Alinting
[codecov-badge]: https://img.shields.io/codecov/c/github/intake/intake-esm.svg?logo=codecov&style=for-the-badge
[codecov-link]: https://codecov.io/gh/intake/intake-esm
[rtd-badge]: https://img.shields.io/readthedocs/intake-esm/latest.svg?style=for-the-badge
Expand Down
2 changes: 1 addition & 1 deletion intake_esm/cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ class ESMCatalogModel(pydantic.BaseModel):
"""

esmcat_version: pydantic.StrictStr
id: str
attributes: typing.List[Attribute]
assets: Assets
aggregation_control: AggregationControl
id: typing.Optional[str] = ''
catalog_dict: typing.Optional[typing.List[typing.Dict]] = None
catalog_file: pydantic.StrictStr = None
description: pydantic.StrictStr = None
Expand Down
2 changes: 1 addition & 1 deletion tests/sample-collections/cesm1-lens-zarr.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"esmcat_version": "0.1.0",
"id": "sample-cesm1-lens-aws",
"id": null,
"description": "This is a sample ESM collection for CESM1-LENS data in zarr format",
"catalog_file": "./tests/sample-collections/cesm1-lens-aws-zarr.csv",
"attributes": [
Expand Down

0 comments on commit ead1c1c

Please sign in to comment.