Skip to content

Commit 51d8324

Browse files
committed
Add action to clean up branches
0 parents  commit 51d8324

File tree

8 files changed

+596
-0
lines changed

8 files changed

+596
-0
lines changed

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "monthly"
7+
groups:
8+
github-actions:
9+
patterns:
10+
- "*"

.github/workflows/test.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Test
2+
on:
3+
- push
4+
- pull_request
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v4
11+
- name: Set up Python
12+
uses: actions/setup-python@v5
13+
- name: Run pre-commit
14+
run: |
15+
pip install pre-commit
16+
pre-commit run --all-files
17+
- name: Test action
18+
uses: Scientific-Python-Translations/translations-sync@main
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
with:
22+
# Provided by user
23+
crowdin-project: "NumPy.Org"
24+
source-repo: "numpy/numpy.org"
25+
source-folder: "numpy.org/content/en/"
26+
source-ref: "main"
27+
translations-repo: "Scientific-Python-Translations/numpy.org-translations"
28+
translations-folder: "numpy.org-translations/content/en/"
29+
translations-ref: "main"
30+
translation-percentage: "90"
31+
approval-percentage: "0"
32+
use-precommit: "true"
33+
# Provided by organization secrets
34+
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
35+
passphrase: ${{ secrets.PASSPHRASE }}
36+
token: "not-a-real-token"
37+
crowdin-token: ${{ secrets.CROWDIN_TOKEN }}

.gitignore

Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.nox/
43+
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
48+
*.cover
49+
*.py,cover
50+
.hypothesis/
51+
.pytest_cache/
52+
cover/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
.pybuilder/
76+
target/
77+
78+
# Jupyter Notebook
79+
.ipynb_checkpoints
80+
81+
# IPython
82+
profile_default/
83+
ipython_config.py
84+
85+
# pyenv
86+
# For a library or package, you might want to ignore these files since the code is
87+
# intended to run in multiple environments; otherwise, check them in:
88+
# .python-version
89+
90+
# pipenv
91+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
93+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
94+
# install all needed dependencies.
95+
#Pipfile.lock
96+
97+
# UV
98+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99+
# This is especially recommended for binary packages to ensure reproducibility, and is more
100+
# commonly ignored for libraries.
101+
#uv.lock
102+
103+
# poetry
104+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105+
# This is especially recommended for binary packages to ensure reproducibility, and is more
106+
# commonly ignored for libraries.
107+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108+
#poetry.lock
109+
110+
# pdm
111+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
112+
#pdm.lock
113+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
114+
# in version control.
115+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
116+
.pdm.toml
117+
.pdm-python
118+
.pdm-build/
119+
120+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
121+
__pypackages__/
122+
123+
# Celery stuff
124+
celerybeat-schedule
125+
celerybeat.pid
126+
127+
# SageMath parsed files
128+
*.sage.py
129+
130+
# Environments
131+
.env
132+
.venv
133+
env/
134+
venv/
135+
ENV/
136+
env.bak/
137+
venv.bak/
138+
139+
# Spyder project settings
140+
.spyderproject
141+
.spyproject
142+
143+
# Rope project settings
144+
.ropeproject
145+
146+
# mkdocs documentation
147+
/site
148+
149+
# mypy
150+
.mypy_cache/
151+
.dmypy.json
152+
dmypy.json
153+
154+
# Pyre type checker
155+
.pyre/
156+
157+
# pytype static type analyzer
158+
.pytype/
159+
160+
# Cython debug symbols
161+
cython_debug/
162+
163+
# PyCharm
164+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
165+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
166+
# and can be added to the global gitignore or merged into this file. For a more nuclear
167+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
168+
#.idea/
169+
170+
# PyPI configuration file
171+
.pypirc
172+
173+
.DS_Store
174+
.env
175+
temp/

.pre-commit-config.yaml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
repos:
2+
- repo: https://github.com/MarcoGorelli/absolufy-imports
3+
rev: v0.3.1
4+
hooks:
5+
- id: absolufy-imports
6+
- repo: https://github.com/hadialqattan/pycln
7+
rev: v2.5.0
8+
hooks:
9+
- id: pycln
10+
- repo: https://github.com/psf/black-pre-commit-mirror
11+
rev: 25.1.0
12+
hooks:
13+
- id: black
14+
pass_filenames: true
15+
- repo: https://github.com/astral-sh/ruff-pre-commit
16+
rev: v0.9.4
17+
hooks:
18+
- id: ruff
19+
- repo: https://github.com/seddonym/import-linter
20+
rev: v2.1
21+
hooks:
22+
- id: import-linter
23+
stages: [manual]
24+
- repo: https://github.com/python-jsonschema/check-jsonschema
25+
rev: 0.31.1
26+
hooks:
27+
- id: check-github-workflows
28+
- repo: https://github.com/pre-commit/pre-commit-hooks
29+
rev: 2c9f875913ee60ca25ce70243dc24d5b6415598c # frozen: v4.6.0
30+
hooks:
31+
- id: check-added-large-files
32+
- id: check-ast
33+
- id: check-builtin-literals
34+
- id: check-case-conflict
35+
- id: check-json
36+
- id: check-toml
37+
- id: check-yaml
38+
- id: debug-statements
39+
- id: end-of-file-fixer
40+
- id: mixed-line-ending
41+
- id: trailing-whitespace
42+
43+
- repo: https://github.com/psf/black
44+
rev: 3702ba224ecffbcec30af640c149f231d90aebdb # frozen: 24.4.2
45+
hooks:
46+
- id: black
47+
48+
- repo: https://github.com/pre-commit/mirrors-prettier
49+
rev: ffb6a759a979008c0e6dff86e39f4745a2d9eac4 # frozen: v3.1.0
50+
hooks:
51+
- id: prettier
52+
files: \.(css|html|md|yml|yaml)
53+
args: [--prose-wrap=preserve]
54+
exclude: ^{{cookiecutter.__translations_repo_name}}/
55+
56+
- repo: https://github.com/asottile/pyupgrade
57+
rev: 32151ac97cbfd7f9dcd22e49516fb32266db45b4 # frozen: v3.16.0
58+
hooks:
59+
- id: pyupgrade
60+
args: [--py38-plus]
61+
62+
ci:
63+
autoupdate_schedule: monthly

LICENSE.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
The MIT License (MIT)
3+
4+
Copyright (c) 2023 Quansight, Inc. and contributors
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in
14+
all 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
22+
THE SOFTWARE.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# clean-up
2+

0 commit comments

Comments
 (0)