diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index ce4a4e0..adbbc00 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -31,7 +31,7 @@ jobs: fail-fast: false matrix: platform: ["ubuntu-latest", "macos-latest", "windows-latest"] - python-version: ["3.7", "3.8", "3.9"] + python-version: ["3.10", "3.11"] name: Python ${{ matrix.python-version }} on ${{ matrix.platform }} runs-on: ${{ matrix.platform }} @@ -68,7 +68,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: '3.x' + python-version: '3.10' - name: Check that tag version matches code version run: | @@ -84,8 +84,10 @@ jobs: pip install setuptools wheel twine - name: Build and publish env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + TWINE_USERNAME: "__token__" + TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + #TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + #TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | python setup.py sdist twine upload dist/* diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst index 8805f63..3b15919 100644 --- a/docs/source/changelog.rst +++ b/docs/source/changelog.rst @@ -5,6 +5,10 @@ Version 2.0 ----------- * Updated version compatible with HDA v2 +Version 1.14 +------------- +* The `download_dir` is created automatically + Version 1.13 ------------- * Minor documentation fixes diff --git a/docs/source/conf.py b/docs/source/conf.py index f86c8e7..5500730 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -15,8 +15,8 @@ copyright = "2023, ECMWF" author = "ECMWF" -release = "1.13" -version = "1.13" +release = "1.14" +version = "1.14" # -- General configuration diff --git a/hda/api.py b/hda/api.py index 7fee65b..30f194a 100644 --- a/hda/api.py +++ b/hda/api.py @@ -719,8 +719,10 @@ def stream(self, download_id, size, download_dir): """ full = self.full_url(*[f"dataaccess/download/{download_id}"]) - if download_dir is None or not os.path.exists(download_dir): + if download_dir is None: download_dir = "." + else: + os.makedirs(download_dir, exist_ok=True) logger.info( "Downloading %s (%s)", diff --git a/setup.py b/setup.py index 384c13c..c37b501 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ def read(fname): return io.open(file_path, encoding="utf-8").read() -version = "1.13" +version = "1.19" setuptools.setup( name="hda",