Skip to content

Commit

Permalink
Merge pull request #122 from dolfinus/update_readme
Browse files Browse the repository at this point in the history
Update README
  • Loading branch information
benwilson512 committed Mar 23, 2021
2 parents 7b056e7 + 0cbaf9c commit 54353bd
Show file tree
Hide file tree
Showing 3 changed files with 136 additions and 14 deletions.
56 changes: 56 additions & 0 deletions CODE_OF_CONDUCT.md
@@ -0,0 +1,56 @@
# Code of Conduct

Contact: conduct@absinthe-graphql.org

## Why have a Code of Conduct?

As contributors and maintainers of this project, we are committed to providing a friendly, safe and welcoming environment for all, regardless of age, disability, gender, nationality, race, religion, sexuality, or similar personal characteristic.

The goal of the Code of Conduct is to specify a baseline standard of behavior so that people with different social values and communication styles can talk about the Absinthe project effectively, productively, and respectfully, even in face of disagreements. The Code of Conduct also provides a mechanism for resolving conflicts in the community when they arise.

## Our Values

These are the values developers that participate in Absinthe project-related activities should aspire to:

* Be friendly and welcoming
* Be patient
* Remember that people have varying communication styles and that not everyone is using their native language. (Meaning and tone can be lost in translation.)
* Be thoughtful
* Productive communication requires effort. Think about how your words will be interpreted.
* Remember that sometimes it is best to refrain entirely from commenting.
* Be respectful
* In particular, respect differences of opinion. It is important that we resolve disagreements and differing views constructively.
* Avoid destructive behavior
* Derailing: stay on topic; if you want to talk about something else, start a new conversation.
* Unconstructive criticism: don't merely decry the current state of affairs; offer (or at least solicit) suggestions as to how things may be improved.
* Snarking (pithy, unproductive, sniping comments).

The following actions are explicitly forbidden:

* Insulting, demeaning, hateful, or threatening remarks.
* Discrimination based on age, disability, gender, nationality, race, religion, sexuality, or similar personal characteristic.
* Bullying or systematic harassment.
* Unwelcome sexual advances.
* Incitement to any of these.

## Where does the Code of Conduct apply?

If you participate in or contribute to the Absinthe project ecosystem in any way, you are encouraged to follow the Code of Conduct while doing so.

Explicit enforcement of the Code of Conduct applies to the official mediums operated by the Absinthe project:

* The official GitHub projects and code reviews.
* The absinthe-graphql.org website and documentation.
* The #absinthe-graphql Slack channel.

Activities related to Absinthe (conference talks, meetups, and other unofficial forums) are encouraged to adopt this Code of Conduct. Such groups must provide their own contact information.

Project maintainers may remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct.

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by emailing: conduct@absinthe-graphql.org. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. **All reports will be kept confidential**.

**The goal of the Code of Conduct is to resolve conflicts in the most harmonious way possible**. We hope that in most cases issues may be resolved through polite discussion and mutual agreement. Bannings and other forceful measures are to be employed only as a last resort. **Do not** post about the issue publicly or try to rally sentiment against a particular individual or group.

## Acknowledgements

This document was based on the Code of Conduct from the Elixir project, which is based on the Code of Conduct from the Go project with parts derived from Django's Code of Conduct, Rust's Code of Conduct, and the Contributor Covenant.
51 changes: 51 additions & 0 deletions CONTRIBUTING.md
@@ -0,0 +1,51 @@
# Contributing

Thank you for contributing to the project. We'd love to see your
issues and pull requests.

If you're creating a pull request, please consider these suggestions:

Fork, then clone the repo:

git clone git@github.com:your-username/dataloader.git

Install the dependencies:

mix deps.get

Make sure the tests pass.

Running tests for Dataloader requires a running instance of Postgres. The easiest way to do this is to run Postgres inside of Docker whilst running the Dataloader tests. In one terminal run:

docker run -p 5432:5432 -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=dataloader_test postgres

