From da1a82902fc99e346f0ca4d37159fcf93b51035f Mon Sep 17 00:00:00 2001 From: Henrik Andersson Date: Tue, 8 Oct 2024 08:09:49 +0200 Subject: [PATCH 1/8] Slim sdist --- MANIFEST.in | 2 -- mikeio/__init__.py | 4 ++-- pyproject.toml | 7 ++----- 3 files changed, 4 insertions(+), 9 deletions(-) delete mode 100644 MANIFEST.in diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 27ca010fe..000000000 --- a/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -graft mikeio/bin -include License.txt diff --git a/mikeio/__init__.py b/mikeio/__init__.py index c483450ca..2259317e2 100644 --- a/mikeio/__init__.py +++ b/mikeio/__init__.py @@ -21,9 +21,9 @@ # 'X.Y.dev0' is the canonical version of 'X.Y.dev' # -__version__ = "2.1.0" # TODO use git hash instead for dev version? +__version__ = "2.2.dev0" # TODO use git hash instead for dev version? # __version__ = "1.5.0" -__dfs_version__: int = 210 +__dfs_version__: int = 220 if "64" not in architecture()[0]: diff --git a/pyproject.toml b/pyproject.toml index 0b7793419..8a919ca6e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,14 +3,11 @@ requires = ["hatchling"] build-backend = "hatchling.build" [tool.hatch.build.targets.sdist] -exclude = ["notebooks", "tests", "images"] - -[tool.hatch.metadata] -allow-direct-references = true +exclude = ["notebooks", "tests", "images", ".github", "docs", ".devcontainer", "*.md", "*.txt", ".gitattributes"] [project] name="mikeio" -version="2.1.0" +version="2.2.dev0" dependencies = [ "mikecore>=0.2.1", "numpy>=1.22.0", From 2dd781d19aeebefcae4507a0132c9e64975bf3ff Mon Sep 17 00:00:00 2001 From: Henrik Andersson Date: Tue, 8 Oct 2024 08:16:47 +0200 Subject: [PATCH 2/8] Upload artifact --- .github/workflows/full_test.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/full_test.yml b/.github/workflows/full_test.yml index 601da8b2e..d3560e2ea 100644 --- a/.github/workflows/full_test.yml +++ b/.github/workflows/full_test.yml @@ -44,3 +44,10 @@ jobs: run: make doctest - name: Static type check run: make typecheck + - name: Build package + run: python -m build + - name: Upload build artifact + uses: actions/upload-artifact@v2 + with: + name: dist {{matrix.os}} {{matrix.python-version}} + path: dist/* From 554c2af2e17102198e3649bfd6b03f669ac1812f Mon Sep 17 00:00:00 2001 From: Henrik Andersson Date: Tue, 8 Oct 2024 08:18:36 +0200 Subject: [PATCH 3/8] Use latest version (bad Copilot) --- .github/workflows/full_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/full_test.yml b/.github/workflows/full_test.yml index d3560e2ea..4a7db6317 100644 --- a/.github/workflows/full_test.yml +++ b/.github/workflows/full_test.yml @@ -47,7 +47,7 @@ jobs: - name: Build package run: python -m build - name: Upload build artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: dist {{matrix.os}} {{matrix.python-version}} path: dist/* From a50ac1b417c1e2c64e33ad56ae90174bcb94f6d4 Mon Sep 17 00:00:00 2001 From: Henrik Andersson Date: Tue, 8 Oct 2024 08:21:08 +0200 Subject: [PATCH 4/8] Build tools --- .github/workflows/full_test.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/full_test.yml b/.github/workflows/full_test.yml index 4a7db6317..62bcc2359 100644 --- a/.github/workflows/full_test.yml +++ b/.github/workflows/full_test.yml @@ -45,7 +45,10 @@ jobs: - name: Static type check run: make typecheck - name: Build package - run: python -m build + run: + pip install build wheel twine + python -m build + - name: Upload build artifact uses: actions/upload-artifact@v4 with: From 6408f9fbedc48dc94cd066d69a01048fc6d846c4 Mon Sep 17 00:00:00 2001 From: Henrik Andersson Date: Tue, 8 Oct 2024 08:25:23 +0200 Subject: [PATCH 5/8] Yaml syntax --- .github/workflows/full_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/full_test.yml b/.github/workflows/full_test.yml index 62bcc2359..ca28374c2 100644 --- a/.github/workflows/full_test.yml +++ b/.github/workflows/full_test.yml @@ -45,7 +45,7 @@ jobs: - name: Static type check run: make typecheck - name: Build package - run: + run: | pip install build wheel twine python -m build From 6009563d1838e00173fae8223cbb060fa93ef52c Mon Sep 17 00:00:00 2001 From: Henrik Andersson Date: Tue, 8 Oct 2024 08:35:32 +0200 Subject: [PATCH 6/8] String interpolation --- .github/workflows/full_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/full_test.yml b/.github/workflows/full_test.yml index ca28374c2..c7615261b 100644 --- a/.github/workflows/full_test.yml +++ b/.github/workflows/full_test.yml @@ -52,5 +52,5 @@ jobs: - name: Upload build artifact uses: actions/upload-artifact@v4 with: - name: dist {{matrix.os}} {{matrix.python-version}} + name: dist-${{matrix.os}}-${{matrix.python-version}} path: dist/* From 3188dd1edb1ac0e20333f25ad27bb6e7b4a0faea Mon Sep 17 00:00:00 2001 From: Henrik Andersson Date: Tue, 8 Oct 2024 08:43:07 +0200 Subject: [PATCH 7/8] Update action versions --- .github/workflows/docs.yml | 4 ++-- .github/workflows/downstream_test.yml | 4 ++-- .github/workflows/full_test.yml | 4 ++-- .github/workflows/legacy_test.yml | 4 ++-- .github/workflows/notebooks_test.yml | 4 ++-- .github/workflows/perf_test.yml | 4 ++-- .github/workflows/python-publish.yml | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 3331b8792..1d1f2c121 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -9,9 +9,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.11 diff --git a/.github/workflows/downstream_test.yml b/.github/workflows/downstream_test.yml index bd582f99e..2545875a1 100644 --- a/.github/workflows/downstream_test.yml +++ b/.github/workflows/downstream_test.yml @@ -10,9 +10,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.9 - name: Install dependencies diff --git a/.github/workflows/full_test.yml b/.github/workflows/full_test.yml index c7615261b..3eda9b3f0 100644 --- a/.github/workflows/full_test.yml +++ b/.github/workflows/full_test.yml @@ -20,13 +20,13 @@ jobs: python-version: [3.9, "3.12"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: chartboost/ruff-action@v1 # Fail fast if there are any linting errors with: version: 0.6.2 # consistent with pyproject.toml ? src: mikeio # ignore notebooks - 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 dependencies diff --git a/.github/workflows/legacy_test.yml b/.github/workflows/legacy_test.yml index df10ac375..d8eece050 100644 --- a/.github/workflows/legacy_test.yml +++ b/.github/workflows/legacy_test.yml @@ -13,9 +13,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.9 diff --git a/.github/workflows/notebooks_test.yml b/.github/workflows/notebooks_test.yml index c3d37128c..ff6ee147b 100644 --- a/.github/workflows/notebooks_test.yml +++ b/.github/workflows/notebooks_test.yml @@ -14,9 +14,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.9' - name: Install mikeio diff --git a/.github/workflows/perf_test.yml b/.github/workflows/perf_test.yml index 1b39e73cf..9bd61290e 100644 --- a/.github/workflows/perf_test.yml +++ b/.github/workflows/perf_test.yml @@ -17,9 +17,9 @@ jobs: python-version: ["3.10"] 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 dependencies diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index c6b0174ba..e011f10ad 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -18,9 +18,9 @@ jobs: steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.10' - name: Install dependencies From 618d086a093b444e71e58ec6420dba9ce3750fb0 Mon Sep 17 00:00:00 2001 From: Henrik Andersson Date: Tue, 8 Oct 2024 08:52:15 +0200 Subject: [PATCH 8/8] Makefile duplicate line --- Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Makefile b/Makefile index e670e4be4..5e6693da0 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,12 @@ LIB = mikeio -LIB = mikeio - check: lint typecheck test build: typecheck test python -m build lint: - ruff check mikeio + ruff check $(LIB)/ format: ruff format $(LIB)/