Skip to content
This repository was archived by the owner on Nov 10, 2024. It is now read-only.

Commit a139150

Browse files
authored
Optimizations (#68)
* Change spacing to unix line breaks * Remove runtime.txt It is unimportant to have specific python version declared for the project since it is a package * Change timing.py to work on any system and not just unix * Remove the need of requirements.txt file * Move coverage configuration into pyproject.toml * Poetry lock * Return to manual version editing * Format project * Remove SqlAlchemy TypeDecorator cache warning * Restore dataclasses to python 3.6 installation * Fix issues with mypy update and python 3.6
1 parent 1159c07 commit a139150

23 files changed

Lines changed: 1340 additions & 1856 deletions

.github/dependabot.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
2-
version: 2
3-
updates:
4-
- package-ecosystem: "pip"
5-
directory: "/"
6-
schedule:
7-
interval: "weekly"
8-
1+
2+
version: 2
3+
updates:
4+
- package-ecosystem: "pip"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
id: cache-deps
2929
with:
3030
path: ~/.cache/pip
31-
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt') }}
31+
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/pyproject.toml') }}
3232
restore-keys: |
3333
${{ runner.os }}-pip-
3434

.github/workflows/publish.yml

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
1-
name: publish
2-
3-
on:
4-
push
5-
6-
jobs:
7-
publish-tag:
8-
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
9-
runs-on: ubuntu-latest
10-
strategy:
11-
max-parallel: 1
12-
matrix:
13-
python-version: [3.8]
14-
15-
steps:
16-
- uses: actions/checkout@v1
17-
- name: Set up Python ${{ matrix.python-version }}
18-
uses: actions/setup-python@v1
19-
with:
20-
python-version: ${{ matrix.python-version }}
21-
# Avoid caching to be 100% confident things are working properly
22-
- name: Init python poetry action
23-
uses: abatilo/actions-poetry@v2.1.0
24-
25-
- name: Install dependencies
26-
run: poetry install -E session
27-
28-
- name: Check that formatting, linting, and tests pass
29-
run: poetry run make ci
30-
31-
- name: Check docs are up to date
32-
run: poetry run make docs-build-ci
33-
34-
- name: Build distribution
35-
run: poetry build
36-
37-
- name: Publish distribution to PyPI
38-
uses: pypa/gh-action-pypi-publish@master
39-
with:
40-
user: ${{ secrets.PYPI_USERNAME }}
41-
password: ${{ secrets.PYPI_PASSWORD }}
42-
# For security porpuses only!
1+
name: publish
2+
3+
on:
4+
push
5+
6+
jobs:
7+
publish-tag:
8+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
9+
runs-on: ubuntu-latest
10+
strategy:
11+
max-parallel: 1
12+
matrix:
13+
python-version: [3.8]
14+
15+
steps:
16+
- uses: actions/checkout@v1
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v1
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
# Avoid caching to be 100% confident things are working properly
22+
- name: Init python poetry action
23+
uses: abatilo/actions-poetry@v2.1.0
24+
25+
- name: Install dependencies
26+
run: poetry install -E session
27+
28+
- name: Check that formatting, linting, and tests pass
29+
run: poetry run make ci
30+
31+
- name: Check docs are up to date
32+
run: poetry run make docs-build-ci
33+
34+
- name: Build distribution
35+
run: poetry build
36+
37+
- name: Publish distribution to PyPI
38+
uses: pypa/gh-action-pypi-publish@master
39+
with:
40+
user: ${{ secrets.PYPI_USERNAME }}
41+
password: ${{ secrets.PYPI_PASSWORD }}
42+
# For security porpuses only!

.github/workflows/pull-request.yml

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,49 @@
1-
name: build-pull-request
2-
3-
on:
4-
pull_request:
5-
branches:
6-
- master
7-
8-
jobs:
9-
build:
10-
runs-on: ubuntu-latest
11-
strategy:
12-
max-parallel: 3
13-
matrix:
14-
python-version: [3.6, 3.7, 3.8, 3.9]
15-
16-
steps:
17-
- uses: actions/checkout@v1
18-
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v1
20-
with:
21-
python-version: ${{ matrix.python-version }}
22-
23-
- name: Init Python Poetry Action
24-
uses: abatilo/actions-poetry@v2.1.0
25-
- uses: actions/cache@v1
26-
id: cache-deps
27-
with:
28-
path: ~/.cache/pip
29-
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt') }}
30-
restore-keys: |
31-
${{ runner.os }}-pip-
32-
33-
- name: Install dependencies
34-
run: poetry install -E session
35-
- uses: actions/cache@v1
36-
with:
37-
path: .mypy_cache
38-
key: mypy-${{ matrix.python-version }}
39-
- uses: actions/cache@v1
40-
with:
41-
path: .pytest_cache
42-
key: pytest-${{ matrix.python-version }}
43-
- name: Check docs build
44-
# only run this for the python version used by netlify:
45-
if: matrix.python-version == 3.8
46-
run: poetry run make docs-build-ci
47-
- name: Check that formatting, linting, and tests pass
48-
run: poetry run make ci
49-
1+
name: build-pull-request
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
max-parallel: 3
13+
matrix:
14+
python-version: [3.6, 3.7, 3.8, 3.9]
15+
16+
steps:
17+
- uses: actions/checkout@v1
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v1
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
23+
- name: Init Python Poetry Action
24+
uses: abatilo/actions-poetry@v2.1.0
25+
- uses: actions/cache@v1
26+
id: cache-deps
27+
with:
28+
path: ~/.cache/pip
29+
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/pyproject.toml') }}
30+
restore-keys: |
31+
${{ runner.os }}-pip-
32+
33+
- name: Install dependencies
34+
run: poetry install -E session
35+
- uses: actions/cache@v1
36+
with:
37+
path: .mypy_cache
38+
key: mypy-${{ matrix.python-version }}
39+
- uses: actions/cache@v1
40+
with:
41+
path: .pytest_cache
42+
key: pytest-${{ matrix.python-version }}
43+
- name: Check docs build
44+
# only run this for the python version used by netlify:
45+
if: matrix.python-version == 3.8
46+
run: poetry run make docs-build-ci
47+
- name: Check that formatting, linting, and tests pass
48+
run: poetry run make ci
49+

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,5 @@ venv.bak/
8787
site
8888

8989
.bento/
90+
91+
runtime.txt

0 commit comments

Comments
 (0)