Skip to content

Commit

Permalink
v2.0.1. release candidate (#17)
Browse files Browse the repository at this point in the history
* Bump bleach from 3.2.1 to 3.3.0

Bumps [bleach](https://github.com/mozilla/bleach) from 3.2.1 to 3.3.0.
- [Release notes](https://github.com/mozilla/bleach/releases)
- [Changelog](https://github.com/mozilla/bleach/blob/master/CHANGES)
- [Commits](mozilla/bleach@v3.2.1...v3.3.0)

Signed-off-by: dependabot[bot] <[email protected]>

* update deprecated import and reformat w/ black

* reformatted all code w/ black

* update Pipfile.lock

* v2.0 release candidate (fixes #9, fixes #9) (#10)

* changelog

* add test for bug

* use brackets for lists in env vars

* update README and tests

* README

* modularize environment variable management

* new modular architecture

* type utils

* pluggable providers

* fix circular imports when running unit tests from root directory

* documentation

* docs

Co-authored-by: Chris Haumesser <[email protected]>

* update README

* remove old python versions

* rtd updates

* typo

* rtd

* rtd

* rtd

* fix issues w/ python 3.8 typing

* add github workflow

* update for newer versions of python and pyyaml

* add tomli for python<3.11

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Chris Haumesser <[email protected]>
  • Loading branch information
3 people authored Feb 2, 2024
1 parent f27029f commit dd11d65
Show file tree
Hide file tree
Showing 8 changed files with 638 additions and 380 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: cfitall tests

on:
push:
branches: [ develop, master ]
pull_request:
branches: [ develop, master ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pipenv
pipenv install -d
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Run unit tests
run: |
pipenv run python -m unittest -v
- name: Check types with mypy
run: |
pipenv run mypy -p cfitall
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
CHANGES
=======

* add github workflow

v2.0.0
------

* fix doc issues for 2.0 (#12)
* fix issues w/ python 3.8 typing
* rtd
* rtd
* rtd
Expand Down
18 changes: 10 additions & 8 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ verify_ssl = true
pbr = "*"
cfitall = {editable = true,path = "."}
ipython = "*"
twine = "*"
coverage = "*"
mypy = "*"
sphinx = "*"
sphinx-autodoc-typehints = "*"
sphinx-rtd-theme = "*"
twine = "<5"
coverage = "<7"
mypy = "<2"
sphinx = ">=4.5"
sphinx-autodoc-typehints = "<2"
sphinx-rtd-theme = "<2"
tomli = { version = "*", markers = "python_version < '3.11'" }
types-pyyaml = "<7"


[packages]
pyyaml = "*"
types-pyyaml = "*"
pyyaml = "<7"
930 changes: 572 additions & 358 deletions Pipfile.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cfitall/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ConfigurationRegistry(object):
def __init__(
self,
name: str,
defaults: Dict = None,
defaults: Optional[Dict] = None,
providers: Optional[List[ConfigProviderBase]] = None,
) -> None:
"""
Expand Down
8 changes: 5 additions & 3 deletions cfitall/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@
"""

from collections.abc import Mapping
from typing import Dict
from typing import Dict, Optional

from cfitall import ConfigValueType


def add_keys(destdict: dict, srclist: list, value: ConfigValueType = None) -> dict:
def add_keys(
destdict: dict, srclist: list, value: Optional[ConfigValueType] = None
) -> dict:
"""
Nests keys from srclist into destdict, with optional value set on the final key.
Expand All @@ -34,7 +36,7 @@ def add_keys(destdict: dict, srclist: list, value: ConfigValueType = None) -> di


def expand_flattened_path(
flattened_path: str, value: ConfigValueType = None, separator: str = "."
flattened_path: str, value: Optional[ConfigValueType] = None, separator: str = "."
) -> dict:
"""
Expands a dotted path into a nested dict; if value is set, the
Expand Down
8 changes: 0 additions & 8 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,9 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys

import sphinx_rtd_theme

# here = os.path.dirname(os.path.abspath(__file__))
# cfitall_path = os.path.join(here, "..", "cfitall")
# sys.path.insert(0, cfitall_path)
print(sys.path)


# -- Project information -----------------------------------------------------

project = "cfitall"
Expand Down
6 changes: 4 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ classifier =
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12

[options]
packages = find:
install_requires =
PyYAML <=6
PyYAML <= 7

[files]
data_files =
tests = tests/*
tests = tests/*

0 comments on commit dd11d65

Please sign in to comment.