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 Pre-commit Hooks for Code Formatting and Linting #79

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 0 additions & 2 deletions .github/workflows/auto-comment-on-closing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,3 @@ jobs:
issue_number: issueNumber,
body: greetingMessage
});


2 changes: 1 addition & 1 deletion .github/workflows/auto-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
const item = context.payload.issue || context.payload.pull_request;
const itemBody = item.body ? item.body.toLowerCase() : '';
const itemTitle = item.title.toLowerCase();

// Add gssoc label to all issues and PRs
await github.rest.issues.addLabels({
owner: context.repo.owner,
Expand Down
2 changes: 1 addition & 1 deletion .idea/ISRO_Mining_Site_FINAL_APP.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 32 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
repos:
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
language_version: python3 # Ensure it uses Python 3

# - repo: https://github.com/pycqa/flake8
# rev: 6.0.0
# hooks:
# - id: flake8
# additional_dependencies: [flake8-bugbear]

# For YAML files
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-yaml

# # For Markdown files
# - repo: https://github.com/markdownlint/markdownlint
# rev: v0.12.0
# hooks:
# - id: markdownlint

# For text files (trailing whitespace, end-of-file fixes, etc.)
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-merge-conflict
10 changes: 5 additions & 5 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ We are committed to maintaining a welcoming, inclusive, and harassment-free envi

## Our Values

1. **Respect and Kindness**
1. **Respect and Kindness**
We expect all members of the community to treat others with kindness and respect. Harassment, discrimination, and offensive language or behavior will not be tolerated. We believe that a community built on respect is essential for fostering collaboration and innovation.

2. **Collaboration and Support**
2. **Collaboration and Support**
The StarMine thrives on collaboration. If you encounter an issue or need assistance, don’t hesitate to reach out to others. Likewise, offer your help when you can. Encourage the exchange of ideas, and work together to improve the project.

3. **Constructive Feedback**
3. **Constructive Feedback**
Feedback is an essential part of our community’s growth. When giving or receiving feedback, be respectful and open-minded. Constructive criticism leads to better outcomes and helps improve both the project and the community as a whole.

4. **Inclusivity and Diversity**
4. **Inclusivity and Diversity**
We welcome contributions from individuals of all backgrounds and skill levels. The StarMine is a space for diverse perspectives, and everyone should feel empowered to contribute, learn, and share their ideas without fear of discrimination or exclusion.

5. **Professionalism**
5. **Professionalism**
We expect professionalism in all communications, whether they are issues, pull requests, or direct messages. Be mindful of your tone and ensure that interactions remain respectful and polite at all times.

## Expected Behavior
Expand Down
4 changes: 0 additions & 4 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,3 @@ Push the changes to your forked repository on GitHub:
Provide a clear description of the changes you've made.

7) **We will review your pull request and merge it**




2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ EXPOSE 8501

HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health

ENTRYPOINT ["streamlit", "run", "Home.py"]
ENTRYPOINT ["streamlit", "run", "Home.py"]
1,028 changes: 518 additions & 510 deletions EDA/EDA_ISRO_SPACE_MINING.ipynb

Large diffs are not rendered by default.

1,028 changes: 518 additions & 510 deletions EDA_ISRO_SPACE_MINING.ipynb

Large diffs are not rendered by default.

32 changes: 18 additions & 14 deletions Home.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,34 @@
layout="wide",
initial_sidebar_state="expanded",
)
# Adding selectboxes for user customization
# Adding selectboxes for user customization

# Sidebar content with advanced layout

with st.sidebar:
mining_importance = st.selectbox(
"🔧 **Select Mining Site Importance Level**",
options=["Low", "Medium", "High", "Critical"]
options=["Low", "Medium", "High", "Critical"],
)
distance_filter = st.selectbox(
"🌐 **Filter Sites by Distance**",
options=["< 100 light years", "100-500 light years", "500-1000 light years", "> 1000 light years"]
options=[
"< 100 light years",
"100-500 light years",
"500-1000 light years",
"> 1000 light years",
],
)
outlier_sensitivity = st.selectbox(
"🔍 **Adjust Sensitivity for Outlier Detection**",
options=["Low", "Medium", "High"]
options=["Low", "Medium", "High"],
)
st.title("🪐 **Galactic Mining Hub**")
st.subheader("Deep dive into the infinite cosmic sea!")
st.markdown(
"""
**Galactic Mining Hub** is a cutting-edge platform that leverages advanced
Machine Learning and Data Science techniques to revolutionize space mining
Machine Learning and Data Science techniques to revolutionize space mining
exploration. Dive deep into the cosmos to discover valuable mining sites
across the galaxy.
"""
Expand All @@ -41,9 +46,9 @@
"""
## 🚀 **Galactic Mining Hub**

This initiative is at the forefront of space exploration, aiming to identify
and evaluate mining sites on distant celestial bodies using sophisticated
AI algorithms. Developed to push the boundaries of what's possible in
This initiative is at the forefront of space exploration, aiming to identify
and evaluate mining sites on distant celestial bodies using sophisticated
AI algorithms. Developed to push the boundaries of what's possible in
extraterrestrial resource extraction.

**Developer:** [Devanik](https://www.linkedin.com/in/devanik/)
Expand All @@ -61,7 +66,6 @@
)



# Main content layout with a centered introduction and styled text
st.markdown(
"""
Expand All @@ -70,18 +74,18 @@
<h2><em>Explore, Analyze, and Discover Cosmic Mining Sites with Advanced AI</em></h2>
</div>
""",
unsafe_allow_html=True
unsafe_allow_html=True,
)

st.divider()

# Information and interactive section
st.markdown(
f"""
**Welcome to Galactic Mining Hub**, a premier platform that combines the power of
**Machine Learning** and **Data Science** to unlock the secrets of the universe.
Our hub provides a comprehensive toolkit for space mining analysis, from predictive
modeling to in-depth data insights, designed to support informed decision-making
**Welcome to Galactic Mining Hub**, a premier platform that combines the power of
**Machine Learning** and **Data Science** to unlock the secrets of the universe.
Our hub provides a comprehensive toolkit for space mining analysis, from predictive
modeling to in-depth data insights, designed to support informed decision-making
in the field of space exploration.

### **🚀 Prediction Model**
Expand Down
Loading
Loading