Skip to content

Commit

Permalink
separate config to different files
Browse files Browse the repository at this point in the history
Signed-off-by: Zhiyuan Chen <[email protected]>
  • Loading branch information
ZhiyuanChen committed Jan 13, 2023
1 parent aaa6b4c commit 555add3
Show file tree
Hide file tree
Showing 18 changed files with 1,781 additions and 1,654 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/analysis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: analysis
on: [push, pull_request]
jobs:
lint:
environment: analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ricardochaves/[email protected]
with:
use-pylint: false
python-root-list: "chanfig"
extra-pylint-options: "--max-line-length 120"
extra-pycodestyle-options: "--max-line-length 120"
extra-flake8-options: "--max-line-length 120"
extra-black-options: "--line-length 120"
extra-mypy-options: ""
extra-isort-options: "--line-length 120"
test:
environment: analysis
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install dependencies
run: pip install -r requirements.txt
- name: Install pytest
run: pip install pytest
- name: doctest
run: pytest --doctest-modules chanfig
2 changes: 1 addition & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
key: ${{ github.ref }}
path: .cache
- run: pip install git+https://${{ secrets.GH_TOKEN }}@github.com/squidfunk/mkdocs-material-insiders.git
- run: pip install -r requirements.txt
- run: pip install -r requirements-doc.txt
- run: mkdocs build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
Expand Down
23 changes: 0 additions & 23 deletions .github/workflows/lint.yaml

This file was deleted.

5 changes: 4 additions & 1 deletion chanfig/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
from .config import Config, ConfigParser, DefaultDict, FlatDict, NestedDict, Variable
from .config import Config, ConfigParser
from .flat_dict import FlatDict
from .nested_dict import DefaultDict, NestedDict
from .variable import Variable

__all__ = ["Config", "NestedDict", "FlatDict", "Variable", "DefaultDict", "ConfigParser"]
Loading

0 comments on commit 555add3

Please sign in to comment.