-
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.
"Create addon: collective.volto.stickyblocks"
- Loading branch information
0 parents
commit 51eab6c
Showing
59 changed files
with
2,063 additions
and
0 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,6 @@ | ||
[report] | ||
include = | ||
src/collective.volto/* | ||
omit = | ||
*/test* | ||
*/upgrades/* |
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,15 @@ | ||
[*] | ||
indent_style = space | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
charset = utf-8 | ||
|
||
[{*.py,*.cfg}] | ||
indent_size = 4 | ||
|
||
[{*.html,*.dtml,*.pt,*.zpt,*.xml,*.zcml,*.js}] | ||
indent_size = 2 | ||
|
||
[Makefile] | ||
indent_style = tab |
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 @@ | ||
CHANGES.rst merge=union |
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,16 @@ | ||
* collective.volto.stickyblocks version: | ||
* Plone Version: | ||
* Python version: | ||
* Operating System: Linux | ||
|
||
### Description | ||
|
||
Describe what you were trying to get done. | ||
Tell us what happened, what went wrong, and what you expected to happen. | ||
|
||
### What I Did | ||
|
||
``` | ||
Paste the command(s) you ran and the output. | ||
If there was a crash, please include the traceback here. | ||
``` |
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,65 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: Plone package | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
plone-version: | ||
- 'Plone52' | ||
- 'Plone60' | ||
python-version: [3.7, 3.8, 3.9] | ||
|
||
steps: | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
- uses: actions/checkout@v3 | ||
- uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cache/pip | ||
~/buildout-cache | ||
~/extends | ||
key: ${{ runner.os }}-tox-${{ matrix.python-version }}-${{ matrix.plone-version }}-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/*.cfg') }}-${{ hashFiles('**/constraints.txt') }}-${{ hashFiles('**/tox.ini') }} | ||
#restore-keys: | | ||
# ${{ runner.os }}-tox- | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: setup buildout cache | ||
run: | | ||
mkdir -p ~/buildout-cache/{eggs,downloads} | ||
mkdir ~/.buildout | ||
echo "[buildout]" > $HOME/.buildout/default.cfg | ||
echo "download-cache = $HOME/buildout-cache/downloads" >> $HOME/.buildout/default.cfg | ||
echo "eggs-directory = $HOME/buildout-cache/eggs" >> $HOME/.buildout/default.cfg | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install tox tox-gh-actions | ||
- name: Black-Check | ||
run: | | ||
tox -r -e black-check | ||
- name: Test with tox | ||
run: | | ||
tox -r | ||
env: | ||
PLONE-VERSION: ${{ matrix.plone-version }} | ||
PYTHON-VERSION: ${{ matrix.python-version }} | ||
- name: "Upload coverage to Codecov" | ||
uses: "codecov/codecov-action@v3" | ||
with: | ||
fail_ci_if_error: true | ||
if: matrix.python-version == '3.7' |
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,39 @@ | ||
.coverage | ||
.coverage.* | ||
*.egg-info | ||
*.log | ||
*.mo | ||
*.py? | ||
*.swp | ||
.*project | ||
# dirs | ||
/.settings/ | ||
bin/ | ||
buildout-cache/ | ||
develop-eggs/ | ||
eggs/ | ||
htmlcov/ | ||
include/ | ||
lib/ | ||
local/ | ||
node_modules/ | ||
parts/ | ||
dist/* | ||
test.plone_addon/ | ||
var/ | ||
# files | ||
.installed.cfg | ||
.mr.developer.cfg | ||
coverage.xml | ||
lib64 | ||
local.cfg | ||
log.html | ||
output.xml | ||
pip-selfcheck.json | ||
pyvenv.cfg | ||
report.html | ||
.vscode/ | ||
.tox/ | ||
reports/ | ||
venv/ | ||
# excludes |
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,71 @@ | ||
# This file is a template, and might need editing before it works on your project. | ||
# Official language image. Look for the different tagged releases at: | ||
# https://hub.docker.com/r/library/plone/tags/ | ||
image: python:3.7-buster | ||
|
||
# Change pip's cache directory to be inside the project directory since we can | ||
# only cache local items. | ||
variables: | ||
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" | ||
|
||
# Pip's cache doesn't store the python packages | ||
# https://pip.pypa.io/en/stable/reference/pip_install/#caching | ||
# | ||
# If you want to also cache the installed packages, you have to install | ||
# them in a virtualenv and cache it as well. | ||
cache: | ||
paths: | ||
- .cache/pip | ||
- venv/ | ||
- downloads/ | ||
- eggs/ | ||
|
||
# Set execution order: first run jobs on 'test' stage on parallel | ||
# then run jobs on 'report' stage | ||
stages: | ||
- test | ||
- report | ||
|
||
before_script: | ||
- echo "deb http://ftp.de.debian.org/debian/ stretch main contrib non-free" >> /etc/apt/sources.list | ||
- apt-get update | ||
- apt-get install -y firefoxdriver | ||
- apt-get install -y xvfb | ||
- python -V # Print out python version for debugging | ||
- pip install virtualenv | ||
- export LC_CTYPE=en_US.UTF-8 | ||
- export LC_ALL=en_US.UTF-8 | ||
- export LANG=en_US.UTF-8 | ||
- python3 -m venv venv | ||
- source venv/bin/activate | ||
- pip install -r requirements.txt | ||
- buildout bootstrap | ||
- bin/buildout -n -c buildout.cfg | ||
|
||
code-analysis: | ||
stage: test | ||
# still not available, see: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5004 | ||
# success_with_warnings: True | ||
script: | ||
- tox -e black-check | ||
- tox -e py37-lint | ||
|
||
test: | ||
stage: test | ||
script: | ||
- export DISPLAY=:99.0 | ||
# - sh -e /etc/init.d/xvfb start | ||
- tox -r | ||
|
||
coverage: | ||
stage: report | ||
script: | ||
- bin/createcoverage | ||
- bin/coverage html | ||
- bin/coverage report | ||
when: on_success | ||
|
||
coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+\%)/' | ||
artifacts: | ||
paths: | ||
- htmlcov |
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,61 @@ | ||
dist: bionic | ||
language: python | ||
cache: | ||
pip: true | ||
directories: | ||
- eggs | ||
- $HOME/buildout-cache | ||
- $HOME/.buildout | ||
python: | ||
- "2.7" | ||
matrix: | ||
include: | ||
- python: "2.7" | ||
env: PLONE_VERSION=43 | ||
- python: "2.7" | ||
env: PLONE_VERSION=51 | ||
- python: "2.7" | ||
env: PLONE_VERSION=52 | ||
- python: "3.7" | ||
env: PLONE_VERSION=52 | ||
fast_finish: true | ||
|
||
before_install: | ||
- mkdir -p $HOME/buildout-cache/{downloads,eggs,extends} | ||
- mkdir -p $HOME/.buildout | ||
- echo "[buildout]" > $HOME/.buildout/default.cfg | ||
- echo "download-cache = $HOME/buildout-cache/downloads" >> $HOME/.buildout/default.cfg | ||
- echo "eggs-directory = $HOME/buildout-cache/eggs" >> $HOME/.buildout/default.cfg | ||
- echo "extends-cache = $HOME/buildout-cache/extends" >> $HOME/.buildout/default.cfg | ||
- echo "abi-tag-eggs = true" >> $HOME/.buildout/default.cfg | ||
- git config --global user.email "[email protected]" | ||
- git config --global user.name "Travis CI" | ||
- sudo apt-get install -y firefox-geckodriver | ||
- virtualenv -p `which python` . | ||
- bin/pip install -r requirements.txt -c constraints_plone$PLONE_VERSION.txt | ||
- cp test_plone$PLONE_VERSION.cfg buildout.cfg | ||
|
||
install: | ||
- travis_retry pip install -U tox coveralls coverage -c constraints.txt | ||
|
||
before_script: | ||
- 'export DISPLAY=:99.0' | ||
- export VERBOSE=true | ||
- Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & | ||
- sleep 3 | ||
|
||
script: | ||
- PYTEST_ADDOPTS="-s -vv" tox | ||
|
||
after_success: | ||
- python -m coverage.pickle2json | ||
- coverage combine | ||
- coveralls | ||
|
||
notifications: | ||
email: | ||
recipients: | ||
# - [email protected] | ||
- {author} | ||
on_success: change | ||
on_failure: change |
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,9 @@ | ||
Changelog | ||
========= | ||
|
||
|
||
1.0a1 (unreleased) | ||
------------------ | ||
|
||
- Initial release. | ||
[RedTurtle] |
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,4 @@ | ||
Contributors | ||
============ | ||
|
||
- RedTurtle, [email protected] |
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,76 @@ | ||
Using the development buildout | ||
============================== | ||
|
||
plonecli | ||
-------- | ||
|
||
The convenient way, use plonecli build ;):: | ||
|
||
$ plonecli build | ||
|
||
or with --clear if you want to clean your existing venv:: | ||
|
||
$ plonecli build --clear | ||
|
||
Start your instance:: | ||
|
||
$ plonecli serve | ||
|
||
|
||
Without plonecli | ||
---------------- | ||
|
||
Create a virtualenv in the package:: | ||
|
||
$ python3 -m venv venv | ||
|
||
or with --clear if you want to clean your existing venv:: | ||
|
||
$ python3 -m venv venv --clear | ||
|
||
Install requirements with pip:: | ||
|
||
$ ./venv/bin/pip install -r requirements.txt | ||
|
||
bootstrap your buildout:: | ||
|
||
$ ./bin/buildout bootstrap | ||
|
||
Run buildout:: | ||
|
||
$ ./bin/buildout | ||
|
||
Start Plone in foreground:: | ||
|
||
$ ./bin/instance fg | ||
|
||
|
||
Running tests | ||
------------- | ||
|
||
$ tox | ||
|
||
list all tox environments:: | ||
|
||
$ tox -l | ||
py27-Plone43 | ||
py27-Plone51 | ||
py27-Plone52 | ||
py37-Plone52 | ||
build_instance | ||
code-analysis | ||
lint-py27 | ||
lint-py37 | ||
coverage-report | ||
|
||
run a specific tox env:: | ||
|
||
$ tox -e py37-Plone52 | ||
|
||
|
||
CI Github-Actions / codecov | ||
--------------------------- | ||
|
||
The first time you push the repo to github, you might get an error from codecov. | ||
Either you activate the package here: `https://app.codecov.io/gh/collective/+ <https://app.codecov.io/gh/collective/+>`_ | ||
Or you just wait a bit, codecov will activate your package automatically. |
Oops, something went wrong.