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

Valence punctuation + unit tests #325

Open
wants to merge 28 commits into
base: main
Choose a base branch
from

Conversation

agshruti12
Copy link
Contributor

@agshruti12 agshruti12 commented Nov 4, 2024

Pull Request Template:
If you are merging in a feature or other major change, use this template to check your pull request!

Basic Info

What's this pull request about?
Added positivity tests in test_chat_level.csv (no perturbation required). Added additional valence tests with punctuation.

My PR Adds or Improves Documentation

If your feature is about documentation, ensure that you check the boxes relevant to you.

Docstrings

  • Docstrings: I have followed the proper documentation format (https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html; Google Format recommended).
  • Docstrings: Every function in the file has a block quote comment with a description of the feature.
  • Docstrings: Every input argument is documented.
  • Docstrings: The output type is documented, along with a description of what the output is for.
  • Docstrings: I have linked the feature under the Table of Contents (docs/source/features/index.rst)

Feature Wiki

  • Conceptual Wiki: I made a copy of the TEMPLATE (docs/source/features_conceptual/TEMPLATE.rst)
  • Conceptual Wiki: I replaced the word TEMPLATE at the top of the file with the name of the feature (.. _TEMPLATE:) Please do NOT delete any of the punctuation (the .._ and :) in the header, as this is important for referencing the feature in the Table of Contents!
  • Conceptual Wiki: I have answered the six sections of the template to the best of my ability.
  • Conceptual Wiki: I have linked the feature under the Table of Contents (docs/source/features_conceptual/index.rst).

General Documentation

  • My documentation is linked in a toctree.
  • I have confirmed that make clean and make html do not generate breaking errors.

My PR is About Adding a New Feature to the Code Repository

