Skip to content

Commit

Permalink
Merge pull request #17 from tranlyvu/dev
Browse files Browse the repository at this point in the history
Merge from dev branch
  • Loading branch information
tranlv authored Mar 17, 2019
2 parents 2cfda74 + 6fa8821 commit a069211
Show file tree
Hide file tree
Showing 9 changed files with 207 additions and 129 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
__pycache__/
*.py[cod]
*$py.class
**.pyc

# Distribution / packaging
.Python
Expand Down
15 changes: 12 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
language: python
python:
- "3.6"
# command to install dependencies
install:
- pip install -r requirements.txt
- pip install python-coveralls
services:
- mysql
# command to run tests
script:
- pytest --cov=wikilink tests/ --cov-report=html
- echo "skipping tests"
#- pytest --cov=wikilink tests/integration --cov-report=html
branches:
only:
- dev
after_success:
- coveralls
matrix:
include:
- python: 3.6
- python: 3.7
dist: xenial
sudo: true



76 changes: 76 additions & 0 deletions CODE-OF-CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at vutransingapore@gmail.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
39 changes: 39 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# **Instructions for contributors**

For bug reports or requests please submit an [issue](https://github.com/tranlyvu/wiki-link/issues).

For new feature contribution, please follow the following instruction:

1. Fork the repo https://github.com/tranlyvu/wiki-link.git to your own github

2. Clone from your own repo

`$ git clone https://github.com/<your name>/wiki-link.git`

3. Make sure you are at dev branch

`$ git checkout dev && git pull`

4. Create your feature/bug-fix branch

`$ git checkout -b <feature/bug>/<branch-name>`

Do remember to add your name into the [list of contributors](https://github.com/tranlyvu/wiki-link/blob/dev/CONTRIBUTORS.md) if you have not done so before going to step 5.

5. Commit your changes

`$ git commit -am 'Add some new feature'`

6. Push to the branch

`$ git push`

7. Go to your own repo and create a new Pull Request against 'dev' branch

8. To sync your forked repo with my repo

```
$ git remote add upstream https://github.com/tranlyvu/wiki-link.git
$ git checkout master
$ git merge upstream/master
```
3 changes: 3 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# **List of contributors**

Tran Ly Vu <vutransingapore@gmail.com>
125 changes: 46 additions & 79 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
# **wikilink** [![version][23]][24] [![HitCount][21]][22]
# **wikilink** [![version][23]][24] [![Downloads][25]][26] [![HitCount][21]][22] [![star this repo][27]][28] [![fork this repo][29]][30]
[21]: http://hits.dwyl.io/tranlyvu/wiki-link.svg
[22]: http://hits.dwyl.io/tranlyvu/wiki-link
[23]: https://img.shields.io/pypi/v/wikilink.svg
[24]: https://pypi.org/project/wikilink/
[25]: https://pepy.tech/badge/wikilink
[26]: https://pepy.tech/project/wikilink
[27]: http://githubbadges.com/star.svg?user=tranlyvu&repo=wiki-link&style=default
[28]: https://github.com/tranlyvu/wiki-link
[29]: http://githubbadges.com/fork.svg?user=tranlyvu&repo=wiki-link&style=default
[30]: https://github.com/tranlyvu/wiki-link/fork

A web-scraping application to find the minimum number of links between 2 given wiki pages.


| Build | [![Build Status][3]][4] | [![Coverage Status][5]][6] | [![Code Health][9]][10] |
| :--- | :--- | :--- | :--- |
| **Quality** | [![Maintainability][13]][14] | [![Known Vulnerabilities][15]][16] | [![Requirements Status][19]][20] |
| **Support** | [![Join the chat at https://gitter.im/find-link/Lobby][17]][18] | [![blog][1]][2] | [![Open Source Helpers][7]][8] |
| Build | [![Build Status][3]][4] | [![Coverage Status][5]][6] |
| :--- | :--- | :--- |
| **Quality** | [![Maintainability][13]][14] | [![Requirements Status][19]][20] |
| **Support** | [![Join the chat][17]][18] | [![blog][1]][2] |
| **Platform** | [![python](https://img.shields.io/pypi/pyversions/wikilink.svg)](https://pypi.org/project/wikilink/)
| |


[3]: https://travis-ci.org/tranlyvu/wiki-link.svg?branch=dev
[4]: https://travis-ci.org/tranlyvu/wiki-link
[5]: https://coveralls.io/repos/github/tranlyvu/wiki-link/badge.svg
[6]: https://coveralls.io/github/tranlyvu/wiki-link
[9]: https://landscape.io/github/tranlyvu/wiki-link/dev/landscape.svg?style=flat
[10]: https://landscape.io/github/tranlyvu/wiki-link/dev

[13]: https://api.codeclimate.com/v1/badges/8679cde6756683bd787d/maintainability
[14]: https://codeclimate.com/github/tranlyvu/wiki-link/maintainability
[15]: https://snyk.io/test/github/tranlyvu/wiki-link/badge.svg
[16]: https://snyk.io/test/github/tranlyvu/wiki-link

[17]: https://badges.gitter.im/find-link/Lobby.svg
[18]: https://gitter.im/find-link/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
Expand All @@ -32,35 +37,33 @@ A web-scraping application to find the minimum number of links between 2 given w
[19]: https://requires.io/github/tranlyvu/wiki-link/requirements.svg?branch=dev
[20]: https://requires.io/github/tranlyvu/wiki-link/requirements/?branch=dev

[7]: https://www.codetriage.com/tranlyvu/wiki-link/badges/users.svg
[8]: https://www.codetriage.com/tranlyvu/wiki-link

<img src="img/link.jpg" width="480" alt="Combined Image" />

---
Table of contents
---

1. [Usage](#Usage)
2. [Development Setup](#Development-Setup)
2. [Contribution](#Contribution)
3. [Project Architecture](#Project-Architecture)
4. [Release History](#Release-History)
5. [Contribution](#Contribution)
6. [Contact](#Contact)
7. [License](#License)
5. [Contact](#Contact)
6. [License](#License)

---
Usage
---

- Database: wikilink currently supports [Mysql](https://www.mysql.com/downloads/) and [PostgreSQL](https://www.postgresql.org/); supported either "mysql" or "postgresql" for setup_db().

- Download a [release](https://github.com/tranlyvu/wiki-link/releases) or install with pip
Download a [release](https://github.com/tranlyvu/wiki-link/releases) or install with pip

```
$ pip install wikilink
```

### Database support

wikilink currently supports [Mysql](https://www.mysql.com/downloads/) and [PostgreSQL](https://www.postgresql.org/)

### API

setup_db(db, username, password, ip, port): to set up database; supported "mysql" and postgresql" for 'db' argument.
Expand All @@ -76,38 +79,34 @@ min_link(source_url, dest_url, limit = 6): find minimum number of link from sour
>>> model.min_link(source_url, dest_url, 6)
```

Alternatively, you can simply modify starting_url and ending_url in the script [sample.py](https://github.com/tranlyvu/wiki-link) and run:

```
$ python sample.py
```

---
Development Setup
Contribution [![Open Source Helpers][7]][8]
---
[7]: https://www.codetriage.com/tranlyvu/wiki-link/badges/users.svg
[8]: https://www.codetriage.com/tranlyvu/wiki-link

### How to contribute

### Packages Installation
Please follow our contribution convention at [contribution instructions](https://github.com/tranlyvu/wiki-link/blob/dev/CONTRIBUTING.md) and [code of conduct](https://github.com/tranlyvu/wiki-link/blob/dev/CODE-OF-CONDUCT.md).

Wiki-link was developed using python 3.6, simply run the following on your development environment:
To set up development environment, simply run:

```
$ pip install -r requirements.txt
```

Or to set up environment with virtualenv
### List of issues

```
$ cd <path to wikilink project>
$ python3 -m venv env
$ source env/bin/activate
$ pip install -r requirements.txt
```
1. Implement function to print path ([#16](https://github.com/tranlyvu/wiki-link/issues/16))
2. Update unit test ([#11](https://github.com/tranlyvu/wiki-link/issues/11))

If you are done working in the virtual environment for the moment, you can deactivate it:
### Appreciation

```
$ deactivate
```
Feel free to add your name into the [list of contributors](https://github.com/tranlyvu/wiki-link/blob/dev/CONTRIBUTORS.md). You will automatically be inducted into Hall of Fame as a way to show my appreciation for your contributions.

#### Hall of Fame

[![](https://sourcerer.io/fame/tranlyvu/tranlyvu/wiki-link/images/0)](https://sourcerer.io/fame/tranlyvu/tranlyvu/wiki-link/links/0)[![](https://sourcerer.io/fame/tranlyvu/tranlyvu/wiki-link/images/1)](https://sourcerer.io/fame/tranlyvu/tranlyvu/wiki-link/links/1)[![](https://sourcerer.io/fame/tranlyvu/tranlyvu/wiki-link/images/2)](https://sourcerer.io/fame/tranlyvu/tranlyvu/wiki-link/links/2)[![](https://sourcerer.io/fame/tranlyvu/tranlyvu/wiki-link/images/3)](https://sourcerer.io/fame/tranlyvu/tranlyvu/wiki-link/links/3)[![](https://sourcerer.io/fame/tranlyvu/tranlyvu/wiki-link/images/4)](https://sourcerer.io/fame/tranlyvu/tranlyvu/wiki-link/links/4)[![](https://sourcerer.io/fame/tranlyvu/tranlyvu/wiki-link/images/5)](https://sourcerer.io/fame/tranlyvu/tranlyvu/wiki-link/links/5)[![](https://sourcerer.io/fame/tranlyvu/tranlyvu/wiki-link/images/6)](https://sourcerer.io/fame/tranlyvu/tranlyvu/wiki-link/links/6)[![](https://sourcerer.io/fame/tranlyvu/tranlyvu/wiki-link/images/7)](https://sourcerer.io/fame/tranlyvu/tranlyvu/wiki-link/links/7)

---
Project Architecture
Expand All @@ -118,6 +117,11 @@ An overview of the project can be found [here](https://tranlyvu.github.io/BFS-an
---
Release History
---

* v1.2.1
* Add support for python3.7
* Fix pypi shipping

* v1.2.0 - Jan 23, 2019
* Re-define API
* Publish to PyPi
Expand All @@ -129,56 +133,19 @@ Release History
* v1.0.0 - Nov 7, 2016
* First official release

---
Contribution
---

For bug reports or requests please submit an [issue](https://github.com/tranlyvu/wiki-link/issues).

For new feature contribution, please follow the following instruction:

1. Fork the repo https://github.com/tranlyvu/wiki-link.git to your own github

2. Clone from your own repo

`$ git clone https://github.com/<your name>/wiki-link.git`

3. Make sure you are at dev branch

`$ git checkout dev && git pull`

4. Create your feature/bug-fix branch

`$ git checkout -b <feature/bug>/<branch-name>`

5. Commit your changes

`$ git commit -am 'Add some new feature'`

6. Push to the branch

`$ git push`

7. Go to your own repo and create a new Pull Request against 'dev' branch

8. To sync your forked repo with my repo

```
$ git remote add upstream https://github.com/tranlyvu/wiki-link.git
$ git checkout master
$ git merge upstream/master
```

---
Contact
---

Feel free to contact me to discuss any issues, questions, or comments.

* Email: vutransingapore@gmail.com
* Linkedln: [@vutransingapore](https://www.linkedin.com/in/tranlyvu/)
* GitHub: [Tran Ly Vu](https://github.com/tranlyvu)
* Blog: [tranlyvu.github.io](https://tranlyvu.github.io/)

If you like my project, feel fee to leave a few words of appreciation here [![Say Thanks!](https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg)](https://saythanks.io/to/tranlyvu)

---
License
---
Expand Down
Loading

0 comments on commit a069211

Please sign in to comment.