Skip to content

Commit 1684eb7

Browse files
committed
Initial commit
0 parents  commit 1684eb7

Some content is hidden

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

50 files changed

+4341
-0
lines changed

.editorconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
indent_style = space
8+
trim_trailing_whitespace = true
9+
10+
[*.py]
11+
indent_size = 4

.github/workflows/ci.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: CI
2+
on:
3+
push:
4+
pull_request:
5+
schedule:
6+
- cron: '0 8 * * 6'
7+
jobs:
8+
test:
9+
env:
10+
PIP_DISABLE_PIP_VERSION_CHECK: 1
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
os: ["ubuntu-20.04", "macos-latest"]
15+
python:
16+
- "3.7"
17+
- "3.8"
18+
- "3.9"
19+
- "3.10"
20+
- "3.11"
21+
- "3.12"
22+
- "3.13"
23+
- "pypy-3.9"
24+
- "pypy-3.10"
25+
include:
26+
- os: "windows-latest"
27+
python: "3.8"
28+
- os: "windows-latest"
29+
python: "3.9"
30+
- os: "windows-latest"
31+
python: "3.10"
32+
- os: "windows-latest"
33+
python: "3.11"
34+
- os: "windows-latest"
35+
python: "3.12"
36+
- os: "windows-latest"
37+
python: "3.13"
38+
exclude:
39+
- os: "macos-latest"
40+
python: "3.7"
41+
runs-on: ${{ matrix.os }}
42+
name: "Test: Python ${{ matrix.python }} on ${{ matrix.os }}"
43+
steps:
44+
- uses: actions/checkout@v4
45+
with:
46+
submodules: recursive
47+
- uses: actions/setup-python@v5
48+
with:
49+
python-version: ${{ matrix.python }}
50+
- uses: pypa/hatch@install
51+
- run: hatch test -v --cover --include python=$(echo ${{ matrix.python }} | tr -d '-') tests
52+
- run: hatch run coverage:xml
53+
- uses: codecov/codecov-action@v5
54+
with:
55+
fail_ci_if_error: true
56+
token: ${{ secrets.CODECOV_TOKEN }}
57+
typecheck:
58+
name: Type check
59+
runs-on: ubuntu-24.04
60+
steps:
61+
- uses: actions/checkout@v4
62+
- uses: actions/setup-python@v5
63+
with:
64+
python-version: "3.13"
65+
- uses: pypa/hatch@install
66+
- run: hatch run types:check
67+
fmt:
68+
name: Format and lint
69+
runs-on: ubuntu-24.04
70+
steps:
71+
- uses: actions/checkout@v4
72+
- uses: actions/setup-python@v5
73+
with:
74+
python-version: "3.13"
75+
- uses: pypa/hatch@install
76+
- run: hatch fmt --check

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.pyc
2+
dist/
3+
.coverage*

CHANGELOG.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
Note: this changelog only lists feature additions, not bugfixes. For details on
2+
those, see the Git history.
3+
4+
- v1.21
5+
- Drop support for Python 3.6: the minimum version supported is now Python
6+
3.7
7+
- v1.20
8+
- Drop support for Python 2 and old versions of Python 3: the minimum
9+
version supported is now Python 3.6
10+
- v1.19
11+
- Add `mode:` option for `create`
12+
- Add `exclude:` option for `link`
13+
- v1.18
14+
- Add `--only` and `--except` flags
15+
- Add support to run with `python -m dotbot`
16+
- Add `--force-color` option
17+
- v1.17
18+
- Add `canonicalize-path:` option for `link`
19+
- v1.16
20+
- Add `create` plugin
21+
- v1.15
22+
- Add `quiet:` option for `shell`
23+
- v1.14
24+
- Add `if:` option for `link`
25+
- v1.13
26+
- Add `--no-color` flag
27+
- v1.12
28+
- Add globbing support to `link`
29+
- v1.11
30+
- Add force option to `clean` to remove all broken symlinks
31+
- v1.10
32+
- Update `link` to support shorthand syntax for links
33+
- v1.9
34+
- Add support for default options for commands
35+
- v1.8
36+
- Update `link` to be able to create relative links
37+
- v1.7
38+
- Add support for plugins
39+
- v1.6
40+
- Update `link` to expand environment variables in paths
41+
- v1.5
42+
- Update `link` to be able to automatically overwrite broken symlinks
43+
- v1.4
44+
- Update `shell` to allow for selectively enabling/disabling stdin, stdout,
45+
and stderr
46+
- v1.3
47+
- Add support for YAML format configs
48+
- v1.2
49+
- Update `link` to be able to force create links (deleting things that were
50+
previously there)
51+
- Update `link` to be able to create parent directories
52+
- v1.1
53+
- Update `clean` to remove old broken symlinks
54+
- v1.0
55+
- Initial commit

