Skip to content

Commit

Permalink
Merge branch 'develop' into pep8
Browse files Browse the repository at this point in the history
  • Loading branch information
jmeixensperger authored Apr 2, 2019
2 parents 0458c35 + 070c6e0 commit 0254f9b
Show file tree
Hide file tree
Showing 20 changed files with 573 additions and 173 deletions.
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# http://editorconfig.org

root = true

[*]
# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.py]
indent_style = space
indent_size = 4

[Makefile]
indent_style = tab
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Bug report
about: Provide the details of the bug to us in order to further triage and fix
title: "[BUG]"
labels: bug
assignees: li-wu, GordonWang
assignees: lephino, arctan5x, jmeixensperger, li-wu, GordonWang

---

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Feature request
about: Suggest an idea or improvement for this project
title: "[FEATURE/IMPROVEMENT]"
labels: enhancement
assignees: li-wu, GordonWang
assignees: lephino, arctan5x, jmeixensperger, li-wu, GordonWang

---

Expand Down
91 changes: 4 additions & 87 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,99 +1,16 @@
# Contributing

When contributing to this repository, please first discuss the change you wish to make via issue,
email, or any other method with the owners of this repository before making a change.
When contributing to this repository, please read over the [contributing document](http://splunk.github.io/eventgen/CONTRIBUTE.html). [Create a issue](http://splunk.github.io/eventgen/FILE_ISSUES.html) to discuss your demand and follow the [guidelines](http://splunk.github.io/eventgen/CONTRIBUTE_CODE.html) to make the code change

Please note we have a code of conduct, please follow it in all your interactions with the project.
Please note we have a [code of conduct](http://splunk.github.io/eventgen/CONTRIBUTE.html#code-of-conduct), please follow it in all your interactions with the project.

## Pull Request Process

1. Ensure any install or build dependencies are removed before the end of the layer when doing a
build.
2. Update the splunk_eventgen/README/eventgen.conf.spec with details of changes to the interface, this includes new environment
variables, exposed ports, useful file locations and container parameters. Also, update the necessary documentation.
3. Increase the version numbers in splunk_eventgen/version.json. The versioning scheme we use is [SemVer](http://semver.org/).
4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you
do not have permission to do that, you may request the second reviewer to merge it for you.

## Code of Conduct

### Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

### Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

### Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

### Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

### Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at tonyl@splunk.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

### Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/

### Past / Active(marked as *) Contributors
bbingham*
arctan5x*
jmeixensperger*
li-wu*
GordonWang*
coccyx
Jaykul
allanwsplk
Expand Down
29 changes: 25 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ SMALL ?= 'tests/small'
MEDIUM ?= 'tests/medium'
LARGE ?= 'tests/large'
XLARGE ?= 'tests/xlarge'
NEWLY_ADDED_PY_FILES = $(shell git ls-files -o --exclude-standard | grep -E '\.py$$')
CHANGED_ADDED_PY_FILES = $(shell git ls-files -mo --exclude-standard | grep -E '\.py$$')

.PHONY: tests
.PHONY: tests, lint, format, docs

all: egg

Expand Down Expand Up @@ -90,9 +92,28 @@ run_controller: eg_network
docker run --name eg_controller --network eg_network -d -p 5672:5672 -p 15672:15672 -p 9500:9500 eventgen:latest controller

docs:
npm install -g gitbook-serve
cd docs/
gitbookserve
cd docs/; bundle install; bundle exec jekyll serve

build_spl: clean
python -m splunk_eventgen build --destination ./

lint:
ifeq ($(NEWLY_ADDED_PY_FILES), )
@echo 'No newly added python files. Skip...'
else
@flake8 $(NEWLY_ADDED_PY_FILES) || true
endif
@git diff -U0 -- '*.py' | flake8 --diff || true

format:
ifeq ($(CHANGED_ADDED_PY_FILES), )
@echo 'No changed python files. Skip...'
else
@isort $(CHANGED_ADDED_PY_FILES)
endif
ifeq ($(NEWLY_ADDED_PY_FILES), )
@echo 'No newly added python files. Skip...'
else
@yapf -i $(NEWLY_ADDED_PY_FILES)
endif

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ The Splunk Event Generator is licensed under the Apache License 2.0. Details can
### Support

This software is released as-is. Splunk provides no warranty and no support on this software.
If you have any issues with the software, please file an issue (https://github.com/splunk/eventgen/issues/new)
If you have any issues with the software, please read over the [guidelines](http://splunk.github.io/eventgen/FILE_ISSUES.md) and file an issue.
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_site
97 changes: 97 additions & 0 deletions docs/CONTRIBUTE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# Contribute to Eventgen

Please be sure to read the contribution guidelines before making or requesting a change.

## Code of conduct

### Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

### Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting


### Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

### Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

### Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at tonyl@splunk.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

### Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/

## Filing issues

Before filing an issue, please be sure to read the guidelines for what you're reporting:

* [Reporting bugs](FILE_ISSUES.md#reporting-bugs)
* [Requesting changes](FILE_ISSUES.md#requesting-changes)


## Contributing code

Before working on the code, please read over the guidelines about how to contributing code.

* [Pull Request](CONTRIBUTE_CODE.md#pull-request-guidelines)
* [Build Eventgen](CONTRIBUTE_CODE.md#how-to-build-eventgen)
* [Code Style](CONTRIBUTE_CODE.md#code-style-and-formatting-tools)


Loading

0 comments on commit 0254f9b

Please sign in to comment.