and in another terminal run:

MIX_ENV=test mix ecto.setup
mix test

If you kill the docker process, you will need to rerun the `ecto.setup` command as the data in the container is ephemeral (no mounted volumes are leveraged).

Make your change. Add tests for your change. Make the tests pass:

mix test

Push to your fork (preferably to a non-`master` branch) and
[submit a pull request][pr].

[pr]: https://github.com/absinthe-graphql/dataloader/compare/

We'll review and answer your pull request as soon as possible. We may suggest
some changes, improvements, or alternatives. Let's work through it together.

Some things that will increase the chance that your pull request is accepted:

* Write tests.
* Include `@typedoc`s, `@spec`s, and `@doc`s
* Try to match the style conventions already present (and Elixir conventions,
generally).
* Write a [good commit message][commit].

Thanks again for helping!

[commit]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
43 changes: 29 additions & 14 deletions README.md
@@ -1,6 +1,6 @@
# Dataloader

[![Build Status](https://img.shields.io/travis/absinthe-graphql/dataloader.svg?style=flat-square)](https://travis-ci.org/absinthe-graphql/dataloader)
[![Build Status](https://github.com/absinthe-graphql/dataloader/workflows/CI/badge.svg)](https://github.com/absinthe-graphql/dataloader/actions?query=workflow%3ACI)
[![Version](https://img.shields.io/hexpm/v/dataloader.svg)](https://hex.pm/packages/dataloader)
[![Hex Docs](https://img.shields.io/badge/hex-docs-lightgreen.svg)](https://hexdocs.pm/dataloader/)
[![Download](https://img.shields.io/hexpm/dt/dataloader.svg)](https://hex.pm/packages/dataloader)
Expand All @@ -23,6 +23,18 @@ def deps do
end
```

Note: Dataloader requires Elixir 1.10 or higher.

## Upgrading

See [CHANGELOG](./CHANGELOG.md) for upgrade steps between versions.

## Documentation

- [Dataloader hexdocs](https://hexdocs.pm/dataloader).
- For the tutorial, guides, and general information about Absinthe-related
projects, see [http://absinthe-graphql.org](http://absinthe-graphql.org).

## Usage

Central to Dataloader is the idea of a source. A single Dataloader struct can
Expand Down Expand Up @@ -60,27 +72,30 @@ a different source used for each context. This provides an easy way to enforce
data access rules within each context. See the `Dataloader.Ecto` moduledocs for
more details

## Sources
### Sources

Dataloader ships with two different built in sources. The first is the Ecto source for easily pulling out data with ecto. The other is a simple `KV` key value source. See each module for its respective documentation.

Anything that implements the `Dataloader.Source` protocol can act as a source.

Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc). The docs can be found at [https://hexdocs.pm/dataloader](https://hexdocs.pm/dataloader).
## Community

## Contributing
The project is under constant improvement by a growing list of
contributors, and your feedback is important. Please join us in Slack
(`#absinthe-graphql` under the Elixir Slack account) or the Elixir Forum
(tagged `absinthe`).

Running tests for Dataloader requires a running instance of Postgres. The easiest way to do this is to run Postgres inside of Docker whilst running the Dataloader tests. In one terminal run:
Please remember that all interactions in our official spaces follow
our [Code of Conduct](./CODE_OF_CONDUCT.md).

```terminal
$ docker run -p 5432:5432 -e POSTGRES_HOST_AUTH_METHOD=trust postgres
```
## Related Projects

and in another terminal run:
See the [GitHub organization](https://github.com/absinthe-graphql).

```terminal
$ MIX_ENV=test mix ecto.setup
$ mix test
```
## Contributing

Please follow [contribution guide](./CONTRIBUTING.md).

## License

If you kill the docker process, you will need to rerun the `ecto.setup` command as the data in the container is ephemeral (no mounted volumes are leveraged).
See [LICENSE.md](./LICENSE.md).

0 comments on commit 54353bd

Please sign in to comment.