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

♻️ refactor(project): Refactor tests and models, update dependencies #11

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

nmunatsibw
Copy link

No description provided.

… add linting and CI

This commit is carrying out several changes:
- Removed an unnecessary test for user assignment in `edc_data_manager/tests.py` and incorporated user existence validation within the save method of DataActionItem model in `edc_data_manager/models.py`. This change improves the clarity and efficiency of user related tests and ensures any attempt to assign a non-existent user is promptly validated and not allowed.
- Updated the dependencies listed in `requirements.txt` to newer and/or more suitable versions or source references, thus ensuring the application uses up-to-date and reliable libraries.
- Removed unused import from `edc_data_manager/apps.py` and refactored the `ready` method to its minimal definition as its earlier functionality (`data_action_item_on_post_save` signal) is no longer needed.
- Updated GitHub actions and build status badges on `README.md` to reflect the current state of the project.
- Created a new GitHub actions workflow (`django.yml`) for continuous integration, which helps in automatically checking the integrity of new commits.
- Added new file `.flake8` for linting configuration; helps improve code quality by enforcing coding style.
- Minor adjustments on `edc_data_manager/model_wrappers/data_action_item_model_wrapper.py` for better compliance with updated packages and/or coding style.
README badges for build status and code coverage were updated to match the current project repository urls. This change is significant because it correctly reflects the build and coverage status of the current project instead of the old repository.
Switched the pip install command to use the general 'requirements.txt' instead of the 'requirements_production.txt'. Also, modified the Flake8 Lint workflow to point at the 'edc-data-manager' directory instead of 'potlako'. This update aligns the workflow with the correct dependency file and ensures linting is run against the primary project directory.
Adjusted the path for the Flake8 Lint run command in the Github workflow file 'django.yml' from the specific 'edc-data-manager' directory to cover the entire workspace, ensuring linting is performed across all code included in the repository, not limited to just the 'edc-data-manager' directory. Now, it is working in a more comprehensive manner.
Adjusted the path for the Flake8 Lint run command in the Github workflow file 'django.yml' from the specific 'edc-data-manager' directory to cover the entire workspace, ensuring linting is performed across all code included in the repository, not limited to just the 'edc-data-manager' directory. Now, it is working in a more comprehensive manner.
Adjusted the path for the Flake8 Lint run command in the Github workflow file 'django.yml' from the specific 'edc-data-manager' directory to cover the entire workspace, ensuring linting is performed across all code included in the repository, not limited to just the 'edc-data-manager' directory. Now, it is working in a more comprehensive manner.
Added comprehensive tests in the edc_data_manager app to ensure validation of data action items. These tests include validating users' first and last names, assigning valid users, and email functionalities such as handling nonexistent users and sending emails.

Moreover, configurations for an SMTP email backend have been added to the settings.py file to facilitate sending emails in the edc_data_manager app. Including default email sender information.

These changes aim to improve codebase robustness and ensure better user management and communication in our system.
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.

1 participant