Skip to content

Commit 0deebf4

Browse files
Dependencies
Co-authored-by: Stephen Celis <[email protected]>
0 parents  commit 0deebf4

File tree

83 files changed

+7013
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+7013
-0
lines changed

.github/CODE_OF_CONDUCT.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
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, religion, or sexual identity and orientation.
6+
7+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8+
9+
## Our Standards
10+
11+
Examples of behavior that contributes to a positive environment for our community include:
12+
13+
* Demonstrating empathy and kindness toward other people
14+
* Being respectful of differing opinions, viewpoints, and experiences
15+
* Giving and gracefully accepting constructive feedback
16+
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17+
* Focusing on what is best not just for us as individuals, but for the overall community
18+
19+
Examples of unacceptable behavior include:
20+
21+
* The use of sexualized language or imagery, and sexual attention or
22+
advances of any kind
23+
* Trolling, insulting or derogatory comments, and personal or political attacks
24+
* Public or private harassment
25+
* Publishing others' private information, such as a physical or email
26+
address, without their explicit permission
27+
* Other conduct which could reasonably be considered inappropriate in a
28+
professional setting
29+
30+
## Enforcement Responsibilities
31+
32+
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.
33+
34+
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.
35+
36+
## Scope
37+
38+
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.
39+
40+
## Enforcement
41+
42+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [email protected]. All complaints will be reviewed and investigated promptly and fairly.
43+
44+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45+
46+
## Enforcement Guidelines
47+
48+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49+
50+
### 1. Correction
51+
52+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53+
54+
**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.
55+
56+
### 2. Warning
57+
58+
**Community Impact**: A violation through a single incident or series of actions.
59+
60+
**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.
61+
62+
### 3. Temporary Ban
63+
64+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65+
66+
**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.
67+
68+
### 4. Permanent Ban
69+
70+
**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.
71+
72+
**Consequence**: A permanent ban from any sort of public interaction within the community.
73+
74+
## Attribution
75+
76+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77+
available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78+
79+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80+
81+
[homepage]: https://www.contributor-covenant.org
82+
83+
For answers to common questions about this code of conduct, see the FAQ at
84+
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Bug Report
2+
description: Something isn't working as expected
3+
labels: [bug]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thank you for contributing to Dependencies!
9+
10+
Before you submit your issue, please complete each text area below with the relevant details for your bug, and complete the steps in the checklist
11+
- type: textarea
12+
attributes:
13+
label: Description
14+
description: |
15+
A short description of the incorrect behavior.
16+
17+
If you think this issue has been recently introduced and did not occur in an earlier version, please note that. If possible, include the last version that the behavior was correct in addition to your current version.
18+
validations:
19+
required: true
20+
- type: checkboxes
21+
attributes:
22+
label: Checklist
23+
options:
24+
- label: I have determined whether this bug is also reproducible in a vanilla SwiftUI project.
25+
required: false
26+
- label: If possible, I've reproduced the issue using the `main` branch of this package.
27+
required: false
28+
- label: This issue hasn't been addressed in an [existing GitHub issue](https://github.com/pointfreeco/swift-dependencies/issues) or [discussion](https://github.com/pointfreeco/swift-dependencies/discussions).
29+
required: true
30+
- type: textarea
31+
attributes:
32+
label: Expected behavior
33+
description: Describe what you expected to happen.
34+
validations:
35+
required: false
36+
- type: textarea
37+
attributes:
38+
label: Actual behavior
39+
description: Describe or copy/paste the behavior you observe.
40+
validations:
41+
required: false
42+
- type: textarea
43+
attributes:
44+
label: Steps to reproduce
45+
description: |
46+
Explanation of how to reproduce the incorrect behavior.
47+
48+
This could include an attached project or link to code that is exhibiting the issue, and/or a screen recording.
49+
placeholder: |
50+
1. ...
51+
validations:
52+
required: false
53+
- type: input
54+
attributes:
55+
label: Dependencies version information
56+
description: The version of Dependencies used to reproduce this issue.
57+
placeholder: "'0.1.0' for example, or a commit hash"
58+
- type: input
59+
attributes:
60+
label: Destination operating system
61+
description: The OS running your application.
62+
placeholder: "'iOS 16' for example"
63+
- type: input
64+
attributes:
65+
label: Xcode version information
66+
description: The version of Xcode used to reproduce this issue.
67+
placeholder: "The version displayed from 'Xcode 〉About Xcode'"
68+
- type: textarea
69+
attributes:
70+
label: Swift Compiler version information
71+
description: The version of Swift used to reproduce this issue.
72+
placeholder: Output from 'xcrun swiftc --version'
73+
render: shell

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
blank_issues_enabled: false
2+
3+
contact_links:
4+
- name: Discussion
5+
url: https://github.com/pointfreeco/swift-dependencies/discussions
6+
about: Dependencies Q&A, ideas, and more
7+
- name: Documentation
8+
url: https://pointfreeco.github.io/swift-dependencies/main/documentation/dependencies/
9+
about: Read documentation for Dependencies
10+
- name: Videos
11+
url: https://www.pointfree.co/collections/composable-architecture/reducer-protocol/ep205-reducer-protocol-dependencies-part-1
12+
about: Watch videos to get a behind-the-scenes look at how Dependencies was motivated and built

