Skip to content

Commit bdf29cb

Browse files
committed
Init
Signed-off-by: Alexis Jeandet <[email protected]>
0 parents  commit bdf29cb

34 files changed

+966
-0
lines changed

.github/ISSUE_TEMPLATE.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
* Python ISTP loader version:
2+
* Python version:
3+
* Operating System:
4+
5+
### Description
6+
7+
Describe what you were trying to get done.
8+
Tell us what happened, what went wrong, and what you expected to happen.
9+
10+
### What I Did
11+
12+
```
13+
Paste the command(s) you ran and the output.
14+
If there was a crash, please include the traceback here.
15+
```

.github/workflows/Coverage.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Coverage
2+
3+
on: [pull_request, push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: Set up Python 3.10
11+
uses: actions/setup-python@v2
12+
with:
13+
python-version: '3.10'
14+
- name: Test with pytest
15+
run: |
16+
python -m pip install --upgrade pip
17+
pip install -e .
18+
pip install -r requirements_dev.txt
19+
pip install pytest pytest-cov sphinx pandoc
20+
pip install -r docs/requirements.txt
21+
pytest --cov=./ --cov-report=xml
22+
make doctest
23+
- name: Upload coverage to Codecov
24+
if: matrix.python-version == '3.8'
25+
uses: codecov/codecov-action@v1
26+
with:
27+
token: ${{ secrets.CODECOV_TOKEN }}
28+
file: ./coverage.xml
29+
flags: unittests
30+
name: codecov-umbrella
31+
fail_ci_if_error: true

.github/workflows/Lint.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Linters
2+
3+
on: [pull_request, push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: Set up Python 3.10
11+
uses: actions/setup-python@v2
12+
with:
13+
python-version: '3.10'
14+
- name: Install dependencies
15+
run: |
16+
python -m pip install --upgrade pip
17+
pip install -e .
18+
pip install -r requirements_dev.txt
19+
- name: Lint with flake8
20+
run: |
21+
pip install flake8
22+
# stop the build if there are Python syntax errors or undefined names
23+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
24+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
25+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics

.github/workflows/pythonpublish.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Upload Python Package
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
max-parallel: 4
12+
matrix:
13+
python-version: [3.7]
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Set up Python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install setuptools wheel twine
24+
- name: Build and publish
25+
env:
26+
TWINE_USERNAME: __token__
27+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
28+
run: |
29+
python setup.py sdist bdist_wheel
30+
twine upload dist/*

.github/workflows/tests-matrix.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Tests matrix
2+
on: [pull_request, push]
3+
4+
jobs:
5+
build:
6+
runs-on: ${{ matrix.os }}
7+
continue-on-error: true
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
os: [macos-latest, windows-latest, ubuntu-latest]
12+
python-version: ['3.7', '3.8', '3.9', '3.10']
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Set up Python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
architecture: x64
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install -e .
25+
pip install -r requirements_dev.txt
26+
pip install pytest sphinx pandoc
27+
pip install -r docs/requirements.txt
28+
- name: Test with pytest
29+
run: |
30+
pytest
31+
make doctest

.gitignore

+106
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
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+
env/
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+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
28+
# PyInstaller
29+
# Usually these files are written by a python script from a template
30+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
31+
*.manifest
32+
*.spec
33+
34+
# Installer logs
35+
pip-log.txt
36+
pip-delete-this-directory.txt
37+
38+
# Unit test / coverage reports
39+
htmlcov/
40+
.tox/
41+
.coverage
42+
.coverage.*
43+
.cache
44+
nosetests.xml
45+
coverage.xml
46+
*.cover
47+
.hypothesis/
48+
.pytest_cache/
49+
50+
# Translations
51+
*.mo
52+
*.pot
53+
54+
# Django stuff:
55+
*.log
56+
local_settings.py
57+
58+
# Flask stuff:
59+
instance/
60+
.webassets-cache
61+
62+
# Scrapy stuff:
63+
.scrapy
64+
65+
# Sphinx documentation
66+
docs/_build/
67+
68+
# PyBuilder
69+
target/
70+
71+
# Jupyter Notebook
72+
.ipynb_checkpoints
73+
74+
# pyenv
75+
.python-version
76+
77+
# celery beat schedule file
78+
celerybeat-schedule
79+
80+
# SageMath parsed files
81+
*.sage.py
82+
83+
# dotenv
84+
.env
85+
86+
# virtualenv
87+
.venv
88+
venv/
89+
ENV/
90+
91+
# Spyder project settings
92+
.spyderproject
93+
.spyproject
94+
95+
# Rope project settings
96+
.ropeproject
97+
98+
# mkdocs documentation
99+
/site
100+
101+
# mypy
102+
.mypy_cache/
103+
104+
# IDE settings
105+
.vscode/
106+
.idea/

AUTHORS.rst

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
=======
2+
Credits
3+
=======
4+
5+
Development Lead
6+
----------------
7+
8+
* Alexis Jeandet <[email protected]>
9+
10+
Contributors
11+
------------
12+
13+
None yet. Why not be the first?

CONTRIBUTING.rst

+128
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
.. highlight:: shell
2+
3+
============
4+
Contributing
5+
============
6+
7+
Contributions are welcome, and they are greatly appreciated! Every little bit
8+
helps, and credit will always be given.
9+
10+
You can contribute in many ways:
11+
12+
Types of Contributions
13+
----------------------
14+
15+
Report Bugs
16+
~~~~~~~~~~~
17+
18+
Report bugs at https://github.com/jeandet/pyistp/issues.
19+
20+
If you are reporting a bug, please include:
21+
22+
* Your operating system name and version.
23+
* Any details about your local setup that might be helpful in troubleshooting.
24+
* Detailed steps to reproduce the bug.
25+
26+
Fix Bugs
27+
~~~~~~~~
28+
29+
Look through the GitHub issues for bugs. Anything tagged with "bug" and "help
30+
wanted" is open to whoever wants to implement it.
31+
32+
Implement Features
33+
~~~~~~~~~~~~~~~~~~
34+
35+
Look through the GitHub issues for features. Anything tagged with "enhancement"
36+
and "help wanted" is open to whoever wants to implement it.
37+
38+
Write Documentation
39+
~~~~~~~~~~~~~~~~~~~
40+
41+
Python ISTP loader could always use more documentation, whether as part of the
42+
official Python ISTP loader docs, in docstrings, or even on the web in blog posts,
43+
articles, and such.
44+
45+
Submit Feedback
46+
~~~~~~~~~~~~~~~
47+
48+
The best way to send feedback is to file an issue at https://github.com/jeandet/pyistp/issues.
49+
50+
If you are proposing a feature:
51+
52+
* Explain in detail how it would work.
53+
* Keep the scope as narrow as possible, to make it easier to implement.
54+
* Remember that this is a volunteer-driven project, and that contributions
55+
are welcome :)
56+
57+
Get Started!
58+
------------
59+
60+
Ready to contribute? Here's how to set up `pyistp` for local development.
61+
62+
1. Fork the `pyistp` repo on GitHub.
63+
2. Clone your fork locally::
64+
65+
$ git clone [email protected]:your_name_here/pyistp.git
66+
67+
3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::
68+
69+
$ mkvirtualenv pyistp
70+
$ cd pyistp/
71+
$ python setup.py develop
72+
73+
4. Create a branch for local development::
74+
75+
$ git checkout -b name-of-your-bugfix-or-feature
76+
77+
Now you can make your changes locally.
78+
79+
5. When you're done making changes, check that your changes pass flake8 and the
80+
tests, including testing other Python versions with tox::
81+
82+
$ flake8 pyistp tests
83+
$ python setup.py test or pytest
84+
$ tox
85+
86+
To get flake8 and tox, just pip install them into your virtualenv.
87+
88+
6. Commit your changes and push your branch to GitHub::
89+
90+
$ git add .
91+
$ git commit -m "Your detailed description of your changes."
92+
$ git push origin name-of-your-bugfix-or-feature
93+
94+
7. Submit a pull request through the GitHub website.
95+
96+
Pull Request Guidelines
97+
-----------------------
98+
99+
Before you submit a pull request, check that it meets these guidelines:
100+
101+
1. The pull request should include tests.
102+
2. If the pull request adds functionality, the docs should be updated. Put
103+
your new functionality into a function with a docstring, and add the
104+
feature to the list in README.rst.
105+
3. The pull request should work for Python 3.5, 3.6, 3.7 and 3.8, and for PyPy. Check
106+
https://travis-ci.com/jeandet/pyistp/pull_requests
107+
and make sure that the tests pass for all supported Python versions.
108+
109+
Tips
110+
----
111+
112+
To run a subset of tests::
113+
114+
115+
$ python -m unittest tests.test_pyistp
116+
117+
Deploying
118+
---------
119+
120+
A reminder for the maintainers on how to deploy.
121+
Make sure all your changes are committed (including an entry in HISTORY.rst).
122+
Then run::
123+
124+
$ bump2version patch # possible: major / minor / patch
125+
$ git push
126+
$ git push --tags
127+
128+
Travis will then deploy to PyPI if tests pass.

HISTORY.rst

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
=======
2+
History
3+
=======
4+
5+
0.1.0 (2022-04-01)
6+
------------------
7+
8+
* First release on PyPI.

0 commit comments

Comments
 (0)