Short description of your project.
- Clone the repository:
git clone https://github.com/yourusername/abstract-retriever.git- Navigate to the project directory:
cd abstract-retriever2.Create and activate a virtual environment:
python -m venv env
source env/bin/activate # On macOS/Linux
.\env\Scripts\activate # On Windows- Install dependencies:
pip install -r requirements.txtFor parsing some abstracts, you need to use chromedriver. if you want to us that install chromedriver and pass along its path as an environmental variable when you start the app.
brew install chromedriver
find the path to chromedriver
which chromedriver
Have an environmental variable for chrome driver path, or when you launch the app or service etc.
CHROMEDRIVER_PATH='/path/to/chromedriver' python example.py
example, using the ptw that is mentioned later
CHROME_DRIVER_PATH=/opt/homebrew/bin/chromedriver ptw tests/abstract_parsers/test_journals_physiology_parser.py abstract_retriever/ -nv
copy .env file and add your apy keys to it
cp .env.example .envget_abstract("https://www.sciencedirect.com/science/article/abs/pii/S1005030224000446")get_abstract("https://doi.org/10.1016/j.jmst.2023.12.007")get_abstract_from_doi("10.1016/j.jmst.2023.12.007")If you want to see it in action, you can start the gradio app.
You will need gradio
pip install gradioYou can check serch syntax here
python example.pyor if you want to develop the example and reload the app when you change the code, you can start it with:
gradio example.pyptw (pytest-watch) is a tool that automatically runs your tests whenever your code changes. This is useful for maintaining a fast development workflow and ensuring that your tests are always up-to-date.
You can install ptw using pip:
pip install pytest-watchUsage Once installed, you can use ptw from the command line to watch your project directory for changes and automatically run your tests:
ptwIf you for instance wish to just watch one test file while you are working on the parsers code you could do this, so as not having to run all tests when working on one particular parser.
ptw tests/abstract_parsers/test_science_direct_parser.py abstract_retriever/abstract_parsers -nvContributions are welcome! Please follow these guidelines:
Fork the repository Create your feature branch (git checkout -b feature/your-feature) Commit your changes (git commit -am 'Add some feature') Push to the branch (git push origin feature/your-feature) Create a new Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.