.github/workflows/ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- '*'
10+
workflow_dispatch:
11+
12+
concurrency:
13+
group: ci-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
library:
18+
runs-on: macos-12
19+
strategy:
20+
matrix:
21+
xcode: ['14.2']
22+
config: ['debug', 'release']
23+
steps:
24+
- uses: actions/checkout@v3
25+
- name: Select Xcode ${{ matrix.xcode }}
26+
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
27+
- name: Run ${{ matrix.config }} tests
28+
run: CONFIG=${{ matrix.config }} make test
29+
- name: Build for library evolution
30+
run: make build-for-library-evolution
31+
32+
ubuntu-tests:
33+
strategy:
34+
matrix:
35+
os: [ubuntu-18.04, ubuntu-20.04]
36+
37+
runs-on: ${{ matrix.os }}
38+
39+
steps:
40+
- uses: actions/checkout@v3
41+
- name: Run tests
42+
run: make test-swift
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Documentation
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
push:
8+
branches:
9+
- main
10+
- protocol-clocks
11+
workflow_dispatch:
12+
13+
concurrency:
14+
group: docs-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
build:
19+
runs-on: macos-12
20+
steps:
21+
- name: Select Xcode 14.1
22+
run: sudo xcode-select -s /Applications/Xcode_14.1.app
23+
24+
- name: Checkout Package
25+
uses: actions/checkout@v3
26+
with:
27+
fetch-depth: 0
28+
29+
- name: Checkout gh-pages Branch
30+
uses: actions/checkout@v3
31+
with:
32+
ref: gh-pages
33+
path: docs-out
34+
35+
- name: Build documentation
36+
run: >
37+
rm -rf docs-out/.git;
38+
rm -rf docs-out/main;
39+
git tag -l --sort=-v:refname | grep -e "\d\+\.\d\+.0" | tail -n +6 | xargs -I {} rm -rf {};
40+
41+
for tag in $(echo "main"; git tag -l --sort=-v:refname | grep -e "\d\+\.\d\+.0" | head -6);
42+
do
43+
if [ -d "docs-out/$tag/data/documentation/dependencies" ]
44+
then
45+
echo "✅ Documentation for "$tag" already exists.";
46+
else
47+
echo "⏳ Generating documentation for Dependencies @ "$tag" release.";
48+
rm -rf "docs-out/$tag";
49+
50+
git checkout .;
51+
git checkout "$tag";
52+
53+
swift package \
54+
--allow-writing-to-directory docs-out/"$tag" \
55+
generate-documentation \
56+
--target Dependencies \
57+
--output-path docs-out/"$tag" \
58+
--transform-for-static-hosting \
59+
--hosting-base-path /swift-dependencies/"$tag" \
60+
&& echo "✅ Documentation generated for Dependencies @ "$tag" release." \
61+
|| echo "⚠️ Documentation skipped for Dependencies @ "$tag".";
62+
fi;
63+
done
64+
65+
- name: Fix permissions
66+
run: 'sudo chown -R $USER docs-out'
67+
68+
- name: Publish documentation to GitHub Pages
69+
uses: JamesIves/[email protected]
70+
with:
71+
branch: gh-pages
72+
folder: docs-out
73+
single-commit: true

.github/workflows/format.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Format
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency:
9+
group: format-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
swift_format:
14+
name: swift-format
15+
runs-on: macos-12
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: Xcode Select
19+
run: sudo xcode-select -s /Applications/Xcode_14.0.1.app
20+
- name: Tap
21+
run: brew tap pointfreeco/formulae
22+
- name: Install
23+
run: brew install Formulae/[email protected]
24+
- name: Format
25+
run: make format
26+
- uses: stefanzweifel/git-auto-commit-action@v4
27+
with:
28+
commit_message: Run swift-format
29+
branch: 'main'
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.DS_Store
2+
/.build
3+
/.swiftpm
4+
/Packages
5+
/*.xcodeproj
6+
xcuserdata/

Dependencies.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

0 commit comments

Comments
 (0)