Skip to content

Commit

Permalink
📚 update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
chfw committed Nov 23, 2024
1 parent de0c7a6 commit 4ba48ef
Show file tree
Hide file tree
Showing 10 changed files with 130 additions and 60 deletions.
1 change: 0 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ With your PR, here is a check list:
- [ ] Has all code lines tested?
- [ ] Has `make format` been run?
- [ ] Please update CHANGELOG.yml(not CHANGELOG.rst)
- [ ] Passes all Travis CI builds
- [ ] Has fair amount of documentation if your change is complex
- [ ] Agree on NEW BSD License for your contribution
20 changes: 20 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: lint

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
name: lint code
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: lint
run: |
pip --use-deprecated=legacy-resolver install flake8
pip --use-deprecated=legacy-resolver install -r tests/requirements.txt
flake8 --exclude=.moban.d,docs,setup.py --builtins=unicode,xrange,long .
python setup.py checkdocs
8 changes: 4 additions & 4 deletions .github/workflows/moban-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@ jobs:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.PAT }}
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.7'
- name: check changes
run: |
pip install markupsafe==2.0.1
pip install moban gitfs2 pypifs moban-jinja2-github moban-ansible
moban
git status
git diff --exit-code
- name: Auto-commit
if: failure()
uses: docker://cdssnc/auto-commit-github-action
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: stefanzweifel/git-auto-commit-action@v4
with:
args: >-
commit_message: >-
This is an auto-commit, updating project meta data,
such as changelog.rst, contributors.rst
19 changes: 12 additions & 7 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,16 @@ on:
types: [created]

jobs:
deploy:
pypi-publish:
name: upload release to PyPI
runs-on: ubuntu-latest
# Specifying a GitHub environment is optional, but strongly encouraged
environment: pypi
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
# retrieve your distributions here
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
Expand All @@ -16,11 +23,9 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
pip install setuptools wheel
- name: Build
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
35 changes: 35 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Run unit tests on Windows, Ubuntu and Mac

on: [push, pull_request]

jobs:

test:
name: ${{ matrix.os }} / ${{ matrix.python_version }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [Ubuntu]
python_version: ["3.9.16"]

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}
architecture: x64

- name: install
run: |
pip --use-deprecated=legacy-resolver install -r requirements.txt
pip --use-deprecated=legacy-resolver install -r tests/requirements.txt
- name: test
run: |
pip freeze
nosetests --verbosity=3 --with-coverage --cover-package pyramid_excel --cover-package tests tests --with-doctest --doctest-extension=.rst README.rst docs/source pyramid_excel
- name: Upload coverage
uses: codecov/codecov-action@v1
with:
name: ${{ matrix.os }} Python ${{ matrix.python-version }}
21 changes: 21 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.12"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py

# Optionally build your docs in additional formats such as PDF
formats:
- pdf

python:
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2015-2020 by Onni Software Ltd. and its contributors
Copyright (c) 2015-2022 by Onni Software Ltd. and its contributors
All rights reserved.

Redistribution and use in source and binary forms of the software as well
Expand All @@ -13,7 +13,7 @@ that the following conditions are met:
and/or other materials provided with the distribution.

* Neither the name of 'pyramid-excel' nor the names of the contributors
may not be used to endorse or promote products derived from this software
may be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE AND DOCUMENTATION IS PROVIDED BY THE COPYRIGHT HOLDERS AND
Expand Down
46 changes: 21 additions & 25 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,19 @@ pyramid-excel - Let you focus on data, instead of file formats
.. image:: https://raw.githubusercontent.com/pyexcel/pyexcel.github.io/master/images/patreon.png
:target: https://www.patreon.com/chfw

.. image:: https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg
.. image:: https://raw.githubusercontent.com/pyexcel/pyexcel-mobans/master/images/awesome-badge.svg
:target: https://awesome-python.com/#specific-formats-processing

.. image:: https://travis-ci.org/pyexcel-webwares/pyramid-excel.svg?branch=master
:target: http://travis-ci.org/pyexcel-webwares/pyramid-excel

