Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IV-21-22] Objetivo 3 #11

Merged
merged 8 commits into from
Nov 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 59 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# Faux

Faux is a tool aimed to reduce misinformation along the web.
Faux is a tool aimed to reduce misinformation along the web. It analyzes
texts and headlines to categorize them as fake news, clickbait articles
or seemingly-normal-things.

It analyzes texts and headlines to categorize them as fake news,
clickbait articles or seemingly-normal-things. On top of that,
it provides information about how likely this prediction is based
on its source and topic (health, economics, etc).
## Table of contents

- [Why and how](https://github.com/arguellesm/faux#why-and-how)
- [Dependencies](https://github.com/arguellesm/faux#dependencies)
- [Installation](https://github.com/arguellesm/faux#installation)
- [Usage](https://github.com/arguellesm/faux#usage)
- [Documentation](https://github.com/arguellesm/faux#read-the-docs)

## Why and how

Expand All @@ -18,6 +23,54 @@ Faux takes news and headlines as input and applies heuristics to
classify them. Being a cloud service, it's constantly being
updated and refined to achieve the best possible outcome.

## Requirements

- Python **3.5+**.

## Dependencies

Managed with [Poetry](https://python-poetry.org/), check out [`pyproject.toml`](pyproject.toml).

## Installation

#### Poetry

Poetry will manage and install dependencies, ensuring that your
_Faux_ built is ready to use. According to the [official Poetry
documentation](https://python-poetry.org/docs/#installation),
install with:

```
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -

```

#### This repository

[Clone](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository)
this repository and run:

```
cd faux
poetry install
```

This will install all dependencies.

## Usage

#### Syntax check

You can check the syntax of every `.py` file under `src` with:

```
poetry shell
inv check
```

## Read the docs!

Feel free to read a bit more about the project [here](docs/README.md).
Feel free to read a bit more about the project:

- [Users and user journey](docs/users.md)
- [Development tools and why](docs/dev_tools.md)
44 changes: 44 additions & 0 deletions docs/dev_tools.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
## Development tools and why

### [Poetry](https://python-poetry.org/)

We use Poetry as a dependency management tool to keep track
of the libraries needed to build the project. This makes it
easier for anyone to replicate the project.

The main alternatives to Poetry are Pip and Pipenv:

- [Pip](https://pypi.org/project/pip/)

Pip is a package manager, meaning that dependency updates
must be done manually. This will defeat the purpose of using
it for automation.

- [Pipenv](https://pipenv.pypa.io/en/latest/)

The main differences between Pipenv and Poetry are that Poetry
has much faster install times and supports `pyproject.toml`,
which is the official Python file for dependency management (see
[PEP 518](https://www.python.org/dev/peps/pep-0518/#file-format)).


### [Invoke](https://www.pyinvoke.org/)

Invoke is our task runner of choice. It inherits a minimal yet
powerful philosophy from GNU Make and is broadly used among the
Python community.

Some alternatives are:

- [Pypyr](https://pypyr.io/docs/)

Pypyr uses pipelines defined in yaml. There are many differences
between these two, but the key for choosing one over the other
was being more used to Python and finding easier to work with
Invoke's approach.

- [doit](https://pydoit.org/contents.html#)
Copy link

Choose a reason for hiding this comment

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

You can't list stuff and a posteriori reasons to not choose them; all requirements need to be laid out in advance, as I commented in class. Please bear this in mind, because it will become increasingly important in the rest of the objectives.

Copy link
Owner Author

Choose a reason for hiding this comment

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

ok, I'll keep it in mind for the next ones, thanks! 👍🏼


_doit_ has quite a similar approach to Invoke and uses Python as
well. However, Invoke's community is much bigger, which usually
translates to more resources and easier troubleshooting.
File renamed without changes.
5 changes: 5 additions & 0 deletions iv.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
lenguaje: python

entidad:
- src/article.py
- src/globals.py

automatizar:
fichero: tasks.py
orden: inv
Loading