Skip to content

Commit

Permalink
housekeeping/updated to be contemporary (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
gimlichael authored Sep 18, 2024
1 parent f08ee57 commit 39abe7c
Show file tree
Hide file tree
Showing 26 changed files with 390 additions and 122 deletions.
4 changes: 2 additions & 2 deletions .docfx/BuildDocfxImage.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$version = minver -i
$version = minver -i -t v -v w
docfx metadata docfx.json
docker build -t yourbranding/classlibrary1:$version -f Dockerfile.docfx .
docker buildx build -t yourbranding/classlibrary1:$version --platform linux/arm64,linux/amd64 --load -f Dockerfile.docfx .
get-childItem -recurse -path api -include *.yml, .manifest | remove-item
40 changes: 4 additions & 36 deletions .docfx/Dockerfile.docfx
Original file line number Diff line number Diff line change
@@ -1,44 +1,12 @@
# escape=`

FROM nginx:1.25.4 AS base
FROM nginx:1.27.0-alpine AS base
RUN rm -rf /usr/share/nginx/html/*

FROM mono:6.12.0.182 AS build
ARG DOCFX_VERSION=v2.75.3

ENV PATH ${PATH}:/opt/docfx
ENV DOCFX_SOURCE_BRANCH_NAME="main"

# MONO IMAGE
RUN curl -sSL --output packages-microsoft-prod.deb https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb
RUN dpkg -i packages-microsoft-prod.deb
RUN apt-get update `
&& apt-get install -y powershell zip apt-transport-https dirmngr gnupg ca-certificates git `
&& mkdir -p /opt/docfx/ `
&& curl -sSL --output docfx.zip "https://github.com/dotnet/docfx/releases/download/${DOCFX_VERSION}/docfx-linux-x64-${DOCFX_VERSION}.zip" `
&& unzip docfx.zip -d /opt/docfx/ `
&& rm docfx.zip `
&& echo '#!/bin/bash' >> /opt/docfx/docfx `
&& echo 'exec mono /opt/docfx/docfx.exe $@' >> /opt/docfx/docfx `
&& chmod +x /opt/docfx/docfx `
&& apt-get -y purge unzip

SHELL ["/opt/microsoft/powershell/7/pwsh", "-Command"]

WORKDIR /build
FROM codebeltnet/docfx:2.77.0 AS build

ADD [".", "docfx"]
#ADD ["src", "src"] INCLUDE THIS WHEN DOCFX IS MATURED - SEE NOTE BELOW

RUN cd docfx; `
# docfx metadata; ` INCLUDE THIS WHEN DOCFX IS MATURED - SEE NOTE BELOW
docfx build

# After carefull considerations, I have concluded that DoxFx is not a matured product to be run entirely as part of a Docker image.
# Reason is that for DocFx to resolve cref correctly (and assembly names) it requires the msbuild project file (csproj) and not only the source files (cs).
# As stated by docfx team themself: Visual Studio 2019 is needed for docfx metadata msbuild projects.
# Given that VS2019 is to hard a dependency, I have moved the docfx metadata taskto my local development environment.
# It would have been great to have all documentation done in a container - but for now this is not an option without significant drawbacks.
RUN cd docfx; \
docfx build

FROM base AS final
WORKDIR /usr/share/nginx/html
Expand Down
4 changes: 2 additions & 2 deletions .docfx/PublishDocfxImage.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
$version = minver -i
docker tag sharedkernel-docfx:$version yourbranding/classlibrary1:$version
$version = minver -i -t v -v w
docker tag classlibrary1-docfx:$version yourbranding/classlibrary1:$version
docker push yourbranding/classlibrary1:$version
15 changes: 15 additions & 0 deletions .docfx/api/namespaces/ClassLibrary1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
uid: ClassLibrary1
summary: *content
---
The `ClassLibrary1` namespace contains types that ...

[!INCLUDE [availability-default](../../includes/availability-default.md)]

Complements: [xUnit: Capturing Output](https://xunit.net/docs/capturing-output) 🔗

### Extension Methods

|Type|Ext|Methods|
|--:|:-:|---|
|ClassLibrary1|⬇️|`Awesome`|
1 change: 1 addition & 0 deletions .docfx/docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"files": [
"api/**/*.yml",
"api/**/*.md",
"packages/**/*.md",
"toc.yml",
"*.md"
],
Expand Down
1 change: 1 addition & 0 deletions .docfx/includes/availability-default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Availability: .NET 8, .NET 6 and .NET Standard 2.0
1 change: 1 addition & 0 deletions .docfx/includes/availability-modern.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Availability: .NET 8 and .NET 6
7 changes: 7 additions & 0 deletions .docfx/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
uid: frontpage-md
title: ClassLibrary1
---
# ClassLibrary1

