Skip to content

Commit

Permalink
Merge branch 'main' into backup-cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
eimrek committed Oct 16, 2023
2 parents 3696d13 + 90cd4c8 commit ec151e2
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 56 deletions.
113 changes: 61 additions & 52 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,58 +5,67 @@ name: release
# and the pre-commit and tests pass

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+*"
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'

jobs:

check-release-tag:

# Only run this job on the main repository and not on forks
if: github.repository == 'aiidateam/disk-objectstore'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- run: python .github/workflows/check_release_tag.py $GITHUB_REF disk_objectstore/__init__.py

pre-commit:

runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- uses: pre-commit/[email protected]

publish:

name: Publish to PyPI
needs: [check-release-tag, pre-commit]
runs-on: ubuntu-latest

steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Build package
run: |
pip install wheel
python setup.py sdist bdist_wheel
- name: Publish to PyPI
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_KEY }}
check-release-tag:

if: github.repository == 'aiidateam/disk-objectstore'
runs-on: ubuntu-latest

steps:
- name: Checkout source
uses: actions/checkout@v2

- name: Install Python 3.8
uses: actions/setup-python@v4
with:
python-version: '3.8'

- name: Validate the tag version against the package version
run: python .github/workflows/check_release_tag.py $GITHUB_REF disk_objectstore/__init__.py

pre-commit:

needs: [check-release-tag]
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v2

- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
cache: 'pip'
cache-dependency-path: pyproject.toml

- uses: pre-commit/[email protected]

publish:

name: Publish to PyPI
needs: [check-release-tag, pre-commit]
runs-on: ubuntu-latest

steps:
- name: Checkout source
uses: actions/checkout@v2

- name: Install Python 3.8
uses: actions/setup-python@v4
with:
python-version: '3.8'

- name: Install flit
run: pip install flit~=3.4

- name: Build and publish
run: flit publish
env:
FLIT_USERNAME: __token__
FLIT_PASSWORD: ${{ secrets.PYPI_KEY }}
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@ repos:
- id: isort

- repo: https://github.com/asottile/pyupgrade
rev: v3.10.1
rev: v3.14.0
hooks:
- id: pyupgrade
args: [--py37-plus]

- repo: https://github.com/psf/black
rev: '23.7.0'
rev: '23.9.1'
hooks:
- id: black

- repo: https://github.com/PyCQA/pylint
rev: v3.0.0a7
rev: v3.0.0
hooks:
- id: pylint
additional_dependencies:
Expand Down
41 changes: 41 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,46 @@
# Changelog

## v1.0.0 (September 2023)

### Features

- Add support for `whence=2` in `PackedObjectReader.seek` [\[5515ab6\]](https://github.com/aiidateam/disk-objectstore/commit/5515ab6d75581b36ecb3e0b8ff37407e05abefda)
- Add support for changing compression when repacking, and add auto compression heuristics [\[599e87c\]](https://github.com/aiidateam/disk-objectstore/commit/599e87c852427e02062f04f5f3d2276013410710)
- Improve efficiency when accessing packed compressed objects [\[10edd63\]](https://github.com/aiidateam/disk-objectstore/commit/10edd6395455d7c59361e608396b672289d8de58)

### Changes

- A number of API methods changed the return type from bare dictionaries to dataclass instances [\[7a63462\]](https://github.com/aiidateam/disk-objectstore/commit/7a634626ea3e5f35aa3cdd458daf9d8b825d759a)

- `Container.get_object_stream_and_meta -> ObjectMeta`
- `Container.get_objects_meta -> ObjectMeta`
- `Container.get_object_meta -> ObjectMeta`
- `Container.count_objects -> ObjectCount`
- `Container.get_total_size -> TotalSize`
- `Container.validate -> ValidationIssues`

The dataclasses are importable from `disk_objectstore.dataclasses`.

- A number of API methods replaced using `os.path` with `str` paths, for `pathlib.Path` [\[df96142\]](https://github.com/aiidateam/disk-objectstore/commit/df9614236b7d420fb610313d70ffae51e7aead75)
The following methods now return a `pathlib.Path` instance:

- `Container.get_folder`
- `LazyOpener.path`

- Various improvements to docs and code [\[5ba9316\]](https://github.com/aiidateam/disk-objectstore/commit/5ba93162cd49d9b1ca7149c502349bfb06833255)

### Devops

- Moving documentation to `sphinx+myst` [\[2002f3c\]](https://github.com/aiidateam/disk-objectstore/commit/2002f3c3ec07f7ff46a04df293c8c9a7dff4db6a)
- Adopt PEP 621 and move build spec to `pyproject.toml` [\[4bd0c4e\]](https://github.com/aiidateam/disk-objectstore/commit/4bd0c4e01eaf3c149d4e11921b7ff4d42a5d5da5)
- Make types more permissive [\[c012056\]](https://github.com/aiidateam/disk-objectstore/commit/c0120568a992b41a55b325f3217d4902b5281070)

### Dependencies

- Add Python 3.11 support [\[afdae26\]](https://github.com/aiidateam/disk-objectstore/commit/afdae261a5849e994b5920ca07665fc6a19f3852)
- Unpin `sqlalchemy` adding support for `>=1.4.22` [\[a2a987f\]](https://github.com/aiidateam/disk-objectstore/commit/a2a987f02a128b7cc265982e102d210e6e17d6f6)
- Removed uneeded `ablog` dependencies [\[8165f58\]](https://github.com/aiidateam/disk-objectstore/commit/8165f58fefdd40b55555eef9a2d40ee280593232)

## v0.6.0 (September 2021)

- ⬆️ UPGRADE: Remove Python support for 3.5 and 3.6, and add support for 3.9.
Expand Down
2 changes: 1 addition & 1 deletion disk_objectstore/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

__all__ = ("Container", "ObjectType", "CompressMode")

__version__ = "0.6.0"
__version__ = "1.0.0"

0 comments on commit ec151e2

Please sign in to comment.