Skip to content

Commit cfaf341

Browse files
authored
Refresh infra-structure and support cython 3.x (#16)
* Refresh infra-structure and support cython 3.x * review actions * add workflow_dispatch to ci-tests
1 parent 21a199b commit cfaf341

22 files changed

+512
-151
lines changed

.git_archival.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node: $Format:%H$
2+
node-date: $Format:%cI$
3+
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
4+
ref-names: $Format:%D$

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.git_archival.txt export-subst

.github/dependabot.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Reference:
2+
# - https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/keeping-your-actions-up-to-date-with-dependabot
3+
4+
version: 2
5+
updates:
6+
7+
- package-ecosystem: "github-actions"
8+
directory: "/"
9+
schedule:
10+
# Check for updates to GitHub Actions every weekday
11+
interval: "daily"
12+
labels:
13+
- "new: pull request"
14+
- "bot"

.github/workflows/ci-manifest.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Reference:
2+
# - https://github.com/actions/checkout
3+
4+
name: ci-manifest
5+
6+
on:
7+
pull_request:
8+
9+
push:
10+
branches:
11+
- "main"
12+
- "v*x"
13+
- "!conda-lock-auto-update"
14+
- "!pre-commit-ci-update-config"
15+
- "!dependabot/*"
16+
tags:
17+
- "v*"
18+
19+
workflow_dispatch:
20+
21+
concurrency:
22+
group: ${{ github.workflow }}-${{ github.ref }}
23+
cancel-in-progress: true
24+
25+
jobs:
26+
manifest:
27+
name: "check-manifest"
28+
uses: scitools/workflows/.github/workflows/ci-manifest.yml@2023.10.0

.github/workflows/ci-tests.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: ci-tests
2+
3+
on:
4+
pull_request:
5+
6+
push:
7+
branches:
8+
- "main"
9+
- "v*x"
10+
- "!conda-lock-auto-update"
11+
- "!pre-commit-ci-update-config"
12+
- "!dependabot/*"
13+
tags:
14+
- "v*"
15+
16+
workflow_dispatch:
17+
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.ref }}
20+
cancel-in-progress: true
21+
22+
jobs:
23+
tests:
24+
name: "tests py${{ matrix.python-version }}"
25+
runs-on: "ubuntu-latest"
26+
defaults:
27+
run:
28+
shell: bash -l {0}
29+
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
python-version: ["3.9", "3.10", "3.11", "3.12"]
34+
35+
steps:
36+
- uses: actions/checkout@v4
37+
with:
38+
fetch-depth: 0
39+
40+
- name: "conda install"
41+
uses: conda-incubator/setup-miniconda@v2
42+
with:
43+
miniforge-variant: Mambaforge
44+
miniforge-version: latest
45+
python-version: ${{ matrix.python-version }}
46+
activate-environment: mo-pack-dev
47+
environment-file: requirements/mo_pack.yml
48+
auto-update-conda: false
49+
auto-activate-base: false
50+
51+
- name: "conda configuration"
52+
run: |
53+
conda info
54+
conda list --explicit
55+
56+
- name: "test with py${{ matrix.python-version }}"
57+
run: |
58+
python setup.py build_ext --inplace
59+
pytest

.gitignore

Lines changed: 161 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,166 @@
1-
*.pyc
1+
# Reference https://github.com/github/gitignore/blob/main/Python.gitignore
22

