Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Codecov Coverage

on:
push:
branches-ignore:
- 'main'
workflow_dispatch:

jobs:
running_tests:
runs-on: ubuntu-20.04
strategy:
max-parallel: 4
matrix:
python-version: [3.10.5]
fail-fast: [false]

steps:
- uses: actions/checkout@v3
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
6 changes: 5 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,19 @@ jobs:

# Check if the current version is already on PyPI
- name: Check version on PyPI
id: version_check
run: |
python check_version.py # This script now checks against real PyPI
python check_version.py
continue-on-error: true

# Build the package (folder exclusion is handled by MANIFEST.in)
- name: Build package
if: steps.version_check.outputs.version_exists != 'true'
run: |
python setup.py sdist bdist_wheel

- name: Upload to PyPI
if: steps.version_check.outputs.version_exists != 'true'
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
Expand Down
40 changes: 26 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,28 @@

![Tests](https://github.com/adamspd/django-appointment/actions/workflows/tests.yml/badge.svg)
![Published on PyPi](https://github.com/adamspd/django-appointment/actions/workflows/publish.yml/badge.svg)
[![PyPI version](https://badge.fury.io/py/django-appointment.svg)](https://badge.fury.io/py/django-appointment)
[![codecov](https://codecov.io/gh/adamspd/django-appointment/branch/main/graph/badge.svg?token=ZQZQZQZQZQ)](https://codecov.io/gh/adamspd/django-appointment)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![GitHub commit activity](https://img.shields.io/github/commit-activity/m/adamspd/django-appointment)](https://github.com/adamspd/django-appointment/commits/main)
[![GitHub last commit](https://img.shields.io/github/last-commit/adamspd/django-appointment)](https://github.com/adamspd/django-appointment/commit/main)
[![GitHub issues](https://img.shields.io/github/issues/adamspd/django-appointment)](https://github.com/adamspd/django-appointment/issues)
[![GitHub pull requests](https://img.shields.io/github/issues-pr/adamspd/django-appointment)](https://github.com/adamspd/django-appointment/pulls)
[![GitHub contributors](https://img.shields.io/github/contributors/adamspd/django-appointment)](https://github.com/adamspd/django-appointment/graphs/contributors)

⚠️ **IMPORTANT**: Version 2.1.0 introduces significant database changes. Please read
the [migration guide](https://github.com/adamspd/django-appointment/tree/main/migration_guide_v2.1.0.md) before
the [migration guide](https://github.com/adamspd/django-appointment/tree/main/migration_guides/latest.md) before
updating.

Django-Appointment is a Django app engineered for managing appointment scheduling with ease and flexibility. It enables
users to define custom configurations for time slots, lead time, and finish time, or utilize the default values
provided. This app proficiently manages conflicts and availability for appointments, ensuring a seamless user
experience.

Detailed documentation can be found in the [docs](https://github.com/adamspd/django-appointment/tree/main/docs)
directory.
For changes and migration information, please refer to the release
notes [here](https://github.com/adamspd/django-appointment/tree/main/release_notes.md).
Detailed documentation can be found in
the [docs' directory](https://github.com/adamspd/django-appointment/tree/main/docs).
For changes and migration information, please refer to the [release
notes](https://github.com/adamspd/django-appointment/tree/main/release_notes/latest.md).

## Features ✨

Expand All @@ -29,7 +37,7 @@ notes [here](https://github.com/adamspd/django-appointment/tree/main/release_not

- **Database Changes ⚠️**: Significant modifications to the database schema. Before updating, ensure you follow the
migration steps outlined in
the [migration guide](https://github.com/adamspd/django-appointment/tree/main/migration_guide_v2.1.0.md).
the [migration guide](https://github.com/adamspd/django-appointment/tree/main/migration_guides/latest.md).

1. Introduced a staff feature allowing staff members in a team or system to manage their own appointments.
2. Implemented an admin feature panel enabling staff members and superusers (admins) to manage the system.
Expand All @@ -40,13 +48,16 @@ notes [here](https://github.com/adamspd/django-appointment/tree/main/release_not
working hours, and buffer time between appointments. However, only admins have the privilege to add/remove services.

### Breaking Changes in version 2.1.0:

- None

### New Features 🆕
See the [release notes](release_notes.md#Updates) for more information.

See the [release notes](docs/release_notes/latest.md#Updates) for more information.

### Fixes 🆕
See the [release notes](release_notes.md#Bug-Fixes) for more information.

See the [release notes](docs/release_notes/latest.md#Bug-Fixes) for more information.

## Quick Start 🚀

Expand Down Expand Up @@ -83,8 +94,7 @@ See the [release notes](release_notes.md#Bug-Fixes) for more information.
```

If you're utilizing the default Django user model, there's no need to add this line since Django automatically sets
it
to:
it to:

```python
AUTH_USER_MODEL = 'auth.User'
Expand All @@ -106,8 +116,7 @@ See the [release notes](release_notes.md#Bug-Fixes) for more information.
```

And the current year is 2023, the password will be "Chocolates2023". If `APPOINTMENT_WEBSITE_NAME` is not provided,
the
default value is "Website", rendering the password as "Website2023".
the default value is "Website", rendering the password as "Website2023".

This name is also utilized in the footer of the emails sent to clients upon scheduling an appointment:

Expand All @@ -127,8 +136,7 @@ See the [release notes](release_notes.md#Bug-Fixes) for more information.
## Customization 🔧

1. In your Django project's `settings.py`, you can override the default values for the appointment scheduler. More
information regarding available configurations can be found in the
documentation [here](docs/README.md#configuration).
information regarding available configurations can be found in the [documentation](docs/README.md#configuration).
2. Modify these values as needed for your application, and the app will adapt to the new settings.
3. For further customization, you can extend the provided models, views, and templates or create your own.

Expand All @@ -140,3 +148,7 @@ directory or visit the GitHub repository for more information.
## Notes 📝⚠️

Currently, the application does not send email reminders yet.

## About the Author

Adams Pierre David - [Website](https://adamspierredavid.com/)
7 changes: 7 additions & 0 deletions appointment/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
__author__ = "Adams Pierre David"
__author_email__ = "adamspd.developer@gmail.com"
__author_website__ = "https://adamspierredavid.com/"
__description__ = "Managing appointment scheduling with customizable slots, staff features, and conflict handling."
__package_name__ = "django-appointment"
__url__ = "https://github.com/adamspd/django-appointment"
__version__ = "2.1.1"
13 changes: 10 additions & 3 deletions check_version.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
import requests
from appointment import __version__, __package_name__

package_name = "django-appointment"
current_version = "2.1.1"
package_name = __package_name__
current_version = __version__

response = requests.get(f"https://pypi.org/pypi/{package_name}/json")

version_exists = False

if response.status_code == 200:
released_versions = response.json()["releases"].keys()
if current_version in released_versions:
print(f"Version {current_version} already exists on PyPI!")
exit(1)
version_exists = True

# Output for GitHub Actions
print(f"::set-output name=version_exists::{version_exists}")
File renamed without changes.
File renamed without changes.
8 changes: 0 additions & 8 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
[metadata]
name = django-appointment
version = 2.1.1
description = Managing appointment scheduling with customizable slots, staff features, and conflict handling.
url = https://github.com/adamspd/django-appointment
author = Adams Pierre David
author_email = adamspd.developer@gmail.com
author_website = https://adamspierredavid.com/
readme = README.md
license = Apache License 2.0
classifiers =
Environment :: Web Environment
Expand Down
12 changes: 12 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
import setuptools

from appointment import __author__, __author_email__, __author_website__, __description__, __package_name__, __url__, \
__version__

with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()

setuptools.setup(
name=__package_name__,
version=__version__,
author=__author__,
author_email=__author_email__,
long_description=long_description,
long_description_content_type="text/markdown",
url=__url__,
description=__description__,
project_urls={
"Author Website": __author_website__,
},
)