CONTRIBUTING.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# Contributing
2+
3+
All kinds of contributions to Dotbot are greatly appreciated. For someone
4+
unfamiliar with the code base, the most efficient way to contribute is usually
5+
to submit a [feature request](#feature-requests) or [bug report](#bug-reports).
6+
If you want to dive into the source code, you can submit a [patch](#patches) as
7+
well, either working on your own ideas or [existing issues][issues].
8+
9+
## Feature Requests
10+
11+
Do you have an idea for an awesome new feature for Dotbot? Please [submit a
12+
feature request][issue]. It's great to hear about new ideas.
13+
14+
If you are inclined to do so, you're welcome to [fork][fork] Dotbot, work on
15+
implementing the feature yourself, and submit a patch. In this case, it's
16+
*highly recommended* that you first [open an issue][issue] describing your
17+
enhancement to get early feedback on the new feature that you are implementing.
18+
This will help avoid wasted efforts and ensure that your work is incorporated
19+
into the code base.
20+
21+
## Bug Reports
22+
23+
Did something go wrong with Dotbot? Sorry about that! Bug reports are greatly
24+
appreciated!
25+
26+
When you [submit a bug report][issue], please include relevant information such
27+
as Dotbot version, operating system, configuration file, error messages, and
28+
steps to reproduce the bug. The more details you can include, the easier it is
29+
to find and fix the bug.
30+
31+
## Patches
32+
33+
Want to hack on Dotbot? Awesome!
34+
35+
If there are [open issues][issues], you're more than welcome to work on those -
36+
this is probably the best way to contribute to Dotbot. If you have your own
37+
ideas, that's great too! In that case, before working on substantial changes to
38+
the code base, it is *highly recommended* that you first [open an issue][issue]
39+
describing what you intend to work on.
40+
41+
**Patches are generally submitted as pull requests.** Patches are also
42+
[accepted over email][email].
43+
44+
Any changes to the code base should follow the style and coding conventions
45+
used in the rest of the project. The version history should be clean, and
46+
commit messages should be descriptive and [properly
47+
formatted][commit-messages].
48+
49+
### Testing
50+
51+
When preparing a patch, it's recommended that you add unit tests
52+
that demonstrate the bug is fixed (or that the feature works). You
53+
can run tests on your local machine using [Hatch][hatch]:
54+
55+
```bash
56+
hatch test
57+
```
58+
59+
If you prefer to run the tests in an isolated container using Docker, you can
60+
do so with the following:
61+
62+
```bash
63+
docker run -it --rm -v "${PWD}:/dotbot" -w /dotbot python:3.13-bookworm /bin/bash
64+
```
65+
66+
After spawning the container, install Hatch with `pip install hatch`, and then
67+
run the tests.
68+
69+
### Type checking
70+
71+
You can run type checking with:
72+
73+
```bash
74+
hatch run types:check
75+
```
76+
77+
### Formatting and linting
78+
79+
You can run the [Ruff][ruff] formatter and linter with:
80+
81+
```bash
82+
hatch fmt
83+
```
84+
85+
---
86+
87+
If you have any questions about anything, feel free to [ask][email]!
88+
89+
[issue]: https://github.com/anishathalye/dotbot/issues/new
90+
[issues]: https://github.com/anishathalye/dotbot/issues
91+
[fork]: https://github.com/anishathalye/dotbot/fork
92+
[email]: mailto:[email protected]
93+
[commit-messages]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
94+
[hatch]: https://hatch.pypa.io/
95+
[ruff]: https://github.com/astral-sh/ruff

LICENSE.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The MIT License (MIT)
2+
=====================
3+
4+
**Copyright (c) Anish Athalye ([email protected])**
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy of
7+
this software and associated documentation files (the "Software"), to deal in
8+
the Software without restriction, including without limitation the rights to
9+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10+
of the Software, and to permit persons to whom the Software is furnished to do
11+
so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in all
14+
copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
SOFTWARE.

0 commit comments

Comments
 (0)