3+
# setuptools-scm
4+
_version.py
5+
6+
# Byte-compiled / optimized / DLL files
7+
__pycache__/
8+
*.py[cod]
9+
*$py.class
10+
11+
# C extensions
12+
*.c
13+
*.so
14+
15+
# Distribution / packaging
16+
.Python
317
build/
18+
develop-eggs/
419
dist/
20+
downloads/
21+
eggs/
22+
.eggs/
23+
lib/
24+
lib64/
25+
parts/
26+
sdist/
27+
var/
28+
wheels/
29+
share/python-wheels/
30+
*.egg-info/
31+
.installed.cfg
32+
*.egg
33+
MANIFEST
34+
35+
# PyInstaller
36+
# Usually these files are written by a python script from a template
37+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
38+
*.manifest
39+
*.spec
40+
41+
# Installer logs
42+
pip-log.txt
43+
pip-delete-this-directory.txt
44+
45+
# Unit test / coverage reports
46+
htmlcov/
47+
.tox/
48+
.nox/
49+
.coverage
50+
.coverage.*
51+
.cache
52+
nosetests.xml
53+
coverage.xml
54+
*.cover
55+
*.py,cover
56+
.hypothesis/
57+
.pytest_cache/
58+
cover/
59+
60+
# Translations
61+
*.mo
62+
*.pot
63+
64+
# Django stuff:
65+
*.log
66+
local_settings.py
67+
db.sqlite3
68+
db.sqlite3-journal
69+
70+
# Flask stuff:
71+
instance/
72+
.webassets-cache
73+
74+
# Scrapy stuff:
75+
.scrapy
76+
77+
# Sphinx documentation
78+
docs/_build/
79+
80+
# PyBuilder
81+
.pybuilder/
82+
target/
83+
84+
# Jupyter Notebook
85+
.ipynb_checkpoints
86+
87+
# IPython
88+
profile_default/
89+
ipython_config.py
90+
91+
# pyenv
92+
# For a library or package, you might want to ignore these files since the code is
93+
# intended to run in multiple environments; otherwise, check them in:
94+
# .python-version
95+
96+
# pipenv
97+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
98+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
99+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
100+
# install all needed dependencies.
101+
#Pipfile.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/#use-with-ide
116+
.pdm.toml
117+
118+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
119+
__pypackages__/
120+
121+
# Celery stuff
122+
celerybeat-schedule
123+
celerybeat.pid
124+
125+
# SageMath parsed files
126+
*.sage.py
127+
128+
# Environments
129+
.env
130+
.venv
131+
env/
132+
venv/
133+
ENV/
134+
env.bak/
135+
venv.bak/
136+
137+
# Spyder project settings
138+
.spyderproject
139+
.spyproject
140+
141+
# Rope project settings
142+
.ropeproject
143+
144+
# mkdocs documentation
145+
/site
146+
147+
# mypy
148+
.mypy_cache/
149+
.dmypy.json
150+
dmypy.json
151+
152+
# Pyre type checker
153+
.pyre/
154+
155+
# pytype static type analyzer
156+
.pytype/
5157

6-
lib/mo_pack.egg-info/
158+
# Cython debug symbols
159+
cython_debug/
7160

8-
lib/mo_pack/_packing.c
9-
lib/mo_pack/_packing*.so
161+
# PyCharm
162+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
163+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
164+
# and can be added to the global gitignore or merged into this file. For a more nuclear
165+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
166+
#.idea/

.pre-commit-config.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
# See https://pre-commit.ci/#configuration
4+
5+
ci:
6+
autofix_prs: false
7+
repos:
8+
- repo: https://github.com/pre-commit/pre-commit-hooks
9+
rev: "v4.5.0"
10+
hooks:
11+
# Prevent giant files from being committed.
12+
- id: check-added-large-files
13+
# Check whether files parse as valid Python.
14+
- id: check-ast
15+
# Check for file name conflicts on case-insensitive file-systems.
16+
- id: check-case-conflict
17+
# Check for files that contain merge conflict strings.
18+
- id: check-merge-conflict
19+
# Check for debugger imports and py37+ `breakpoint()` calls in Python source.
20+
- id: debug-statements
21+
# Check TOML file syntax.
22+
- id: check-toml
23+
# Check YAML file syntax.
24+
- id: check-yaml
25+
# Makes sure files end in a newline and only a newline
26+
- id: end-of-file-fixer
27+
exclude: nae.20100104-06_0001_0001.pp
28+
# Replaces or checks mixed line ending
29+
- id: mixed-line-ending
30+
exclude: nae.20100104-06_0001_0001.pp
31+
# Don't commit to main branch.
32+
#- id: no-commit-to-branch
33+
# Trims trailing whitespace
34+
- id: trailing-whitespace
35+
exclude: nae.20100104-06_0001_0001.pp
36+
37+
- repo: https://github.com/codespell-project/codespell
38+
rev: "v2.2.6"
39+
hooks:
40+
- id: codespell
41+
types_or: [python, markdown]
42+
additional_dependencies: [tomli]
43+
44+
- repo: https://github.com/aio-libs/sort-all
45+
rev: "v1.2.0"
46+
hooks:
47+
- id: sort-all
48+
types: [file, python]
49+
50+
- repo: https://github.com/abravalheri/validate-pyproject
51+
rev: "v0.15"
52+
hooks:
53+
- id: validate-pyproject

.travis.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)