Skip to content

Commit 9603e04

Browse files
v2 🥚
1 parent 4ada96f commit 9603e04

51 files changed

Lines changed: 1326 additions & 290 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
- "*"
1313

1414
env:
15-
PROJECT_NAME: configuration
15+
PROJECT_NAME: config
1616

1717
jobs:
1818
build:
@@ -55,6 +55,7 @@ jobs:
5555
run: |
5656
echo "Running linters"
5757
58+
pip install black
5859
flake8 .
5960
isort --check-only . 2>&1
6061
black --check . 2>&1
@@ -71,19 +72,19 @@ jobs:
7172
bash <(curl -s https://codecov.io/bash)
7273
7374
- name: Install distribution dependencies
74-
run: pip install --upgrade twine setuptools wheel
75-
if: matrix.python-version == 3.10
75+
run: pip install build
76+
if: matrix.python-version == 3.11
7677

7778
- name: Create distribution package
78-
run: python setup.py sdist bdist_wheel
79-
if: matrix.python-version == 3.10
79+
run: python -m build
80+
if: matrix.python-version == 3.11
8081

8182
- name: Upload distribution package
8283
uses: actions/upload-artifact@master
8384
with:
84-
name: dist-package-${{ matrix.python-version }}
85+
name: dist
8586
path: dist
86-
if: matrix.python-version == 3.10
87+
if: matrix.python-version == 3.11
8788

8889
publish:
8990
runs-on: ubuntu-latest
@@ -93,17 +94,28 @@ jobs:
9394
- name: Download a distribution artifact
9495
uses: actions/download-artifact@v2
9596
with:
96-
name: dist-package-3.10
97+
name: dist
9798
path: dist
98-
- name: Publish distribution 📦 to Test PyPI
99-
uses: pypa/gh-action-pypi-publish@master
99+
100+
- name: Use Python 3.11
101+
uses: actions/setup-python@v1
100102
with:
101-
skip_existing: true
102-
user: __token__
103-
password: ${{ secrets.test_pypi_password }}
104-
repository_url: https://test.pypi.org/legacy/
103+
python-version: '3.11'
104+
105+
- name: Install dependencies
106+
run: |
107+
pip install twine
108+
109+
- name: Publish distribution 📦 to Test PyPI
110+
run: |
111+
twine upload -r testpypi dist/*
112+
env:
113+
TWINE_USERNAME: __token__
114+
TWINE_PASSWORD: ${{ secrets.test_pypi_password }}
115+
105116
- name: Publish distribution 📦 to PyPI
106-
uses: pypa/gh-action-pypi-publish@master
107-
with:
108-
user: __token__
109-
password: ${{ secrets.pypi_password }}
117+
run: |
118+
twine upload -r pypi dist/*
119+
env:
120+
TWINE_USERNAME: __token__
121+
TWINE_PASSWORD: ${{ secrets.pypi_password }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,4 @@ venv.bak/
105105
test-cov.xml
106106
test-output.xml
107107
*.py,cover
108+
venv*

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.0.0] - 2023-04-08 :egg:
9+
- Renames the main namespace to `config`.
10+
- Adds a method to obtain type checked configuration items (e.g. with `pydantic`
11+
or custom classes).
12+
- Adds support to read secrets stored in the user folder, for development purpose.
13+
- Adds a CLI to administer local secrets stored in the user folder.
14+
- Adds a `FileConfigurationSource` base class.
15+
- Migrates to `pyproject.toml`.
16+
- Add support for `.env` files bound using `python-dotenv`.
17+
818
## [1.0.0] - 2022-11-04 :snake:
919
- Upgrades pinned dependencies for Python 3.11
1020
- Adds the alias "EnvVars" to reduce the verbosity of the class name "EnvironmentVariables"

Makefile

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,35 @@
22

33

44
artifacts: test
5-
python setup.py sdist bdist_wheel
5+
python -m build
66

77

88
clean:
99
rm -rf dist/
1010

1111

1212
prepforbuild:
13-
pip install --upgrade twine setuptools wheel
13+
pip install build
1414

1515

16-
testrelease:
17-
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
16+
build:
17+
python -m build
1818

1919

20-
release: clean artifacts
21-
twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
20+
test-release:
21+
twine upload --repository testpypi dist/*
22+
23+
24+
release:
25+
twine upload --repository pypi dist/*
2226

2327

2428
test:
2529
pytest
2630

2731

28-
testcov:
29-
pytest --cov-report html --cov=configuration tests/
32+
test-cov:
33+
pytest --cov-report html --cov=config tests/
3034

3135

3236
lint: check-flake8 check-isort check-black

0 commit comments

Comments
 (0)