Skip to content

Commit 8be2acb

Browse files
Refactor dev dependencies and update installation steps
Renamed `requirements.txt` to `requirements-dev.txt` and moved development dependencies to an `extras_require` block in `setup.py`. Updated the README with instructions for installing development dependencies and clarified their purpose. This refactoring improves dependency management and developer onboarding.
1 parent c85c328 commit 8be2acb

File tree

3 files changed

+41
-5
lines changed

3 files changed

+41
-5
lines changed

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ A **Python implementation** of the Generalized Sequence Pattern (GSP) algorithm
2121
- [What is GSP?](#what-is-gsp)
2222
- [Requirements](#requirements)
2323
- [Installation](#installation)
24+
- [Developer Installation](#developer-installation)
2425
- [Usage](#usage)
2526
- [Planned Features](#planned-features)
2627
- [Contributing](#contributing)
@@ -76,6 +77,17 @@ pip install gsppy
7677

7778
---
7879

80+
## 🛠️ Developer Installation
81+
82+
For contributors and developers, GSP-Py provides additional dependencies for development purposes (e.g., testing and linting).
83+
84+
To install the package along with development dependencies, use:
85+
```bash
86+
pip install .[dev]
87+
```
88+
89+
The `dev` category includes tools such as `pytest`, `pylint`, and others to ensure code quality and maintainability.
90+
7991
## 💡 Usage
8092

8193
The library is designed to be easy to use and integrate with your own projects. Below is an example of how you can configure and run GSP-Py.
@@ -97,6 +109,15 @@ Import the `GSP` class from the `gsppy` package and call the `search` method to
97109
```python
98110
from gsppy.gsp import GSP
99111

112+
# Define the input data
113+
transactions = [
114+
['Bread', 'Milk'],
115+
['Bread', 'Diaper', 'Beer', 'Eggs'],
116+
['Milk', 'Diaper', 'Beer', 'Coke'],
117+
['Bread', 'Milk', 'Diaper', 'Beer'],
118+
['Bread', 'Milk', 'Diaper', 'Coke']
119+
]
120+
100121
# Minimum support set to 30%
101122
min_support = 0.3
102123

@@ -127,6 +148,10 @@ We are actively working to improve GSP-Py. Here are some exciting features plann
127148
2. **Support for Preprocessing and Postprocessing**:
128149
- Add hooks to allow users to transform datasets before mining and customize the output results.
129150

151+
3. **Support for Time-Constrained Pattern Mining**:
152+
- Extend GSP-Py to handle temporal datasets by allowing users to define time constraints (e.g., maximum time gaps between events, time windows) during the sequence mining process.
153+
- Enable candidate pruning and support calculations based on these temporal constraints.
154+
130155
Want to contribute or suggest an improvement? [Open a discussion or issue!](https://github.com/jacksonpradolima/gsp-py/issues)
131156

132157
---
@@ -135,6 +160,11 @@ Want to contribute or suggest an improvement? [Open a discussion or issue!](http
135160

136161
We welcome contributions from the community! If you'd like to help improve GSP-Py, read our [CONTRIBUTING.md](CONTRIBUTING.md) guide to get started.
137162

163+
Development dependencies (e.g., testing and linting tools) are included in the `dev` category in `setup.py`. To install these dependencies, run:
164+
```bash
165+
pip install .[dev]
166+
```
167+
138168
### General Steps:
139169
1. Fork the repository.
140170
2. Create a feature branch: `git checkout -b feature/my-feature`.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1+
-e .
12
pylint==3.2.6
23
pytest==8.3.4
34
pytest-benchmark==5.1.0
4-
pytest-cov==6.0.0
5+
pytest-cov==6.0.0

setup.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,16 @@
2222
packages=find_packages(exclude=['test_']),
2323
python_requires='>=3.11',
2424
install_requires=[
25-
'pylint==3.2.6',
26-
'pytest==8.3.4',
27-
'pytest-benchmark==5.1.0',
28-
'pytest-cov==6.0.0',
25+
# No additional runtime dependencies are required since the project uses standard library modules only.
2926
],
27+
extras_require={
28+
'dev': [
29+
'pylint==3.2.6',
30+
'pytest==8.3.4',
31+
'pytest-benchmark==5.1.0',
32+
'pytest-cov==6.0.0',
33+
],
34+
},
3035
classifiers=[
3136
'Programming Language :: Python :: 3.11',
3237
'Operating System :: OS Independent',

0 commit comments

Comments
 (0)