Skip to content

Commit 8798c3d

Browse files
committed
Initial commit of code, tests and docs.
0 parents  commit 8798c3d

File tree

81 files changed

+4515
-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.

81 files changed

+4515
-0
lines changed

.bumpversion.cfg

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[bumpversion]
2+
current_version = 0.0.0
3+
commit = True
4+
tag = True
5+
6+
[bumpversion:file:.github/workflows/conda_ci.yml]
7+
8+
[bumpversion:file:README.rst]
9+
10+
[bumpversion:file:doc-source/index.rst]
11+
12+
[bumpversion:file:pypi_json/__init__.py]
13+
search = : str = "{current_version}"
14+
replace = : str = "{new_version}"
15+
16+
[bumpversion:file:pyproject.toml]
17+
search = version = "{current_version}"
18+
replace = version = "{new_version}"
19+
20+
[bumpversion:file:repo_helper.yml]

.dependabot/config.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# This file is managed by 'repo_helper'. Don't edit it directly.
2+
---
3+
version: 1
4+
update_configs:
5+
- package_manager: python
6+
directory: /
7+
update_schedule: weekly
8+
default_reviewers:
9+
- domdfcoding

.github/ISSUE_TEMPLATE/bug_report.md

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
labels: bug
5+
assignees: domdfcoding
6+
7+
---
8+
9+
<!-- Have you searched for similar issues? Before submitting this issue, please check the open issues and add a note before logging a new issue.
10+
11+
PLEASE USE THE TEMPLATE BELOW TO PROVIDE INFORMATION ABOUT THE ISSUE.
12+
THE ISSUE WILL BE CLOSED IF INSUFFICIENT INFORMATION IS PROVIDED.
13+
-->
14+
15+
## Description
16+
<!--Provide a brief description of the issue-->
17+
18+
19+
## Steps to Reproduce
20+
<!--Please add a series of steps to reproduce the issue.
21+
22+
If possible, please include a small, self-contained reproduction.
23+
-->
24+
25+
1.
26+
2.
27+
3.
28+
29+
## Actual result:
30+
<!--Please add screenshots if needed and include the Python traceback if present-->
31+
32+
33+
## Expected result:
34+
35+
36+
## Reproduces how often:
37+
<!--[Easily reproduced/Intermittent issue/No steps to reproduce]-->
38+
39+
40+
## Version
41+
42+
* Operating System:
43+
* Python:
44+
* pypi-json:
45+
46+
## Installation source
47+
<!-- e.g. GitHub repository, GitHub Releases, PyPI/pip, Anaconda/conda -->
48+
49+
50+
## Other Additional Information:
51+
<!--Any additional information, related issues, extra QA steps, configuration or data that might be necessary to reproduce the issue-->
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
labels: "enhancement"
5+
assignees: domdfcoding
6+
7+
---
8+
9+
<!-- Have you searched for similar issues? Someone may already be working on the feature you are suggesting. Before submitting this issue, please check the open issues and add a note before logging a new issue.
10+
-->
11+
12+
13+
## Description
14+
<!--Provide a clear and concise description of what the problem is and the improvement you are suggesting-->
15+
16+
<!--Please add screenshots if needed-->
17+
18+
19+
## Version
20+
21+
* Operating System:
22+
* Python:
23+
* pypi-json:
24+
25+
26+
## Other Additional Information:
27+
<!--Any additional information, related issues, etc.-->

.github/actions_build_conda.sh

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
# This file is managed by 'repo_helper'. Don't edit it directly.
3+
4+
set -e -x
5+
6+
python -m mkrecipe --type wheel || exit 1
7+
8+
# Switch to miniconda
9+
source "/home/runner/miniconda/etc/profile.d/conda.sh"
10+
hash -r
11+
conda activate base
12+
conda config --set always_yes yes --set changeps1 no
13+
conda install conda=4.8.5 conda-build=3.18.11
14+
conda info -a
15+
16+
conda config --add channels conda-forge || exit 1
17+
conda config --add channels domdfcoding || exit 1
18+
conda config --remove channels defaults
19+
20+
conda build conda -c conda-forge -c domdfcoding --output-folder conda/dist --skip-existing
21+
22+
exit 0

.github/actions_deploy_conda.sh

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
# This file is managed by 'repo_helper'. Don't edit it directly.
3+
4+
set -e -x
5+
6+
# Switch to miniconda
7+
source "/home/runner/miniconda/etc/profile.d/conda.sh"
8+
hash -r
9+
conda activate base
10+
conda config --set always_yes yes --set changeps1 no
11+
conda install conda=4.8.5 anaconda-client
12+
conda info -a
13+
14+
for f in conda/dist/noarch/pypi-json-*.tar.bz2; do
15+
[ -e "$f" ] || continue
16+
echo "$f"
17+
conda install "$f" || exit 1
18+
echo "Deploying to Anaconda.org..."
19+
anaconda -t "$ANACONDA_TOKEN" upload "$f" || exit 1
20+
echo "Successfully deployed to Anaconda.org."
21+
done
22+
23+
exit 0

.github/auto_assign.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# This file is managed by 'repo_helper'. Don't edit it directly.
2+
---
3+
addReviewers: true
4+
addAssignees: true
5+
reviewers:
6+
- domdfcoding
7+
numberOfReviewers: 0
8+
9+
# more settings at https://github.com/marketplace/actions/auto-assign-action

