Skip to content

Commit 222594e

Browse files
Fix config deserialization and update/uninstall/new commands (#573)
1 parent daaafb5 commit 222594e

21 files changed

+2238
-2192
lines changed

.github/workflows/docs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,23 @@ jobs:
3939
run: make install
4040

4141
- name: Build docs (docs)
42-
if: startsWith(github.ref, 'refs/tags') && !contains(github.ref, '-rc')
42+
if: startsWith(github.ref, 'refs/tags') && !contains(github.ref, 'rc')
4343
run: MDBOOK_ROOT=https://docs.dipdup.io make docs
4444

4545
- name: Deploy to GH Pages (docs)
46-
if: startsWith(github.ref, 'refs/tags') && !contains(github.ref, '-rc')
46+
if: startsWith(github.ref, 'refs/tags') && !contains(github.ref, 'rc')
4747
uses: peaceiris/actions-gh-pages@v3
4848
with:
4949
github_token: ${{ secrets.GITHUB_TOKEN }}
5050
publish_dir: ./docs/dist/docs
5151
destination_dir: docs
5252

5353
- name: Build docs (docs-next)
54-
if: startsWith(github.ref, 'refs/heads') || contains(github.ref, '-rc')
54+
if: startsWith(github.ref, 'refs/heads') || contains(github.ref, 'rc')
5555
run: MDBOOK_ROOT=https://docs-next.dipdup.io make docs
5656

5757
- name: Deploy to GH Pages (docs-next)
58-
if: startsWith(github.ref, 'refs/heads') || contains(github.ref, '-rc')
58+
if: startsWith(github.ref, 'refs/heads') || contains(github.ref, 'rc')
5959
uses: peaceiris/actions-gh-pages@v3
6060
with:
6161
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/installer.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,25 @@ on:
77
paths:
88
- 'src/**'
99
- 'scripts/install.py'
10+
- 'pyproject.toml'
11+
- 'poetry.lock'
1012
- '.github/workflows/installer.yml'
1113

1214
jobs:
1315
installer:
1416
name: Installer
15-
runs-on: ubuntu-22.04
17+
runs-on: ${{ matrix.os }}
18+
strategy:
19+
matrix:
20+
include:
21+
- os: ubuntu-latest
22+
arch: amd64
23+
- os: ubuntu-latest
24+
arch: arm64
25+
# - os: macos-latest
26+
# arch: amd64
27+
- os: macos-latest
28+
arch: arm64
1629
steps:
1730
- name: Check out the repo
1831
uses: actions/checkout@v3
@@ -22,6 +35,9 @@ jobs:
2235
with:
2336
python-version: '3.10'
2437

38+
- name: macOS runner workaround
39+
run: pip install --upgrade pip pipx
40+
2541
- name: Install DipDup
2642
run: python src/dipdup/install.py --quiet --path .
2743

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog], and this project adheres to [Semantic Versioning].
66

7+
## [Unreleased]
8+
9+
### Fixed
10+
11+
- cli: `update` and `uninstall` commands no longer require a valid config.
12+
- cli: Fixed a regression in `new` command leading to crash with `TypeError`.
13+
- config: Fixed `jobs` section deserialization.
14+
715
## [6.4.0rc1] - 2022-12-09
816

917
## Added

docs/config/reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ http: HTTP client configuration</p>
346346

347347
<dl class="py class">
348348
<dt class="sig sig-object py" id="dipdup.config.JobConfig">
349-
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">dipdup.config.</span></span><span class="sig-name descname"><span class="pre">JobConfig</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">hook:</span> <span class="pre">~dipdup.config.HookConfig</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">crontab:</span> <span class="pre">~typing.Optional[str]</span> <span class="pre">=</span> <span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">interval:</span> <span class="pre">~typing.Optional[int]</span> <span class="pre">=</span> <span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">daemon:</span> <span class="pre">bool</span> <span class="pre">=</span> <span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">args:</span> <span class="pre">dict[str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">typing.Any]</span> <span class="pre">=</span> <span class="pre">&lt;factory&gt;</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#dipdup.config.JobConfig" title="Permalink to this definition">¶</a></dt>
349+
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">dipdup.config.</span></span><span class="sig-name descname"><span class="pre">JobConfig</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">hook:</span> <span class="pre">~dipdup.config.HookConfig</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">args:</span> <span class="pre">dict[str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">typing.Any]</span> <span class="pre">=</span> <span class="pre">&lt;factory&gt;</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">crontab:</span> <span class="pre">~typing.Optional[str]</span> <span class="pre">=</span> <span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">interval:</span> <span class="pre">~typing.Optional[int]</span> <span class="pre">=</span> <span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">daemon:</span> <span class="pre">bool</span> <span class="pre">=</span> <span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#dipdup.config.JobConfig" title="Permalink to this definition">¶</a></dt>
350350
<dd><p>Job schedule config</p>
351351
<dl class="field-list simple">
352352
<dt class="field-odd">Parameters<span class="colon">:</span></dt>

docs/getting-started/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ We aim to improve cross-platform compatibility in future releases ([issue](https
2626
The following command will install DipDup for the current user:
2727

2828
```shell
29-
python -c "$(curl -sSL https://dipdup.io/install.py)"
29+
curl -Lsf https://dipdup.io/install.py | python
3030
```
3131

3232
This script uses pipx under the hood to install `dipdup` and `datamodel-codegen` as CLI tools. Then you can use any package manager of your choice to manage versions of DipDup and other project dependencies.

docs/quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ A modern Linux/macOS distribution with Python 3.10 installed is required to run
1313
You can initialize a hello-world project interactively by choosing configuration options in the terminal. The following command will install DipDup for the current user:
1414

1515
```shell
16-
python -c "$(curl -sSL https://dipdup.io/install.py)"
16+
curl -Lsf https://dipdup.io/install.py | python
1717
```
1818

1919
Now, let's create a new project:

docs/release-notes/6.2.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Starting from this release, DipDup comes with an interactive installer to help y
99
Run the command below in the terminal:
1010

1111
```shell
12-
python -c "$(curl -sSL https://dipdup.io/install.py)"
12+
curl -Lsf https://dipdup.io/install.py | python
1313
```
1414

1515
Follow the instructions to complete the installation.

0 commit comments

Comments
 (0)