-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add restapi endpoint and fix ci * fix endpoint name * enable sorting * code cleanup * fix: endpoint serch_tassonomie param value * add bandit file * remove dependency * remove branch * typo * remove unused folder and fix tests * fail under 30 --------- Co-authored-by: Giulia Ghisini <[email protected]> Co-authored-by: Mauro Amico <[email protected]>
- Loading branch information
1 parent
a63c438
commit a9b4383
Showing
26 changed files
with
620 additions
and
348 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Security check - Bandit | ||
|
||
on: push | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Security check - Bandit | ||
uses: ioggstream/[email protected] | ||
with: | ||
project_path: src | ||
# ignore_failure: true | ||
|
||
# This is optional | ||
#- name: Security check report artifacts | ||
# uses: actions/upload-artifact@v4 | ||
# with: | ||
# name: Security report | ||
# path: output/security_report.txt | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- '**.md' | ||
- '**.rst' | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
python: ["3.10", "3.11"] | ||
plone: ["60"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Cache eggs | ||
uses: actions/cache@v3 | ||
with: | ||
path: eggs | ||
key: ${{ runner.OS }}-build-python${{ matrix.python }}-${{ matrix.plone }} | ||
- name: Set up Python ${{ matrix.python }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- name: Install dependencies | ||
run: | | ||
pip install -r requirements.txt -c constraints_plone${{ matrix.plone }}.txt | ||
cp test_plone${{ matrix.plone }}.cfg buildout.cfg | ||
- name: Install buildout | ||
run: | | ||
buildout -N code-analysis:return-status-codes=True | ||
- name: Code analysis | ||
run: | | ||
bin/code-analysis | ||
- name: Run tests | ||
run: | | ||
bin/test-coverage | ||
env: | ||
PROXY_BEARER_AUTH: on | ||
#- name: Upload coverage data to coveralls.io | ||
# run: | | ||
# pip install coveralls | ||
# coveralls --service=github | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# COVERALLS_FLAG_NAME: py${{ matrix.python }}-plone${{ matrix.plone }}-tz${{ matrix.tz }} | ||
# COVERALLS_PARALLEL: true | ||
|
||
#coveralls_finish: | ||
# needs: build | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Finished | ||
# run: | | ||
# pip install --upgrade coveralls | ||
# coveralls --service=github --finish | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,43 +27,75 @@ | |
:alt: License | ||
|
||
|
||
=============== | ||
iosanita.policy | ||
=============== | ||
======================= | ||
IO-Sanita policy | ||
======================= | ||
|
||
An add-on for Plone | ||
Policy per il backend dei portali Io-Sanita. | ||
|
||
Features | ||
-------- | ||
Questo pacchetto si occupa di installare tutte le dipendenze necessarie per il progetto. | ||
|
||
- Can be bullet points | ||
|
||
Rotte API | ||
========= | ||
|
||
Examples | ||
-------- | ||
@search-tassonomie | ||
------------------ | ||
|
||
This add-on can be seen in action at the following sites: | ||
- Is there a page on the internet where everybody can see the features? | ||
Endpoint che serve a ricercare i contenuti marcati da una determinata tassonomia. | ||
|
||
Parametri: | ||
|
||
Documentation | ||
------------- | ||
- **type** (obbligatorio): il nome dell'indice in catalogo della tassonomia | ||
- **value**: un eventuale valore per filtrare l'indice | ||
- **portal_type**: un filtro su uno specifico portal_type | ||
- **sort_on**: permette di ordinare i risultati in base ad un determinato indice | ||
- **sort_order**: permette di scegliere l'ordinamento da usare | ||
|
||
Full documentation for end users can be found in the "docs" folder, and is also available online at http://docs.plone.org/foo/bar | ||
Le tassonomie (*type*) utilizzabili sono limitate: | ||
|
||
- parliamo_di | ||
- a_chi_si_rivolge_tassonomia | ||
|
||
Translations | ||
------------ | ||
Esempio di chiamata:: | ||
|
||
This product has been translated into | ||
> http://localhost:8080/Plone/++api++/@search-tassonomie?type=a_chi_si_rivolge_tassonomia | ||
|
||
- Klingon (thanks, K'Plai) | ||
|
||
Risposta:: | ||
|
||
Installation | ||
------------ | ||
{ | ||
"@id": "http://localhost:8080/Plone/++api++/@search-tassonomie?type=a_chi_si_rivolge_tassonomia", | ||
"facets": { | ||
"portal_types": [ | ||
{ | ||
"title": "Struttura", | ||
"token": "Struttura" | ||
} | ||
] | ||
}, | ||
"items": [ | ||
{ | ||
"@id": "http://localhost:8080/Plone/struttura", | ||
"@type": "Struttura", | ||
"description": "", | ||
"enhanced_links_enabled": null, | ||
"getObjSize": "0 KB", | ||
"image_field": "", | ||
"image_scales": null, | ||
"mime_type": "text/plain", | ||
"review_state": "private", | ||
"title": "struttura", | ||
"type_title": "Struttura" | ||
} | ||
], | ||
"items_total": 1 | ||
} | ||
|
||
Install iosanita.policy by adding it to your buildout:: | ||
Installazione | ||
============= | ||
|
||
Per installare iosanita.policy bisogna per prima cosa aggiungerlo al buildout:: | ||
|
||
[buildout] | ||
|
||
|
@@ -73,39 +105,28 @@ Install iosanita.policy by adding it to your buildout:: | |
iosanita.policy | ||
|
||
|
||
and then running ``bin/buildout`` | ||
|
||
|
||
Authors | ||
------- | ||
|
||
Provided by awesome people ;) | ||
|
||
|
||
Contributors | ||
------------ | ||
|
||
Put your name here, you deserve it! | ||
e poi lanciare il buildout con ``bin/buildout``. | ||
|
||
- ? | ||
Successivamente va installato dal pannello di controllo di Plone. | ||
|
||
|
||
Contribute | ||
---------- | ||
Contribuisci | ||
============ | ||
|
||
- Issue Tracker: https://github.com/collective/iosanita.policy/issues | ||
- Source Code: https://github.com/collective/iosanita.policy | ||
- Documentation: https://docs.plone.org/foo/bar | ||
- Issue Tracker: https://github.com/redturtle/iosanita.policy/issues | ||
- Codice sorgente: https://github.com/redturtle/iosanita.policy | ||
|
||
|
||
Support | ||
------- | ||
Licenza | ||
======= | ||
|
||
If you are having issues, please let us know. | ||
We have a mailing list located at: [email protected] | ||
Questo progetto è rilasciato con licenza GPLv2. | ||
|
||
Autori | ||
====== | ||
|
||
License | ||
------- | ||
Questo progetto è stato sviluppato da **RedTurtle Technology**. | ||
|
||
The project is licensed under the GPLv2. | ||
.. image:: https://avatars1.githubusercontent.com/u/1087171?s=100&v=4 | ||
:alt: RedTurtle Technology Site | ||
:target: http://www.redturtle.it/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.