iucn-redlist-api 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,29 @@
1
+ name: Documentation
2
+ on:
3
+ push:
4
+ branches:
5
+ - master
6
+ - main
7
+ permissions:
8
+ contents: read
9
+ pages: write
10
+ id-token: write
11
+ jobs:
12
+ deploy:
13
+ environment:
14
+ name: github-pages
15
+ url: ${{ steps.deployment.outputs.page_url }}
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - uses: actions/configure-pages@v6
19
+ - uses: actions/checkout@v7
20
+ - uses: actions/setup-python@v6
21
+ with:
22
+ python-version: 3.x
23
+ - run: pip install zensical
24
+ - run: zensical build --clean
25
+ - uses: actions/upload-pages-artifact@v5
26
+ with:
27
+ path: site
28
+ - uses: actions/deploy-pages@v5
29
+ id: deployment
@@ -0,0 +1,25 @@
1
+ name: pre-commit
2
+
3
+ on:
4
+ push:
5
+ branches: main
6
+ pull_request:
7
+
8
+ jobs:
9
+ pre-commit:
10
+ runs-on: ubuntu-latest
11
+ timeout-minutes: 10
12
+
13
+ steps:
14
+ - name: Checkout repository
15
+ uses: actions/checkout@v6
16
+
17
+ - name: Set up Python
18
+ uses: actions/setup-python@v6
19
+ with:
20
+ python-version: "3.12"
21
+
22
+ - name: Install pre-commit & run pre-commit hooks
23
+ run: |
24
+ python3 -m pip install pre-commit
25
+ pre-commit run --all-files
@@ -0,0 +1,58 @@
1
+ # This workflow is designed to lint and test source code against multiple
2
+ # combinations of Python version, OS, and hardware architecture.
3
+
4
+ name: CI
5
+
6
+ on:
7
+ push:
8
+ branches:
9
+ - main
10
+ pull_request:
11
+ branches:
12
+ - main
13
+
14
+ permissions:
15
+ contents: read
16
+
17
+ concurrency:
18
+ group: ${{ github.event.number || github.run_id }}
19
+ cancel-in-progress: true
20
+
21
+ jobs:
22
+ test:
23
+ env:
24
+ PYTHONDEVMODE: 1
25
+ API_KEY: ${{ secrets.IUCN_RED_LIST_API_KEY }}
26
+ runs-on: ${{ matrix.os }}
27
+ strategy:
28
+ fail-fast: false
29
+ max-parallel: 1
30
+ matrix:
31
+ python-version: ["3.14"]
32
+ os: [ubuntu-latest]
33
+ install-via: [pip]
34
+ arch: [x64]
35
+
36
+ steps:
37
+ - uses: actions/checkout@v6
38
+
39
+ - name: Set up Python ${{ matrix.python-version }}
40
+ uses: actions/setup-python@v6
41
+ with:
42
+ python-version: ${{ matrix.python-version }}
43
+ architecture: ${{ matrix.arch }}
44
+ allow-prereleases: false
45
+
46
+ - name: Install uv
47
+ if: matrix.install-via == 'pip'
48
+ run: |
49
+ python3 -m pip install uv
50
+ uv --version
51
+
52
+ - name: Install project dependencies
53
+ run: |
54
+ make sync_deps_exact
55
+
56
+ - name: Run unit tests + Measure code coverage
57
+ run: |
58
+ make unittests
@@ -0,0 +1,165 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ tests/units/__pycache__/
4
+ *.py[cod]
5
+ *$py.class
6
+
7
+ # C extensions
8
+ *.so
9
+
10
+ # Distribution / packaging
11
+ .Python
12
+ build/
13
+ develop-eggs/
14
+ dist/
15
+ downloads/
16
+ eggs/
17
+ .eggs/
18
+ lib/
19
+ lib64/
20
+ parts/
21
+ sdist/
22
+ var/
23
+ wheels/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ *.py,cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+ cover/
54
+
55
+ # Translations
56
+ *.mo
57
+ *.pot
58
+
59
+ # Django stuff:
60
+ *.log
61
+ local_settings.py
62
+ db.sqlite3
63
+ db.sqlite3-journal
64
+
65
+ # Flask stuff:
66
+ instance/
67
+ .webassets-cache
68
+
69
+ # Scrapy stuff:
70
+ .scrapy
71
+
72
+ # Sphinx documentation
73
+ docs/_build/
74
+
75
+ # PyBuilder
76
+ .pybuilder/
77
+ target/
78
+
79
+ # Jupyter Notebook
80
+ .ipynb_checkpoints
81
+
82
+ # IPython
83
+ profile_default/
84
+ ipython_config.py
85
+
86
+ # pyenv
87
+ # For a library or package, you might want to ignore these files since the code is
88
+ # intended to run in multiple environments; otherwise, check them in:
89
+ # .python-version
90
+
91
+ # pipenv
92
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
93
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
94
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
95
+ # install all needed dependencies.
96
+ #Pipfile.lock
97
+
98
+ # poetry
99
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
100
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
101
+ # commonly ignored for libraries.
102
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
103
+ #poetry.lock
104
+
105
+ # pdm
106
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
107
+ #pdm.lock
108
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
109
+ # in version control.
110
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
111
+ .pdm.toml
112
+ .pdm-python
113
+ .pdm-build/
114
+
115
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
116
+ __pypackages__/
117
+
118
+ # Celery stuff
119
+ celerybeat-schedule
120
+ celerybeat.pid
121
+
122
+ # SageMath parsed files
123
+ *.sage.py
124
+
125
+ # Environments
126
+ .env
127
+ .venv
128
+ env/
129
+ venv/
130
+ ENV/
131
+ env.bak/
132
+ venv.bak/
133
+
134
+ # Spyder project settings
135
+ .spyderproject
136
+ .spyproject
137
+
138
+ # Rope project settings
139
+ .ropeproject
140
+
141
+ # mkdocs documentation
142
+ /site
143
+
144
+ # mypy
145
+ .mypy_cache/
146
+ .dmypy.json
147
+ dmypy.json
148
+
149
+ # Pyre type checker
150
+ .pyre/
151
+
152
+ # pytype static type analyzer
153
+ .pytype/
154
+
155
+ # Cython debug symbols
156
+ cython_debug/
157
+
158
+ # PyCharm
159
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
160
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
161
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
162
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
163
+ #.idea/
164
+
165
+ .DS_Store
@@ -0,0 +1,17 @@
1
+ repos:
2
+ # Ruff linting
3
+ - repo: https://github.com/astral-sh/ruff-pre-commit
4
+ rev: v0.16.5
5
+ hooks:
6
+ - id: ruff
7
+ args: [--fix]
8
+ - id: ruff-format
9
+
10
+ # Code hygiene checks
11
+ - repo: https://github.com/pre-commit/pre-commit-hooks
12
+ rev: v6.0.0
13
+ hooks:
14
+ - id: end-of-file-fixer
15
+ - id: check-yaml
16
+ - id: trailing-whitespace
17
+ - id: check-added-large-files
@@ -0,0 +1,17 @@
1
+ # Read the Docs configuration file for MkDocs projects
2
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3
+
4
+ # Required
5
+ version: 2
6
+
7
+ # Set the version of Python and other tools you might need
8
+ build:
9
+ os: ubuntu-lts-latest
10
+ tools:
11
+ python: "3.12"
12
+ commands:
13
+ - python3 -m pip install uv
14
+ - uv sync --verbose --active --all-groups --no-install-project --no-cache --refresh --exact
15
+ - uv run zensical build --clean
16
+ - mkdir -p _readthedocs
17
+ - cp -r site/ _readthedocs/html/
@@ -0,0 +1,8 @@
1
+ # Contributing
2
+
3
+ Contributors and contributions are welcome. More detailed guidelines will follow, but the basic process is:
4
+
5
+ 1. Get a working copy of this repository either as a direct clone or a clone of a fork.
6
+ 2. Create a pull request (PR) against the `main` branch of this repository with your proposed changes, and request a review from the maintainer (me).
7
+ 3. Address all comments and/or suggestions from the review, and re-request a review if required.
8
+ 4. On approval, either merge it yourself if you have the necessary permissions, or wait for the maintainer to merge it.