Skip to content

Commit 1003a25

Browse files
committed
add readme
Signed-off-by: Todd Baert <[email protected]>
1 parent 00bf340 commit 1003a25

File tree

2 files changed

+81
-2
lines changed

2 files changed

+81
-2
lines changed

CONTRIBUTING.md

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Contributing
2+
3+
## System Requirements
4+
5+
Dotnet 6+ is recommended.
6+
7+
## Compilation target(s)
8+
9+
As in the Dotnet-SDK, we target C# LangVersion 7.3. The `Common.props` configures this automatically.
10+
11+
## Adding a project
12+
13+
1. Create a new library project under `src/`: `dotnet new classlib -o src/OpenFeatureContrib.MyComponent --langVersion 7.3`
14+
2. Create a new test project under `test/`: `dotnet new xunit -o test/OpenFeatureContrib.MyComponent.Test`
15+
3. Add the library project to the solution: `dotnet sln DotnetSdkContribs.sln add src/OpenFeatureContrib.MyComponent/OpenFeatureContrib.MyComponent.csproj`
16+
4. Add the test project to the solution: `dotnet sln DotnetSdkContribs.sln add test/OpenFeatureContrib.MyComponent.Test/OpenFeatureContrib.MyComponent.Test.csproj`
17+
5. Add the desired properties to your library's `.csproj` file (see example below).
18+
5. Remove all content besides the root element from your test project's `.csproj` file (all settings will be inherited).
19+
6. Add the new library project to `release-please-config.json`.
20+
7. Add a `version.txt` file to the root of your library with a version matching that in your new `.csproj` file, e.g. `0.0.1`.
21+
8. If you care to release a pre `1.0.0` version, add the same version above to `.release-please-manifest.json`. Failing to do this will release a `1.0.0` initial release.
22+
23+
Sample `.csproj` file:
24+
25+
```xml
26+
<Project Sdk="Microsoft.NET.Sdk">
27+
28+
<PropertyGroup>
29+
<PackageId>OpenFeature.MyComponent</PackageId>
30+
<VersionNumber>0.0.1</VersionNumber> <!--x-release-please-version -->
31+
<Version>$(VersionNumber)</Version>
32+
<AssemblyVersion>$(VersionNumber)</AssemblyVersion>
33+
<FileVersion>$(VersionNumber)</FileVersion>
34+
<Description>A very valuable OpenFeature contribution!</Description>
35+
<PackageProjectUrl>https://openfeature.dev</PackageProjectUrl>
36+
<RepositoryUrl>https://github.com/open-feature/dotnet-sdk-contrib</RepositoryUrl>
37+
<Authors>Me!</Authors>
38+
</PropertyGroup>
39+
40+
</Project>
41+
```
42+
43+
## Documentation
44+
45+
Any published modules must have documentation in their root directory, explaining the basic purpose of the module as well as installation and usage instructions.
46+
Instructions for how to develop a module should also be included (required system dependencies, instructions for testing locally, etc).
47+
48+
## Testing
49+
50+
Any published modules must have reasonable test coverage.
51+
The parent POM adds basic testing support for you.
52+
53+
Use `dotnet test` to test the entire project.
54+
55+
## Versioning and releasing
56+
57+
As described in the [README](./README.md), this project uses release-please, and semantic versioning.
58+
Breaking changes should be identified by using a semantic PR title.
59+
60+
## Dependencies
61+
62+
Keep dependencies to a minimum.
63+
Dependencies used only for building and testing should have a `<PrivateAssets>all</PrivateAssets>` element to prevent them from being exposed to consumers.

README.md

+18-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,18 @@
1-
# dotnet-sdk-contrib
2-
OpenFeature Providers and Hooks for .NET
1+
# OpenFeature .NET Contributions
2+
3+
![Experimental](https://img.shields.io/badge/experimental-breaking%20changes%20allowed-yellow)
4+
![Alpha](https://img.shields.io/badge/alpha-release-red)
5+
6+
This repository is intended for OpenFeature contributions which are not included in the [OpenFeature SDK](https://github.com/open-feature/dotnet-sdk).
7+
8+
## Releases
9+
10+
This repo uses _Release Please_ to release packages. Release Please sets up a running PR that tracks all changes for the library components, and maintains the versions according to [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/), generated when [PRs are merged](https://github.com/amannn/action-semantic-pull-request). When Release Please's running PR is merged, any changed artifacts are published.
11+
12+
## Contributing
13+
14+
see: [CONTRIBUTING.md](./CONTRIBUTING.md)
15+
16+
## License
17+
18+
Apache 2.0 - See [LICENSE](./LICENSE) for more information.

0 commit comments

Comments
 (0)