.github/dependabot.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This file is managed by 'repo_helper'. Don't edit it directly.
2+
---
3+
version: 2
4+
updates:
5+
- package-ecosystem: pip
6+
directory: /
7+
schedule:
8+
interval: weekly
9+
reviewers:
10+
- domdfcoding

.github/stale.yml

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# This file is managed by 'repo_helper'. Don't edit it directly.
2+
# Configuration for probot-stale - https://github.com/probot/stale
3+
---
4+
5+
# Number of days of inactivity before an Issue or Pull Request becomes stale
6+
daysUntilStale: 180
7+
8+
# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
9+
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
10+
daysUntilClose: 180
11+
12+
# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
13+
onlyLabels: []
14+
15+
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
16+
exemptLabels:
17+
- pinned
18+
- security
19+
- "[Status] Maybe Later"
20+
21+
# Set to true to ignore issues in a project (defaults to false)
22+
exemptProjects: false
23+
24+
# Set to true to ignore issues in a milestone (defaults to false)
25+
exemptMilestones: false
26+
27+
# Set to true to ignore issues with an assignee (defaults to false)
28+
exemptAssignees: false
29+
30+
# Label to use when marking as stale
31+
staleLabel: stale
32+
33+
# Comment to post when marking as stale. Set to `false` to disable
34+
markComment: >
35+
This issue has been automatically marked as stale because it has not had
36+
recent activity. It will be closed if no further activity occurs. Thank you
37+
for your contributions.
38+
39+
# Comment to post when removing the stale label.
40+
# unmarkComment: >
41+
# Your comment here.
42+
43+
# Comment to post when closing a stale Issue or Pull Request.
44+
# closeComment: >
45+
# Your comment here.
46+
47+
# Limit the number of actions per hour, from 1-30. Default is 30
48+
limitPerRun: 30
49+
50+
# Limit to only `issues` or `pulls`
51+
# only: issues
52+
53+
# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
54+
# pulls:
55+
# daysUntilStale: 30
56+
# markComment: >
57+
# This pull request has been automatically marked as stale because it has not had
58+
# recent activity. It will be closed if no further activity occurs. Thank you
59+
# for your contributions.
60+
61+
# issues:
62+
# exemptLabels:
63+
# - confirmed

.github/workflows/cleanup.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# This file is managed by 'repo_helper'. Don't edit it directly.
2+
---
3+
name: Artefact Cleaner
4+
on:
5+
schedule:
6+
- cron: 0 9 1 * *
7+
jobs:
8+
Clean:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: cleanup
12+
uses: glassechidna/artifact-cleaner@v2
13+
with:
14+
minimumAge: 1000000.0

.github/workflows/conda_ci.yml

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# This file is managed by 'repo_helper'. Don't edit it directly.
2+
---
3+
name: Conda Tests
4+
5+
on:
6+
push:
7+
branches: ["master"]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
tests:
14+
name: "Conda"
15+
runs-on: ubuntu-18.04
16+
17+
steps:
18+
- name: Checkout 🛎️
19+
uses: "actions/checkout@v2"
20+
21+
- name: Setup Python 🐍
22+
uses: "actions/setup-python@v2"
23+
with:
24+
python-version: "3.8"
25+
26+
- name: Install dependencies 🔧
27+
run: |
28+
python -VV
29+
python -m site
30+
python -m pip install --upgrade pip setuptools wheel
31+
python -m pip install --upgrade whey-conda
32+
# $CONDA is an environment variable pointing to the root of the miniconda directory
33+
$CONDA/bin/conda update -q conda
34+
$CONDA/bin/conda install conda-build=3.21.0
35+
36+
$CONDA/bin/conda config --add channels conda-forge
37+
$CONDA/bin/conda config --add channels domdfcoding
38+
39+
- name: "Build and index channel"
40+
run: |
41+
python -m whey --builder whey_conda --out-dir conda-bld/noarch
42+
$CONDA/bin/conda index ./conda-bld || exit 1
43+
44+
- name: "Search for package"
45+
run: |
46+
$CONDA/bin/conda search -c file://$(pwd)/conda-bld pypi-json
47+
$CONDA/bin/conda search -c file://$(pwd)/conda-bld --override-channels pypi-json
48+
49+
- name: "Install package"
50+
run: |
51+
$CONDA/bin/conda install -c file://$(pwd)/conda-bld pypi-json=0.0.0=py_1 -y || exit 1
52+
53+
- name: "Run Tests"
54+
run: |
55+
rm -rf pypi_json
56+
$CONDA/bin/pip install -r tests/requirements.txt
57+
$CONDA/bin/pytest tests/
+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# This file is managed by 'repo_helper'. Don't edit it directly.
2+
---
3+
name: "Docs Check"
4+
on:
5+
push:
6+
branches-ignore:
7+
- 'repo-helper-update'
8+
- 'pre-commit-ci-update-config'
9+
pull_request:
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
docs:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout 🛎️
19+
uses: "actions/checkout@v1"
20+
21+
- name: Check for changed files
22+
uses: dorny/paths-filter@v2
23+
id: changes
24+
with:
25+
list-files: "json"
26+
filters: |
27+
code:
28+
- '!tests/**'
29+
30+
- name: Install and Build 🔧
31+
uses: sphinx-toolbox/[email protected]
32+
if: steps.changes.outputs.code == 'true'
33+
with:
34+
pre-build-command: python -m pip install tox
35+
docs-folder: "doc-source/"
36+
build-command: "tox -e docs -- "

0 commit comments

Comments
 (0)