Skip to content

Commit

Permalink
Merge branch 'release-2.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
miguel-bermudo committed Feb 14, 2024
2 parents a867a8e + 8dfe1bf commit ba2b711
Show file tree
Hide file tree
Showing 41 changed files with 1,731 additions and 938 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/ci_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI tests

on:
push:
pull_request:
schedule:
- cron: '0 8 * * *'

jobs:
build:

strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
runs-on: ubuntu-20.04

services:
mariadb:
image: mariadb:latest
ports:
- 3306:3306
env:
MYSQL_USER: silence
MYSQL_PASSWORD: 123456
MYSQL_DATABASE: testing
MYSQL_ROOT_PASSWORD: 123456
options: --health-cmd="mariadb-admin ping" --health-interval=8s --health-timeout=4s --health-retries=10

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
- name: Test Silence
run: |
silence new ci_app --url https://github.com/DEAL-US/Silence-CI-Project
cd ci_app
silence createdb
silence createapi
silence run &
sleep 15
cd test
python run_tests.py
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

71 changes: 70 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,74 @@
# 1.2.3
# 2.2.0
- Autogenerated views do not allow users to view them by a specific primary key argument, as the view might not have access to said arguments, now only GetAll is implemented.
- request body parameters now show up on silence console if the corresponding flag is true in settings.py
- wontfix for DB table capitalization, linux users beware.

# 2.1.10
- Privacy improvements for logging and debug
- No information is provided anymore on whether a user exists when trying to log in
- Fixed automated testing for Python 3.6 (actions/setup-python#544)
- Refactored README and moved most of the info to the newly created [wiki page](https://github.com/DEAL-US/Silence/wiki).

# 2.1.9
- Code refactoring and general performance improvements

# 2.1.8
- Silence now issues a warning when a configuration setting in `settings.py` is unknown.
- Added autogeneration of a JS module for login and register, if they are enabled.
- `DATE` and `TIME` columns are now also serialized in ISO format.
- Autogenerate additional JS methods to query views by the primary keys from other tables that they contain.
- The `createapi` and `createtests` commands now support tables without a PK.
- Some code refactoring and improvements.

# 2.1.7
- Some improvements to logging:
- Full stack traces are now only printed if the debug mode is active, otherwise, just the error string is shown.
- The month in the access logs is now numerical instead of textual.
- Colors are (hopefully!) no longer mixed up on Windows when access and non-access log appear in quick succession.
- Fixed some bugs from the previous update and made detection of Flask logs more robust.

# 2.1.6
- Fixed the logging style after updating Flask.

# 2.1.5
- Big upgrade to all dependencies, especially to Flask to prevent a bug in Flask 1.X due to a recently upgraded transitive dependency (pallets/flask#4494).
- Improvements to some messages and formatting for the autogenerated JS files.
- The warning message when a new version is available now also includes a link to the changelog.

# 2.1.4
- Altered the test creator suite to better show the user what the different tests are doing, as well as replace the registration default test with a login one.

# 2.1.3
- Fixed a bug where tests could not be automatically generated if a `tests/` folder was not present.

# 2.1.2
- Fixed a bug where the autogenerated endpoints would not contain a field for the primary key if it was not autoincrement

# 2.1.1
- Added the setting `ALLOW_CLEAR_PASSWORDS` to allow clear text passwords stored in the users table to be used for login, defaults to `False`.

# 2.1.0
- Added the posibility to use a `$loggedId` parameter in any SQL query, which is replaced by the value of the primary key of the user performing the request. If the user is not authenticated, it becomes `NULL`. Thanks to [@S0ULIS](https://github.com/S0ULIS) for the pull request!
- Added a new optional `active_status` attribute for `USER_AUTH_DATA`. By setting this to the name of a boolean column in the users table, Silence will check whether the user is active when logging in. This can be disabled either by not specifying this attribute, or by setting the `CHECK_USER_IS_ACTIVE` setting to `False`.
- Added some info about Silence's maintainers in the autogenerated JS files.
- Fixed a bug regarding the access restriction via roles.
- Updated README

# 2.0.0
- **IMPORTANT:** Silence v2 is not compatible with projects generated using Silence v1.
- Added fine-grained endpoint access by role:
- Added a new optional `role` key to specify the role column in `USER_AUTH_DATA`.
- Added a new `DEFAULT_ROLE_REGISTER` setting to specify the role that should be assigned to new users when using the `/register` endpoint.
- Added a new `allowed_roles` parameters for the `@endpoint` decorator, which receives a list of the roles that can access the endpoint. There is a special value, `*`, which allows all roles to use the endpoint.
- Added a new way of creating endpoints as JSON files
- Added a new `createapi` command to auto generate the .json endpoint files and .js api consumption files automatically based on the database tables and already defined endpoints by the user. This feature can be toggled through `ENABLE_ENDPOINT_AUTO_GENERATION` in the `settings.py` file.

# 1.2.4
- Changed the serialization of datetime objects to follow ISO 8601.
- Bumped Flask-CORS to 3.0.9.
- Migrated the CI testing from Travis to GitHub Actions.

# 1.2.3
- Set the MIME type of `.js` files to `application/javascript` manually, to prevent the wrong type from being dispatched due to bad configurations of the Windows registry.

# 1.2.2
Expand Down
46 changes: 46 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
cff-version: 1.2.0
title: "Silence"
message: "If you use Silence in a research project, please consider citing it as:"
authors:
- family-names: "Borrego"
given-names: "Agustín"
orcid: "https://orcid.org/0000-0003-3750-8484"
- family-names: "Bermudo"
given-names: "Miguel"
- family-names: "Sola"
given-names: "Fernando"
- family-names: "Ayala"
given-names: "Daniel"
orcid: "https://orcid.org/0000-0003-2095-1009"
- family-names: "Hernández"
given-names: "Inma"
orcid: "https://orcid.org/0000-0001-8920-6635"
- family-names: "Ruiz"
given-names: "David"
orcid: "https://orcid.org/0000-0003-4460-5493"
preferred-citation:
type: article
authors:
- family-names: "Borrego"
given-names: "Agustín"
orcid: "https://orcid.org/0000-0003-3750-8484"
- family-names: "Bermudo"
given-names: "Miguel"
- family-names: "Sola"
given-names: "Fernando"
- family-names: "Ayala"
given-names: "Daniel"
orcid: "https://orcid.org/0000-0003-2095-1009"
- family-names: "Hernández"
given-names: "Inma"
orcid: "https://orcid.org/0000-0001-8920-6635"
- family-names: "Ruiz"
given-names: "David"
orcid: "https://orcid.org/0000-0003-4460-5493"
title: "Silence — A web framework for an agile generation of RESTful APIs"
journal: "SoftwareX"
volume: 20
pages: "101260"
year: 2022
doi: "10.1016/j.softx.2022.101260"
url: "https://www.sciencedirect.com/science/article/pii/S2352711022001789"
Loading

0 comments on commit ba2b711

Please sign in to comment.