.. image:: https://codecov.io/gh/pyexcel-webwares/pyramid-excel/branch/master/graph/badge.svg
:target: https://codecov.io/gh/pyexcel-webwares/pyramid-excel

.. image:: https://badge.fury.io/py/pyramid-excel.svg
:target: https://pypi.org/project/pyramid-excel



.. image:: https://pepy.tech/badge/pyramid-excel/month
:target: https://pepy.tech/project/pyramid-excel/month
:target: https://pepy.tech/project/pyramid-excel


.. image:: https://img.shields.io/gitter/room/gitterHQ/gitter.svg
Expand All @@ -37,25 +35,20 @@ Support the project
================================================================================

If your company has embedded pyexcel and its components into a revenue generating
product, please support me on github, `patreon <https://www.patreon.com/bePatron?u=5537627>`_
or `bounty source <https://salt.bountysource.com/teams/chfw-pyexcel>`_ to maintain
the project and develop it further.

If you are an individual, you are welcome to support me too and for however long
you feel like. As my backer, you will receive
`early access to pyexcel related contents <https://www.patreon.com/pyexcel/posts>`_.
product, please support me on github, or `patreon <https://www.patreon.com/bePatron?u=5537627>`_
maintain the project and develop it further.

And your issues will get prioritized if you would like to become my patreon as `pyexcel pro user`.

With your financial support, I will be able to invest
a little bit more time in coding, documentation and writing interesting posts.
With your financial support, I will be able to invest a little bit more time in coding,
documentation and writing interesting posts.


Known constraints
==================

Fonts, colors and charts are not supported.

Nor to read password protected xls, xlsx and ods files.

Introduction
================================================================================
Here is a typical conversation between the developer and the user::
Expand Down Expand Up @@ -105,7 +98,7 @@ The highlighted features are:
======================== ======================= =================
Package name Supported file formats Dependencies
======================== ======================= =================
`pyexcel-io`_ csv, csvz [#f1]_, tsv,
`pyexcel-io`_ csv, csvz [#f1]_, tsv, csvz,tsvz readers depends on `chardet`
tsvz [#f2]_
`pyexcel-xls`_ xls, xlsx(read only), `xlrd`_,
xlsm(read only) `xlwt`_
Expand Down Expand Up @@ -134,9 +127,9 @@ The highlighted features are:
Plugin shopping guide
------------------------

Since 2020, all pyexcel-io plugins have dropped the support for python version
lower than 3.6. If you want to use any python versions, please use pyexcel-io
and its plugins version lower than 0.6.0.
Since 2020, all pyexcel-io plugins have dropped the support for python versions
which are lower than 3.6. If you want to use any of those Python versions, please use pyexcel-io
and its plugins versions that are lower than 0.6.0.


Except csv files, xls, xlsx and ods files are a zip of a folder containing a lot of
Expand Down Expand Up @@ -305,7 +298,7 @@ Then install relevant development requirements:
#. pip install -r tests/requirements.txt

Once you have finished your changes, please provide test case(s), relevant documentation
and update CHANGELOG.rst.
and update changelog.yml

.. note::

Expand All @@ -316,15 +309,18 @@ and update CHANGELOG.rst.


How to test your contribution
------------------------------
--------------------------------------------------------------------------------

Although `nose` and `doctest` are both used in code testing, it is advisable that unit tests are put in tests. `doctest` is incorporated only to make sure the code examples in documentation remain valid across different development releases.
Although `nose` and `doctest` are both used in code testing, it is advisable
that unit tests are put in tests. `doctest` is incorporated only to make sure
the code examples in documentation remain valid across different development
releases.

On Linux/Unix systems, please launch your tests like this::

$ make

On Windows systems, please issue this command::
On Windows, please issue this command::

> test.bat

Expand All @@ -336,7 +332,7 @@ Please run::

$ make format

so as to beautify your code otherwise travis-ci may fail your unit test.
so as to beautify your code otherwise your build may fail your unit test.



Expand Down
29 changes: 11 additions & 18 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
`pyramid-excel` - Let you focus on data, instead of file formats
================================================================================

:Author: chfw
:Author: C.W.
:Source code: http://github.com/pyexcel-webwares/pyramid-excel.git
:Issues: http://github.com/pyexcel-webwares/pyramid-excel/issues
:License: New BSD License
Expand Down Expand Up @@ -60,7 +60,7 @@ The highlighted features are:
======================== ======================= =================
Package name Supported file formats Dependencies
======================== ======================= =================
`pyexcel-io`_ csv, csvz [#f1]_, tsv,
`pyexcel-io`_ csv, csvz [#f1]_, tsv, csvz,tsvz readers depends on `chardet`
tsvz [#f2]_
`pyexcel-xls`_ xls, xlsx(read only), `xlrd`_,
xlsm(read only) `xlwt`_
Expand Down Expand Up @@ -89,9 +89,9 @@ The highlighted features are:
Plugin shopping guide
------------------------

Since 2020, all pyexcel-io plugins have dropped the support for python version
lower than 3.6. If you want to use any python verions, please use pyexcel-io
and its plugins version lower than 0.6.0.
Since 2020, all pyexcel-io plugins have dropped the support for python versions
which are lower than 3.6. If you want to use any of those Python versions, please use pyexcel-io
and its plugins versions that are lower than 0.6.0.


Except csv files, xls, xlsx and ods files are a zip of a folder containing a lot of
Expand Down Expand Up @@ -200,9 +200,9 @@ or clone it and install it:
$ cd pyramid-excel
$ python setup.py install
Installation of individual plugins , please refer to individual plugin page. For example, if you need xls file support, please install pyexcel-xls::
Installation of individual plugins , please refer to individual plugin page. For example, if you need xlsx file support, please install pyexcel-xlsx::

$ pip install pyexcel-xls
$ pip install pyexcel-xlsx


Setup
Expand Down Expand Up @@ -295,18 +295,11 @@ Support the project
-----------------------

If your company has embedded pyexcel and its components into a revenue generating
product, please support me on github, `patreon <https://www.patreon.com/bePatron?u=5537627>`_
or `bounty source <https://salt.bountysource.com/teams/chfw-pyexcel>`_ to maintain
the project and develop it further.
product, please support me on github, or `patreon <https://www.patreon.com/bePatron?u=5537627>`_
maintain the project and develop it further.

If you are an individual, you are welcome to support me too and for however long
you feel like. As my backer, you will receive
`early access to pyexcel related contents <https://www.patreon.com/pyexcel/posts>`_.

And your issues will get prioritized if you would like to become my patreon as `pyexcel pro user`.

With your financial support, I will be able to invest
a little bit more time in coding, documentation and writing interesting posts.
With your financial support, I will be able to invest a little bit more time in coding,
documentation and writing interesting posts.



Expand Down
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
locale.setlocale(locale.LC_ALL, "en_US.UTF-8")

NAME = "pyramid-excel"
AUTHOR = "chfw"
AUTHOR = "C.W."
VERSION = "0.0.5"
EMAIL = "[email protected]"
LICENSE = "New BSD"
Expand All @@ -41,7 +41,7 @@
)
URL = "https://github.com/pyexcel-webwares/pyramid-excel"
DOWNLOAD_URL = "%s/archive/0.0.5.tar.gz" % URL
FILES = ["README.rst", "CHANGELOG.rst"]
FILES = ["README.rst", "CONTRIBUTORS.rst", "CHANGELOG.rst"]
KEYWORDS = [
"python",
"API",
Expand Down Expand Up @@ -76,6 +76,7 @@
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5'

]


Expand All @@ -96,7 +97,7 @@
PUBLISH_COMMAND = "{0} setup.py sdist bdist_wheel upload -r pypi".format(sys.executable)
HERE = os.path.abspath(os.path.dirname(__file__))

GS_COMMAND = ("gs pyramid-excel v0.0.5 " +
GS_COMMAND = ("gease pyramid-excel v0.0.5 " +
"Find 0.0.5 in changelog for more details")
NO_GS_MESSAGE = ("Automatic github release is disabled. " +
"Please install gease to enable it.")
Expand Down

0 comments on commit 4ba48ef

Please sign in to comment.