Skip to content

Commit

Permalink
Merge branch 'master' into gwaldo-master
Browse files Browse the repository at this point in the history
  • Loading branch information
deniszh committed Oct 24, 2022
2 parents 472be28 + 20bcee3 commit fa31ccc
Show file tree
Hide file tree
Showing 87 changed files with 4,532 additions and 960 deletions.
19 changes: 19 additions & 0 deletions .backportrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"upstream": "graphite-project/carbon",

// You can pre-select branches you use often
"branches": [
{ "name": "1.1.x", "checked": true },
{ "name": "1.0.x", "checked": false },
{ "name": "0.9.x", "checked": false }
],

// Backport multiple commits
"multipleCommits": true,

// Backport to multiple branches
"multipleBranches": true,

// Labels will be added to the PR
"labels": ["backport"]
}
12 changes: 12 additions & 0 deletions .deepsource.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version = 1

test_patterns = [
"*/test/**"
]

[[analyzers]]
name = "python"
enabled = true

[analyzers.meta]
runtime_version = "3.x.x"
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG]"
labels: bug
assignees: ''

---

**Please report bug only for carbon component here, if you want to to do so for Graphite, please use [graphite-web repo](https://github.com/graphite-project/graphite-web/issues/new/choose)**

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

**Expected behavior**
A clear and concise description of what you expected to happen.

**Environment (please complete the following information):**
- OS flavor: [e.g. Ubuntu, CentOS, Debian etc]
- Graphite version [e.g. 1.1.5, 1.0.6, etc]
- Setup type [e.g. pip, from sources, from OS packages etc]
- Python version [e.g. 2.7, 3.8 etc]

**Additional context**
Add any other context about the problem here.
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Please ask feature request only for carbon component here, if you want to to do so for Graphite, please use [graphite-web repo](https://github.com/graphite-project/graphite-web/issues/new/choose)**

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/general-support-question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: General support question
about: Ask anything carbon component
title: "[Q]"
labels: question
assignees: ''

---

**Please ask help only about carbon component here, if you want to to do so for Graphite, please use [graphite-web repo](https://github.com/graphite-project/graphite-web/issues/new/choose)**
17 changes: 17 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
56 changes: 56 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: "CodeQL"

on:
push:
branches: [ master, 0.9.x, 1.0.x, 1.1.x ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '37 7 * * 6'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
language: [ 'python' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

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

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
68 changes: 68 additions & 0 deletions .github/workflows/tests-amd64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: "Run tests for amd64 architecture"

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
include:
- name: "Python 2.7"
python-version: '2.7'
toxenv: "py27"
- name: "Pypy 2.7"
python-version: 'pypy-2.7'
toxenv: 'pypy'
- name: "Python 3.7"
python-version: '3.7'
toxenv: 'py37'
- name: "Pypy 3.7"
python-version: 'pypy-3.7'
toxenv: 'pypy3'
- name: "Python 3.8"
python-version: '3.8'
toxenv: 'py38'
- name: "Python 3.9"
python-version: '3.9'
toxenv: 'py39'
- name: "Python 3.10"
python-version: '3.10'
toxenv: 'py310'
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 'setuptools<58' --force-reinstall
pip install 'tox<4' tox-gh-actions flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Tests with tox
env:
TOXENV: ${{ matrix.toxenv }}
run: |
tox
- name: Linting
if: ${{ matrix.python-version==3.10 }}
env:
TOXENV: lint
run: |
tox
- name: Run Codecov
if: ${{ matrix.python-version==3.10 }}
env:
TOXENV: lint
run: |
pip install codecov
codecov
- name: Upload coverage to Codecov
if: ${{ matrix.python-version==3.10 }}
uses: codecov/codecov-action@v1
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,16 @@ dist
*.pyc
.idea
*.iml
.venv
.coverage
coverage.xml
.tox
conf/*.conf
storage
_trial_temp
htmlcov
*.swp
.eggs/
*.egg-info/
lib/twisted/plugins/dropin.cache
venv
74 changes: 65 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,74 @@
# http://travis-ci.org/#!/graphite-project/carbon
dist: bionic
language: python
python:
- 2.7
- pypy
python: 3.9

matrix:
include:
- python: 2.7
arch: s390x
env:
- TOXENV=py27
- python: 3.6
arch: s390x
env:
- TOXENV=py36
- python: 3.7
arch: s390x
env:
- TOXENV=py37
- python: 3.8
arch: s390x
env:
- TOXENV=py38
- python: 3.9
arch: s390x
env:
- TOXENV=py39
- python: 3.9
arch: s390x
env:
- TOXENV=lint
#PPC64LE jobs:-
- python: 2.7
arch: ppc64le
env:
- TOXENV=py27
- python: 3.6
arch: ppc64le
env:
- TOXENV=py36
- python: 3.7
arch: ppc64le
env:
- TOXENV=py37
- python: 3.8
arch: ppc64le
env:
- TOXENV=py38
- python: 3.9
arch: ppc64le
env:
- TOXENV=py39
- python: 3.9
arch: ppc64le
env:
- TOXENV=lint

env:
- TOXENV=ci
- TOXENV=py39
- TOXENV=py39-pyhash
- TOXENV=lint

install:
- pip install -r requirements.txt
- python setup.py install --prefix=$VIRTUAL_ENV --install-lib=$VIRTUAL_ENV/lib/python$TRAVIS_PYTHON_VERSION/site-packages
- pip install tox
- if [[ $(uname -m) == 's390x' ]]; then sudo rm -rf $HOME/.cache/pip; fi
- if echo "$TOXENV" | grep -q 'pyhash' ; then sudo apt-get -q install -y libboost-python-dev; fi
- if echo "$TOXENV" | grep -q '^py2' ; then pip install --upgrade pip virtualenv; fi
- pip install tox

script:
- tox -e $TOXENV
- tox -e $TOXENV

sudo: false
after_success:
- pip install codecov
- codecov
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ recursive-include conf/ *
recursive-include distro/ *
exclude conf/*.conf
include LICENSE
include README.md
include lib/carbon/amqp0-8.xml
include MANIFEST.in
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Carbon

[![Codacy Badge](https://api.codacy.com/project/badge/Grade/85221cd3bb6e49d7bbd6fed376a88264)](https://www.codacy.com/app/graphite-project/carbon?utm_source=github.com&utm_medium=referral&utm_content=graphite-project/carbon&utm_campaign=badger)
[![Build Status](https://secure.travis-ci.org/graphite-project/carbon.png?branch=master)](http://travis-ci.org/graphite-project/carbon)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fgraphite-project%2Fcarbon.svg?type=shield)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fgraphite-project%2Fcarbon?ref=badge_shield)
[![codecov](https://codecov.io/gh/graphite-project/carbon/branch/master/graph/badge.svg)](https://codecov.io/gh/graphite-project/carbon)

## Overview

Expand Down
34 changes: 34 additions & 0 deletions bin/carbon-aggregator-cache.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/env python
"""Copyright 2009 Chris Davis
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License."""

import sys
import os.path

# Figure out where we're installed
BIN_DIR = os.path.dirname(os.path.abspath(__file__))
ROOT_DIR = os.path.dirname(BIN_DIR)

# Make sure that carbon's 'lib' dir is in the $PYTHONPATH if we're running from
# source.
LIB_DIR = os.path.join(ROOT_DIR, "lib")
sys.path.insert(0, LIB_DIR)

from carbon.util import run_twistd_plugin # noqa
from carbon.exceptions import CarbonConfigException # noqa

try:
run_twistd_plugin(__file__)
except CarbonConfigException as exc:
raise SystemExit(str(exc))
Loading

0 comments on commit fa31ccc

Please sign in to comment.