Skip to content

Commit

Permalink
Release v3.1.0 (#419)
Browse files Browse the repository at this point in the history
* first package draft

- removed statics
- add inline style to error.html
- allow sha256 to deliver the error.html
- added utils.coreBasePath to reference the package path

* Replaced db.py with a empty proxy to viur.datastore, removed depenencies for viur.core.db

* chore: update dependencies

* added github actions

* Added viur-datastore to requirements.txt

* Replaced calls to KeyClass with Key in tasks.py

* fix: update

* Re-Added translation() jinja2 function

* Fixed allocateIDs, updated viur.datastore to 0.3

* chore: disabled changelog check

* fix: update requirements and  version

* fix: added missing pytz

* Updated viur-datastore to 0.5

* Fixed deleteRecursive function in files

* Fixed ratelimit module

* Fixed running on Python 3.10

* Pass bone.getEmptyValue() in json render structure, handle custom types in CustomJsonEncoder

* Allow setBoneValue setting values to Empty again

* feat: added configureable db engine

- reuse db.py
- added viur.db.engine in conf

* Fixed serializing randomSliceBone

* Updated viur-datastore to 0.6

* Updated changelog

* deleteRecursive function in tree-prototype

* Fixed the new import system, updated viur-datastore to 0.7

* Fixed querying randomSliceBone with new datastore adapter

* Allow configuring the expiration of downloadURLs generated by JSON render

* Correct the response status code

Use the shorter `name` variable of the `HTTPException` instead of the verbose `descr`.
Then we also use the Reason-Phrases suggested in the RFC 7231 Sec. 6.1 (https://datatracker.ietf.org/doc/html/rfc7231#section-6.1).

Test with:
```py
class Index(BasicApplication):
	@Exposed
	def testEx(self):
		raise errors.NotFound()
```
and
```sh
curl -I http://localhost:8080/testEx
```

Old result:
```plain
HTTP/1.1 404 The requested resource could not be found.
...
```

New result:
```plain
HTTP/1.1 404 Not Found
```

* Disolved the redirect method in request.py

Fixes #367

* Updated viur-datastore to 0.8

* Fixed killSessionByUser function

* Fixed files embedded in textbones expiring

* Added support for src-sets in textBones

* Updated requirements, fixed logging

* revert old csp work around and added new extendCsp rules for error pages and google login

* cleaning unnecessary paths

* update requirements

* removed old datastore import

* updated gitignore

* readded path updates

* updated version

* removed github action for auto PyPI automatic release

* added pipenv script shortcuts to build and release on PyPI

* added requirements.txt to package_data

* Provide a get() function for skel.get() as well

* Don't use repr() as fallback for string

This breaks output of skeletons in HTML

* Log higher severity errors raises from bones

Provide a viur.debug.skeleton.fromClient config flag to log debug, which is easier for development.

* Fix: Don't fail when bone_unqiueIndexValue is None

This bug raises when a skeleton was configured to use unique bones while data has previously been written.

* RelSkel.unserialize() should accept dict

This is also stated in the docstring before, but didn't work as subsequent calls access properties not implemented in dict.

* Set x-viur-error in header with exception description

This enables Ajax-requests to access detailed information when something went wrong. This is already implemented in flare, for example.

* Fixes for second factor login in relation to ViUR3

* Fixes and improvements for the tree prototype

* Set content-type to application/json in dumpConfig

* Remove unused parameters from singleValueUnserialize

* Accept single values for multiple=True bones

This...
```python
b = stringBone(multiple=True)

skel["b"] = "test"
```
...will write `['t', 'e', 's', 't']` into the bone in the datastore.

This fix will write `["test"]`, as wanted.

* Allow overriding the fileName under wich a blob will be downloaded

* Update package requirements

* Update package requirements

* fix: removed forgotten resources js, code was embedded with sha to respect CSP

* Revert "Update package requirements"

This reverts commit bb5addd.

* Added support for new downloadUrl format in textBone

* Replaced original PR by assertion

* Simplified rootNode check condition as discussed

* fixed singleValueUnserialize in selectCountryBone.py

* Set parentnode and parentrepo before fromClient() (#402)

This change sets the readOnly-bones parentnode and parentrepo of a TreeSkel before the fromClient call. The reason for this is, that in a specific use-case, a unique value is build, which may only be unique per repository. This construction was made in a custom fromClient function implemented on the Skeleton, which requires the parentrepo to be known.

* Implement baseSkel for all module prototypes (#378)

* Provide a baseSkel for all prototypes

* Fixing some docstrings and function order.

* Update tree.py

* Update tree.py

* Fixed unique=True on multiple=True relationalBones (#401)

* Fixed unique=True on multiple=True relationalBones

* Removed dupplicate setting of self.multiple

* Feature/viur datastore0.9 (#400)

* Prepared for viur-datastore 0.9

* Added viur-datastore 0.9 hash, removed viur.debug.traceQueries config flag

* Updated changelog to include the information, where traceQueries can now be set

* Fixed deferred calls with _countdown set failing when called from a cronjob (#403)

* selectBone() values accept for list, tuple or callable (#390)

* selectBone() values accept for list, tuple or callable

- list and tuple are converted to dict
- callable allows to obtain values on demand by a callback

* Also recognize ISO3 codes

* Translate list/tuple-based values

* Fixed bug with userSkel.access-bone

This came in with the new selectBone implementation.

* Updated CHANGELOG.md

* Updated requirements.txt (#408)

* Fixed caching module, updated viur-datastore to 1.1 (#407)

* Fixed caching module, updated viur-datastore to 1.1

Replaces #406

* Update core/cache.py

Removed pointless except: raise

Co-authored-by: Sven Eberth <[email protected]>

Co-authored-by: Jan Max Meyer <[email protected]>
Co-authored-by: Sven Eberth <[email protected]>

* Fix `setBoneValue` to work with multiple and language bones (#410)

A value via `BaseSkeleton.setBoneValue()` was not setable to
a multiple or language `selectBone` and `stringBone`.
* Extend `baseBone.setBoneValue()` to fix this
* Add `language` parameter in `BaseSkeleton.setBoneValue()`
* Correct default `defaultValue` for multiple and language `selectBone`
* Fix and add several relatet docstrings and type annotations

* bumped viur-datastore to version 1.2.0 (#411)

Co-authored-by: Stefan Kögl <[email protected]>

* Improve SEO url integration (#404)

* Improve SEO url integration

* Correct the type annotation of the `@exposed` decorator
* Eliminate duplicate by calling `list()` instead
* Add docstrings
* Redirect to the current seo-key if the site was opened with an old one

* Use `utils.seoUrlToEntry`

* Accept fetch requests SEC_FETCH_SITE for 'same-site' local dev mode (#415)

Co-authored-by: Stefan Kögl <[email protected]>

* Feature/viur datastore bump to 1.2.1 (#414)

* minor polished version bump for viur-datastore to version 1.2.1

* wtf - now the new hash for viur-datastore is correct

Co-authored-by: Stefan Kögl <[email protected]>

* Fixed randomSliceBone returning no result if limit=1 (#413)

* Sorry - old hash for viur-datastore kept. This change will fix it. (#416)

Co-authored-by: Stefan Kögl <[email protected]>

* Fix buildDBFilter rawFilter condition (#388)

In case `rawFilter[name].lower() == "none"` and rawFilter[name] is something else than str, ViUR will crash here.

* Updated README.md and CHANGELOG.md

* Assert kwargs are empty on session security key (#417)

This little improvement might help to fix issues when porting from ViUR2 to ViUR3.

* Prepared Release 3.1.0 (#418)

With this release, responsibility for this repository has been transferred to [email protected];
further releases will be authored by him.

Co-authored-by: XeoN-GHMB <[email protected]>
Co-authored-by: Andreas H. Kelch <[email protected]>
Co-authored-by: Sven Eberth <[email protected]>
Co-authored-by: Jan Max Meyer <[email protected]>
Co-authored-by: Christos Athanasiadis <[email protected]>
Co-authored-by: Stefan Kögl <[email protected]>
Co-authored-by: Stefan Kögl <[email protected]>
  • Loading branch information
8 people authored Apr 15, 2022
1 parent 98b8cd3 commit 417f649
Show file tree
Hide file tree
Showing 86 changed files with 1,484 additions and 2,518 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: 🏗️Build and 📦publish ☀️release

on: push

jobs:
build:
name: 🏗️ build package
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8

- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- uses: actions/upload-artifact@master
with:
name: buildfiles
path: .

release:
name: ☀️create release
runs-on: ubuntu-latest
needs: [build]
if: "startsWith(github.ref, 'refs/tags/v')"

steps:
- uses: actions/download-artifact@master
with:
name: buildfiles
path: .

- name: Get version from tag
id: tag_name
run: |
echo ::set-output name=current_version::${GITHUB_REF#refs/tags/v}
- name: create release
uses: softprops/action-gh-release@v1
with:
files: dist/*
body: ${{ steps.changelog_reader.outputs.changes }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@
*.bak
.idea/
/docs/build/
dist
viur_core.egg-info
.env
45 changes: 45 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,51 @@ For the 2.x changelog see the [viur/server](https://github.com/viur-framework/se
### Removed



## [3.1.0]

### Added
- `viur.db.engine` config variable to inject different database drivers
- `viur.render.json.downloadUrlExpiration` config variable to specifiy the expiration of downloadUrls generated by JSON render
- Global jinja2 function "translate" for instances where compile-time resolving is not possible
- Passing getEmptyValue() in the structure definition in json-render
- Support for srcsets in textBone
- `language` paramater in `BaseSkeleton.setBoneValue()`
- Support for pypi packaging
- Re-Added translation() jinja2 function
- get() function to skeleton
- Support for overriding the fileName under wich a blob will be downloaded
- Implement baseSkel for all module prototypes (#378)

### Changed
- Replaced viur.core.db by viur-datastore (#400)
- selectBone() values accept for list, tuple or callable (#390)
- Improve SEO url integration: refactoring and redirect from old keys to the current
- Allow sec-fetch-site=same-site on local development server
- Set parentnode and parentrepo before fromClient() (#402)

### Fixed
- files embedded in textBones don't expire anymore and get correctly locked
- Several issues in randomSliceBone
- Recursive deletion in modules/file.py
- deleteRecursive function in tree-prototype
- killSessionByUser function
- Fixes on the Tree prototype (#381)
- Fixed deferred calls with _countdown set failing when called from a cronjob (#403)
- Fixed unique=True on multiple=True relationalBones (#401)
- `setBoneValue` works now for multiple and (multiple and language) bones (#410)
- default `defaultValue` for multiple and language `selectBone`
- randomSliceBone with limit=1 returning no result
- ratelimit module
- setBoneValue to allow setting back to empty
- Adding unique=True to existing skeletons
- Logins with second factor

### Removed
- conf['viur.debug.traceQueries'] flag. It has to be set on the viur-datastore config (viur.core.db.config["traceQueries"]).
- the unused `skel` parameter from singleValueUnserialize


## [3.0.3]

### Added
Expand Down
17 changes: 17 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
build="*"
twine="*"

[dev-packages]

[requires]
python_version = "3.8"

[scripts]
build = "python -m build --wheel"
release = "twine upload dist/*"
Loading

0 comments on commit 417f649

Please sign in to comment.