Skip to content

Commit

Permalink
Version 1.5.0 (#331)
Browse files Browse the repository at this point in the history
* Version 1.5.0

* Fix RTD

* Fix tests

* Fix RTD
  • Loading branch information
sobolevn committed Mar 22, 2024
1 parent 05fd689 commit d086c9e
Show file tree
Hide file tree
Showing 14 changed files with 1,240 additions and 1,278 deletions.
7 changes: 0 additions & 7 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ updates:
time: "02:00"
open-pull-requests-limit: 10

- package-ecosystem: pip
directory: "/docs"
schedule:
interval: daily
time: "02:00"
open-pull-requests-limit: 10

- package-ecosystem: github-actions
directory: "/"
schedule:
Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,31 @@ on:
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

permissions:
contents: read

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

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install poetry
run: |
curl -sSL \
"https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py" | python
curl -sSL "https://install.python-poetry.org" | python
# Adding `poetry` to `$PATH`:
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
Expand All @@ -43,9 +50,8 @@ jobs:
poetry run doc8 -q docs
poetry check
poetry run pip check
poetry run safety check --full-report
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
18 changes: 8 additions & 10 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
# .readthedocs.yml
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-20.04
tools:
python: "3.9"
os: ubuntu-lts-latest
tools: {python: "3.11"}
jobs:
pre_create_environment:
- asdf plugin add poetry
- asdf install poetry latest
- asdf global poetry latest
- poetry config virtualenvs.create false
post_install:
- |
. "$(pwd | rev | sed 's/stuokcehc/svne/' | rev)/bin/activate"
&& poetry install --only main --only docs
- poetry self add poetry-plugin-export
- poetry export --only main --only docs --format=requirements.txt --output=requirements.txt

python:
install:
- requirements: requirements.txt

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py
fail_on_warning: true
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
We follow semantic versioning.


## Version 1.5.0

### Features

- Drops `python3.7` and `python3.8` support
- Adds `python3.11` and `python3.12` official support

### Misc

- Updates multiple dev dependencies


## Version 1.4.0

### Features
Expand Down
10 changes: 4 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,16 @@
import sys

import sphinx_readable_theme
import tomlkit
import tomli

sys.path.insert(0, os.path.abspath('..'))


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

def _get_project_meta():
with open('../pyproject.toml') as pyproject:
file_contents = pyproject.read()

return tomlkit.parse(file_contents)['tool']['poetry']
with open('../pyproject.toml', mode='rb') as pyproject:
return tomli.load(pyproject)['tool']['poetry']


pkg_meta = _get_project_meta()
Expand All @@ -44,7 +42,7 @@ def _get_project_meta():
# -- General configuration ---------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
needs_sphinx = '5.0'
needs_sphinx = '7.2'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
Expand Down
6 changes: 2 additions & 4 deletions dump_env/dumper.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from collections import OrderedDict
from os import environ
from typing import Dict, List, Mapping, Optional, Set
from typing import Dict, Final, List, Mapping, Optional, Set

from dump_env.exceptions import StrictEnvError

Store = Mapping[str, str]

EMPTY_STRING = ''
EMPTY_STRING: Final = ''


def _parse(source: str) -> Store:
Expand Down Expand Up @@ -89,14 +89,12 @@ def _assert_envs_exist(strict_keys: Set[str]) -> None:
def _source(source: str, strict_source: bool) -> Store:
"""Applies vars and assertions from source template ``.env`` file."""
sourced: Dict[str, str] = {}

sourced.update(_parse(source))

if strict_source:
_assert_envs_exist(set(sourced.keys()))

sourced.update(_preload_specific_vars(set(sourced.keys())))

return sourced


Expand Down
Loading

0 comments on commit d086c9e

Please sign in to comment.