Adding Feature to the Feature Dictionary

  • I have edited the feature_dictionary.py file with an appropriate entry for my feature. Below is a sample entry; I confirm that all fields are accurately filled out.
  "Function Word Accommodation": {
    "columns": ["function_word_accommodation"],
    "file": "./features/word_mimicry.py",
    "level": "Chat",
    "semantic_grouping": "Variance",
    "description": "The total number of function words used in a given turn that were also used in the previous turn. Function words are defined as a list of 190 words from the source paper.",
    "references": "(Ranganath et al., 2013)",
    "wiki_link": "https://github.com/Watts-Lab/team-process-map/wiki/C.9-Mimicry:-Function-word,-Content-word,-BERT,-Moving",
    "function": ChatLevelFeaturesCalculator.calculate_word_mimicry,
    "dependencies": [],
    "preprocess": [],
    "vect_data": False,
    "bert_sentiment_data": False
  }
  • If my feature is at the chat level, my dictionary entry is in the top half of the file; if my feature is at the conversation level, my dictionary entry is in the bottom half of the file (below the comment that says, ### Conversation Level).

Documentation

Did you document your feature? You should follow the same requirements as above:

  • Docstrings: I have followed the proper documentation format (https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html; Google Format recommended).
  • Docstrings: Every function in the file has a block quote comment with a description of the feature.
  • Docstrings: Every input argument is documented.
  • Docstrings: The output type is documented, along with a description of what the output is for.
  • Docstrings: I have linked the feature under the Table of Contents (docs/source/features/index.rst)

Code Basics

  • My feature is a .py file.
  • My feature uses snake case in the name. That means the name of the format is my_feature, NOT myFeature (camel case).
  • My feature has the name, NAME_features.py, where NAME is the name of my feature.
  • My feature is located in src/features/.

Testing

  • I have thought about test cases for my features, with inputs and expected outputs.
  • I have added test cases for my feature under the tests/ folder.
  • My feature passes the automated testing suite.

The location of my tests are here:

[PASTE LINK HERE]

If you check all the boxes above, then you ready to merge!

dependabot bot and others added 28 commits September 23, 2024 15:46
* Add Examples Notebook (#294)

* Urgent fix to remove LIWC lexicons from public repo (#279)

* delete small test lexicons

* move .pkl files to assets and remove from GH

* filesystem cleanup

* update certainty pickle location

* remove unpickling certainty

* remove lexicons from pyproject

* change lexical pkl path

* add error handling when lexicons are not found

* update warning message

* add legal caveat and update name of certainty pkl to be correct

* ensure lexicons are ignored

* Update Documentation (Complete Conceptual Documentation, Document Assumptions) (#289)

* new docs

* lexicons hotfix

* emilys doc edits

* update deprecated github actions to latest

* update last remaining text features

* update index

* update docs

* update index

* update docs

* update docs and the feature dictionary

* add basics.rst

* add new basics page

* update docs

---------

Co-authored-by: Xinlan Emily Hu <xehu@wharton.upenn.edu>
Co-authored-by: Xinlan Emily Hu <xehu@cs.stanford.edu>

* update torch requirements to resolve compatibility issue on torch end (#290)

* Update Website (#291)

* website updates

* renaming tpm-website to website

* deploying via gh-pages

* changed from tpm-website to website

* deployed website

* copyright and team

* team headshots and footer

* edits to the pages

* website updates

* updated links

* updated homepage

* link updates

* mobile compatibility

* mobile adjustments

* navbar mobile updates

* whitespace edits

* homepage updates

* feature table

* website updates

* renaming tpm-website to website

* deploying via gh-pages

* changed from tpm-website to website

* edits to the pages

* website updates

* updated links

* updated homepage

* link updates

* mobile compatibility

* mobile adjustments

* navbar mobile updates

* homepage updates

* add table of features

* updated team page titles

* include flask in requirements.txt

* updates to table of features

* load pages from top

* fix to 404 issues

* moved build under website folder

* updates to package launch

* hyperlink ./setup.sh

* fix nav bar sizing and hamburger logo

* include preprint

* updates to "getting started"

* update team

---------

Co-authored-by: amytangzheng <amy.tang.zheng@gmail.com>

* update documentation for clarity and correct typos in positivity z-score and information exchange and liwc

* add demo notebook

* update notebook and add information to docs

* update documentation

---------

Co-authored-by: Shruti Agarwal <46203852+agshruti12@users.noreply.github.com>
Co-authored-by: amytangzheng <amy.tang.zheng@gmail.com>

* Bump path-to-regexp and express in /website

Bumps [path-to-regexp](https://github.com/pillarjs/path-to-regexp) and [express](https://github.com/expressjs/express). These dependencies needed to be updated together.

Updates `path-to-regexp` from 0.1.7 to 0.1.10
- [Release notes](https://github.com/pillarjs/path-to-regexp/releases)
- [Changelog](https://github.com/pillarjs/path-to-regexp/blob/master/History.md)
- [Commits](pillarjs/path-to-regexp@v0.1.7...v0.1.10)

Updates `express` from 4.19.2 to 4.21.0
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.0/History.md)
- [Commits](expressjs/express@4.19.2...4.21.0)

---
updated-dependencies:
- dependency-name: path-to-regexp
  dependency-type: indirect
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Xinlan Emily Hu <xehu@cs.stanford.edu>
Co-authored-by: Shruti Agarwal <46203852+agshruti12@users.noreply.github.com>
Co-authored-by: amytangzheng <amy.tang.zheng@gmail.com>
Co-authored-by: Xinlan Emily Hu <xehu@wharton.upenn.edu>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add Examples Notebook (#294)

* Urgent fix to remove LIWC lexicons from public repo (#279)

* delete small test lexicons

* move .pkl files to assets and remove from GH

* filesystem cleanup

* update certainty pickle location

* remove unpickling certainty

* remove lexicons from pyproject

* change lexical pkl path

* add error handling when lexicons are not found

* update warning message

* add legal caveat and update name of certainty pkl to be correct

* ensure lexicons are ignored

* Update Documentation (Complete Conceptual Documentation, Document Assumptions) (#289)

* new docs

* lexicons hotfix

* emilys doc edits

* update deprecated github actions to latest

* update last remaining text features

* update index

* update docs

* update index

* update docs

* update docs and the feature dictionary

* add basics.rst

* add new basics page

* update docs

---------

Co-authored-by: Xinlan Emily Hu <xehu@wharton.upenn.edu>
Co-authored-by: Xinlan Emily Hu <xehu@cs.stanford.edu>

* update torch requirements to resolve compatibility issue on torch end (#290)

* Update Website (#291)

* website updates

* renaming tpm-website to website

* deploying via gh-pages

* changed from tpm-website to website

* deployed website

* copyright and team

* team headshots and footer

* edits to the pages

* website updates

* updated links

* updated homepage

* link updates

* mobile compatibility

* mobile adjustments

* navbar mobile updates

* whitespace edits

* homepage updates

* feature table

* website updates

* renaming tpm-website to website

* deploying via gh-pages

* changed from tpm-website to website

* edits to the pages

* website updates

* updated links

* updated homepage

* link updates

* mobile compatibility

* mobile adjustments

* navbar mobile updates

* homepage updates

* add table of features

* updated team page titles

* include flask in requirements.txt

* updates to table of features

* load pages from top

* fix to 404 issues

* moved build under website folder

* updates to package launch

* hyperlink ./setup.sh

* fix nav bar sizing and hamburger logo

* include preprint

* updates to "getting started"

* update team

---------

Co-authored-by: amytangzheng <amy.tang.zheng@gmail.com>

* update documentation for clarity and correct typos in positivity z-score and information exchange and liwc

* add demo notebook

* update notebook and add information to docs

* update documentation

---------

Co-authored-by: Shruti Agarwal <46203852+agshruti12@users.noreply.github.com>
Co-authored-by: amytangzheng <amy.tang.zheng@gmail.com>

* Bump nltk from 3.8.1 to 3.9

Bumps [nltk](https://github.com/nltk/nltk) from 3.8.1 to 3.9.
- [Changelog](https://github.com/nltk/nltk/blob/develop/ChangeLog)
- [Commits](nltk/nltk@3.8.1...3.9)

---
updated-dependencies:
- dependency-name: nltk
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update pyproject.toml

* Update requirements.txt

* Update download_resources.py

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Xinlan Emily Hu <xehu@cs.stanford.edu>
Co-authored-by: Shruti Agarwal <46203852+agshruti12@users.noreply.github.com>
Co-authored-by: amytangzheng <amy.tang.zheng@gmail.com>
Co-authored-by: Xinlan Emily Hu <xehu@wharton.upenn.edu>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add Examples Notebook (#294)

* Urgent fix to remove LIWC lexicons from public repo (#279)

* delete small test lexicons

* move .pkl files to assets and remove from GH

* filesystem cleanup

* update certainty pickle location

* remove unpickling certainty

* remove lexicons from pyproject

* change lexical pkl path

* add error handling when lexicons are not found

* update warning message

* add legal caveat and update name of certainty pkl to be correct

* ensure lexicons are ignored

* Update Documentation (Complete Conceptual Documentation, Document Assumptions) (#289)

* new docs

* lexicons hotfix

* emilys doc edits

* update deprecated github actions to latest

* update last remaining text features

* update index

* update docs

* update index

* update docs

* update docs and the feature dictionary

* add basics.rst

* add new basics page

* update docs

---------

Co-authored-by: Xinlan Emily Hu <xehu@wharton.upenn.edu>
Co-authored-by: Xinlan Emily Hu <xehu@cs.stanford.edu>

* update torch requirements to resolve compatibility issue on torch end (#290)

* Update Website (#291)

* website updates

* renaming tpm-website to website

* deploying via gh-pages

* changed from tpm-website to website

* deployed website

* copyright and team

* team headshots and footer

* edits to the pages

* website updates

* updated links

* updated homepage

* link updates

* mobile compatibility

* mobile adjustments

* navbar mobile updates

* whitespace edits

* homepage updates

* feature table

* website updates

* renaming tpm-website to website

* deploying via gh-pages

* changed from tpm-website to website

* edits to the pages

* website updates

* updated links

* updated homepage

* link updates

* mobile compatibility

* mobile adjustments

* navbar mobile updates

* homepage updates

* add table of features

* updated team page titles

* include flask in requirements.txt

* updates to table of features

* load pages from top

* fix to 404 issues

* moved build under website folder

* updates to package launch

* hyperlink ./setup.sh

* fix nav bar sizing and hamburger logo

* include preprint

* updates to "getting started"

* update team

---------

Co-authored-by: amytangzheng <amy.tang.zheng@gmail.com>

* update documentation for clarity and correct typos in positivity z-score and information exchange and liwc

* add demo notebook

* update notebook and add information to docs

* update documentation

---------

Co-authored-by: Shruti Agarwal <46203852+agshruti12@users.noreply.github.com>
Co-authored-by: amytangzheng <amy.tang.zheng@gmail.com>

* Bump body-parser and express in /website

Bumps [body-parser](https://github.com/expressjs/body-parser) and [express](https://github.com/expressjs/express). These dependencies needed to be updated together.

Updates `body-parser` from 1.20.2 to 1.20.3
- [Release notes](https://github.com/expressjs/body-parser/releases)
- [Changelog](https://github.com/expressjs/body-parser/blob/master/HISTORY.md)
- [Commits](expressjs/body-parser@1.20.2...1.20.3)

Updates `express` from 4.19.2 to 4.21.0
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.0/History.md)
- [Commits](expressjs/express@4.19.2...4.21.0)

---
updated-dependencies:
- dependency-name: body-parser
  dependency-type: indirect
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Xinlan Emily Hu <xehu@cs.stanford.edu>
Co-authored-by: Shruti Agarwal <46203852+agshruti12@users.noreply.github.com>
Co-authored-by: amytangzheng <amy.tang.zheng@gmail.com>
Co-authored-by: Xinlan Emily Hu <xehu@wharton.upenn.edu>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add Examples Notebook (#294)

* Urgent fix to remove LIWC lexicons from public repo (#279)

* delete small test lexicons

* move .pkl files to assets and remove from GH

* filesystem cleanup

* update certainty pickle location

* remove unpickling certainty

* remove lexicons from pyproject

* change lexical pkl path

* add error handling when lexicons are not found

* update warning message

* add legal caveat and update name of certainty pkl to be correct

* ensure lexicons are ignored

* Update Documentation (Complete Conceptual Documentation, Document Assumptions) (#289)

* new docs

* lexicons hotfix

* emilys doc edits

* update deprecated github actions to latest

* update last remaining text features

* update index

* update docs

* update index

* update docs

* update docs and the feature dictionary

* add basics.rst

* add new basics page

* update docs

---------

Co-authored-by: Xinlan Emily Hu <xehu@wharton.upenn.edu>
Co-authored-by: Xinlan Emily Hu <xehu@cs.stanford.edu>

* update torch requirements to resolve compatibility issue on torch end (#290)

* Update Website (#291)

* website updates

* renaming tpm-website to website

* deploying via gh-pages

* changed from tpm-website to website

* deployed website

* copyright and team

* team headshots and footer

* edits to the pages

* website updates

* updated links

* updated homepage

* link updates

* mobile compatibility

* mobile adjustments

* navbar mobile updates

* whitespace edits

* homepage updates

* feature table

* website updates

* renaming tpm-website to website

* deploying via gh-pages

* changed from tpm-website to website

* edits to the pages

* website updates

* updated links

* updated homepage

* link updates

* mobile compatibility

* mobile adjustments

* navbar mobile updates

* homepage updates

* add table of features

* updated team page titles

* include flask in requirements.txt

* updates to table of features

* load pages from top

* fix to 404 issues

* moved build under website folder

* updates to package launch

* hyperlink ./setup.sh

* fix nav bar sizing and hamburger logo

* include preprint

* updates to "getting started"

* update team

---------

Co-authored-by: amytangzheng <amy.tang.zheng@gmail.com>

* update documentation for clarity and correct typos in positivity z-score and information exchange and liwc

* add demo notebook

* update notebook and add information to docs

* update documentation

---------

Co-authored-by: Shruti Agarwal <46203852+agshruti12@users.noreply.github.com>
Co-authored-by: amytangzheng <amy.tang.zheng@gmail.com>

* update check embeddings with tqdm loading bar and BERT tokenization update

* (1) allow BERT sentiments to be generated from the messages with punctuation, rather than the preprocessed messages; (2) batch BERT sentiment generation to make it more efficient; (3) add loading bar for generation of chat-level features

---------

Co-authored-by: Shruti Agarwal <46203852+agshruti12@users.noreply.github.com>
Co-authored-by: amytangzheng <amy.tang.zheng@gmail.com>
* website updates

* renaming tpm-website to website

* deploying via gh-pages

* changed from tpm-website to website

* deployed website

* copyright and team

* team headshots and footer

* edits to the pages

* website updates

* updated links

* updated homepage

* link updates

* mobile compatibility

* mobile adjustments

* navbar mobile updates

* whitespace edits

* homepage updates

* feature table

* website updates

* renaming tpm-website to website

* deploying via gh-pages

* changed from tpm-website to website

* edits to the pages

* website updates

* updated links

* updated homepage

* link updates

* mobile compatibility

* mobile adjustments

* navbar mobile updates

* homepage updates

* add table of features

* updated team page titles

* include flask in requirements.txt

* updates to table of features

* load pages from top

* fix to 404 issues

* moved build under website folder

* updates to package launch

* hyperlink ./setup.sh

* fix nav bar sizing and hamburger logo

* include preprint

* updates to "getting started"

* update team

* gh actions and custom domain

* deploy to custom url

* deploy to custom url

* updates to cname

* changes to cname

* cname updates

* testing github actions

* updates to github-actions-website

* testing github actions

* updates to gh actions

* updates to github-actions

* update home for testing gh actions

* updates CNAME

* update testing email

* updates username/email

* updates to email in github-actions-website

* testing gh actions for feature_dict

* testing github-actions feature_dict

* updates to github-actions-feature_dict

* Update github-actions-feature_dict.yaml

* testing updates to feature_dict.py

* testing feature_dict updates

* testing updates to feature_dict.py

* testing feature_dict deployment

* Update github-actions-feature_dict.yaml

* testing feature_dict updates

* testing updates to feature_dict.py

* updates to feature_dict

* updates to github actions feature_dict

* testing auto updates to feature_dict

* Update feature_dict.py

* testing feature_dict auto updates

* testing feature_dict auto updates

* Update feature_dict.py

* testing feature_dict auto updates

* remove commented code in feature_dict.py

* Delete src/team_comm_tools/filtered_dict.json

delete test json file

* Update github-actions-website.yaml to deploy on update to dev

* put 'dev' in quotes

* Update github-actions-feature_dict.yaml to update upon dev

* re-add filtered dict

---------

Co-authored-by: Xinlan Emily Hu <xehu@cs.stanford.edu>
Co-authored-by: Xinlan Emily Hu <xehu@wharton.upenn.edu>
* website updates

* renaming tpm-website to website

* deploying via gh-pages

* changed from tpm-website to website

* deployed website

* copyright and team

* team headshots and footer

* edits to the pages

* website updates

* updated links

* updated homepage

* link updates

* mobile compatibility

* mobile adjustments

* navbar mobile updates

* whitespace edits

* homepage updates

* feature table

* website updates

* renaming tpm-website to website

* deploying via gh-pages

* changed from tpm-website to website

* edits to the pages

* website updates

* updated links

* updated homepage

* link updates

* mobile compatibility

* mobile adjustments

* navbar mobile updates

* homepage updates

* add table of features

* updated team page titles

* include flask in requirements.txt

* updates to table of features

* load pages from top

* fix to 404 issues

* moved build under website folder

* updates to package launch

* hyperlink ./setup.sh

* fix nav bar sizing and hamburger logo

* include preprint

* updates to "getting started"

* update team

* gh actions and custom domain

* deploy to custom url

* deploy to custom url

* updates to cname

* changes to cname

* cname updates

* testing github actions

* updates to github-actions-website

* testing github actions

* updates to gh actions

* updates to github-actions

* update home for testing gh actions

* updates CNAME

* update testing email

* updates username/email

* updates to email in github-actions-website

* testing gh actions for feature_dict

* testing github-actions feature_dict

* updates to github-actions-feature_dict

* Update github-actions-feature_dict.yaml

* testing updates to feature_dict.py

* testing feature_dict updates

* testing updates to feature_dict.py

* testing feature_dict deployment

* Update github-actions-feature_dict.yaml

* testing feature_dict updates

* testing updates to feature_dict.py

* updates to feature_dict

* updates to github actions feature_dict

* testing auto updates to feature_dict

* Update feature_dict.py

* testing feature_dict auto updates

* testing feature_dict auto updates

* Update feature_dict.py

* testing feature_dict auto updates

* remove commented code in feature_dict.py

* Delete src/team_comm_tools/filtered_dict.json

delete test json file

* Update github-actions-website.yaml to deploy on update to dev

* put 'dev' in quotes

* Update github-actions-feature_dict.yaml to update upon dev

* re-add filtered dict

* update packages for website

---------

Co-authored-by: amytangzheng <amy.tang.zheng@gmail.com>
* Update package-lock.json

* Update package.json
* address #306

* fix hedges reference and update dictionary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants