Skip to content

Setup: Init - Initial setup.py and basic configs#4

Merged
abuccts merged 10 commits into
devfrom
xiongyf/setup-py
Jan 28, 2021
Merged

Setup: Init - Initial setup.py and basic configs#4
abuccts merged 10 commits into
devfrom
xiongyf/setup-py

Conversation

@abuccts
Copy link
Copy Markdown
Member

@abuccts abuccts commented Jan 27, 2021

Initialize setup.py and basic configurations for this project.

Major revisions:

  • initialize setup.py for Python package
  • add gitignore and dockerignore
  • add editorconfig for editors
  • configure yapf for auto formating
  • configure mypy for type hint
  • configure flake8 for lint, including quotes and docstrings
  • add pre-commit check for git commit
  • add spelling check in GitHub Actions
  • format existing files according to configured rules

Example usage:

# install dependencies
$ python3 -m pip install -e .[dev,test]
$ pre-commit install

# format code automatically
$ python3 setup.py format

# lint code
$ python3 setup.py lint

# test code
$ python3 setup.py test

* inital setup.py
* add gitignore and dockerignore
* add editorconfig
* add yapf, mypy, flake8 for type check and lint
@abuccts abuccts requested review from cp5555 and guoshzhao January 27, 2021 05:04
Comment thread .style.yapf Outdated
Comment thread .flake8 Outdated
Update max-line-length in lint, use default 79.
Comment thread setup.cfg Outdated
Comment thread setup.py
Comment thread setup.py Outdated
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Topic :: System :: Benchmark",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TobeyQin would you please check it?

Copy link
Copy Markdown
Contributor

@cp5555 cp5555 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you please double check with @TobeyQin about the category?

@cp5555 cp5555 requested a review from TobeyQin January 27, 2021 07:29
@abuccts
Copy link
Copy Markdown
Member Author

abuccts commented Jan 27, 2021

Would you please double check with @TobeyQin about the category?

@TobeyQin pls refer to classifiers list

Update according to comments.
Comment thread test.dockerfile Outdated
Comment thread .gitignore
* follow [pep257](https://www.python.org/dev/peps/pep-0257/),
  use single quote for inline quotes and double quote for
  multiline/docstring
* require docstring in `superbench/`
* require typed defs in `superbench/`
Add spelling check for typo.
Fix warning and typo.
Add pre-commit config.
Comment thread superbench/__init__.py Outdated
Comment thread setup.py Outdated
Comment thread setup.py
Comment thread .pre-commit-config.yaml
Comment thread .flake8 Outdated
Comment thread .mypy.ini
@abuccts abuccts requested a review from a team as a code owner January 28, 2021 02:29
Add docstrings and remove exception rules.
@abuccts abuccts merged commit 5be3248 into dev Jan 28, 2021
@abuccts abuccts deleted the xiongyf/setup-py branch January 28, 2021 13:01
@cp5555 cp5555 added test Unit tests, lint or format check related CI/CD Continuous integration or deployment labels Feb 5, 2021
abuccts added a commit that referenced this pull request Apr 13, 2021
Initialize setup.py and basic configurations for this project.

Major revisions:

- initialize setup.py for Python package
- add gitignore and dockerignore
- add editorconfig for editors
- configure yapf for auto formating
- configure mypy for type hint
- configure flake8 for lint, including quotes and docstrings
- add pre-commit check for `git commit`
- add spelling check in GitHub Actions
- format existing files according to configured rules

Example usage:

    # install dependencies
    $ python3 -m pip install -e .[dev,test]
    $ pre-commit install

    # format code automatically
    $ python3 setup.py format

    # lint code
    $ python3 setup.py lint

    # test code
    $ python3 setup.py test
abuccts added a commit that referenced this pull request Apr 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD Continuous integration or deployment test Unit tests, lint or format check related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants