Skip to content

Commit ca6d35a

Browse files
Merge pull request #18 from sepandhaghighi/dev
Version 0.1
2 parents 042c4bc + 21fc10b commit ca6d35a

32 files changed

+845
-115
lines changed

Diff for: .coveragerc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[run]
2+
branch = True
3+
omit =
4+
*/nafas/__main__.py
5+
*/nafas/__init__.py
6+
[report]
7+
# Regexes for lines to exclude from consideration
8+
exclude_lines =
9+
pragma: no cover

Diff for: .github/CODE_OF_CONDUCT.md

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [email protected]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

Diff for: .github/CONTRIBUTING.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Contribution
2+
3+
Changes and improvements are more than welcome! ❤️ Feel free to fork and open a pull request.
4+
5+
6+
Please consider the following :
7+
8+
9+
1. Fork it!
10+
2. Create your feature branch (under `dev` branch)
11+
3. Add your functions/methods to proper files
12+
4. Add standard `docstring` to your functions/methods
13+
5. Add tests for your functions/methods (`doctest` testcases in `test` folder)
14+
6. Pass all CI tests
15+
7. Update `CHANGELOG.md`
16+
- Describe changes under `[Unreleased]` section
17+
8. Submit a pull request into `dev` (please complete the pull request template)

Diff for: .github/ISSUE_TEMPLATE.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#### Description
2+
3+
#### Steps/Code to Reproduce
4+
5+
#### Expected Behavior
6+
7+
#### Actual Behavior
8+
9+
#### Operating System
10+
11+
#### Python Version
12+
13+
#### Nafas Version (Use : `nafas.__version__`)

Diff for: .github/PULL_REQUEST_TEMPLATE.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#### Reference Issues/PRs
2+
3+
#### What does this implement/fix? Explain your changes.
4+
5+
6+
#### Any other comments?
7+

Diff for: .github/workflows/pythonpublish.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This workflow will upload a Python Package using Twine when a release is created
2+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3+
4+
name: Upload Python Package
5+
6+
on:
7+
push:
8+
# Sequence of patterns matched against refs/tags
9+
tags:
10+
- '*' # Push events to matching v*, i.e. v1.0, v20.15.10
11+
12+
jobs:
13+
deploy:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Set up Python
20+
uses: actions/setup-python@v1
21+
with:
22+
python-version: '3.x'
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install setuptools wheel twine
27+
- name: Build and publish
28+
env:
29+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
30+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
31+
run: |
32+
python setup.py sdist bdist_wheel
33+
twine upload dist/*.tar.gz
34+
twine upload dist/*.whl

Diff for: .gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ var/
3030
# Usually these files are written by a python script from a template
3131
# before PyInstaller builds the exe, so as to inject date/other infos into it.
3232
*.manifest
33-
*.spec
3433

3534
# Installer logs
3635
pip-log.txt

Diff for: .travis.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
language: python
2+
3+
matrix:
4+
include:
5+
- os: linux
6+
python: 3.8
7+
dist: xenial
8+
- os: linux
9+
python: 3.7
10+
dist: xenial
11+
- os: linux
12+
python: 3.6
13+
- os: linux
14+
python: 3.5
15+
- os: osx
16+
language: generic
17+
env: TOXENV=py36
18+
- os: linux
19+
python: 3.7-dev
20+
dist: xenial
21+
- os: linux
22+
python: 3.8-dev
23+
dist: xenial
24+
- os: linux
25+
python: 3.9-dev
26+
dist: xenial
27+
- os: linux
28+
python: nightly
29+
dist: xenial
30+
allow_failures:
31+
- os: linux
32+
python: 3.9-dev
33+
dist: xenial
34+
- os: linux
35+
python: nightly
36+
dist: xenial
37+
install:
38+
- chmod +x .travis/install.sh
39+
- .travis/install.sh
40+
before_script:
41+
- chmod +x .travis/test.sh
42+
script:
43+
- .travis/test.sh
44+
after_success:
45+
- codecov

Diff for: .travis/install.sh

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
set -e
3+
set -x
4+
5+
PYTHON_COMMAND=python
6+
PIP_COMMAND=pip
7+
if [ "$TRAVIS_OS_NAME" == "osx" ]
8+
then
9+
PYTHON_COMMAND=python3
10+
PIP_COMMAND=pip3
11+
fi
12+
13+
$PIP_COMMAND install -r requirements.txt
14+
$PYTHON_COMMAND setup.py install
15+
$PYTHON_COMMAND -m nafas test
16+
17+
if [ "$TRAVIS_OS_NAME" == "osx" ]
18+
then
19+
$PIP_COMMAND install --upgrade --upgrade-strategy=only-if-needed -r dev-requirements.txt --user
20+
else
21+
$PIP_COMMAND install --upgrade --upgrade-strategy=only-if-needed -r dev-requirements.txt
22+
fi
23+
24+

Diff for: .travis/test.sh

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
set -e
3+
set -x
4+
IS_IN_TRAVIS=false
5+
PYTHON_COMMAND=python
6+
7+
if [ "$TRAVIS_OS_NAME" == "osx" ]
8+
then
9+
PYTHON_COMMAND=python3
10+
fi
11+
$PYTHON_COMMAND -m pytest test --cov=nafas --cov-report=term
12+
$PYTHON_COMMAND otherfiles/version_check.py
13+
14+
if [ "$CI" = 'true' ] && [ "$TRAVIS" = 'true' ]
15+
then
16+
IS_IN_TRAVIS=true
17+
fi
18+
19+
if [ "$IS_IN_TRAVIS" = 'false' ] || [ "$TRAVIS_PYTHON_VERSION" = '3.6' ]
20+
then
21+
$PYTHON_COMMAND -m vulture nafas/ setup.py --min-confidence 65 --exclude=__init__.py --sort-by-size
22+
$PYTHON_COMMAND -m bandit -r nafas -s B311
23+
$PYTHON_COMMAND -m pydocstyle --match-dir=nafas -v
24+
fi
25+

Diff for: CHANGELOG.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8-
## [0.1] - 2020-08-23
8+
## [0.1] - 2020-10-30
99
### Added
1010
- Clear Mind program
1111
- Relax program
@@ -16,7 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1616
- Cigarette Replace program
1717

1818
[Unreleased]: https://github.com/sepandhaghighi/nafas/compare/v0.1...dev
19-
[0.1]: https://github.com/sepandhaghighi/nafas/compare/1e238cd...v0.1
19+
[0.1]: https://github.com/sepandhaghighi/nafas/compare/c58087a...v0.1
2020

2121

2222

Diff for: LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2017 Sepand Haghighi
3+
Copyright (c) 2020 Sepand Haghighi
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Diff for: NAFAS.spec

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# -*- mode: python -*-
2+
3+
block_cipher = None
4+
5+
6+
a = Analysis(['nafas/__main__.py'],
7+
pathex=['nafas'],
8+
binaries=[],
9+
datas=[],
10+
hiddenimports=[],
11+
hookspath=[],
12+
runtime_hooks=[],
13+
excludes=[],
14+
win_no_prefer_redirects=False,
15+
win_private_assemblies=False,
16+
cipher=block_cipher)
17+
pyz = PYZ(a.pure, a.zipped_data,
18+
cipher=block_cipher)
19+
exe = EXE(pyz,
20+
a.scripts,
21+
a.binaries,
22+
a.zipfiles,
23+
a.datas,
24+
name='NAFAS',
25+
debug=False,
26+
strip=False,
27+
upx=True,
28+
runtime_tmpdir=None,
29+
icon='otherfiles/icon.ico',
30+
version="otherfiles/Version.rc",
31+
console=True )

0 commit comments

Comments
 (0)