No project description provided
Project description
Get Papers List(Aganiths_Intern_task)
This project fetches research papers from PubMed based on a query, filters out non-academic authors, and generates a CSV file with relevant details.
Project Organization
project/
├── get_papers/
│ ├── fetch_papers.py # Module to fetch and filter papers
├── scripts/
│ ├── get_papers_list.py # Command-line program to use the module
├── tests/ # Directory for test cases
├── README.md # Project documentation
├── pyproject.toml # Poetry configuration
├── dist/ # Generated distribution files for publishing
Installation
- Clone the repository:
git clone https://github.com/Vighnesh-M-S/Aganitha_Intern_task cd Aganitha_Intern_task
- Install dependencies:
poetry install
Usage
- Run the command-line program to fetch papers and generate a CSV file:
poetry run python3 scripts/get_papers_list.py "<search_query>" -f <output_file> -d
Command-Line Arguments
| Argument | Description | Example |
|---|---|---|
| query | Search query for PubMed | "cancer research" |
| -f, --file | Output filename for CSV | "output.csv" |
| -d, --debug | Enable debug output | N/A |
- Example:
poetry run python3 scripts/get_papers_list.py "cancer treatment" -f results.csv -d
Output Format
The generated CSV file will have the following columns:
| Column Name | Description |
|---|---|
| PubmedID | Unique identifier for the paper |
| Title | Title of the paper |
| Publication Date | Date the paper was published |
| Non-academic Author(s) | Names of authors affiliated with non-academic institutions |
| Company Affiliation(s) | Names of pharmaceutical/biotech companies |
| Corresponding Author Email | Email address of the corresponding author |
Tools and Libraries Used
The following tools and libraries are used in this project:
- Python: The programming language used to develop the script.
- Poetry: For dependency management and packaging. Link
- Requests: To fetch data from the PubMed API. Link
- Pandas: For data manipulation and CSV generation. Link
- Argparse: For command-line argument parsing. Link
Publishing the Module
The module can be published to Test PyPI using the following steps:
Build the package:
poetry build
Upload to Test PyPI:
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
For more information, refer to the Test PyPI Guide.
Troubleshooting
- Ensure you have an active internet connection to access the PubMed API.
- If you encounter authentication issues while uploading to Test PyPI, verify your token and credentials.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aganitha_intern_task-0.1.0.tar.gz.
File metadata
- Download URL: aganitha_intern_task-0.1.0.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27ad05fcf095bc8bc9bf66c63e9a083f33c7568ab0d872a1d3d954ad0f3d087e
|
|
| MD5 |
095f70fc098010da1aeb0031af6b7a2c
|
|
| BLAKE2b-256 |
175b20c5eb34078ccfc9b06ac17bbc723a64cfe8f97f90d3312f70c4380f3cf6
|
File details
Details for the file aganitha_intern_task-0.1.0-py3-none-any.whl.
File metadata
- Download URL: aganitha_intern_task-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
944fb39b451613dccb71cb47f7f050a1d008522749f5c278eb1b8d8c345243fe
|
|
| MD5 |
1fd118233b4403a8e493d7e28dd3bf5f
|
|
| BLAKE2b-256 |
50121bdb40c1175ca3e855733cd0d4c8ef2a005ae92275d57bef8734c533b545
|