Skip to content

Commit

Permalink
Merge branch 'main' into release/v1.5.X
Browse files Browse the repository at this point in the history
# Conflicts:
#	version.txt
  • Loading branch information
LexABzH committed Sep 7, 2022
2 parents 996995d + 0f8aa39 commit 7dc5bce
Show file tree
Hide file tree
Showing 13 changed files with 338 additions and 64 deletions.
51 changes: 51 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: 'bug'
assignees: ''

---

### Describe the bug

A clear and concise description of what the bug is.

### To Reproduce

Code snippet:

```
```

(Please provide a code snippet! This will help expedite us finding and solving the problem.)

Steps to reproduce the behavior:
1. ...
2. ...

### Expected behavior

A clear and concise description of what you expected to happen.

### Actual behavior

Explain the buggy behavior you experience when you go through the steps above. If applicable, add screenshots to help explain your problem.

### Is this a regression?

That is, did this use to work the way you expected in the past?

- [ ] Yes
- [ ] No

### Debug info

- Words'n Fun version:
- Python version: (get it with `$ python --version`)
- OS version:

### Additional context

Add any other context about the problem here.
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: 'enhancement'
assignees: ''


---

<!--
Note, you don't have to fill out every section here. They're just here for guidance. That said, nicely detailed feature requests are more likely to get attention sooner
-->

### Problem

Is your feature request related to a problem?
Please describe the problem here. Ex. I'm always frustrated when [...]

### Solution

Describe the solution you'd like, i.e. a clear and concise description of what you want to happen.
Ideally you want to fullfil the following bullet points :

- **MVP:** What's the smallest possible solution that would get 80% of the problem out of the way?

- **Possible additions:** What are other things that could be added to the MVP over time to make it better?

- **Preferred solution:** If you don't like the MVP above, tell us why, and what you'd like done instead.

- **Alternatives solution:** Alternative solutions or features you've considered.


### Additional context

Add any other context or screenshots about the feature request here.
47 changes: 47 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<!--
Before contributing :
⚠️ Any contribution that is more than a few lines of code must be stated on the corresponding issue. If there is no issue for it yet, please create it first.
This ensure that :
1. Two people aren't working on the same thing
2. This is something Words'n Fun's maintainers believe should be implemented/fixed
3. Your time is well spent :)
-->

## ✒️ Context

_Please describe the project or issue background here_

- What kind of change does this PR introduce ?

- [ ] Bugfix
- [ ] Feature
- [ ] Refactoring
- [ ] Other, please describe:

## 🧱 Description of Changes

- _Add bullet points summarizing your changes here_


## 🩺 Testing

- _Add bullet points summarizing your changes here_

- [ ] This change does not need new tests
- [ ] Added/Updated unit tests

## 🔗 References

_Does this depend on other work, documents, or tickets?_

- **Issue**: Closes #XXXX

---

**Contribution License Agreement**

By submitting this pull request you agree that all contributions to this project are made under the GNU AFFERO GENERAL PUBLIC LICENSE.
4 changes: 3 additions & 1 deletion .github/workflows/wnf_build_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- 'LICENSE'
- 'Makefile'
pull_request:
types: [opened, reopened, edit]
types: [opened, reopened, edit, synchronize]
branches:
- 'main'
- 'release/v*'
Expand All @@ -21,6 +21,8 @@ on:
- '*.md'
- 'LICENSE'
- 'Makefile'
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:

jobs:
Expand Down
128 changes: 128 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible 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.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

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

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders 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, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[email protected].
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

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

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
15 changes: 5 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,18 @@
[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
[![Generic badge](https://img.shields.io/badge/python-3.7|3.8-blue.svg)](https://shields.io/)

# WORDS N FUN : Semantic analysis module built by agence Data Services
# WORDS N FUN : Semantic analysis module built

The purpose of this project is two folds:
1. To normalize tools and how tos of semantic analysis projects
2. To offer end to end pipelines to speed up the time to market of NLP services

---

# Licence

This project is distributed under the GNU AFFERO GENERAL PUBLIC LICENSE V3.0. Please check the LICENSE file.

---

## Why ?

The purpose of this project is two folds:
1. To normalize tools and how tos of semantic analysis projects
2. To offer end to end pipelines to speed up the time to market of NLP services


---

## Philosophy of this package
Expand Down
26 changes: 14 additions & 12 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
# Data manipulation
numpy==1.19.5
pandas==1.3.5
numpy==1.21.6; python_version < "3.8"
numpy==1.23.2; python_version >= "3.8"
pandas==1.3.5; python_version < "3.8"
pandas==1.4.4; python_version >= "3.8"

# NLP
nltk==3.4.5
ftfy==5.8
nltk==3.7
ftfy==6.1.1

# Others
simplejson==3.17.2
tqdm==4.62.2
requests==2.23.0
tqdm==4.64.1
simplejson==3.17.6
requests==2.28.1

# Optionnals - code quality & cie
flake8==3.7.9
black==19.10b0
isort==4.3.21
flake8==5.0.4
black==22.8.0
isort==5.10.1
nose==1.3.7
nose-exclude==0.5.0
coverage==5.3
coverage==6.4.4

# Has to be installed last / optionnal to use spacy lemmatizer
markupsafe==2.0.1 # BUG FIX -> https://github.com/aws/aws-sam-cli/issues/3661
Cython==0.29.24
spacy==3.3.1
# The following line downloads a spacy model. It can be commented if you don't have an internet access to download it, but lemmatizer features won't work.
# The following line downloads a frnech spacy model. It can be commented if you don't have an internet access to download it, but lemmatizer features won't work.
https://github.com/explosion/spacy-models/releases/download/fr_core_news_sm-3.3.0/fr_core_news_sm-3.3.0-py3-none-any.whl
22 changes: 13 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# Get package directory
package_directory = os.path.dirname(os.path.abspath(__file__))

# Get package version (env variable or verion file + -local)
# Get package version (env variable or version file + -local)
version_path = os.path.join(package_directory, 'version.txt')
with open(version_path, 'r') as version_file:
version = version_file.read().strip()
Expand All @@ -38,22 +38,26 @@
license='AGPL-3.0',
long_description=long_description,
long_description_content_type='text/markdown',
author='Agence Data Services PE Nantes',
author="Agence Data Services PE Nantes",
author_email="[email protected]",
description="Semantic library of the Data Services agency",
url="https://github.com/OSS-Pole-Emploi/words_n_fun",
platforms=['windows', 'linux'],
python_requires='>=3.7',
package_data={
'words_n_fun': ['configs/*.json', 'nltk_data/corpora/stopwords/french']
},
include_package_data=True,
install_requires=[
'pandas==1.3.5',
'numpy==1.19.5',
'nltk>=3.4.5,<3.6',
'tqdm==4.62.2', # https://github.com/tqdm/tqdm/issues/780
'simplejson>=3.17.0,<3.17.3',
'requests>=2.23.0,<2.25.1',
'ftfy>=5.8,<6.0',
'pandas>=1.3,<1.4; python_version < "3.8"',
'pandas>=1.3,<1.5; python_version >= "3.8"',
'numpy>=1.19,<1.22; python_version < "3.8"',
'numpy>=1.19,<1.24; python_version >= "3.8"',
'nltk>=3.4,<3.8',
'ftfy>=5.8,<6.2',
'tqdm>=4.40,<4.65',
'simplejson>=3.17,<3.18',
'requests>=2.23,<2.29',
],
extras_require={
"lemmatizer": ["spacy==3.3.1", "markupsafe==2.0.1", "Cython==0.29.24", "fr-core-news-sm==3.3.0"]
Expand Down
Loading

0 comments on commit 7dc5bce

Please sign in to comment.