Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.Net Foundation onboarding #1436

Merged
merged 10 commits into from
Mar 16, 2020
70 changes: 70 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Contributing to Marten

We take Pull Requests!

## Before you send Pull Request


1. Contact the contributors via the [Gitter channel](https://gitter.im/JasperFx/marten) or the [Github Issue](https://github.com/JasperFx/marten/issues/new) to make sure that this is issue or bug should be handled with proposed way. Send details of your case and explain the details of the proposed solution.
2. Once you get approval from one of the maintainers, you can start to work on your code change.
3. After your change is ready to make sure that you covered your case with automated tests and verify that you limited the number of breaking changes to a bare minimum.
4. We also highly appreciate updates for the documentation.
5. Make sure that your code is compiling and all automated tests are passing.

## After you've sent Pull Request

1. Make sure that you applied or answered all the feedback from the maintainers.
2. We're trying to be as much responsive as we can, but if we didn't respond to you, feel free to ping us on the [Gitter channel](https://gitter.im/JasperFx/marten).
3. Pull request will be merged when you get approvals from at least 2 of the maintainers (and no rejection from others). Pull request will be tagged with the desired Marten Nuget version in which it will be released. We also label the Pull Requests with information about the type of change.

## Setup your work environment

We try to limit the number of necessary setup to a minimum, but few steps are still needed:

**1. Install .NET Core SDK 2.1 (or higher)**

Available [here](https://www.microsoft.com/net/download/core)

**2. Install .NET Framework 4.6.1 Developer Pack**

Available [here](https://dotnet.microsoft.com/download/thank-you/net461-developer-pack)

**3. Use PostgreSQL **9.5+** database with PLV8**

You need to enable the PLV8 extension inside of PostgreSQL for running JavaScript stored procedures for the nascent projection support.

Ensure the following:

- The login you are using to connect to your database is a member of the `postgres` role
- An environment variable of `marten_testing_database` is set to the connection string for the database you want to use as a testbed. (See the [Npgsql documentation](http://www.npgsql.org/doc/connection-string-parameters.html) for more information about PostgreSQL connection strings ).

_Help with PSQL/PLV8_

- On Windows, see [this link](http://www.postgresonline.com/journal/archives/360-PLV8-binaries-for-PostgreSQL-9.5-windows-both-32-bit-and-64-bit.html) for pre-built binaries of PLV8
- On *nix, check [marten-local-db](https://github.com/eouw0o83hf/marten-local-db) for a Docker based PostgreSQL instance including PLV8.

Once you have the codebase and the connection string file, run the build script or use the dotnet CLI to restore and build the solution.

You are now ready to contribute to Marten.

## Working with the Git

1. Fork the repository.
2. Create a feature branch from the `master` branch.
3. We're not squashing the changes and using rebase strategy for our branches (see more in [Git documentation](https://git-scm.com/book/en/v2/Git-Branching-Rebasing)). Having that, we highly recommend using clear commit messages. Commits should also represent the unit of change.
4. Before sending PR to make sure that you rebased the latest `master` branch from the main Marten repository.
5. When you're ready to create the [Pull Request on GitHub](https://github.com/JasperFx/marten/compare).

## Code style

Coding rules are set up in the [.editorconfig file](.editorconfig). This file is supported by all popular IDE (eg. Microsoft Visual Studio, Rider, Visual Studio Code) so if you didn't disabled it manually they should be automatically applied after opening the solution. We also recommend turning automatic formatting on saving to have all the rules applied.

## Licensing and legal rights

By contributing to Marten:

1. You assert that contribution is your original work.
2. You assert that you have the right to assign the copyright for the work.
3. You are accepting the [License](LICENSE).


2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 JasperFx
Copyright (c) .NET Foundation, Jeremy D. Miller, Babu Annamalai, Oskar Dudycz, Joona-Pekka Kokko and Contributors.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
40 changes: 29 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
## Polyglot Persistence Powered by .NET and PostgreSQL

[![Join the chat at https://gitter.im/JasperFx/Marten](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/JasperFx/Marten?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
![Twitter Follow](https://img.shields.io/twitter/follow/marten_lib?logo=Twitter&style=flat-square)
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/va5br63j7sbx74cm/branch/master?svg=true)](https://ci.appveyor.com/project/jasper-ci/marten/branch/master)
[![Linux Build status](https://dev.azure.com/jasperfx-marten/marten/_apis/build/status/marten?branchName=master)](https://dev.azure.com/jasperfx-marten/marten/_build/latest?definitionId=1&branchName=master)
[![Nuget Package](https://badgen.net/nuget/v/marten)](https://www.nuget.org/packages/Marten/)
Expand Down Expand Up @@ -38,10 +39,12 @@ _Help with PSQL/PLV8_
- On Windows, see [this link](http://www.postgresonline.com/journal/archives/360-PLV8-binaries-for-PostgreSQL-9.5-windows-both-32-bit-and-64-bit.html) for pre-built binaries of PLV8
- On *nix, check [marten-local-db](https://github.com/eouw0o83hf/marten-local-db) for a Docker based PostgreSQL instance including PLV8.

Once you have the codebase and the connection string file, run the rake script or use the dotnet CLI to restore and build the solution.
Once you have the codebase and the connection string file, run the [build command](https://github.com/JasperFx/marten#build-commands) or use the dotnet CLI to restore and build the solution.

You are now ready to contribute to Marten.

See more in [Contribution Guidelines](CONTRIBUTING.md).

### Tooling

* Unit Tests rely on [xUnit](http://xunit.github.io/) and [Shouldly](https://github.com/shouldly/shouldly)
Expand All @@ -51,16 +54,16 @@ You are now ready to contribute to Marten.

### Build Commands

Description | Windows Commandline | PowerShell | Linux Shell | DotNet CLI
---|---|---|---|---
Run restore, build and test | `build.cmd` | `build.ps1` | `build.sh` | `dotnet build src\Marten.sln`
Run all tests including mocha tests | `build.cmd test` | `build.ps1 test` | `build.sh test` | `dotnet run -p martenbuild.csproj -- test`
Run just mocha tests | `build.cmd mocha` | `build.ps1 mocha` | `build.sh mocha` | `dotnet run -p martenbuild.csproj -- mocha`
Run StoryTeller tests | `build.cmd storyteller` | `build.ps1 storyteller` | `build.sh storyteller` | `dotnet run -p martenbuild.csproj -- storyteller`
Open StoryTeller editor | `build.cmd open_st` | `build.ps1 open_st` | `build.sh open_st` | `dotnet run -p martenbuild.csproj -- open_st`
Run documentation website locally | `build.cmd docs` | `build.ps1 docs` | `build.sh docs` | `dotnet run -p martenbuild.csproj -- docs`
Publish docs | `build.cmd publish-docs` | `build.ps1 publish-docs` | `build.sh publish-docs` | `dotnet run -p martenbuild.csproj -- publish-docs`
Run benchmarks | `build.cmd benchmarks` | `build.ps1 benchmarks` | `build.sh benchmarks` | `dotnet run -p martenbuild.csproj -- benchmarks`
| Description | Windows Commandline | PowerShell | Linux Shell | DotNet CLI |
| ----------------------------------- | ------------------------ | ------------------------ | ----------------------- | -------------------------------------------------- |
| Run restore, build and test | `build.cmd` | `build.ps1` | `build.sh` | `dotnet build src\Marten.sln` |
| Run all tests including mocha tests | `build.cmd test` | `build.ps1 test` | `build.sh test` | `dotnet run -p martenbuild.csproj -- test` |
| Run just mocha tests | `build.cmd mocha` | `build.ps1 mocha` | `build.sh mocha` | `dotnet run -p martenbuild.csproj -- mocha` |
| Run StoryTeller tests | `build.cmd storyteller` | `build.ps1 storyteller` | `build.sh storyteller` | `dotnet run -p martenbuild.csproj -- storyteller` |
| Open StoryTeller editor | `build.cmd open_st` | `build.ps1 open_st` | `build.sh open_st` | `dotnet run -p martenbuild.csproj -- open_st` |
| Run documentation website locally | `build.cmd docs` | `build.ps1 docs` | `build.sh docs` | `dotnet run -p martenbuild.csproj -- docs` |
| Publish docs | `build.cmd publish-docs` | `build.ps1 publish-docs` | `build.sh publish-docs` | `dotnet run -p martenbuild.csproj -- publish-docs` |
| Run benchmarks | `build.cmd benchmarks` | `build.ps1 benchmarks` | `build.sh benchmarks` | `dotnet run -p martenbuild.csproj -- benchmarks` |

> Note: You should have a running Postgres instance while running unit tests or StoryTeller tests.

Expand All @@ -84,3 +87,18 @@ If you wish to insert code samples to a documentation page from the tests, wrap
Then to insert that code to the documentation, add `<[sample:name-of-sample]>`.

> Note: content is published to the `gh-pages` branch of this repository. Refer to build commands section to lookup the command for publishing docs.

## License

Copyright © .NET Foundation, Jeremy D. Miller, Babu Annamalai, Oskar Dudycz, Joona-Pekka Kokko and contributors.

Marten is provided as-is under the MIT license. For more information see [LICENSE](LICENSE).

## Code of Conduct

This project has adopted the code of conduct defined by the [Contributor Covenant](http://contributor-covenant.org/) to clarify expected behavior in our community.
For more information see the [.NET Foundation Code of Conduct](http://www.dotnetfoundation.org/code-of-conduct).

## .NET Foundation

This project is supported by the [.NET Foundation](http://www.dotnetfoundation.org) .
16 changes: 13 additions & 3 deletions documentation/content/stylish-portfolio.css
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,22 @@ hr.small {
}
}

.twitter-follow-button {
vertical-align: middle;
}

/* Footer */

footer {
padding: 100px 0;
text-align: center;
margin-bottom: 20px;
}

.twitter-follow-button {
vertical-align: middle;
footer ul {
list-style: none;
}

.dot-net-foundation-logo {
max-height: 100px;
padding: 10px;
}
14 changes: 14 additions & 0 deletions documentation/content/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,17 @@ nav.related-links {
.twitter-follow-button {
margin-top: 14px;
}

footer {
text-align: center;
margin-bottom: 20px;
}

footer ul {
list-style: none;
}

.dot-net-foundation-logo {
max-height: 75px;
padding: 10px;
}
10 changes: 10 additions & 0 deletions documentation/layout.htm
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,16 @@ <h1><[title]> <a href="https://github.com/jasperfx/marten/blob/master/documentat
</div><!--/right-->
</div><!--/row-->
</div><!--/container-->
<footer>
<ul>
<li>
<a href="https://dotnetfoundation.org">
<img class="dot-net-foundation-logo" src="https://raw.githubusercontent.com/dotnet/swag/master/logo/dotnetfoundation_v4.png" alt="Supported by the .NET Foundation" />
</a>
Supported by the <a href="https://dotnetfoundation.org">.NET Foundation</a>
</li>
</ul>
</footer>
</body>

<foot>
Expand Down
10 changes: 10 additions & 0 deletions documentation/splash.htm
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,16 @@ <h2>Event Store</h2>
</div>
<hr>
</div> <!-- /container -->
<footer>
<ul>
<li>
<a href="https://dotnetfoundation.org">
<img class="dot-net-foundation-logo" src="https://raw.githubusercontent.com/dotnet/swag/master/logo/dotnetfoundation_v4.png" alt="Supported by the .NET Foundation" />
</a>
Supported by the <a href="https://dotnetfoundation.org">.NET Foundation</a>
</li>
</ul>
</footer>

<script type='text/javascript' src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type='text/javascript' src="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.