Landing page for ClassLibrary1.
4 changes: 4 additions & 0 deletions .docfx/toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- name: ClassLibrary1 API
href: api/ClassLibrary1.html
- name: NuGet
href: packages
135 changes: 135 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
# Contributor Covenant Code of Conduct

This document is adapted from the Contributor Covenant which is used by many open source projects,
including those under the [.NET Foundation](https://dotnetfoundation.org/code-of-conduct).

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

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

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders 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, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[INSERT CONTACT METHOD].
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
at [https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
52 changes: 52 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Contributing to `Classlibrary1`
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.

Please note we have a code of conduct, please follow it in all your interactions with the project.

## Code of Conduct
Please review our [code of conduct](CODE_OF_CONDUCT.md).

## Our Development Process
We use `trunk` based branching model that is aligned with todays DevSecOps practices.
All new features and/or fixes are merged into the `main` branch by creating a Pull Request.

## Pull Requests
We actively welcome your pull requests.

1. Fork the repo and create your branch from `main`
2. If you've added code that should be tested, add tests (DO follow [Microsoft Engineering Guidelines](https://github.com/dotnet/aspnetcore/wiki/Engineering-guidelines))
3. Any changes or additions requires documentation in the form of documenting public members
4. Ensure that all existing as well as new test passes
5. Issue that pull request with a big and heartful thanks for contributing

## Issues
We use GitHub issues to track public bugs. Please ensure your description is
clear and has sufficient instructions to be able to reproduce the issue.

## Coding Guidelines
* Please follow [Framework Design Guidelines](https://learn.microsoft.com/en-us/dotnet/standard/design-guidelines/)
* Please follow SOLID principles
* Please follow [Microsoft Engineering Guidelines](https://github.com/dotnet/aspnetcore/wiki/Engineering-guidelines)

## Manifesto
As aspiring Software Craftsmen we are raising the bar of professional software development by practicing it and helping others learn the craft.

Through this work we have come to value:

* Not only working software,
but also well-crafted software
* Not only responding to change,
but also steadily adding value
* Not only individuals and interactions,
but also a community of professionals
* Not only customer collaboration,
but also productive partnerships

That is, in pursuit of the items on the left we have found the items on the right to be indispensable.

[Manifesto for Software Craftsmanship](https://manifesto.softwarecraftsmanship.org/) is the originator of this text.

## License
By contributing to `ClassLibrary1`, you agree that your contributions will be licensed
under the MIT license.
File renamed without changes.
13 changes: 12 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
version: 2
updates:
- package-ecosystem: "nuget"
directory: "/src"
schedule:
interval: "weekly"
open-pull-requests-limit: 0
- package-ecosystem: "nuget"
directory: "/test"
schedule:
interval: "weekly"
open-pull-requests-limit: 0
- package-ecosystem: "github-actions"
directory: "/"
directory: "/.github/workflows"
schedule:
interval: "weekly"
open-pull-requests-limit: 0
Loading

0 comments on commit 39abe7c

Please sign in to comment.