Skip to content

Commit

Permalink
README and CI testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
jfjlaros committed Mar 2, 2022
1 parent 2109ad4 commit dfb316c
Show file tree
Hide file tree
Showing 7 changed files with 277 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .github/CODE_OF_CONDUCT.md
@@ -0,0 +1,66 @@
# Contributor Covenant 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.

## Our Standards
Examples of behaviour 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 behaviour 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
behaviour and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behaviour.

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 behaviour 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 behaviour may be
reported by contacting the project team at mailto:jlaros@fixedpoint.nl. The
project team will review and investigate all complaints, and will respond in a
way that it deems 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/
64 changes: 64 additions & 0 deletions .github/CONTRIBUTING.md
@@ -0,0 +1,64 @@
# Contributing
Please follow these guidelines if you would like to contribute to the project.

---

## Table of Contents
Please read through these guidelines before you get started:

1. [Questions & Concerns](#questions--concerns)
2. [Issues & Bugs](#issues--bugs)
3. [Feature Requests](#feature-requests)
4. [Submitting Pull Requests](#submitting-pull-requests)
5. [Code Style](#code-style)

## Questions & Concerns
If you have any questions about using or developing for this project, reach out
to @jfjlaros or send an [email][email].

## Issues & Bugs
Submit an [issue][issues] or [pull request][compare] with a fix if you find any
bugs in the project. See [below](#submitting-pull-requests) for instructions on
sending in pull requests, and be sure to reference the [code style
guide](#code-style) first!

When submitting an issue or pull request, make sure you are as detailed as
possible and fill in all answers to questions asked in the templates. For
example, an issue that simply states "X/Y/Z is not working!" will be closed.

## Feature Requests
Submit an [issue][issues] to request a new feature. Features fall into one of
two categories:

1. **Major**: Major changes should be discussed with me via [email][email]. I am
always open to suggestions and will get back to you as soon as I can!
2. **Minor**: A minor feature can simply be added via a [pull request][compare].

## Submitting Pull Requests
Before you do anything, make sure you check the current list of [pull
requests][pull] to ensure you are not duplicating anyone's work. Then, do the
following:

1. Fork the repository and make your changes in a git branch: `git checkout -b
my-branch base-branch`
2. Read and follow the [code style guidelines](#code-style).
3. Make sure your feature or fix does not break the project! Test thoroughly.
4. Commit your changes, and be sure to leave a detailed commit message.
5. Push your branch to your forked repo on GitHub: `git push origin my-branch`
6. [Submit a pull request][compare] and hold tight!
7. If any changes are requested by the project maintainers, make them and
follow this process again until the changes are merged in.

## Code Style
Please follow the coding style conventions detailed below:

- [Google C++ Style Guide][cppguide].
- [Doxygen][doxygen].


[email]: mailto:jlaros@fixedpoint.nl
[issues]: https://github.com/jfjlaros/trie/issues/new
[compare]: https://github.com/jfjlaros/trie/compare
[pull]: https://github.com/jfjlaros/trie/pulls
[cppguide]: https://google.github.io/styleguide/cppguide.html
[doxygen]: http://doxygen.nl/
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/Bug_report.md
@@ -0,0 +1,28 @@
---
name: Bug report
about: Create a report to help us improve
---

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

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

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

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

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. Ubuntu Desktop 18.04]
- Version [e.g. 0.0.14]

**Additional context**
Add any other context about the problem here.
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/Feature_request.md
@@ -0,0 +1,18 @@
---
name: Feature request
about: Suggest an idea for this project
---

**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.
40 changes: 40 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,40 @@
# Submit a pull request
Thank you for submitting a pull request. To speed up the review process, please
ensure that everything below is true:

1. This is not a duplicate of an [existing pull request][1].
2. No existing features have been broken without good reason.
3. Your commit messages are detailed
4. The code style [guidelines][2] have been followed.
5. Documentation has been updated to reflect your changes.
6. Tests have been added or updated to reflect your changes.
7. All tests pass.

Any questions should be directed to @jfjlaros.

---

Replace any ":question:" below with information about your pull request.

## Pull Request Details
Provide details about your pull request and what it adds, fixes, or changes.

:question:

## Breaking Changes
Describe what features are broken by this pull request and why, if any.

:question:

## Issues Fixed
Enter the issue numbers resolved by this pull request below, if any.

1. :question:

## Other Relevant Information
Provide any other important details below.

:question:

[1]: https://github.com/jfjlaros/trie/pulls
[2]: https://github.com/jfjlaros/trie/blob/master/docs/CONTRIBUTING.md#code-style
25 changes: 25 additions & 0 deletions .github/workflows/cpp-library.yml
@@ -0,0 +1,25 @@
name: build
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt update
sudo apt install catch g++-11 valgrind
- name: Install submodules
run: |
git submodule init
git submodule update
- name: Test with catch
run: |
cd tests
make check
36 changes: 36 additions & 0 deletions README.rst
@@ -0,0 +1,36 @@
Generic C++ trie library
========================

.. image:: https://img.shields.io/github/last-commit/jfjlaros/trie.svg
:target: https://github.com/jfjlaros/trie/graphs/commit-activity
.. image:: https://github.com/jfjlaros/trie/actions/workflows/cpp-library.yml/badge.svg
:target: https://github.com/jfjlaros/trie/actions/workflows/cpp-library.yml
.. image:: https://readthedocs.org/projects/cpptrie/badge/?version=latest
:target: https://cpptrie.readthedocs.io/en/latest
.. image:: https://img.shields.io/github/release-date/jfjlaros/trie.svg
:target: https://github.com/jfjlaros/trie/releases
.. image:: https://img.shields.io/github/release/jfjlaros/trie.svg
:target: https://github.com/jfjlaros/trie/releases
.. image:: https://img.shields.io/github/languages/code-size/jfjlaros/trie.svg
:target: https://github.com/jfjlaros/trie
.. image:: https://img.shields.io/github/languages/count/jfjlaros/trie.svg
:target: https://github.com/jfjlaros/trie
.. image:: https://img.shields.io/github/languages/top/jfjlaros/trie.svg
:target: https://github.com/jfjlaros/trie
.. image:: https://img.shields.io/github/license/jfjlaros/trie.svg
:target: https://raw.githubusercontent.com/jfjlaros/trie/master/LICENSE.md

----

This library provides a generic trie_ implementation for small alphabets, the
structure of the leaf nodes can be specified by the user.

Apart from the basic operations, a generator is provided for easy iteration
over all words stored in the trie and a number of functions for *approximate
matching* are implemented.

Please see ReadTheDocs_ for the latest documentation.


.. _trie: https://en.wikipedia.org/wiki/Trie
.. _ReadTheDocs: https://cpptrie.readthedocs.io

0 comments on commit dfb316c

Please sign in to comment.