Skip to content

Commit

Permalink
chore: add build tools
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Mar 9, 2023
1 parent c9e274e commit 8283fda
Show file tree
Hide file tree
Showing 16 changed files with 813 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
root = true

[*]
indent_size = 4
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[Makefile]
indent_style = tab

[*.{tex,cls,lua,nix}]
indent_style = space
indent_size = 2
trim_trailing_whitespace = false

[*.md]
trim_trailing_whitespace = false
indent_size = 2
max_line_length = 80
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
74 changes: 74 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# 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, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of
experience, nationality, personal appearance, race, religion, or sexual identity
and orientation.

## Our Standards

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

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 behaviors 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 behavior may be
reported by contacting the project team. 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/
1 change: 1 addition & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# CONTRIBUTING
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Steps required to reproduce the problem

1.
2.
3.

## Expected Result

-

## Actual Result

-
7 changes: 7 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
This PR

- [x]
- [ ]
- [ ]

Follows #. Related to #. Fixes #.
47 changes: 47 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# https://github.com/probot/settings

branches:
- name: main
protection:
enforce_admins: false
required_pull_request_reviews:
dismiss_stale_reviews: true
require_code_owner_reviews: true
required_approving_review_count: 1
restrictions: null

labels:
- name: bug
color: ee0701

- name: dependencies
color: 0366d6

- name: enhancement
color: 0e8a16

- name: question
color: cc317c

- name: security
color: ee0701

- name: stale
color: eeeeee

repository:
allow_merge_commit: true
allow_rebase_merge: false
allow_squash_merge: false
default_branch: main
description:
"Mirror repository - Session 'Clean Architecture'"
topics: session
homepage: https://code.europa.eu/ecphp/session-clean-architecture
has_downloads: true
has_issues: true
has_pages: false
has_projects: false
has_wiki: false
name: session-clean-architecture
private: false
10 changes: 10 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
daysUntilStale: 60

daysUntilClose: 7

staleLabel: stale

markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
94 changes: 94 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Build

on: [push]

jobs:
dependencies:
name: Build dependencies
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}

steps:
- name: Check out source files
uses: actions/checkout@v3

- name: Create global variables
id: version
run:
echo "version=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

build:
name: Build PDF files
runs-on: ubuntu-latest
needs: dependencies

steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Check out source files
uses: actions/checkout@v3

- name: Install Nix
uses: cachix/install-nix-action@v18

- name: Build document
run: |
nix build . --impure --quiet
cp result/pandoc-presentation.pdf session--clean-architecture.pdf
- name: Upload build assets
uses: actions/upload-artifact@v3
with:
name: assets
path: session--clean-architecture.pdf

release:
name: "Create tag/pre-release"
runs-on: ubuntu-latest
needs: [dependencies, build]
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name:
Create pre-release (${{ needs.dependencies.outputs.version }})
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name:
v${{ github.run_number }}-${{
needs.dependencies.outputs.version }}
release_name:
Version ${{ github.run_number }} (${{
needs.dependencies.outputs.version }})
draft: false
prerelease: true

assets:
name: Upload release assets
runs-on: ubuntu-latest
needs: [dependencies, release]

steps:
- name: Download build assets (${{ matrix.assets.input }})
uses: actions/download-artifact@v3
with:
name: assets
path: assets

- name: Upload release assets
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: assets/session--clean-architecture.pdf
asset_name:
${{ github.run_number }}--session--clean-architecture--${{
needs.dependencies.outputs.version }}.pdf
asset_content_type: application/pdf
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/.direnv/
/build/
/bin/
/.vscode/
/out/
*.bak*
indent.log
/pandoc-presentation.pdf
/result
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/.direnv/
/.idea/
/vendor/
/docs/
/build/
CHANGELOG.md
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"proseWrap": "always"
}
29 changes: 29 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
BSD 3-Clause License

Copyright (c) 2019-2023, European Union.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Session "Clean Architecture at European Commission"

This presentation will be:

- "contributed", given by [Gilles Demaret](https://github.com/gdeconsulting)
from DG ECFIN
- in French, hence the language used below.

> Retour d’expérience sur l’implémentation d’une architecture logicielle nous
> venant de Robert C. Martin, « Uncle Bob » de son surnom. Ingénieur logiciel de
> renom, il a réalisé des ouvrages très célèbres tel que « Clean Code », « Clean
> Coder », mais surtout le livre dans lequel il détaille cette architecture: «
> Clean Architecture ».
> Les exemples de code sont en PHP mais les principes sont généraux.
## Usage

Build the presentation from Markdown files:

```shell
nix build .
open result/pandoc-presentation.pdf
```
Loading

0 comments on commit 8283fda

Please sign in to comment.