Skip to content

Commit

Permalink
Merge 519bb9d into eec3f2f
Browse files Browse the repository at this point in the history
  • Loading branch information
rohanpm committed Mar 24, 2020
2 parents eec3f2f + 519bb9d commit b59d87a
Show file tree
Hide file tree
Showing 14 changed files with 21 additions and 15 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- n/a
### Fixed

- Fixed missing files from source distribution

## 0.1.0 - 2020-03-24

Initial release.
- Initial release

[Unreleased]: https://github.com/release-engineering/cdn-definitions/compare/v0.1.0...HEAD
3 changes: 1 addition & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
include README.md
include CHANGELOG.md
include LICENSE
include cdn_definitions/*.json
include cdn_definitions/*.yaml
graft src
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
html_static_path = ["_static"]

# Copy cdn_definitions path here to include online versions of the data.
html_extra_path = ["../cdn_definitions"]
html_extra_path = ["../src/cdn_definitions"]

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
Expand Down
4 changes: 2 additions & 2 deletions docs/data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ It is also available in raw JSON or YAML format at URLs:
- https://release-engineering.github.io/cdn-definitions/data.yaml


.. include:: ../cdn_definitions/data.yaml
.. include:: ../src/cdn_definitions/data.yaml
:code: yaml


Expand All @@ -27,5 +27,5 @@ It is also available in raw JSON or YAML format at URLs:
- https://release-engineering.github.io/cdn-definitions/schema.json
- https://release-engineering.github.io/cdn-definitions/schema.yaml

.. include:: ../cdn_definitions/schema.yaml
.. include:: ../src/cdn_definitions/schema.yaml
:code: yaml
4 changes: 2 additions & 2 deletions scripts/make-json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ ROOT = os.path.dirname(os.path.dirname(__file__))


def sync_dataset(basename):
yaml_file = os.path.join(ROOT, "cdn_definitions", "%s.yaml" % basename)
json_file = os.path.join(ROOT, "cdn_definitions", "%s.json" % basename)
yaml_file = os.path.join(ROOT, "src", "cdn_definitions", "%s.yaml" % basename)
json_file = os.path.join(ROOT, "src", "cdn_definitions", "%s.json" % basename)

with open(yaml_file) as f:
data_yaml = yaml.load(f, yaml.SafeLoader)
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from setuptools import setup
from setuptools import setup, find_packages


def get_description():
Expand All @@ -19,7 +19,8 @@ def get_long_description():
version="0.1.0",
author="Rohan McGovern",
author_email="rmcgover@redhat.com",
packages=["cdn_definitions"],
packages=find_packages("src"),
package_dir={"": "src"},
url="https://github.com/release-engineering/cdn-definitions",
license="GNU General Public License",
description=get_description(),
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions tests/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

from . import ROOT_PATH

DATA_PATH = os.path.join(ROOT_PATH, "cdn_definitions", "data.yaml")
SCHEMA_PATH = os.path.join(ROOT_PATH, "cdn_definitions", "schema.yaml")
DATA_PATH = os.path.join(ROOT_PATH, "src", "cdn_definitions", "data.yaml")
SCHEMA_PATH = os.path.join(ROOT_PATH, "src", "cdn_definitions", "schema.yaml")


@pytest.fixture
Expand Down
8 changes: 6 additions & 2 deletions tests/test_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ def any_basename(request):

def test_data_sync(any_basename):
"""Verify that .json files are up-to-date with .yaml files."""
yaml_path = os.path.join(ROOT_PATH, "cdn_definitions", "%s.yaml" % any_basename)
json_path = os.path.join(ROOT_PATH, "cdn_definitions", "%s.json" % any_basename)
yaml_path = os.path.join(
ROOT_PATH, "src", "cdn_definitions", "%s.yaml" % any_basename
)
json_path = os.path.join(
ROOT_PATH, "src", "cdn_definitions", "%s.json" % any_basename
)

with open(yaml_path) as f:
yaml_data = yaml.load(f, yaml.SafeLoader)
Expand Down

0 comments on commit b59d87a

Please sign in to comment.