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

Add drf opportunities #266

Merged
merged 48 commits into from
Oct 11, 2022
Merged

Add drf opportunities #266

merged 48 commits into from
Oct 11, 2022

Conversation

Enzyme3
Copy link
Contributor

@Enzyme3 Enzyme3 commented Jun 16, 2022

Fixes #220

Apologies... not sure why all the previous commits are listed out here - tried squashing them but doesn't seem to work. I'll try to fix it before raising any other PRs.

Changes

  • added backend schema
  • created /opportunities endpoint to list all opportunities
  • re: tools/technologies, I just renamed the attribute/table to skills
    • do we need to split out the languages/tools/tech individually? I feel like that's an arbitrary distinction as regardless of what it is, an opportunity will list it and specify whether it is a required or preferred skill to have. LMK if otherwise
# sample response
[
    {
        "id": "1ad0916e-89f2-40d7-8d5a-1713a812a32b",
        "skills": [
            {
                "id": "92df2b94-ed1e-44cc-a664-4f80149c39f0",
                "is_required": true,
                "name": "Python"
            },
            {
                "id": "c56a5f44-fcbf-45e9-a14e-e2d672fc7080",
                "is_required": false,
                "name": "Django"
            }
        ],
        "experience_level": "Trained",
        "title": "Backend developer needed for super fun oppp!",
        "description": "come build some backends with us in django",
        "poster": "[[email protected]](mailto:[email protected])",
        "hours_per_week": 8,
        "num_positions_available": 2,
        "posted_date": "2022-05-12",
        "project": {
            "id": "e080d5be-52d8-4dd4-aff5-8ac5f5d21c84",
            "name": "CivicTechJobs",
            "description": "CivicTechJobs helps technology practitioners interested in having civic impact to find job opportunities from a central hub of listings",
            "recurring_events": [
                {
                    "name": "CivicTechJobs Weekly All Hands",
                    "day_of_week": "Wednesday",
                    "start_time": "17:00:00",
                    "duration_in_minutes": 60,
                    "roles": [
                        {
                            "id": "36a18961-101e-4808-8f7d-24f143fcbb27",
                            "name": "All"
                        }
                    ]
                },
                {
                    "name": "CivicTechJobs Developer Meeting",
                    "day_of_week": "Wednesday",
                    "start_time": "18:00:00",
                    "duration_in_minutes": 30,
                    "roles": [
                        {
                            "id": "eb4ca87e-a8d0-4118-b4c2-22b8eb5d86c2",
                            "name": "Backend Developer"
                        },
                        {
                            "id": "6e8711bf-6e24-4e6c-b2c2-e542e8616324",
                            "name": "Frontend Developer"
                        }
                    ]
                },
                {
                    "name": "CivicTechJobs UI/UX Meeting",
                    "day_of_week": "Wednesday",
                    "start_time": "18:00:00",
                    "duration_in_minutes": 45,
                    "roles": [
                        {
                            "id": "8ab6bd23-3e55-436a-b678-2f9649487cd5",
                            "name": "UI/UX Designer"
                        }
                    ]
                }
            ]
        },
        "role": {
            "id": "eb4ca87e-a8d0-4118-b4c2-22b8eb5d86c2",
            "name": "Backend Developer"
        }
    },
...

To see in action, bring up app via docker compose and access endpoint via http://localhost:8000/api/v1/opportunitites/

To load sample data, run docker compose run django python manage.py loaddata test_data.yaml

Kevin Park and others added 30 commits April 29, 2022 06:17
…d .gitignore lines and rename compose for staging
* Update app/config/settings.py

Co-authored-by: Kevin Park <[email protected]>
Co-authored-by: Ava Li <[email protected]>
…nd-formatter

Add pre commit for python linter and formatter
* added new libraries

* added notes to documentation

* added preliminary tests and gha

* added user interaction lib

* added async tests

* added note to self

* updated tests

* added transition library

* added new library to better support transitions

* finished writing tests for landing page

* reorganized test files

* moves test files to new location

* moved file mocks

* testing new tab width

* corrected lint

* added custom extension to mkdocs

* added credit for source code

* streamlined dockerfile

* removed start lines

* configured dockerfile

* wrote test architecture info to docs

* lint fixes

* reverted readme indents

* empty commit

* test

* test

* lint errors

* lint fixes

* added alt text

* added dev-branch to linter
* renamed components

* added new custom linter

* added a11y linter to GHA

* shortened code

* linting entire codebase

* configured linter settings

* rewrote config in yml format

* testing

* added defaults for eslint

* copied over default lint configs

* testing linter

* testing linter

* testing

* added axe-react to test code

* fixed accessibility errors

* corrected for accessible tabbing

* added wrapper for onenter events

* added on key wrapper function for events

* cleaned comments

* separated dialog backdrop from component

* fixed tests

* added documentation on accessibility testing

* added links to documentation

* corrected for linter

* pooled resources to all be in mkdocs

* reverted lint configs

* added template credits
* added react 18 and updated dependencies

* opened react in strictmode

* fixed dialog error due to batched rerendering

* added transition ref for findDomNode deprecation

* added useeffect to better handle state setting
* simplified landing page intro

* adjusted sizes to add background

* adjusted landing backgrounds

* adjusted css

* added tests

* linter fixs
Aveline-art and others added 16 commits June 16, 2022 21:13
* added doc notes

* added options to svgr

* created svgWrapper

* wrapped svgs for built in accessibility
* completed first draft

* moved svgs to dedicated directories

* addec checkboxes svgs

* adding state for checkbox

* configured checkbox colors

* adjusted checkbox parent element

* created rudamentary checkbox

* added background hover

* corrected for accessibility

* completed component

* removed checkbox role for parent

* simplified accessibility

* refactored code

* adjusted event listeners

* fixed hidden label prop

* corrected focus

* started checkbox tests

* added tests
* created first draft of textfield

* fixed checkbox pointer rules

* added new icons

* created textfield with icons

* updated demo to showcase icon toggle

* replaced eye closed icon

* lint changes

* lint corrections

* added change callback for inputs

* added tests

* added type prop

* updated tests
…d .gitignore lines and rename compose for staging
@Enzyme3 Enzyme3 changed the base branch from main to dev-branch-1 June 16, 2022 21:24
@Enzyme3
Copy link
Contributor Author

Enzyme3 commented Jun 16, 2022

not sure why the linting is failing
Error #1 points to a linter.yml file
And error #2 points to a css file

neither has been touched/modified. Were some extra linting rules enabled?

@Aveline-art
Copy link
Member

@Enzyme3 Feel free to ignore the linting error for now. It probably resulted from the way the branching was done.

@Enzyme3 Enzyme3 requested a review from Aveline-art September 14, 2022 01:03
Copy link
Member

@Aveline-art Aveline-art left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll need some time to do a full review, but here's a quick note you might want to take a look at.

I'm assuming this was a result of whatever happened with your branch?

Comment on lines 48 to 56
COMMON_MIDDLEWARE = [
"django.middleware.security.SecurityMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
]

MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change broke the Django server.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, looks like the ] somehow got dropped. Added it, and re-ran the linter which also changed the single quotes

Copy link
Member

@Aveline-art Aveline-art left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me! Thanks for working on this!

@Aveline-art Aveline-art merged commit 934f4d0 into hackforla:dev-branch-1 Oct 11, 2022
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.

Create Backend Schema in DRF
2 participants